Programming 101: 8 essential tips to being a better programmer

One of the most important lessons that my parents taught me growing up, was ‘We don’t expect you to come first; just try your best’.

Hayden Marchant
Wix Engineering
7 min readNov 16, 2020

--

“Just try your best”

One of the most important lessons that my parents taught me growing up, was ‘We don’t expect you to come first; just try your best’.

Well, I have to say, that lesson has stuck with me my whole life, and I must admit that I try to apply it to many aspects of my life — whether in bringing up my children, participating in long-distance running, or at work.

For the last 24 years (wow, that makes me feel old), I’ve been programming day in, day out, frequently from dawn till dusk, and I must admit — I enjoy every moment of it.

In this post, I want to share how I try to implement that every-so important lesson from my parents in my day to day job — how to be the best programmer that I can possibly be.

Firstly, what does it really mean to be a better programmer? Well, my interpretation of this is optimizing the value that I can provide to the organization that I work in.

So here goes — read on if you want to see what I feel helps me become a better programmer; and if you manage to read till the end, you’ll find links to some of my favourite books & online resources.

Tip 1 — Write quality code

Does this mean completing my tasks really fast? Or perhaps, does it mean making sure my code runs as fast as possible? When I think about quality code, it means making sure that my code runs well, is well tested, and can be read ‘like a book’ and easily maintained by someone else in my team.

When I design and implement my code, I always try to keep these points in mind.

Tip 2 — Learn from other people

I love seeing how other people in my team or company have solved certain problems and I really try and learn how to implement their ideas in my day to day tasks. I usually read their messages that talk about what they have done, and if I want to find out more, I reach out to them to get more information. So, not only am I benefiting from what other people have created, but I’m also trying to benefit from their innovation process that actually triggered them to create what they did.

Tip 3 — Share knowledge

In the same way that I can learn from other people, when I have completed something that can be of value to other members of the team, I try to share it with my fellow developers.

And it doesn’t matter if it’s the success stories — like that new nifty algorithm I implemented in Scala, or a multi-step fail-safe process for migrating a legacy microservice to our new generation architecture, or major screw ups — like that critical mistake I made that caused irrecoverable data loss and 4 hours of downtime for one of our microservices.

After I complete these tasks, or sometimes even as I’m doing them, I share details of what I’ve done in different mediums — sometimes a message on a Slack channel, in group meetings, or sometimes at a company-wide technical conference, or a blog post (see some of my previous posts) . This generally helps spread ideas and also give me feedback from others to make improvements. We often only realize the value of what we’ve accomplished when we make the effort to share it with others.

Tip 4 — And sharing my time

Yes, sharing is caring. It’s always good to help people, but I also believe that I have become a better programmer when I share my time and experience. When I share my time, I really mean sitting with other programmers, sharing ideas, answering questions and brainstorming ideas.

The more I do this, not only am I, hopefully, helping my fellow programmers, but I invariably come away from these sessions with more than a few little gems from the person who I have been helping.

And yes, this is also where my experience becomes valuable. 20 years of experience also means 20 years of lessons learned from making mistakes, 20 years of experiencing system failures, and also, 20 years of feedback from others — this adds up to a lot and I often end up sharing these lessons I’ve learnt.

Tip 5 — Welcome criticism

One of the most amazing welcome improvements to the programming world in the last decade has been the mainstreaming of code reviews as part of the development process. I really appreciate it when people feel comfortable to give me honest feedback, point out silly mistakes, missed test cases, code duplication etc…

I see this process as an important safety-net to the software development process, and can’t imagine being without it. Most importantly, I try to internalize the feedback I get so that next time, I’ll do better.

Tip 6 — Never stop learning

There are so many great resources out there by people who are many times smarter than I will ever be, and whatever knowledge and skills I can bring into my work from what I learn from those people is an enormous benefit — for both myself, since it makes me a better programmer, and for my organization.

What sticks out in my memory is a conference I went to in 2000, where Unit Testing was the new ‘hot topic’. I was completely blown away by Unit Testing— What, you mean that I can write tests that test my code automatically? Within 2 weeks, we were writing Unit Tests in our product as if we had been doing it all our lives.

I love learning from both technical books and also from online recorded lectures. A lot of my knowledge and ability comes from the time that I spend learning, and I truly believe that the return that I benefit from my learning time is exponential; frequently, a one hour lecture can give infinite benefit.

My wife does tend to complain that I’m a boring geek, but she just doesn’t understand…

Whichever technology I work in, I always look to see who the technology leaders are and learn from them via their books and online talks.

Tip 7 — Don’t stay with the same technology stack for too long

What’s so bad about staying in the same stack? Well, the way I see it is that I intend to be programming for at least another 20 years. Since programming languages and technology stacks change at a fast pace, it’s clear that what’s in fashion now, won’t be in fashion in 10 years’ time. And not only that, once you’ve been in the same stack for a while, the amount of new things to learn slows down a lot, and consequently, the amount of innovation in that technology area will also slow down.

In my years developing, I’ve gone from being a C++ programmer, to Java 1.1, to Java 5, Eclipse Rich Client Development, Hadoop/HBase consulting, Apache Spark Development and now I spend my days doing Microservice Development in Scala and Node.js.

No, I’m not yet looking to jump out of Microservice development, but I must admit, I’d love to dabble with some React and other web related technologies some day soon.

Tip 8 — Be inquisitive

They say that curiosity killed the cat. I guess it’s lucky I’m not a cat. I have a natural curiosity to understand how things work — this frequently means that I end up diving into the source code of frameworks or libraries that I am using.

For example, a few years back, I was working with Apache HBase and was interested to see how it optimizes reads from partitions, which then lead me to learn about Bloom Filters (incidentally a really cool approximation algorithm that I subsequently gave a talk on to 150 developers at Wix). And yes, this led to more than one team talking to me about their new ideas on how to use Bloom Filters to optimize their services.

Or last month, I was curious to see how our new Wix-wide logging framework was implicitly logging some cross-cutting aspects such as session id and ip address. This led me to add some enhancements so that it could also implicitly log extra parameters for our specific domains, subsequently saving fellow developers a lot of time in getting better logs, and also enabling more advanced monitoring dashboards.

Summing up

We were all created as unique human beings, and we are all wired differently . The tips I’ve given here are what works for me, and even though they might not work for everyone, I hope that you can take something away from these tips, and enjoy being the best that you can be.

A few of my favourite things

I also thought I’d share some of my favourite authors and their book(s) which have helped me immensely through the years.

Classics

  • Scott Ambler — Agile development,
  • Martin Fowler — Agile development, modern distributed architecture
  • Bob Martin aka Uncle Bob — Clean Code, Solid

Some other favourites

Online Course & Conferences

  • Coursera & Udemy — Endless courses on technologies such as git, docker, Functional Programming….
  • GOTO conference — amazing conference sessions available online

--

--

Hayden Marchant
Wix Engineering

Server developer with over 20 years experience. Passionate about programming, learning new technologies, and making it work. Currently working at Wix.com