chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
Coder, Programmer, Peter Morlion

Meet Peter Morlion Who Loves Improving Legacy Code

Tell us a little bit about yourself

My name is Peter Morlion. I’m a 35-year old software developer from Bruges, Belgium, husband of a speech therapist, and father of an almost four-year-old daughter.

How did you get started in programming?

I guess my first programming was messing around with QBASIC at the age of 14. Prior to that, computers were mainly for gaming to me. I liked how you could make something, but I wasn’t passionate immediately. I would like fiddling around with computer settings and hardware, but it would take about 8 years before I became interested in programming again.

When I had to choose higher education, I wasn’t into computers anymore. I studied political sciences and majored in international relations. But in my last year, I started realizing I didn’t want a job in politics or administration.

Coincidently, I started playing around with computers again. My future father-in-law had earned his bachelor’s degree as a network administrator in night school several years earlier, and I followed his example. I started out wanting to become a network administrator like him, but found myself very passionate about programming and so chose that path.

Thanks to a few good teachers I became enthusiastic about being able to control what the computer does and being able to create something from scratch. I guess it was downhill from there 😉

What are some of the languages you use today and why?

I’ve been using .NET in most of my career, but I’ve been able to steer myself towards positions that taught me NodeJS/Javascript, Python, PHP, Java and NodeJS/Typescript.

My previous customer was full .NET. My current one is Typescript and Java, running on AWS Lambda.

What type of applications do you develop?

I work on back-end services or line-of-business applications most of the time. Not that I don’t want to do front-end or consumer-facing work. But my career has just evolved that way, and I’m fine with it.

Except for a few cases, this has always been brownfield development, where I was able to significantly refactor pieces of the application. For the better, I hope! I also realized I enjoy this type of work very much. It’s challenging, but very rewarding when you “tame the beast.”

What’s your biggest passion these days related to programming?

I’m very passionate about test-driven development, clean code, and continuous improvement. As I mentioned, I love improving the code quality of existing, legacy codebases. This is regardless of languages and technology stacks, as I have found that most principles carry over from one to the other.

Something new I’m trying to learn, is the non-technical side of programming. Team interactions, human behavior, business language, etc. These are all things that we focus too little on.

What still sucks and shouldn’t be in programming?

Something that still sucks is how developers are still at the bottom of the ladder in organizations. Most developers don’t realize the power they have, but sometimes I have a feeling they don’t want to realize. Just let me write code, they say. But programming is so much more than writing code. It’s collaborating (and negotiating!) with the customers, end-users, business departments, other engineering and ops teams. It’s being part of and forming a culture. It’s keeping an eye on your delivery process.

But that’s not something I want out of programming. I want more of it! It should be featured more in the education of new programmers too.

Something that shouldn’t be in programming is politics. Bad technical or organizational decisions made to appease a person or groups, but affecting the lives of many others negatively. But I guess that’s not specific to programming. Though my previous point is valid here too. If programmers would be more business-savvy, they might be able to prevent some of these decisions.

What are some of the most important skills developers can have?

I’ve touched on that above: the so-called soft skills. How to interact with people and communicate with them. Before we can start automating people’s lives, we need to understand them. Only then can we really help them for the better.

This continues well in technical skills too. The code you write should be highly communicative towards other developers, i.e. write readable code. I believe this encapsulates many best-practices like SOLID, loose coupling, TDD/BDD, just enough documentation, DRY, etc.

How did you learn about Typemock and what was your first reaction?

I heard about Typemock years ago and can’t really remember exactly where or how. It might have been a conference or a blog post. I was definitely intrigued about the magic that it did (the IL weaving). I didn’t know it was possible at the time. Nor did I really understand it. It seemed powerful stuff that was a bit out of my league.

Do you have tips for readers who are just starting out with unit testing?

Follow a course or tutorial and start small. Try to use it as much as possible, without hurting yourself. But try to see the benefits that it brings, even though it might seem cumbersome at first. Try to see how it can push you towards a better design and how it provides a faster feedback-loop.

Concretely, use it for simple helper methods or small calculations. Put in all your edge-cases. And make sure these tests are always run (both locally and on a CI). Really start making it second nature.

After a while, you will probably like the tight feedback loop, and eventually the safety net for refactoring that it provides.

How do you convince your manager to write more unit tests or practice TDD?

