On grokking code

Don’t just read, copy and paste: drink up the thinking behind every concept you come across, that you may be richer for it.

Understand not only the outcome, but the decisions that can take you there.

Know not only what is done, but why and how else it could get done.

Doing things for oneself without looking at how others have done it is a good way to do this. Wilfully trying to do it different from others after seeing what they’ve done is anohter.

To know where the thinking takes place, what the thinking is, what decisions are made, and how they’re implemented is to grok a particular practice.

It is usually ill advised to change code you do not grok; it is far too common to have little time or knowledge to grok something. Writing good documentation and good tests is an aid for others, that they may grok your code.

You in some months is one of the others that will be aided, and will need to grok the ccode again.

Leave a Reply

Your email address will not be published. Required fields are marked *