5 Ways To Sharpen Your Saw as a Programmer

A saw-sharpening guide that helped me improve as a programmer

5 Ways To Sharpen Your Saw as a Programmer
Photo by Pressmaster, rights obtained via Envato Elements.

Yesterday, my day started with a pair programming session with my new colleague Susan. Su, as she likes to be called, started at the company last week as a software developer.

Before we started, we first agreed on some pair programming rules. What style are we going to use? Do we use Ping Pong or standard Driver and Navigator? After how much time do we switch roles? When do we take breaks?

We began with the classic pair programming style, Driver and Navigator. Su started as the driver.

We started with a small task. We had to increase the frequency with which our system checks if there is data to be processed. This value was hardcoded in a file that also contained the data-processing logic.

I proposed that we extract the value into a configuration class. Su agreed, pressed two keystrokes, and bam! She added a new file and class to the project. “Wow, that was fast,” I thought.

I suggested we should rename the file and class to DataProcessingConfig. Again, Su pressed two keystrokes, entered the new name, and bam! She renamed the file and class. Wow.

“Do you ever use the mouse?” I asked.

“I try not to,” Su replied.

“But how do you remember all those keystrokes?” I responded.

“I sharpen my saw every day,” Su said.

Su explained what she meant by sharpening the saw. It comes from Stephen Covey’s book entitled The 7 Habits of Highly Effective People. In Chapter 7 of the book, Covey writes the following:

“Suppose you were to come upon someone in the woods working feverishly to saw down a tree. ‘What are you doing?’ you ask. ‘Can’t you see?’ comes the impatient reply. ‘I’m sawing down this tree.’ ‘You look exhausted!’ you exclaim. ‘How long have you been at it?’ ‘Over five hours,’ he returns, ‘and I’m beat! This is hard work.’ ‘Well, why don’t you take a break for a few minutes and sharpen the saw?’ you inquire. ‘I’m sure it would go a lot faster.’ ‘I don’t have time to sharpen the saw,’ the man says emphatically. ‘I’m too busy sawing!’”

When we translate this to programming, sharpening the saw is anything you do that isn’t programming but makes you a better programmer.

This article lists the five things that Su does to sharpen her saw.


Start Every Morning With a Code Kata

A person practicing martial arts on the beach
Photo by Thao Le Hoang on Unsplash.

To become better as a programmer, you have to practice. The definition of practice is “To do or perform something repeatedly to acquire or polish a skill.”

Now, you would probably say that you practice every day while doing your job. But this doesn’t qualify as practice.

That is why Su starts every morning with a code kata. A kata is an exercise in karate where you repeat a form many, many times — continuously improving. The intent behind a code kata is similar.

A code kata is a small coding exercise that forces you to think about the issues behind programming. For example, Su tries to perform the code kata without using a mouse. Not using a mouse forces her to memorize the keyboard shortcuts of the IDE.

Other programmers try to solve a problem without using if statements or loops. Or they try really hard to come up with good names for methods and variables.

The point of the code kata is not to solve the problem. The goal is to practice.

If the code kata becomes boring after a couple of weeks, you are on the right track. You can find code katas here:


Practice Reading Source Code

Code
Photo by Luis Gomes from Pexels.

You probably think that you write more source code than you read. I don’t think this is true. If you want to add functionality to an existing application, you must first find the right place to add the code. This means reading through the source code.

In his book Clean Code: A Handbook of Agile Software Craftsmanship, Robert C. Martin states that the ratio of reading versus writing is over 10-1.

“Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code. …[Therefore,] making it easy to read makes it easier to write.”

So, it is important to get better at reading and understanding source code.

Just as with programming, the reading of source code you perform during your day-to-day job doesn't qualify as practice. Instead, try to read different source code — maybe even in another programming language.

Contribute to an open source project

For example, browse the open source projects on the website Up For Grabs. It shows a list of projects that need help. The projects have curated tasks specifically for new contributors. Try to start and finish a task.

You have to read the source code and documentation to get an overview of the project. The great thing is that you will be practicing reading source code and helping open source projects.

Recognizing patterns in an open source project

Another interesting practice for reading source code is recognizing design patterns or architecture patterns in open source projects.

If you need some inspiration, take a look at this research paper from Stol et al. called “Identifying architectural patterns used in open-source software: approaches and challenges.”


Write About Your Experiences in Programming

An antique typewriter on a old wooden desk
Photo by Patrick Fore on Unsplash.

While we teach, we learn,” said the Roman philosopher Seneca. If you are learning something, there is no better way to solidify your understanding of the material than to write it down. There is no better way to test your knowledge than to attempt to teach it to somebody.

So start writing about your experiences. Create a blog, write on Medium or another platform. Just start writing.

Maybe you think that people with more expertise have already written all there is to know about a subject. But that doesn’t matter. Your experiences are unique. Most experts have forgotten what it was like to be a beginner. Why is the topic hard to understand? Write about what surprised you. Which obstacles did you face?

Here are some ideas to help you start your first post:

  • Write about the first task you picked from Up For Grabs. What did you learn? How did it go?
  • Write about your first code kata. Which one did you pick and why?
  • Summarize what you learned from a course or online conference.

Read Programming Blogs

A woman on a couch reading a book
Photo by Seven Shooter on Unsplash.

An obvious way to sharpen your saw is the thing you are doing right now: reading programming blogs. Reading is important. It helps to expand your mind and give you more ideas. Reading keeps your minds young, healthy, and sharp.

There are even studies that show that reading helps to prevent Alzheimer's disease.

Here are some programming blogs that I visit often:


Work on a Side Project

Working on a laptop while holding a phone
Photo by Christina Morillo from Pexels.

If you are like me, your day job is probably filled with getting stuff done. Handling your job’s responsibilities and finding ways to be productive is the main part of being a good employee.

So, your focus is limited to your job. Expanding your skill during your workday feels impossible. Starting a side project is a great way to develop your talent and can allow you to show people what you’re capable of doing.

With all the available resources and tools, it has never been easier to release your side project to the global market.

A funny thing about side projects is that you are your own client. You are in complete control. A side project gives you a testing ground for new and innovative ideas. To get the most benefits out of your side project, there should be a critical difference between the work you do all day and the work you do on the side.


Conclusion

So, these are the things Su does to sharpen her saw. I had a fun and productive pair programming session with her. In the end, she also mentioned coding dojos. Su frequently organized them at her previous company.

A coding dojo is a meeting with other programmers. During this meeting, you work together on a programming challenge. There are various formats and styles you can use. I am sure that we will soon organize a coding dojo in our company. It sounds fun!

Thanks for reading. I hope this article helps you to sharpen your saw. Let me know what things you do to sharpen your saw by leaving a response.