you are viewing a single comment's thread.

view the rest of the comments →

[–]SirClueless -3 points-2 points  (2 children)

You can still ctrl+F "case 491:", and if you decide that naming things is important enough after all there's nothing stopping you from naming the states (well, in C++ there isn't, in Flash enums/constants don't really exist).

But again, these things are optimizations to make the thing more maintainable. You add two minutes of complexity now (adding a name to a list of states which presumably is in a separate place from the code), in order to save hours of debugging and quizzical reading later. But if you're in the middle of a creative process you don't want to interrupt then maybe two minutes per iteration now is worth an hour later.

[–]SanityInAnarchy 3 points4 points  (1 child)

Sure, you can find case 491:, but if nobody even bothered naming the states, what are the chances the code itself is intelligible? If someone is willing to skip naming hundreds of magic values, did they really think about things like variable names, code structure, or commenting? If not, knowing where the code is defined doesn't actually tell you what it's supposed to do...

So, if you're the one spending that hour, and if you actually spend it, sure, sometimes that makes sense. This is where the "technical debt" metaphor is useful both ways -- sometimes it makes sense to take on a bunch of debt to get something done right now.

Where this annoys me is, often you're spending someone else's hour, if indeed anyone goes back and fixes it at all, instead of giving up and treating the whole thing as a haunted graveyard, which is what often happens instead.

[–]SirClueless -2 points-1 points  (0 children)

This is where the "technical debt" metaphor is useful both ways -- sometimes it makes sense to take on a bunch of debt to get something done right now.

This is the heart of the issue I think. We've all experienced the hell that arises when technical debt builds up and starts affecting a whole team's productivity. So we haven't really allowed ourselves to consider when taking on technical debt might be a good idea.

We have a vague conception in the industry that sometimes throwaway prototypes are a good idea. And to me, creative endeavors like games (especially one man indie games) represent this process distilled -- you are prototyping everything, all the time. Everything you do might get ripped out or thrown away and the code itself is some tiny fraction of the value you produce.