What is Programming: Definition and 1000 Discussions

Computer programming is the process of designing and building an executable computer program to accomplish a specific computing result or to perform a specific task. Programming involves tasks such as: analysis, generating algorithms, profiling algorithms' accuracy and resource consumption, and the implementation of algorithms in a chosen programming language (commonly referred to as coding). The source code of a program is written in one or more languages that are intelligible to programmers, rather than machine code, which is directly executed by the central processing unit. The purpose of programming is to find a sequence of instructions that will automate the performance of a task (which can be as complex as an operating system) on a computer, often for solving a given problem. Proficient programming thus often requires expertise in several different subjects, including knowledge of the application domain, specialized algorithms, and formal logic.
Tasks accompanying and related to programming include: testing, debugging, source code maintenance, implementation of build systems, and management of derived artifacts, such as the machine code of computer programs. These might be considered part of the programming process, but often the term software development is used for this larger process with the term programming, implementation, or coding reserved for the actual writing of code. Software engineering combines engineering techniques with software development practices. Reverse engineering is a related process used by designers, analysts and programmers to understand and re-create/re-implement.

View More On Wikipedia.org
  1. ramzerimar

    MechE undergrad who also enjoys programming and eletronics?

    I'm now at the second year of my MechE course. Until now, I've taken basic classes in physics, calculus, linear algebra and basic computer programming. I choose to undergraduate in Mechanical Engineering because I'm aware that it is a good and broad degree and it's a field that I like also. It...
  2. R

    MHB Intro Programming: Computing Total Cost

    A drink costs 2 dollars. A taco costs 3 dollars. Given the number of each, compute total cost and assign to totalCost. Ex: 4 drinks and 6 tacos yields totalCost of 26. import java.util.Scanner; public class ComputingTotalCost { public static void main (String [] args) { int numDrinks...
  3. B

    Can I Program a Cell Phone Charger to Optimize Battery Life?

    Hi guys I'm not sure if this is the best place to post this but I couldn't find anywhere else. Would it be possible to program a cell phone charger to detect when a phone is at 20% and then it will start charging? But it won't start charging before 20%. Then it will charge it up to 99% and then...
  4. D

    Interesting Programming Puzzle

    You're in a Mars Lander. The planets gravity pulls you towards it at 3.711 m/s². (So at T(1) with 0 thrust your vertical velocity is -3.711). Your lander has 4 thrust settings: 0 m/s², 1 m/s², 2 m/s², 3 m/s², 4 m/s². Each of these use 0, 1, 2, 3 and 4 units of fuel per second respectively. Your...
  5. AndrewRibeiro

    26 Year Old Computer Scientist's First Physics Foray

    Hello lovers of Physics! It has long been one of my deepest darkest secrets that I have never formally studied physics. I've always felt ashamed of this because to me physics is one of the most elegant areas of human thought and I consider myself a decent thinker. I've decided as a new years...
  6. evinda

    MHB Solutions to Transport Problems Using Dynamic Programming

    Hello! (Wave)Suppose that we have $M$ production stations $A_1, \dots, A_M$ of a product and $N$ destination stations $B_1, \dots, B_N$ of the product. We suppose that $x_{ij}$ units of the product are transferred from $A_i$ to $B_j$ where $i=1, \dots, M, j=1, \dots, N$. The cost of...
  7. evinda

    MHB How do we use dynamic programming?

    Hello! (Wave) Could you explain to me how we can use dynamic programming in order to solve a non linear programming problem? What do we do for example if we are given the following problem? $$\max (y_1^3-11 y_1^2+40 y_1+y_2^3-8y_2^2+21 y_2) \\ y_1+y_2 \leq 5.4 \\ y_1, y_2 \geq 0$$
  8. tony873004

    Local web page programming on a Mac

    I'm used to Windows. I open notepad or wordpad and type <html> Hello world </html> and save it as a .txt file with an .html extension. How do I do this on a Mac? It seems the free included text editor is called textEdit. But it does not allow me to save as a simple txt file with an .html...
  9. Jarvis323

    Share Your Tricks for Satisfying Laziness in Your Programming

    People say the best programmers are 'lazy'. They don't like to waste time and they don't like to do monkey work. 'Lazy' programmers automate things, they use tools in wise ways to get things done easier and faster, they reuse code when appropriate, and they write code that's easy to modify...
  10. onion3000

    Programming HP 50g: Is There an Editor?

    Is there a programming editor on the HP 50g (like the TI programming systems)? I have been unable to find any information on this, so any help would be appreciated.
  11. jedishrfu

    Teaching Programming Skills via Math Concepts

    Got this for Christmas and its quite interesting to read: https://www.amazon.com/dp/0321942043/?tag=pfamazon01-20 The basic premise of the book is to explore the principles of generic programming, optimization and the mathematical concept of abstraction using traditional mathematical...
  12. S

    Would This be a Good Programming "Physics" Project?

    I have recently been doing a lot of programming in python for the past year or so, and consider myself to be okay with the language. I also have some experience with mathematical languages like the Wolfram language and Maple. Other than that, I am willing to learn C, C++, or Java for this...
  13. D

    Programs Computer Programming Advice for prospective Physics Majors

    Hello Everyone, I am a high school physics teacher seeking to give advice to students of mine that are interested in pursuing a physics major. I would imagine that if they want to do any undergraduate research then they better have some programming experience, because I can not imagine how they...
  14. evinda

    MHB Linear programming problem

    Hello! (Wave) I want to solve the linear programming problem: $\max (5x_1-4x_2) \\ -x_1+x_2 \geq -6 \\ 3x_1-2x_2 \leq 24 \\ -2x_1+3x_2 \leq 9 \\ x_1, x_2 \geq 0$ I have found that the solution is $\left(0, \frac{6}{5}, \frac{36}{5},0, \frac{99}{5} \right)$.. Am I right?
  15. evinda

    MHB Solving Linear Programming Problems Graphically

    The following linear programming problem is given and I want to solve it graphically. $$\max (x-y) \\ x+y \leq 4 \\ 2x-y \geq 2 \\ x,y \geq 0$$ I have drawed the lines : $$(\ell_1) x+y=4 \\ (\ell_2) 2x-y=2 \\ (\ell_3) x=0 \\ (\ell_4) y=0$$ as follows: I have drawed the line $2x-y=0$ taking...
  16. Dave Ritche

    Looping problem in C programming

    I know about For loops but i don't know how to solve a problem like this: A program in which a user wants to print a number for specific number of times but this is not initialized i mean user inputs it after the program is compiled?
  17. NicolasPan

    Fortran Fortran 90/95: Read a Function?

    Hello everyone! I've been wondering if it is possible in Fortran to 'read' a function.For instance when I code this: contains function f(x) double precision :: f double precision ::x f=(whatever the function) return end function end program It would be ideal if the program allowed...
  18. Ryaners

    Using Python to calculate projectile motion with resistance

    I'm trying to write a program to calculate the trajectory of a projectile with air resistance. I've made the following function which calculates the position of the particle based on a given launch angle and initial velocity: def traj_fr(angle, v0): #function that computes...
  19. Mastermind01

    What should I do next after completing an introductory programming course?

    Hello, So I'm in high school and I wanted to self-study programming. In summer I completed the course Introduction to Computer Science and Programming Using Python on edX . I really liked it. I was wondering what I should do next and from where? Should I learn a different language (C , C++ and...
  20. H

    What I need for image processing programming?

    I am new to image processing and going serious from now on (as part of my research). I am a Mac user. What program is the best for image processing? What the difference between Xcode and Microsoft Window Visual, which one is better and does OpenCV can works with both of them? What kind of...
  21. Stephanus

    Learning programming languages

    Dear PF Forum, I read this link That makes me think, "How, straight with C++, do we teach programming language to someone who never knows progamming language?"
  22. AliGh

    Engineering Discerete math and algebra books for programming majors

    Hi Im looking for discrete mathematics and algebra books to study. I want to enhance my understanding of algorithms and programming and i like discrete mathematics I'm reading Apostol for this semester's calculus (took a look at spivak too). Any book as good as them that will be useful for me ?
  23. D

    Comp Sci [JAVA GUI] Counting the trajectory of a projectile not shown

    Hello PFers, I'm trying to make a program in java which process user's position, initial velocity of the projectile and the elevation of the projectile and show the trajectory in GUI. The language is in java. The problem is, the trajectory won't show. It is supposed to show the player's...
  24. J

    Maple How Do You Input Formulas for Surface Area Calculations in Maple?

    I can't input this formula, z=(1+x^2)/(1+y^2) This is suppose to represent a function of surface of area with double integrals. I'm struggling inputting the codes into evaluate the equation. It would be convenient if help was given
  25. S

    Industrial automation programming

    In regards to programmable logic controllers (like http://ab.rockwellautomation.com/Programmable-Controllers or http://www.schneider-electric.com/en/product-category/3900-pac--plc---other-controllers) ladder, function block, and structured text are commonly used programming methods. As far as...
  26. NicolasPan

    Comp Sci Error while calculating arc length of curve in Fortran

    The program must calculate the length of the curve of ƒ=3.1*x^2-5.3/x between x=1/2 and x=3/2.The legth should be calculated as the sum of n line segments starting with n=1 and ending with n=20. I really can't find why the result I'm getting is wrong.Thanks in advance I am giving you the code...
  27. S

    Modern programming languages causing cognitive dissonance

    Anyone else experience extreme cognitive dissonance when learning modern programming languages? If so, have you visited a pschyiatrist about it? 1) Automatic type deduction. The idea that I can be too lazy to figure out the exact type returned from a function, and put var or auto in its place...
  28. The Eraser

    Programs Physics degree - careers that involve programming?

    What are the chances of working in IT if you have a physics degree?? How much do you have to work individually in order to gain the required programming knowledge?? Are there relevant courses you can take as a physics undergrad?? Do you learn any programming language that is relevant to the IT...
  29. NicolasPan

    Comp Sci Help with Fortran: Calculate Cos(x) from Equation

    Hello I was assigned the following problem:Make a Fortran program which will be able to read a degree[0-360] checking validity range(not type) and it will be able to calculate and print the cos(x) from the following equation: cos(x)=1-x^2/2! + x^4/4!-x^6/6!+x^8/8!-...,where x is in radiants.As a...
  30. S

    I overuse try-catches in my programming

    My applications seriously look like public void ExecuteCommand ( ) { // ... try { CompareLastTwo(); } catch ( Exception e ) { Console.WriteLine("Error: {0}", e.Message); } // ... } public void CompareLastTwo ( ) { // ... try...
  31. SnakeDoc

    C Programming: Arrays and pointers

    Homework Statement So I created two arrays one called departure_time and the other arrival_time and populate each array as follows. I've tried both putting 8 and defining N as 8 int departure_times[N]={480, 538, 679, 767, 840, 945, 1140, 1305}; int arrival_times[N]={616, 712, 811, 900, 968...
  32. cryora

    How much programming can you expect to do in the lab?

    It may be unique to my situation (or it may not, as I was told that AMO is one of the less computational fields of research in Physics), but for my undergraduate research assistant role, my job is to help the research group set up automated experimental controls. That includes learning: Python...
  33. AceTrainerBlue

    Should I Continue Taking Programming Classes?

    Hey, guys. I'm in the 11th grade. The current class that I'm taking right now is called "Computer Programming 11" which is an intro to programming. The entire course is spent learning how to use Microsoft Visual Basic which kinda disappointed me because I originally signed up to learn Python...
  34. NicolasPan

    Comp Sci Fortran 95 code won't run

    Homework Statement . [/B]Hello all ! I am currently trying to make my fortran95 code run in vain.I would really appreciate it if someone could lend my a hand since I am a starter in programming.So the problem goes like that:Create a program capable of calculating the following function: f(x)=1/x...
  35. O

    Bellman Equation, Dynamic Programming, state vs control

    Hi, I am proficient in standard dynamic programming techniques. In the standard textbook reference, the state variable and the control variable are separate entities. However, I have seen examples in economics, in which a single variable, let's say consumption, is both a state variable and a...
  36. S

    What is the optimal solution for constrained nonlinear programming problems?

    Homework Statement 1. Maximise ##x_1^2+(x_2-5)^2## subject to ##x_1 \geq 0, x_2 \geq 0## and ##2x_1+x_2 \leq 4##. 2. Minimise ##x_1^2+(x_2-5)^2## subject to ##x_1 \geq 0, x_2 \geq 0## and ##2x_1+x_2 \leq 4##. 3. Maximise ##2x_2^2-x_1## subject to ##x_1 \geq 0, x_2 \geq 0## and ##x_1^2+x_2^2...
  37. Feodalherren

    BS in ME, want to learn more programming

    Hello everyone, First a little history: I have one more year left after this semester until I finally get my BS in Mechanical Engineering. My GPA is 3.7 right now and I've taken all expect 1 of the hardest classes, I predict that I will be somewhere around 3.8 to 3.9 by the time I graduate. But...
  38. RooksAndBooks

    Avionics Programming Learning Materials?

    I'm an aspiring aerospace engineer. I know that Ada is a language used in many planes today, but I can't find anything to learn about Ada for avionics--I couldn't find books or tutorials. Do any of you guys have any recommendations on how to go about this? I'm very interested in teaching myself...
  39. A

    AI Seed Programming: Questions & Answers for Nick Bostrom's Superintelligence

    I read Nick Bostroms book "Superintelligence" but can't seem to find an answer to a question I have. I emailed Nick the following (though I'm sure he gets thousands of emails and will likely never respond): Firstly, thank you for the great read. :) My question is this: Why are you so certain...
  40. evinda

    MHB Exploring Canonical Form of Linear Programming

    Hello! (Wave) A linear programming problem is in canonical form if it's of the following form: $$\pm \max (c_1 x_1+ \dots + c_n x_n) , c_1, \dots, c_n \in \mathbb{R} \\ Ax=b, A \in F^{m \times n}, x=\begin{bmatrix} x_1\\ \dots\\ \dots \\ x_n \end{bmatrix}, b=\begin{bmatrix} b_1\\ \dots\\...
  41. S

    Nonlinear Programming and Consumer Preferences

    Homework Statement Consider a consumer with wealth ##w## who consumes two goods, which we shall call goods ##1## and ##2.## Let the amount of good ##\mathcal{l}## that the consumer consumes be ##x_{\mathcal{l}}## and the price of good ##\mathcal{l}## be ##p_{\mathcal{l}}##. Suppose that the...
  42. N

    Java Understanding basics of computer programming

    I am having some issues understanding the fundamentals of Java and OOP. In simplest terms possible with an example can you explain to me what an Object, Class and Method are? I am confused on what these actually are. Thank you
  43. evinda

    MHB What is the maximum of the given function in the closed square $D$?

    Hello! (Wave) We consider the function $f(x_1,x_2)=x_1+x_2$ and the (closed) square $D$ with edges $(0,0), (1,0), (1,1), (0,1)$. Check if $f$ has a maximum in $D$ and if so, find the points of $D$ at which this maximum is achieved.$$\max_{(x_1,x_2) \in D} (x_1+x_2)$$...
  44. H

    Help with spatial resolution conversion programming (bmp image)

    Hello guys. I want to ask something about simple spatial resolution manipulating just by using c language. I have done my programming below, it managed to be compiled but for some reasons the program stucked in the middle when I try to run it. Really hope you guys can help. I am extremely...
  45. N

    Comp Sci Java Error: "Type Mismatch" Explained

    I am programming in Eclipse and I keep seeing the error " Type mismatch: cannot convert from int to String", not only in the example I am going to provide but other programs. I've just started programming in Java. Could someone explain to me what this error exactly means? publicclassPracOne{...
  46. A

    C Programming - First assignment not sure how to approach

    Homework Statement Hi, I am currently in a C programming course and i have no background knowledge of programming whatsoever. The professor in my course isn't very good at explaining so I'm a bit lost here. (Please keep in mind, I am NOT asking anyone to do this for me. I would like to know a...
  47. D

    MHB Java Programming Boolean if-else statement

    Looking for some assistance with this. I've been messing with this for hours and can't seem to get it right. Some assistance would be greatly appreciated. What I have below is not correct. Material in green cannot be changed. Thanks!Print "Balloon" if isBalloon is true and isRed is false. Print...
  48. Steven Ellet

    Piet programming (python programming language )

    Where or how can I get Piet programming to to work on windows 10 I don't care how, only that I can program in Piet offline and NOT a trial. I have gone around the block and come so close to getting it, and then, something doesn't add up. The closest I have come to getting it to work is here...
  49. A

    Need Help Pursuing Career in Robotics

    Hello Everyone, I posted in Physics Forums back in 2011 trying to figure out what undergraduate Major to choose based off my interests. I had received very positive feedback then and am seeking more advice now that I am further along in my career. I am a recent undergrad graduate with a major...
  50. LittleMrsMonkey

    Programming languages in atmospheric physics

    I do know this is very vague and maybe a little bit dumb. But are there languages that are ,generally,used much more than others in atmospheric physics?Excluding meteorology. I put this thread in Academic Guidance because this question is translated to "What computer languages should I focus on...
Back
Top