Spaghetti code
Filed in MetaThe trouble with programming for a person to whom it doesn’t come naturally is that it can leave my tummy knotted up into little balls of stress and obsession. My mind in general is not a logical, computery mind: I am very much the intuitive kind, and so I can do programming to the extent where I can be intuitive about it.
It’s when it comes to having to actually think, logically, about why a bug works I run into trouble. I find myself tensing up with a panic attack coming on. Will I ever figure it out? Should I use “and” or “or” in this particular line? It’s the little things that all build up.
The writing of programs is fine. It’s when, armed with a bit more experience, I come back to my old programs and try to rewrite them that I struggle. And then there’s bug fixing. Bug fixing is not like editing my writing, which is actually pleasurable. My writing without editing is not broken; it may not be as good, but it’s still writing. A program with bugs does not work, or does not work as it should, and I can often go cross-eyed trying to figure it out.
There’s also the part of my mind that obsesses about it all night and the other part that comes up with ten thousand new ideas that I could also program and before I know it another year has passed and I haven’t had any breakfast–or sleep.
What I’ve been doing at Markeroni for the last two weeks started with the desire to put in a new feature: tags and categories. I also decided, at the same time, to put in a different, related feature. That requires a bit of backstory, so here it is:
The Landmarks Visited catalog showcases landmarks that people have found. Some of these landmarks are on two, three or even more historic registers or have numerous signs from different organizations all saying much the same thing. Right now there’s an entry in the catalog for each of these different signs. This is silly. I thought it would be much better to have one entry per site, not per sign, and to then pull the individual information (usually just a picture of the sign and the transcription) into that one entry.
So while I was already messing with the catalog stuff I figured I’d put in this code as well. In retrospect, I should have handled one thing at a time because when I started doing the tags and categories I also started streamlining the programs where people can enter that data. It was harder than I thought.
This code I am messing with is some of my oldest code. I can tell. I have learned a great deal since then, but changing it is a lot harder than starting from scratch. There have been many bugs and bug reports and I have been getting steadily more and more cross-eyed until I was not enjoying myself any more.
I now only have some very small loose ends to tie up, and then I can roll this thing out, and then no doubt there will be many more bug reports, because the job of the Chief Markeroon is never done.
But then again, what I have there now is easier to keep track of, easier to run, and more efficient, so when I do finally send out that twitter or email newsletter announcing that it’s up and running, it will be one of those little proud moments for me. I will have produced a reasonably cohesive set of working programs to make my life and that of Markeron’s members lives easier, even though I’m not really a programmer.
And now, I think I’m going to make some spaghetti sauce.
Subscription links
-
If you enjoyed this post, please consider subscribing to the Raven's Range RSS feed! Click here for the raw feed or links to feed readers.


2 Comments, Comment or Ping
beautyredefined
I know just how you feel. I tried going back and commenting/cleaning up some code for work this weekend and some of it was just incomprehensible. I hope I didn’t break anything! ;)
Jan 28th, 2008
Linda R. Moore
Good luck with not breaking anything! Do you know if you did, yet? :)
Feb 7th, 2008
Reply to “Spaghetti code”