3 ms·
You can't do either in isolation. If you just write code, you end up ghettoizing yourself into a style that works for you but has little to do with how others
by nostrademons 18y ago
You can't do either in isolation. If you just write code, you end up ghettoizing yourself into a style that works for you but has little to do with how others program, and misses out on all the nifty tricks they've discovered. If you just read code, you don't understand why the author employed the tricks they did, as you say.
I usually alternate between the two: find a good piece of code. Then try to modify it to do something different. Then look at the style of the code around the parts you touched, and see if there's a better way to do your modification. Then modify something else in the general vicinity, and repeat.
When I started at Google, I basically just hacked the Google webserver to display "Hello world" in various parts of the result page until I understood what it was doing enough to start contributing to my team.