From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Mon, 20 Apr 2015 16:51:54 +0200 Subject: How do _you_ read the linux source? In-Reply-To: References: Message-ID: <20150420145154.GC7261@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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. 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