Thistle (thistle_chaser) wrote,

  • Mood:


I've been working on a big coding project today, and near the end of it I noticed something odd. When I code, I think differently. I'm sitting here, trying to put into words /how/ it is different... 'more focused' isn't right. I didn't want to call it "less creative" because I think coding can be as creative as some writing, but maybe that's the closest I can come to it. Maybe this:

Recall Tinkertoys? Wooden round parts that wooden sticks could be stuck into, so you could build things with them? You start with the idea of what you need to do: I want to write code that will maintain and then make a weekly report on certain MUSH stats. Or in Tinkertoy-talk: I want to make a stick-dog.

So you focus on each part of what you need to make that thing; you can't just make the whole Tinkertoy dog at once. My code needed to write to a DB object each time someone did something; the dog needs back legs. Okay, you got it writing to the DB, but look, you need to handle these special cases, too; the dog needs a spine.

And so on. You don't make the dog's back legs and then jump and make its head, you focus on each part and it will lead you naturally to the next thing you need. You kind of let it walk you through the project...

Bah, I don't think I explained it well.

This: [words([lattr(DB#)])] will count the number of attributes on an object. It's a 'hips' or a 'shoulders', it's a main part of the stick dog. It does the grunt work of the reporting end of this. Once I had that, I was able to "build" around it -- make the dog's legs and start up the back. Fill in the details. Make it do all the extras.

While coding can be creative, the thinking I use when doing it is nothing at all like my thinking when I RP. Maybe it's a right brain/left brain thing... but it just feels odd to be able to feel that you're thinking in a different style than usual.

And on a related note: I'm always at odds with how "neat" to make my code. It runs now, but I can make it tighter and "cleaner". However, if it runs, is that good enough? Sometimes I go back and clean things up or totally rewrite them, but sometimes I leave things messy and just cringe when I later happen upon it. This stuff I wrote today is pretty loose, I need to tighten it at least a little. (I have an excuse! I wrote it during the last couple hours of work. I always feel like I really got something accomplished at work when I get MUSH code done...)


In other news, Mallen came by (without calling, of course) to get the fryer. Yay! He'll put it to good use and I didn't want to see it anymore, so I'm happy. Also, he brought me a jar of jelly (sorry, jam) that he made. I can't wait to try it!

I went shopping at lunchtime and bought a lot of cleaning supplies. My mother is coming in a month (eek eek eek) so I need to do major cleaning. My apartment isn't dirty, I'm not embarrassed when people come over, but it's not up to her level of clean.

Man, this week is so full. I need to do four or so loads of laundry tomorrow. I so wish I had a washing machine in my apartment, it would make things 100% easier. (There's nothing like lugging a bunch of loads of wet laundry through the parking lot and between buildings...)
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded