+ 1
is pseudocode important in making the actual code? because it is hard to read code same as writing code.
making it human readable
3 Respuestas
+ 4
Yes, pseudo codes are handy when it comes to coding. In JS, if var a = 2, var b = 3, to determine the smaller number, you don't go like this :
return (a < b) ? a : b
But, you go like this :
return Math.min(a, b)
You might see that using the first one is less complicated, but what if you have 5 variables to compare? You can simply use pseudo code and do Math.min(a, b, c, d, e).
+ 1
pseudocode is the foundation in coding style for me but it hard to convert to code....
+ 1
It's ok, jestoni. pseudo code is similar to brainstorming for writing a paper. It helps organize your thoughts and how to solve the problem at hand regardless of which programming language you use.
To can write good pseudo code, start from a broad perspective, get the very basics of your function or program down, once that's done, start from the beginning again and add a little more detail. I usually do about three or four iterations of that and eventually the pseudo code can get detailed enough to where you aren't writing a function from scratch but more like filling in the gaps and initializing variables.
Pseudo code is more problem-solving, than programming per se, but good pseudo code can look very similar to real code.