Coding Like a Girl

Beautiful code, test-first - Signal vs. Noise (by 37signals):

"I was talking with a friend recently and discovered we have a failing in common: we both have a tendency towards a peculiar form of perfectionism. He was telling me how he feels like he has to sit and tweak his code over and over until it not only acts right, but looks right. It cannot be merely functional, it must be beautiful, as well."

(Via Code Like a Girl.)

While programming in Squeak, I find that I am compulsive about making the code beautiful. And the Smalltalk language makes that really possible because of its syntax. Also, reading the book Smalltalk: Best Practice Patterns helps too. And I do not mean doing ridiculous stuff like making beautiful function headers. I mean making Smalltalk code look like it should: short, simple and human readable.

I am not an expert at this, but from looking at the source code and reading the book, here are some of the things that I notice.

The point being that code that is not following those standards feel really, really bad and sloppy. It is almost like leaving spaghetti stains on your white shirt. Sure no one would care about it since you are still clothed and all, but it just becomes an eye sore.

Regardless of the programming language, one should always stick with the proper convention of doing stuff. Program in C, stick to the C convention. Program in Java, stick to the Java style.


comments powered by Disqus