personal

Beauty is in the eye of the beholder

Several folks have blogged recently about the book beautiful code, some like Jeff have blogged multiple times about it.  The reactions are somewhat mixed and not really surprisingly.  I really would expect beauty, which is decidedly aesthetic to vary from person to person.

I’ll be honest and state that I haven’t read this book yet, but it is on my to read list.  Given that I can’t comment yet on the book, but I can share some traits I find beautiful in code.

Readable, it should be very clear what the code is doing from the names of the objects, their instances and any functions or methods.  This can be done with or without language support, and in a very personal sense, I will tend to avoid language features that make code unreadable.

I also really admire code that is decisive some folks like to call this declarative, but I think it can be more.  I dislike excessive branching mostly because I am very cautious and tend to get worried about testing a method with a lot of branching in it.

I admire stateless functions and objects I tend to find it fascinating when I see code that enables useful scenarios that is built out of stateless objects.  This also tends to lead to rather simple code which is also quite nice, because when I’ve long forgotten what code does if it’s readable and straightforward I can usually pick it back up again soon.

I fully expect your mileage to vary because appreciation of beauty is so personal.  I’ll also chime back in after I’ve read the book.

~Rick

personal
technology

Comments (0)

Permalink

About Me

Who am I?

My name is Rick Molloy.  I live in Redmond, Washington with my wife, 2 kids, and a whole bunch of ’stuff’ (most of it electronic) that are sometimes referred to as ‘crunchies’ by my family members.

I currently work for Microsoft as a Program Manager on the Parallel Computing Platform team.  Previously I’ve worked on the shell team for Windows Vista and also on Microsoft Money & MSN Money.  What seems like a very long time ago I wrote device drivers for a company that was acquired by 3dfx.

It’s 2008, why start a blog now?

Why not? I’d like to others to be able to learn from my mistakes.

personal
technology

Comments (1)

Permalink

Get Adobe Flash playerPlugin by wpburn.com wordpress themes