JoeZ99 on software
I know, I know, I’m borrowing the title from the great Joel, but of course it’s just a tribute I couldn’t resist doing
It’s always a balance!!
There is no “safe side” when it comes to coding,
every character you type, has a cost. The more characters, the more the cost
and ..
every one liner also has a cost
the cost is that you and probably everybody else , the further in the future they read that piece of code, the hardest to understand it.
So, there’s no a “better way” or “more sophisticated” way of coding something.
- You can code in an extremely simple and easy to understand way, and then, yes, everybody can understand it, but it probably won’t have any extra scope, it’s probably too focused on a particular situation, it’s probably not usable at all.
- You can code something that accounts for every variable in the world, or something that can behave on almost every context, but then it’s something that only you can understand (and probably only for the first months after writing it. After that, I guarantee that not even you will understand it)
- You can put a lot of “one lines” in your code, in a way that your code does a lot in a lot of different contexts using very little words, but I also guarantee that even you won’t understand it after a few weeks of writing it.
Bad news, my friend; it’s always a line, it’s always a balance between clarity, generality, creativity. But the starting point is this
Everything has a cost. Putting something in your code always has a cost, so be very careful with what you put in the code, and make damn sure that you really need it.
Then again: coding is not about patents, is about copyright.
It’s not about following some “good programmer” rules: all that superabundant lingo: domain driven design, single responsibility principle, test driven design, agile development, scrum sessions, microservices, etc, etc, etc … it’s just that, lingo that only gets in the way.
Programmed stuff can be protected by copyright, because it has some connection with the “art of writing” , so it’s about you liking what you’re doing and how it’s looking while you do it
Of course most of the times you just want something done and done as fast as possible, but very often, you can write something, look at it, the delete the whole thing, then write it again, then deleting it again, and writing it again a third time. And that’s very similar to a creative thing!!
So, don’t sell yourself short. Enjoy programming, and look for this “nirvana” in which you pour some creative force in it (and in case you wonder, the answer is yes, you have creative energy)