I was coding Monday this week, and I notice something I was doing, and I’d like to talk about. Me and my programming pair were both guilty of this, but he did it a lot this particular day. So I have been becoming more aware of this in myself. But I’m dancing around the point. There is this process that I call writing Spaghetti Code, which is just writing code that might work and hoping that it sticks. You know, throwing Spaghetti at the wall.
This is a bad thing.
Because, you know sometimes you’re coding, and it almost works, so you think it might be wrong. You think you saw this in an example at some point, so you throw an “@” symbol in there or you add some method or you throw a “:” somewhere to make a symbol. And this might work, you might even get lucky, haphazardly drafting something from memory.
If you’re taking a test, this may be the saving throw you need.
But generally, I...
Continue reading →