How to reach craftsmanship?

I taught myself playing the violin. Some years ago I borrowed my grandmothers violin and just started fiddling around until I could play some very simple songs like “Happy Birthday” and such. Sincere apologies to my close family at that time, they really had a lot of patience as it must have sounded horrible. Some time later I played at some concerts of the local YMCA youth group. On a stage!

Still, I can’t read a single note and have no idea of music theory. Tell me to play in “E major” and I would have no clue what you mean. I can merely play by ear.

Me standing in a grain field, playing the violin. Yeah, we totally staged this image 😀

I also taught myself coding. Well, I learned the basics of Java programming in school, but I kept on learning beyond that. My first projects were the typical mess that you’d expect from a beginner which has no idea what they are doing. Later I studied computer science and now I’m just a few credit points away from getting my masters degree. Yet, the university is not the place where you learn to code. They do teach you the basics of how a computer works, what a compiler is and even the theory behind creating your own compilers, but they hardly teach you how to write *good* code.

Sometimes I feel like I code just as I play the violin. By instinct. I’m not following any rules or well defined procedures. I roughly know where I want to go and more or less how to get there. Then I just start and see where it leads me. I wouldn’t say that I write bad code, but I also don’t feel like I got the ultimate understanding of what good code is. Most certainly I wouldn’t describe my coding process as “methodical” or “planned”.

So, my question is, how to learn to write *good* code? How do I acquire the skills to write “professional” code? During my Google Summer of Code projects I found that having a mentor was massively helping me to write cleaner, more concise code. So should I join a company as junior software developer in order to be able to learn from the senior developers? Can I just hike into the mountains and find an old man in a cave who teaches me the ancient art of the JVM?

I tried reading some books. I soaked up the Uncle Bob trilogy (especially “Clean Architecture”), not least because I recognized many of the patterns Martin described in that book from my coding adventures. But books are just books and they cannot answer all the questions one might have.

I thought about attending some software engineering related conferences to listen to talks by the greybeards. But then there is this Covid thing (although I hope that vaccines and such will improve the situation soon-ish).

Now that I’m earning some money by writing code, I fell like I have the duty to elevate my skills from “I know some things about what I’m doing” into a proper craftsmanship.

But how do I start? Should I do some courses? Are there any courses that might be fitting?

Let me know if you have any advise or experiences that you think could help me.

Happy Hacking.

On “Clean Architecture”

Some skyscrapers photographed from the bottom to the top.

I recently did what I rarely do: buy and read an educational book. Shocking, I know, but I can assure you that I’m fine 😉

The book I ordered is Clean Architecture – A Craftsman’s Guide to Software Structure and Design by Robert C. Martin. As the title suggests it is about software architecture.

I’ve barely read half of the book, but I’ve already learned a ton! I find it curious that as a halfway decent programmer, I often more or less know what Martin is talking about when he is describing a certain architectural pattern, but I often didn’t know said pattern had a name, or what consequences using said pattern really implied. It is really refreshing to see the bigger picture and having all the pros and cons of certain design decisions layed out in an overview.

One important point the book is trying to put across is how important it is to distinguish between important things like business rule, and not so important things as details. Let me try to give you an example.

Lets say I want to build a reactive Android XMPP chat application using Smack (foreshadowing? 😉 ). Lets identify the details. Surely Smack is a detail. Even though I’d be using Smack for some of the core functionalities of the app, I could just as well chose another XMPP library like babbler to get the job done. But there are even more details, Android for example.

In fact, when you strip out all the details, you are left with reactive chat application. Even XMPP is a detail! A chat application doesn’t care, what protocol you use to send and receive messages, heck it doesn’t even care if it is run on Android or on any other device (that can run java).

I’m still not quite sure, if the keyword reactive is a detail, as I’d say it is a more a programming paradigm. Details are things that can easily be switched out and/or extended and I don’t think you can easily replace a programming paradigm.

The book does a great job of identifying and describing simple rules that, when applied to a project lead to a cleaner, more structured architecture. All in all it teaches how important software architecture in general is.

There is however one drawback with the book. It constantly wants to make you want to jump straight into your next big project with lots of features, so it is hard to keep reading while all that excited ;P

If you are a software developer – no matter whether you work on small hobby projects or big enterprise products, whether or not you pursue to become a Software Architect – I can only recommend reading this book!

One more thought: If you want to support a free software project, maybe donating books like this is a way to contribute?

Happy Hacking!