Hi Friends,
Welcome to the 91st issue of the Polymathic Engineer newsletter. The topic of this week is simple, but yet important: how to get better at coding.
The outline will be as follows:
the importance of practice
coding challenges
projects
open-source
Project-based learning is the best way to build technical skills. CodeCrafters is an awesome platform to practice interesting projects such as build your version of Redis, HTTP server, and even Git from scratch.
Sign up, and become a better software engineer.
The importance of practice
Code is the most visible output for a software developer. But writing code isn't just about getting our job done; it's also about how we do it.
The goal is not only to complete our tasks faster but also to write code that is cleaner, more efficient, and easier to maintain.
Much like athletes need to train to get better at their sports, as a developers we need consistent, focused practice to excel truly.
But why is practice so crucial in coding, and how can we approach it effectively?
Practice isn't just doing something over and over; it's about getting better at it. When we code at work, we're mostly focused on solving problems and meeting deadlines.
However, to grow as developers, we need dedicated time to focus on our techniques, experiment with new approaches, and refine our skills without the pressure of delivering.
Consider learning to drive a car. When you start, every action requires a conscious thought. You need to think about changing the gears, checking mirrors, staying in the lane, etc. But with practice, all these actions become natural, allowing you to focus on your journey, listening to the radio, or talking with other passengers.
In the same way, using new coding techniques, design patterns or tools gets natural with practice so that you don't think about them anymore. You only focus on what you want to do with them.
You can practice and improve your coding skills in many ways, like coding challenges, personal projects, and contributing to open source. Each method offers unique benefits and opportunities for growth.
Coding Exercises
One effective way to improve your coding skills is through small coding exercises called katas. The word "kata" comes from martial arts, where people practice a set of moves over and over again to get better at them.
Most of the time, these kinds of exercises are well-defined problems that are quick to understand but complex enough to require some thought and effort. They can be finished in a few minutes to two hours, which makes them great for focused practice sessions.
For example, you can write a program to calculate the score of a bowling game to get better at Test-Driven Development (TDD) or you can implement a Sudoku solver to improve your algorithmic skills.
The beauty of katas lies in their simplicity and repeatability. The main point is not to solve the problem but to use it as a chance to work on tools or skills you want to get better at.
You can also solve the same problem multiple times. This lets you try out different approaches, compare them, and learn more about different ways to code.
This deliberate practice will pay off when you're working on real projects, allowing you to focus on finding good solutions rather than struggling with how to implement them.
This repo has a good list of katas.
Projects
While coding exercises are great for focused practice, working on your own projects is how you can apply and expand your skills in a more realistic setting.
The beauty of such projects is that you can experience many aspects of a real software project without pressure. You need to come up with an idea, plan features and create a backlog, think about priorities and make estimates, write code and tests, and consider deployment and version control.
However, there are no deadlines, no need to make money, and you can control all the requirements. You can use whatever technologies and methods you want, whenever and wherever you want. You're the boss and the only one who decides.
When choosing a project, the goal isn't to create the next big startup but to learn and become more comfortable with different aspects of software development. A good idea is to pick a topic you're passionate about or build an app that solves a problem you have.
The advantage of choosing something you care about is that you'll always have ideas for new features and want to work on them because you'll want to use them yourself.
Open Source Contributions
Contributing to open-source projects is another excellent way to practice and improve your coding skills. There are thousands of open-source projects out there, covering a lot of technologies and domains.
Here's how you can get started with open-source contributions:
Find a project that fits with what you want to learn or know more about.
Download the source code and familiarize yourself with it.
Run and read the tests to understand how the code works.
Start small by adding documentation, writing tests, or fixing a simple bug.
You can take on more complex tasks or propose new features as you get more comfortable.
When contributing to open source, you're not just improving your coding skills but also learning how to work within an existing system, follow project guidelines, and communicate effectively with other developers.
These are all valuable skills in professional software development.
Don't be intimidated if you're new to open source. Many projects have tasks that are marked as "good first issues" for people who are just starting out. The key is to start small, be respectful of the project's processes, and be open to learning from others in the community.
Interesting Reading
These are some interesting articles I read this week:
Nice tips Fernando. It's difficult to improve at any skill without putting in the necessary practice.
I personally try to keep a mix of learning new stuff and working on mini-projects to build problem solving mindset.
Also, thanks for the mention!
Personally, here’s what I’ve done.
- keep a notebook to write down lessons learnt from solving problems
- ask how the skills you learnt from solving one problem can be applied to solve another one
- always solve every problem twice. You can use help during the first time, but during the second attempt ensure you write the solution in your own words