« Joe the Everyday American | Main | Universal, the movie studio Godzilla »

Comment-happy

One of the fun things I like to do when programming is write comments. Big, huge ones that explain what I'm thinking. Perhaps the most lopsided one that I wrote was about forty lines explaining two lines of code, explaining why I was returning one error instead of another. Of course, the reasoning wasn't obvious at all, and due to an obscure set of configuration options we were using at runtime that could cause subtle failures we needed to do it that way.

But that's deep in the bowels of Blackrock and I can't show it to you. However, the other day, while reviewing my Mac SSL code for Chromium, my reviewer complained that he had no context as to what I was doing. Of course, my code was probably clearer than the Windows code that it was derived from, which was easily twice as gnarly and thrice as long. Nevertheless, I obliged him by throwing in two 70-line comments, some of my best writing yet.

And this time I can share. Chromium's SSLClientSocketMac.

TrackBack

TrackBack URL for this entry:
http://www.drissman.com/cgi-sys/cgiwrap/drissman/mt/mt-tb.cgi/858

Post a comment