Code is Not Literature
Code is not literature and we are not readers. Rather, interesting pieces of code are specimens and we are naturalists. So instead of trying to pick out a piece of code and reading it and then discussing it like a bunch of Comp Lit. grad students, I think a better model is for one of us to play the role of a 19th century naturalist returning from a trip to some exotic island to present to the local scientific society a discussion of the crazy beetles they found: “Look at the antenna on this...Seibel's observation that reading code is less like literature and more like science is dead on. No matter how readable the code is, when I'm confronted with 10,000 lines of it spread across numerous encapsulated functions, I must tackle it very differently from how I read prose. With a complex literary text, I can just read it in linear fashion with occasional segueing to look up words and concepts, with well-engineered code I must follow numerous cases into different flows of logic. These aren't the same at all.
I appreciate that he's trying to dispel the idea that we "read" code as we read for pleasure, I learn from code by experimenting with it. I open up the debugger and step through it, watch the variables change and see where it goes when I execute it. Most of all, I learn by changing that code and trying to build on it. I have enhanced my javascript skills immensely in recent years by cloning various projects on github and trying to expand on them or adopt them to my own purposes. I don't recommend opening up a code base and just reading it, actively engage it, break it, and enhance it.
State of Mind in a Marathon Coding Session
The peak hour itself was tremendously intense, but during the hours before, and even during the hours afterward, a hacker attained a state of pure concentration. When you programmed a computer, you had to be aware of where all the thousands of bits of information were going from one instruction to the next, and be able to predict—and exploit—the effect of all that movement. When you had all that information glued to your cerebral being, it was almost as if your own mind had merged into th...There is a point where you have the whole program in your head at once, one with it, and you don't want to let it go, so you keep working in a marathon burst of energy.
Douglas Crockford on Reading Code
One of the things I've been pushing is reading. I think that is the most useful thing that a community of programmers can do for each other—spend time on a regular basis reading each other's code. Then are's a tendency in project management just to let the programmers go off independently and then we have the big merge and if it builds then we ship it and we're done and we forget about it.An important exercise for programmers is to read each other's code.
Bernie Cosell on Java
Java didn't feel right. My old reflexes hit me. Java struck me as too authoritarian. Thats one of the reasons why I mentioned that Perl felt so good, because it's got the safety and the checks but it is so damn multidimensioned that the artist part of me has a lot of free board to express things early and to think about the right way do things. I have some freedom. When I first messed with Java—^this was /vhen it was little baby language, of course—I said, "Oh, this is just another one...Describing his first impressions of it as authoritarian and designed for not-so-good programmers.
Ken Thompson on Obfuscation in Modern Code
Suppose someone describing something to me from postulates like. "Here's a computer and here are the op codes." I can visualize the structure of programs and how things are efficient or inefficient based on those op codes, by seeing the bottom and imagining the hierarchy. And i can see the same thing with programs. If someone shows me library routines or basic bottom-level things, I can see how you can build that into different programs and what's missing—the kinds of programs that would st...Modern programming principles involve a great deal of delegation, resulting in code that is very hard to follow.