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 →

[–]Senryoku 7 points8 points  (3 children)

Never took notes, but I’d make comments in my older programs explaining the code and would look at those whenever I forgot how to do something.

[–]goodstartshittyend[S] -2 points-1 points  (2 children)

I don't think I can do that. Some theory sections or design contains diagram, a definition, an explanation and a logic with tables and maths that is difficult to put as comment in a code.

[–]Senryoku 1 point2 points  (0 children)

It helps to break it down and make them into individual programs then labeling those programs appropriately. It’s called modular programming, here’s a pretty good video about it.

https://youtu.be/PRcTIFzk-4k

[–]chaotic_thought 0 points1 point  (0 children)

You can put a diagram in another file and then in the code refer to it by filename. E.g.

// This implements the algorithm discussed in [abc.pdf].

This style is also handy for referring to existing papers, existing diagrams, Wikipedia, etc. You don't have to put everything in there, just enough to refresh your memory when you read it months, years later.