Archive for the ‘ Fun ’ Category

Definition: Drive-by coding/scripting

Drive-by coding or scripting: Not using Object Oriented techniques while coding/scripting in order to decrease complexity and increase development speed. On the long term, this results in significant extra work.

Basically, the above is my definition of ‘drive-by coding’. I just thought of this, and was curiously surprised when my (granted, very superficial) Google search didn’t come up with web sites mentioning it. So I decided to update my blog (it’s about time…) with the definition.

I thought of it when I was scripting a simple task list for my school project in PHP. I didn’t use OOP-techniques, but just placed the PHP code between the HTML. Although it’s generally faster for smaller things, it isn’t a best prectice – obviously. But it does decrease the time needed to script something, as well as the complexity. So, in very small things, I do it. Because of the speed increase, yet not a gooed practice, I thought of ‘drive-by coding’ to name this technique. I think it’s rather fitting.

Like I said, this usually only works for small things. As your program gets bigger and you work on it more often, drive-by coding will only decrease speed and increase the complexity of your program. Furthermore, most frequently used programming languages don’t even allow you to code this way (for example, Java). But PHP does.

This is the end of a rather small and useless post. But I’m curious to see if the name catches on. We’ll see in, four, five years? So go and use it! ;)