How do _you_ read the linux source?

Greg KH greg at kroah.com
Mon Apr 20 10:51:54 EDT 2015


On Sun, Apr 19, 2015 at 06:57:49PM -0700, r00nk at simplecpu.com wrote:
> 	The problem a lot of newbies are having is in 'separating the trunk
> from the leaves.' So my question is this: Experienced kernel developers, how
> do _you_ read source code? How do you separate the trunk from the leaves?
> What do you do when you read code you're not familiar with? How do you learn?
> What's your algorithm?

I print out the source code, using a huge font as to take up lots of
space, bind it all together, and relax in a bathtub full of warm bubbles
and drink wine while reading the code and scribbling comments in the
margins with a colored soap shard.  After falling asleep due to the wine
and warm bath, wake up in a few hours freezing cold, surrounded by soggy
pieces of paper with all of the ink washed off.  But my brain has
absorbed it all and I can then resume coding from where I left off.

</sarcasm>

I use vgrep[1], that's it, no ctags needed.

Reality isn't romantic, there is no magic solution to hard tasks.

greg k-h

[1] https://github.com/vrothberg/vgrep



More information about the Kernelnewbies mailing list