Wednesday, April 06, 2011

Sick of eating spaghetti code.

Spaghetti code allegory

For some time, you did not eat spaghetti, so you were quite happy to eat a good big pasta dish. 

Spaghetti is quite fun food, isn't it? You can suck one end and will follow the whole spaghetti until the other end. You can roll up a bunch of them and create a kind of ball. You can cut them and try to catch as much as possible with the fork. So first day is quite good time, you can even enjoy it.

Then next day you have another full dish of same pasta. Which is not too bad, because instead of meat tomato sauce, today you have got some vegetable tomato sauce. So, not bad, it is spaghetti again, but different taste.

Then the following days you have more and more spaghetti. Every day with different flavors, but soon you start getting repeated flavors as well.

After some more time, you feel like something is not good. You like spaghetti, but maybe not every day, isn't it?

Some time later you start being annoyed with spaghetti word, idea, concept, even whatever sauce you add to the dish.

Later on, you really do not want to eat more spaghetti, but that is all you have and there is no other option.

Next step is when you hate spaghetti and by analogy you start not eating even other kinds of pasta.

Finally, you really hate spaghetti and you shout at everyone "I HATE SPAGHETTI!!!".


That is what happens if you develop spaghetti code or if you do work in a coded spaghetti style project. Sadly, this is real and happens every day to many developers.

Free recommendations to prevent it.

Please check your coding diet, try to learn and improve your craft. It will make you and your mates much more healthy people. You will be able to grow up as coder, and the others will not hate your spaghetti code, and so, will respect you more.

If you do not know how to do it, do not do it !!! STUDY, LEARN from community. If you think that you do know how to do it, DO NOT DO IT !!! STUDY AND LEARN EVEN MORE !!! Generally you should assume that your ideas will be wrong, until you understand what the community said about that subject.

If you do not have time for learning, do not develop software, go and apply for a consultancy role, at least your bad ideas will look like something amazing for most of unlearned customers and will never be implemented, what will avoid future headaches for everyone else.

Do I am missing something? Do I am being too much critic? 

All the best, be happy.

No comments: