On writing software

Is there something like a “programmers block” ?

If there is, I’m sure experiencing one lately. I guess every programmer knows this. You wrote a piece of code and the following day you want to change it. The next day you want to change it again because “it isn’t the right way to do it”. Is there a right way to code software? Is there a right way on how to engineer a piece of software?

The other day I read a comment from Linus Torvalds on the “programmers block”. His solution was just to get coding. I tried that, but it just doesn’t work. I get dissatisfaction from doing this, the code you’re writing is not the thing you want to create. I guess kernel developing and writing web applications are two worlds apart.

The problem with the programmers block is that you get slacky. You know what I mean, you surf on the web, find a few interesting news articles and you’re reading those. You can keep doing this for hours without even getting a step further. Just doing something else for a while and then get back to coding doesn’t work either. At a certain time you think you’ve found a good way to code something. A few hours later you discover that this method you’ve developed actually is way to complicated to actually work well. The problem you’re getting into is that you’re spending more time deciphering your own code than using your own code to get something done. I’ve seen this happening in other software projects as well. It’s a hell.

The problem nowadays is that there are a lot of ways to get a piece of software to work. A few years ago I encountered badly written software that was kinda of a portal like thing. Clients could login and manage information ( I’m not going to bore you with the details ). Although the source of this project was a mess, this software actually worked pretty well. I was surprised that someone with almost no knowledge on how to build software could get this far. A few years later I myself have to design software projects. You’re trying to think about everything: usability, modularity, security, speed. Every time I start coding I want to include all that in one framework. Every time I encounter my code or my designs I notice that this is way to complicated. Is it even possible to include all that in one framework that works? Isn’t it smarter just to get coding and make your software modular later on? I think it would be easier to do that. You already know what the software does and if you improve the source code you know that the software has to work the same way it already did.

Another thing I encounter are projects that are almost fully OOP orientated. I’ve already written about this in the part. The more of this code I see, the more I think OOP isn’t that bad at all. It’s just about how you implement it. If you have a class, that uses a function of another class and that functions in itself uses a function from the original class, the code is a mess. There are ways to keep your code clean and use OOP code at the same time though. I would like to test that approach if I’ve got the time. That’s right, “if I got the time”. That’s the third problem I encounter when writing for software projects.

It used to be fun to code software for your own pet projects. The problem is, at the moment the project get things like deadlines and features that need to be implemented it isn’t that fun anymore. It’s just boring. When you have to do something it suddenly isn’t as fun anymore as it used to be. When you haven’t got a lot time and you have a programmers block things can get frustrating.

I think I just will throw a large part away of the code I have now and start again. I think. What’s your opinion on how to design good software and keepin’ it real?

This entry was posted in Work. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.