Puzzling Software DesignPosted: June 2, 2011
I’ve been working on my Strategy RPG game I started last year, and marveling at how bad the code was. I’ve spent the last week refactoring it and trying to make it sane again, and I’m still not done. It made me realize all over again how woefully lacking my software design skills and knowledge is. Having helped out on Bravo, I saw what a well designed program might look like, but I can’t figure out what I need to do to achieve it. Due to some weird coincidence, as of this writing, somebody blogged about this issue and gave a very interesting link.
Of particular interest is the idea of a “quality without a name”. I’ve only just finished reading that chapter and am still digesting it, but the most practical excerpt as follows:
I still can’t tell you what the quality is, but I can tell you some things about soft-
ware that possesses it:
• It was not written to an unrealistic deadline.
• Its modules and abstractions are not too big—if they were too big, their size
and inflexibility would have created forces that would overgovern the overall
structure of the software; every module, function, class, and abstraction is
small and named so that I know what it is without looking at its implementa-
• Any bad parts were repaired during maintenance or are being repaired now.
• If it is small, it was written by an extraordinary person, someone I would like
as a friend; if it is large, it was not designed by one person, but over time in a
slow, careful, incremental way.
• If I look at any small part of it, I can see what is going on—I don’t need to refer
to other parts to understand what something is doing. This tells me that the
abstractions make sense for themselves—they are whole.
• If I look at any large part in overview, I can see what is going on—I don’t need
to know all the details to get it.
• It is like a fractal, in which every level of detail is as locally coherent and as well
thought out as any other level.
• Every part of the code is transparently clear—there are no sections that are
obscure in order to gain efficiency.
• Everything about it seems familiar.
• I can imagine changing it, adding some functionality.
• I am not afraid of it, I will remember it.
I think this could help point me in the right direction, especially because the description reminds me of the Bravo code.