What do ancient Greek philosophers, Navy SEALs, and software developers have in common?
They all benefit from the realization that discipline is freedom.
Discipline is often thought of as being unpleasant. Boring, painful, and lame are all adjectives often used to describe discipline. But actually, looked at differently, it’s not a bad thing at all.
Discipline is the act of training yourself to do things in a habitual and controlled fashion. It’s the act of implementing self-control in your life.
Discipline might show up in your life as healthy habits, like daily exercise or a meditation practice, or it might mean that you hold yourself to a certain standard, like a personal code of conduct or a particular religion’s tenets.
Software developers are not generally known for discipline. Many of us have unhealthy eating habits, barely move, and generally don’t take care of ourselves. There is no shortage of “cowboy coders” out there, producing mountains of sloppy work. Most developers do little to manage their own careers, expect management to take care of them, and take no responsibility when things go haywire.
We can all do better.
Discipline creates freedom. Taking responsibility for your health, craft, and career can lead to dramatic positive benefits in your life.
The freedom that comes from discipline can take many forms. For example, managing your career and finances can lead to financial freedom. You aren’t dependent on your next paycheck. Adhering to software craftsmanship principles creates software that’s easier to change. You can adapt to changes in requirements without having to work nights and weekends. And disciplining your mind through meditation or philosophy can help you free yourself from anxiety.
Let’s talk about how discipline can create freedom for you as a software developer, and some specific practices you can develop to help you get there.
Discipline in Your Life
Part of being a great developer is being the best person you can be. There are three life categories in which discipline can give you more freedom: health, wealth, and mental state.
Maintaining your health largely consists of doing somewhat boring things on a regular basis. Examples include getting enough sleep, exercising, eating healthy food, and brushing your teeth.
There are lots of books and courses that complicate these activities, but gaining all the information you can is far less important than simply developing good habits. A mediocre workout done daily is going to beat a perfect regimen that’s done only a few times.
You should start with things that you find enjoyable. Personally, I like hiking and swinging kettlebells. If you don’t know what you like to do, start with something simple like a 30-minute walk.
For other healthy habits, start small and work your way up. Focus on a small number of habits at a time until they become second nature. Then try a few new things.
There are numerous freedoms to be gained from adopting healthy habits. Exercising and eating healthy allow you to do a wider range of physical activities. For example, I drastically lowered my carbohydrate intake and doubled my maximum hiking distance, which made me feel better and want to do even more.
It’s also easy to underestimate simple freedoms like being able to walk comfortably. There are many people who have trouble moving around because they haven’t taken care of themselves.
Another benefit of maintaining healthy habits is energy. More energy means you can do more with your limited time. I optimize most of my healthy habits toward increasing mental energy. Additionally, you gain financial freedom, because paying to fix health issues is expensive.
Finances are another area where discipline creates freedom. Saving money and avoiding opulent purchases doesn’t seem like much fun, but there are some serious upsides.
The biggest upside is not being stuck in a job you hate. If you are living at the edge of your means, you are tied to that paycheck. You can’t take a lower-paying job because you don’t have any room in your budget. Even if you find a better job that pays more, you might not be able to handle the pay gap between leaving one job and taking that next, better job. Living below your means allows you to quit jobs you hate if necessary.
Debt also reduces your options. It’s hard to travel the world when you have two car payments and a mountain of credit card debt. There are lots of strategies for reducing debt, but all of them revolve around one simple concept: Your income needs to exceed your expenses.
Attack this problem at both ends. Increase your income by building a business or getting more money at your job. Reduce expenses by taking a look at where you spend money and eliminating the purchases that don’t add value to your life. Find ways to buy or do the things you enjoy for less money.
Your mental state is another area that can be improved through discipline. There are lots of practices your can adopt, such as Stoicism, Buddhism, meditation, or simply spending more time outside.
For me, adopting Stoicism was one of the best choices I’ve made. Stoicism is the perfect moral operating system for developers. We live in a fast-paced and ever-changing world. Stoicism gives you the mental tools to handle the chaos and stress that come with being a software developer.
By adopting one or more of these practices, you can be freed from being ruled by your emotions. That doesn’t mean that you feel nothing, but that you instead gain a degree of control over them.
Discipline in Your Craft
Building software is a difficult craft that you can spend a lifetime mastering. It’s also a craft where being undisciplined and sloppy can make your life, and the lives of your colleagues, harder down the road. Being disciplined in your craft grants you a number of freedoms in your work, including more time to focus on the work you want to do and better opportunities to advance your career.
Adopting best practices like test-driven development or building a suite of automated tests means that you have the freedom to change your software without worrying that your clever refactoring might blow up the application. Developers who don’t build automated testing lose the ability to change their software without fear of regressions. Being able to deliver high-quality software on a consistent basis is the key to building trust in your user base. Not following best practices can land you in a situation where your users second-guess every choice you make, because you aren’t giving them consistent results.
Other examples of best practices to follow include the SOLID principles and design patterns. If you want to learn more best practices, try reading some of the books in the Ultimate List of Programming Books.
Seeking feedback is hard, but doing so improves your code and your skills. Many developers avoid seeking feedback because of ego. No one likes hearing negative feedback, but it’s essential to growth. Avoiding feedback is a great way to become stagnant and obsolete.
You can seek feedback in a variety of ways, including pair programming, code reviews, and hallway usability testing (demoing code to whoever is passing by). Constant feedback means that less mistakes make it into production, which frees up your time to work on other things.
Communication with your end audience is another area that’s hard. Sometimes you just want to put on your headphones and be left alone. However, building stuff that our users want requires communicating with them.
There are many situations that can be resolved with a phone call or an email. Have a requirement that’s unclear? Pick up the phone. Can’t get that new feature done in time? Send an email. Got a bug that’s not actually a bug? Walk over and talk to someone.
I call this “solution by diplomacy,” and it’s my favorite way to fix a bug.
You gain two freedoms by being a good communicator with your users. The first freedom is the time you save not building stuff they don’t want or need. The second freedom comes from trust. The fastest way to get micromanaged on a project is to destroy the trust you have with your users. Once that trust breaks down, everything you do is suspect. You can avoid that fate by maintaining a strong line of communication.
Adopting a disciplined approach to software development reduces bugs, creates happier customers, and gives you more opportunities as a software developer. A developer with a proven track record of delivering high-quality software and communicating well has the freedom to pick the kinds of projects and jobs they want to work on. It’s harder than throwing code against a wall and seeing what sticks, but it’s worth the effort.
Discipline in Your Career
Most software developers have a haphazard approach to managing their career. They work from 9 to 5 and go home to veg out while watching TV or playing video games. Development is just a job to these folks.
Managing your career takes hard work and discipline. You need to have an idea of what you want your career to look like in the future, and then you need to develop a plan to get there. This plan could include blogging, speaking at conferences, taking courses, or building side projects.
For me, it’s a combination of all of these things, and yes, it is a lot of work. But the biggest payoff for me has been that it’s made me valuable and given me career options.
If your services are in demand, you can pick what kind of job you like. Want a job that’s going to push you hard and pay you a lot of money? Easily done. Want a job where you work less, but still get paid well? There are plenty of those jobs as well. If you manage your career well, you can pick the kind of place you want to work at.
There are two disciplines you should adopt to manage your career: plan the skills you want to learn, and market yourself well.
It’s important to intentionally plan the skills you want to learn. You have a limited amount of time, so do your homework to figure out where the market is going and choose skills that will help you send your career in a good direction.
Even if you have a job you like, you’ll still want to grow in that role. Maybe that means figuring out what technologies are important to your company and learning those. Or maybe it means finding new technologies that can give your company an edge. It’s also a good idea to keep your skills up-to-date because of the possibility you could lose your job at any time.
One thing I do is create a personal Technology Radar, where I list the technologies I’m using and the technologies I want to learn more about. I also use this time to think about the market as a whole and where I fit into it. This is a great quarterly exercise.
Personally, I’ve been interested in data analysis, so I’ve been working on those skills. Data science is a hot field right now, and I want to know more about it. Use a tool like the Technology Radar to figure out what skills you want to learn.
You should also develop the discipline of marketing yourself, which involves consistent effort.
One way to get started is to maintain a blog. Even if you don’t become a millionaire blogger, you are creating a documented record of your skills. Also, blogging is a great way to improve your communication skills.
There are two main strategies for blogging. If you are blogging to build an audience, pick a specialization. For example, you could blog about asynchronous programming in C# or automated testing in Java. If you are blogging mostly for yourself, then write about the things you are working on. It feels great to Google for a solution to a problem and find it in a blog article you wrote a year ago.
Another way to market yourself is by speaking at user groups and conferences. Speaking can be scary, but it’s a great way to meet people and become known in your community. During my last job hunt, the person interviewing me attended a talk I did the previous month. My job search didn’t last long.
Discipline Will Give You a Better Life
Discipline is a word that’s rarely associated with freedom, but it should be. When you become more disciplined, you take control of your life. You give yourself more options. Adopting discipline in your life, craft, and career will make you healthier, wealthier, and happier.
Here’s how you can start:
- Sit down and make a list of the habits or actions that are negatively impacting your life.
- Rank them in order of their impact. You don’t have to be exact, but you should have at least a few “buckets,” like critical, high, medium, and low.
- Pick a habit from the top of your list and commit to fixing it over the next 30 days.
- Put a notification in your calendar 30 days from now to revisit your list and pick a new habit to improve.
Take a look at your life. Find where you are lacking in discipline and work to improve those areas. You will thank yourself later.