Blog 2017 10 27 Coders at work: Joshua Bloch
Post
Cancel

Coders at work: Joshua Bloch

He used to work for Google as Chief Java Architect and before for Sun Microsystems where he worked on various Java features and frameworks. Among others, he had a huge impact on Java 2 and Java 5.

I found interesting one of his outcries on instant messaging. Apparently he also has a problem about interruptions at work. In the end, he says that emails are way worse than IM. The latter is just a distraction whereas e-mails are ruining his life. My opinion is that e-mails are easier to manage a bit, especially if it’s mandatory for you to be constantly available on an IM platform. Even though I have some ideas for that too - will be part of another blog post.

He made an interesting analogy between math, prose, and programmers. Bloch thinks that you can basically divide programmers into two groups. In one there are those who write (low-level) libraries, compilers, and different frameworks. For them, math is much more important than for those belonging to the second group. These folks write more things on top of the bricks made by the first group. But for the second group being a competent writer is very important. They have to be capable of writing nice proses so that they can produce readable code.

I remember when I was complaining to a fellow student at the university about math. He told me that come on. IT is nothing but math. And here is what Bloch said and I’m writing about it. Does it classify me? Maybe.

Bloch seems to be really serious about clean coding principles. He states that the DRY principle is - among other - what it takes to write good programs. Besides readability, good names, cleanliness will not just result in maintainable artifacts, but even faster programs.

And even if it’s not, it’ll be far more easy to make a correct and clean program fast, than making a prematurely optimized program clean and correct. I must agree with him.

You should spend the necessary time to name your variables well, spend hours if needed, because “without it, you’ll never have maintainable code”.

Elon Musk says that being an expert in more than one field incredibly opens up your creativeness and Bloch refers to the same thing when he says that it’s important to know other areas so that they can inspire you in programming. So get out there and do something else than coding too.

An idea I liked from him is that you should not add any feature just because it’s neat, because you like the engineering process. If you are not solving a real problem, don’t add the feature. Don’t add the feature either to an application, to a framework, or to a language. Otherwise, you just give unnecessary complexity.

He recommended two books specifically: C++ puzzlers and Java Puzzlers. Even though C++ is nothing but puzzlers - according to the author.

This post is licensed under CC BY 4.0 by the author.