Personally, I’ve never tried to convince a manager to write more unit tests or even write them at all. I just do. If I need permission to write tests, I’m not a good fit for the organization. It’s just the way I work. When you order a table from a carpenter, you wouldn’t tell them not to use a hammer, would you?

On the other hand, I have tried to convince coworkers to write more unit tests or practice TDD. With mixed success, I’ve talked about the benefits, gave small courses or done pair programming. Pair programming is a great way to show TDD in action. But it’s not guaranteed to win everyone over.

Any tips on making managers understand the importance of using unit testing?

That’s a tough question. You could search the internet for hard numbers on how beneficial TDD is to a business (i.e. less defects, defects spotted earlier on, less costs).

Another argument might be just talking about how it’s industry standard. This isn’t really a rational argument. More an argumentum ad populum. But it might help.

You could also make the scientific argument. Tests prove your code works, instead of assuming it. That is only one of the benefits of TDD, but the manager doesn’t have to know 😉

A final tip I can give, is to talk about how automated tests cost a bit to write, but nothing to run. Human testers cost much more!

Do you practice TDD and if so, what are some of your favorite code katas?

I practice TDD for as much code as I can. But due to the nature of my work (often legacy code that needs a significant amount of refactoring), this isn’t always possible. Not immediately anyway.

I can’t say I’ve done a lot of code kata’s in my life.

What are some of your must-have tools or libraries that you use in your daily working life?

This depends on what stack I’m working on. But here are some that come to mind:

  • Visual Studio (for .NET work)
  • Resharper (.NET work)
  • Visual Studio Code (general)
  • Postman
  • Windows Subsystem for Linux (almost anything non .NET, and with the advent of .NET Core, even that has changed)
  • IntelliJ editors (depending on the language)
  • Git
  • Internet and a powerful PC!

Who or what inspires you in the technical world?

People with great technical and people skills. People who have achieved things I would like to achieve, even though I may not ever achieve their level: Kent Beck, Martin Fowler, Scott Hanselman, Erik Dietrich.

Also companies and people that take a new and modern approach to run companies: a good balance between private life and work, embracing diversity (not just talking about it), doing away with silly hierarchies, trusting people, etc.

And a special shout out to all the groups and organizations that are actively trying to make the technical world a more diverse and heterogeneous environment.

When you need a quick recess at work to regain focus, what do you do?

Ideally, I’d take a walk. Maybe just to the toilet or kitchen (I work at home). Sometimes to the local supermarket that’s just around the corner. Outside air and a walk can do wonders for the mind.

But I don’t do that enough. I might also just surf the web, play a short game. Or lean back, look outside and daydream.

What’s your horror/war story from the coding trenches?

At my first job, we deployed changes to the production databases by manually executing any change scripts in SQL Management Studio. We did this in a beta environment first, and the week after that we would do it in production. You know where this is going right?

As part of a major change (lots of renames and drops), I started executing the scripts in the beta environment. Only halfway through, with a lot of damage done, did I realize I was doing this in production. I couldn’t continue, because we couldn’t yet deploy the software to match these database changes. But I couldn’t go back, because our rollback scripts wouldn’t restore the lost data.

You know that feeling when you’re hot and cold at the same time? Yep.

I had to phone our customer, a major hospital in the area, and tell them that I had borked their system for electronic patient records. And that it would be offline for, uhm, possibly several hours, we didn’t really know.

I must say, all affected parties were actually very nice about it: the database admin that suddenly had to fix my mistake, the COO of my company, and the hospital. Though I’m not sure about the hospital staff who actually used the software…

What’s the best advice you’ve ever received or what advice would you give your younger self?

Some great advice I’ve received from several sources in my career:

  • go independent
  • find a specialty and look at your career through that lens (i.e. Erik Dietrich’s “you help who do what”)
  • sometimes, put yourself in a slightly uncomfortable position to force yourself to do new things (like a conf talk, or a job with new technologies)

What are some interesting links you can share about yourself?

I blog, tweet at @petermorlion and have some open source work at Github.

I also have a LinkedIn profile.

What is one question that we should have asked, and we didn’t and what would be the answer?

Maybe this: what keeps you into programming? You asked me what got me into programming. But what keeps me there, what is my driving force every day? Why do I do it?

The answer would be twofold: first of all, pure technical knowledge and power. Knowing how to use a programming language to do stuff, and then actually doing it successfully. That’s just awesome. And second of all, seeing or hearing about end-users that are happy to use the tool you’ve made. Having made some small part of their lives easier or more pleasant.