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.
Hi,
I have some basic background in Python and was planning to self-learn more programming.
I was wondering if people here that have self-learnt programming in C/C++ and now using it for "real world" purposes (such as image analysis for BEC or data processing in particle physics) can share...
I decided to write my problem and attach as a separate document so that everything was included and would leave room here to discuss my problem.
From what I understand from the equations is that for each value of u I calculate the value of the basis function for each basis function i. Then...
Is it worth it to take an extra 10 courses (and thus a whole extra year) of computer science courses in university on top of my 4 year electrical engineering degree? If I want to work in the electrical engineering field, how useful will the knowledge gained from these courses be? I'm planning to...
hey I am doing a intro programming class and I am running into some problems. would really appreciate some help to see where I went wrong. Been trying to figure it out for hours now. Someone please help me out
These are my errors
c: In function ‘main’:
c:33:9: error: expected identifier or...
I'm having problem to solve this problem in DP:
Given 2 subsequences:
X = {x1, x2,..., xm} and Y = {y1, y2, ... , yn}
so `n <= m` and also `y1 <= y2 <= ... <= yn`.
The goal is to find a sub-sequence of `X` (xi1, xi2, ... , xin) such that:
sum(k is 1 to n) | xik - yk | is...
Hey, I'm a second year physics undergrad and I'm interested in doing research in quantum Physics after I graduate. I'm just wondering what programming language I should be focusing on to enable me to carry out such research I've done introductory courses for Mathematica, Matlab and C++ and so...
hello -
Do you know which programming languages have probability distributions available to use such as the binomial distribution (as an example).
I guess I would like to limit my questions if it's necessary to languages that are either free or cheap - no specialty math packages for...
This is a repost of an old thread, maybe some new members can give it a shot. This puzzle was included at the start of a casual IBM Fortran programming class for high school students back in 1969. (Yes, I'm that old). I don't know the origin of this puzzle.
An extremely simple and old...
Hi,
I've never programmed before but I recently downloaded the book "Programming from the Ground Up" and I plan to start studying it in 2012.
I've heard that many programmers who learn to program in Assembly don't see a need to use anything else besides this programming language. Is this...
Homework Statement
I'm trying to learn the Branch and Bound method. For that, I need to master the Dual Simplex Method (DSA). I have tried and tried and tried to google examples but can't find any. Does anyone know where I can find any?
How do you know the LPP has become infeasible with...
Can anyone recommend me a textbook that teaches you how to write simple physics models? I would like to take everything I learned this year in physics 1 and create a program for it since I'm also a comp sci major.
This is the best one I found so far but I'm not sure if it's exactly what I...
This semester while taking Linear Programming (Linear Optimization Models), we talked about using a linear program to separate two sets of points A and B. The general program is:
Max d
s.t.
yA ≥ axA+b+d
yB ≤ axB+b-d
It can be expanded into finding a polynomial that passes between the...
How do we solve optimization problems with infinite horizon. I tried to look online for some guidance but nothing but just problems and no solution methods. For example how can I solve:
maximize a_t \in[0,1]
\sum\frac{-2a_t}{3}+log(S_T)
where sum goes from 0 to T-1
subject to: s_t+1 = s_t...
Hi
I will get straight on to the problem. I want my RC servo motor to run when there is no light from 0-180 degrees and when there is light the motor should stop. I have made a program which reads the voltage from sensor and a program to generate PWM signal witha a timer sepraretly as a...
Homework Statement
I made this problem up as an example for a bigger problem I have to do. P = {(-2,4),(1,3)} and Q = {(-1,1),(0,0)}. I need to use linear programming to find the best line to go between them.
Homework Equations
Max d
subject to:
y_{i}≥ax_{i}+b+d (for all points above...
I need help to solve this coursework:
MATLAB PROGRAMMING COURSEWORK
OBJECTIVES:
Learn to solve engineering problems using MATLAB
Write Euler and Runge-Kutta initial-value ODE solvers
Write a Shooting Method boundary-value ODE solver
Investigate the properties of the solvers
...
I'm teaching myself C++ and am stuck on this VERY simple problem. I'm not sure what's wrong with my code.
The problem is from https://projecteuler.net/ if anyone is wondering.
Homework Statement
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9...
Hi all,
I'm stuck on a fortran line code where I have a doubt on its interpretation.
The line is the following:
-----------------------------------------
dimension F2(4,6,2), F3(5,7,2)
...
open(77,...)
read(77, '(4I3)') F2,F3
-----------------------------------------
the...
Homework Statement
Consider the standard form polyhedron {x | Ax = b, x>=0} , and assume that the rows of the
matrix A are linearly independent.
(a) Suppose that two different bases lead to the same basic solution. Show that the basic solution is degenerate (has less than m non-zero...
Homework Statement
min \frac{c^tx}{q^tx}
Ax \leq b
Homework Equations
Above problem is the example of Linear-fractional programming
This problem can be solved by bisection algorithm
Homework Equations
Do you have example of bisection algorithm for LF programming?
If...
A while back I made a post here:
https://www.physicsforums.com/showthread.php?t=536451
detailing how I got kicked out of grad school for physics and whether or not I can ever hope to get back in. Long story short, I decided to get a job for now and possibly go get a Master's in EE later...
Hi. I'm learning how to program in assembly to PICs and I'm stuck quite a while in a problem trying to figure out how to read an input value. I've been googling a lot and it seems that my code it's fine but as I'm beginning to learn I would like to know if any of you guys could tell me if its...
Hi guys,
straight to the point, how do you make your READ statement to be able to read both numbers and letters(words) or functions at the same time? okay, for example, i want the user to input a continuous function. what if the function is, let say, sin(x)? do i need to break the READ...
I'm well aware of all the Hangman codes that are out there given, but I feel that I will get a better understanding of this project if I did it myself with some help.
My main problem is knowing how to compare one character of array from a string text file. The text file consist of a whole...
hi guys,
so I'm in my third year at a UK university, studying Aerospace (Avionics mainly) Engineering.
We've covered some programming in different modules. Some Matlab, some Java, some C.
However, I'd like to start learning more thoroughly.
Which languages are used the most in...
Hey there,
(I apologize if this is in the wrong section - please move it if it is)
I'm an EE undergrad, and I'm wondering how much embedded software/programming is involved in fields like control and signal processing. To be a bit more specific, by "embedded software," I'm referring to...
My question is simple. And that is: How to find out the programming language used in creating the softwares that we use on our different platforms/architectures/instruction sets? Is there any method to find it? Is it necessary that all the windows based software use C/C++ to create softwares...
I've done a very small amount of C++, but I don't want to spend the time I have to prepare on learning a language when it would have been more preferable to learn another (even though it seems you may use several language, and learning one helps to learn another.)
But are there any language...
Dennis Ritchie died on the 8th, but I didn't find out until today. He created the C programming language.
http://www.wired.com/wiredenterprise/2011/10/dennis-ritchie/"
Please explain what this C code will do :
#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;
nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}
'The C Programming' Book says that this code counts characters but it doesn't do the same ...
I want to start learning Java programming,by myself. I got some PDF books. In the introduction, it talks about UML, but I find it complicated. I want to know whether it is a must to read the theory part, or I can just start on the practical part.
Homework Statement
Trying to maximize the profit of a farmer using dynamic optimization. Each period the farmer has a stock of seeds. He can plant them at a cost c per seed or sell them for p. Every seed that is planted produces \gamma seeds for next period. In period m there is no longer any...
Homework Statement
Write an application that inputs ten numbers from the user, each number can be between 10 and 100, inclusive. As each number is read in determine if it is a number already entered. If it is a duplicate move on to the next number, if it is unique store the number in the...
Homework Statement
I'm having trouble understanding dynamic programming as it relates to sequence alignments. I understand from my lecture notes that the scoring matrix used has arbitrary values (in our case +5 for match, -2 for mismatch, and -6 for gap). I therefore understand why square...
Can anyone please explain what is EOF in C programming language.
Is it a value (numeric, character) or something else ??
While reading the book "The C programming language", by Ritchie I came across this term. The code was :
#include <stdio.h>
/* copy input to output; 1st version */...
Homework Statement
Blacktop refining extracts minerals from ore mined at two different sites in Montana. Each ton of ore type 1 contains 20% copper, 20% zinc, and 15% magnesium. Each ton of ore type 2 contains 30% copper, 25% zinc, and 10% magnesium. Ore type 1 costs 90$ per ton, while ore...
(1) Let s be a complex number like s = a + b i, then we define \zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s}
Our aim:
to compute ζ(\frac{1}{2}+14.1347 i) with the help of the programming language Aribas
(2) Web Links
Aribas...
Hello,
I need help with the following:
"Let D be an N×N matrix. The element dij (i=1,…,N;j=1,…,N) of D is 1 if the sum of all the elements of the Pascal matrix of order i equals the sum of all the elements of Magic matrix of order j, and 0 otherwise.
Write a Matlab programme that...
Hi all,
Greetings.
This could be a basic question, and if it is, pardon me for my ignorance as I am a newbie to FORTRAN. I am trying to modify a FORTRAN code where I have added a subroutine (say SUB1) to calculate a variable, say (QX). What I did is to call this subroutine in another one...
I am taking Linear Programming and I haven't completed the course yet, but here is my question.
I've notice that all these problems could have been solved just as easily with Lagrange multipliers.
We got a bunch of linear inequality constraints and an obj function, we can use Lagrange...
Just like there's LaTeX for writing math papers and LaTeX editors to parse it, is there anything for writing papers in programming? Specifically a nice way to automatically format code.
Homework Statement
Choose the number \omega so that the following program has a solution. Then write down the optimal solution.
\begin{bmatrix}
-1 & 2 & 3 \\
2 & 3 & 1 \\
-5 & -4 & 1
\end{bmatrix}
x
=
\begin{bmatrix}
1 \\
5 \\
\omega
\end{bmatrix}
min=x_2
x\geq 0
Homework...
Homework Statement
Suppose we have a maximum LOP P
max z = c^t x
s.t.
Ax \leq b
x \geq 0
and the dual to P is
min w = b^t y
A^t y \geq c
y \leq 0
Then the bounds are
z = c^t x \leq y^t Ax \leq y^t b = b^t y = w
question
Okay where the heck did y^t Ax came...
Homework Statement
A small cargo ship leaving Hawaii for London has three holds for cargo. The forward hold has a capacity of 140 tons, and volume of 6,000 cubic feet; the central hold has a capacity of 800 tons, and a volume of 15,000 cubic feet; the aft hold has a capacity of 450tons and...
Homework Statement
Consider the following LOP P:
Max
z = 3x_1 + x_2 -\frac{1}{2}x_3
s.t.
2x_1 + x_2 + x_3 \leq 8
4x_1 + x_2 - x_3 \leq 10
x_1, x_2, x_3 \geq 0
1) Find a primal solution x and its objective value z = z(x)
2) What is the LOP D that is Dual to P?
3) Find a dual feasible...
I'm looking for what might be best for simulating various physical phenomena - some examples off the top of my head might be how to create an animation of a double-pendulum, or a system of 250 particles that are mutually interacting, confined within some box, in an arbitrary external field (like...