News for hackers. Stuff that matters.
Re:How to Read Other People's Code -- And Why by wenbert on Friday October 23, 2009 @04:06AM (#898437)
Maybe it's just me. But sometimes I draw diagrams describing how the code will work and how the methods interact with each other. A quick drawing with a pencil and paper or on a whiteboard will do. It helps me understand how the over-all system works...
Re:How to Read Other People's Code -- And Why by JoeAltmaier on Friday October 23, 2009 @09:47AM (#898722)
Agreed. If it won't all fit in my head at first, put some of it on paper. Especially when learning the code. And re-visit the drawing, testing it against what I'm reading as I go until I'm sure its right. Once its in my head, throw it away. Wish there was some way to use drawings as comments... My friend Bob learns differently - he needs words, skips all the illustrations in manuals, they just don't sink in for him. He's brilliant, just built differently.
Re:How to Read Other People's Code -- And Why by wenbert on Saturday October 24, 2009 @01:04AM (#900136)
That'd be the day :D Drawings for comments is absolutely a great idea. Sometimes I wish I could "draw" something in my code (Arrows, bookmarks, quick diagrams, etc. beside comments). Think github with this kind of feature.