Tuesday, February 26, 2013

Code reading

Code reading

  • What is the best way to understand a feature OR a tool?
  • How to fix bugs reported against some feature/code?
  • How to learn, optimized techniques of implementing  algorithm?
  • How to be better at writing codes ?
and lot more such questions made me to look out for some directions to 'code reading'. 
The bottom line is 'learning' !

Here are some of the points I found,

  • Read Documentation
  • Read source code
  • Write Code and experiment
This can be further drilled down to,
  • Build and run it
  • Try to get an overview of what the code does.
  • Draw some flowcharts to understand the flow
  • Review
  • Use tools e.g. cscope/ctags
  • Understand unit tests, if possible try to write some
  • Present your understanding to peers
  • The best starting point could be open source project like coreutils on linux or less
  • Also talk to the developers who know the code well and correct your understanding.
In short its on-going and evolving process. Hope you are blessed with lot of patience! I am not
an expert at understanding code written by others(yet), but I have started on this path.

Cheers

Some good links, 


No comments: