Hacker News new | ask | show | jobs
by zergov 1639 days ago
I like to trace down things in order.

For example, let say I'm working on an ecommerce system and I try to understand what happens when a buyer adds an item to its cart. I'm going to put logs / debugger's prompts on the important steps of that operation. Next to those, add a comment that describes why this step is important. The important thing is to label the comment with incrementing numbers. Those numbers allow me to keep track of the order of execution.

Finally, commit this to a dummy branch and share it with your co-workers if both of you are new to this code base.

That's one of the first thing I do when I jump in a new codebase. Pick something that interests you, and log the whole operation.