I’m currently crunching to finish a software project. It’s my first time collaborating with a large number of non-co-located people with a shared repository. It’s been interesting and frustrating to manage tasks and larger-scale goals across such a group. One of the problems is that different members have different aesthetic values on what “good” software is. Here’s my definition:
Completed on time, and does what we want it to.
There’s been a few check-ins that have been very aesthetically oriented, focused on refactoring for neatness, or on renaming project files to remove confusing references to sample code we’ve borrowed from. This is for a project that needs to be ready for a certain large-scale art event in Toronto in a few days.
In the past, most of the code I have written is for a some crazy prototype that I need for a demo or a video or a study before a nearby deadline. I’ll either throw this code away, cackling, or spend a long time cleaning it up it for further work after the deadline passes. This cycle: (very pragmatic crunch coding, optimizations/improvements only later) has strongly affected my aesthetic.
Case in point:
I had to write a function that rotated an array representing an image by 90-degree increments. This is just an O(n) loop where I’m just transferring pixel values from one position in the array to another; I have to solve a mapping problem. The 180-degree rotation is the easiest, since you just to reverse the order in the array. The 90 degree and 270 degree rotations are a little harder. I got the 90 degree rotation working, then paused. My TODO list is full of requests from people I’m collaborating with. I would take me at least 5 minutes to test and debug the 270 degree rotation code. So, to rotate by 270 degrees, the function recursively calls itself to rotate by 90 and then 180 degrees. I felt plagued by guilt for a couple seconds over the blasphemy, but the function worked perfectly and the performance hit is negligible since the images are small. Now that’s good software according to me.