0
Stuck when comming to code
Hello ive been coding for some years and i understand the code that people writes extremely good etc. But when it come to writing my self i get stuck and dont know where, how to start etc. Do anybody have some tips for this. Like i have a good understanding and a deep understanding what actually happens and i could explain code you give to me but when i just want to write i get stuck and dont know what i should create etc.
1 Answer
+ 3
Linkan Skinkan It all starts with having a project idea, some problem you want to solve with a program.
Next, list any constraints, usually on the form of inputs or the number of them.
EXAMPLES
You expect 6 numbers to be entered each time.
Or a line of characters to be entered repeatedly until a specific end sequence is entered.
Once you know the goal and any starting/ending conditions,
Try to work out how you would solve the problem by hand yourself without a computer.
Write down those steps you would take in simple sentences.
If you have any long sentences, look how you could break them down into smaller sentences.
You have just created pseudo-code.
Now starting with your input constraints, write those into actual code to read in your inputs.
Then write your pseudo-code sentences into actual code.
Possibly tweak your pseudo-code to fit what the programming language can do.
Finally write code to convert your variables into expected output.