
Interview with an experienced Java developer – a legacy code whisperer – Part -2
Interview with an experienced Java developer – a legacy code whisperer – Part -2
Bazlur Rahman: From your previous answer, what I understand is, that working with legacy code is rather normal, a company grows, the project gets into shape, it pulls lots of customers, and gradually it becomes big. Naturally, the management will not want to invent the same wheels repeatedly; rather, it improves the original and adds new stuff on top of that.
So learning how to work with legacy code is also vitally important while learning new technologies.
I mostly work to help junior developers, and they will not always get a new project started, which is very natural. I am sure what you are doing is not entirely for experience developers; newcomers can also pick stuff from your project, is not it?
Scott Wierschem: Absolutely! Most experienced developers should already know many of these tools and techniques. Or if they are like me, they are too embarrassed to admit they have to learn them later in their career!
One of the problems with working on an existing code base – especially for newer developers – is that you don’t know how something is done. So you look at the code to see how they did it before. You copy that code and fiddle with it until it does what you want. That’s the way I was taught to do things in my first jobs. Follow the patterns the “smart guys” before you have set. If you can’t figure it out, you’re just not smart enough.
Well, as a member of Mensa, I figured out that I’m smart enough. So there must be another explanation. The “smart guys” simply wrote unreadable code. They were too arrogant to follow good coding practices, and they didn’t have the consideration for their fellow developers to write code in a way that the next developer could quickly read it and understand it.
You’re not stupid! You can figure this stuff out! If it’s unreadable, I hereby empower you to make it so! Become the leader of your organization by learning these techniques and setting the example in your code. Teach those who are willing to learn. Build a team that strives for excellence!
I’m getting myself all worked up now! (slightly smiling face)
The bottom line is that we need to be humble, and willing to learn. We also need to be considerate and respectful of our fellow developers. There’s no room anymore for the arrogant know-it-all who has all the answers. The industry leaders I’ve spoken to are uniformly respectful and considerate even when I say or do something wrong. They patiently show me how to do it right. That’s the kind of leader I want to empower through my project.
- Observation # 6: You cannot afford to be arrogant. Be humble, and be respectful.
Bazlur Rahman: I remember a quote of Martin Fowler that,
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
Scott Wierschem: That’s right. Computers can optimize our code, so clever (unreadable) performance hacks are rarely necessary. And when they are, they should be set aside in a special part of the code so people know that it’s written that way for a reason.
- Observation # 7: Write code for humans, not machines.
Bazlur Rahman: Let me now ask you a different question; since I’m working mainly to help the junior developers to improve their coding and collaboration skills, I would like to know what do you think, what are the required coding and collaboration skills a developer needs to get hired and work on amazing projects?
Scott Wierschem: The collaboration skills are mainly humility and the ability to listen. Don’t be afraid to ask questions. That’s hard for a lot of people in our industry. But if you can ask questions and be sure you understand the problem before you run off to build a solution it will really set you apart.
The coding skills can be found mainly in Robert C. Martin’s “Clean Code” book. In fact, his whole series should be required reading for any new developer. Or more experienced developer, for that matter!
Mainly they come down to the Boy Scout’s Rule: Always leave the code better than you found it.
- Observation # 8: He mentioned about being humble in his earlier answer. So being humble and having the ability to ask questions in that way is important.
- Observation# 9: Attitude towards learning is what really matters to be able to acquire skills. Read books, talk to the experienced developers, and most importantly, be humble and respectful.
Bazlur Rahman: It’s good that you mentioned the book Clean Code. I see a tendency of not wanting to read books much among many junior developers. What do you suggest about that, and how do you think someone can grow a reading habit?
Scott Wierschem: Recently, in a chat room, I read someone whining about why only software developers were expected to use their own personal time to develop their skill sets and grow their careers. I pointed out that EVERY professional livelihood requires extra education of some sort. Doctors, pilots, chefs, teachers, nurses, athletes… I can’t think of a single professional vocation where those who take their work seriously are constantly improving their knowledge and skill set. And the elites of that field spend an inordinate time both teaching and mentoring others.
The same goes for software development. We need to read at least one book each year. We need to watch YouTube videos at the minimum. We need to read blogs, listen to podcasts, attend user group meetings and conferences, and get specific training. Whatever medium works for us, we need to take advantage of it. We need to contribute to open source projects both to learn how others approach problems and to make sure we are contributing to the advancement of the craft.
As any craftsman, we need to own our tools! We are fortunate that most of our tools are free and open source. But if the company won’t pay for my license for BeyondCompare or IntelliJ, I get my own! And most of these tools are free if you are part of an open source project.
So for a junior developer who doesn’t want to read, I would just suggest they find a career they can get passionate about because if you can’t be bothered to learn how to do your job better every day, you’ll never get very far in it.
- Observation # 10: To go beyond average, you must go the extra mile.
Type your email… {#subscribe-email}
✨ This article was originally published at https://bazlur.ca/2017/10/14/interview-with-an-experienced-java-developer-a-legacy-code-whisperer-part-2/