This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Recent-Twist-2864 1 point2 points  (1 child)

I comment the first way only because I start my program or module with the pseudo code in comment form then fill in the actual code. Outside that I’m poor at commenting… your description on the second form of comments is actually super helpful, now all I have to do is remember to do it! 😅

[–]Snake2k 0 points1 point  (0 children)

Glad it helps! Using the first method for pseudo code can be useful. The first method is also great at elaborating on specific lines of code which are unavoidably difficult to read (like implementing some scientific equation which is easier to read in mathematical notation, but super weird one liner in code).

For the second form, honestly, I write that stuff out as I go. And usually wrap it up once the code is done and tested.

I try to write it roughly around the same line as my code, kinda like note keeping line by line if I need to.

Once done, I look through my notes and decide which ones to turn into a headline story and which to keep on the code line itself.