As programmers, we spend a lot of time in front of a computer. It’s not uncommon to go a full day staring at pixels on a screen as you click and type away. There’s a lot of pressure from employers to work long hours to reach the quarterly and annual goals set out by the management team, and it always feels like there’s too much work and not enough resources. The deadlines are tight, but we have to ship this quarter!
There are competing interests between employees and employers that may be hard to understand early in your career. When you’re young, you’re just happy to have a job and a good salary. But as you grow more experienced and progress through the different stages of life, your priorities may change.
Your employer, whether you like it or not, is motivated to run a streamlined and efficient business. Unfortunately, your employer’s goals probably don’t align with your long-term goals. Your company is incentivized to squeeze every ounce of productivity out of you while paying you as little as possible. Businesses operate on margins that they are naturally incentivized to increase by keeping costs low.
On the other hand, as a young programmer and individual contributor, your incentives are a bit different. Your goal is to maximize your salary, thereby increasing your quality of life, all while working as little as possible. Who wouldn’t want to make more money while working less?
So, now you can see there are conflicting interests between a business and their employees, and whether you like it or not, the business usually holds most of the power when it comes to the negotiating table. They are able to push their employees to work harder and meet tight deadlines because there are only a few options for the employee:
Work hard for a promotion.
Meet expectations enough to stay employed.
Fall short of expectations and get fired.
Leave voluntarily to find a better opportunity.
Most people choose to work hard for a promotion, but sometimes that promotion involves a lot more work than you may realize. It’s possible you may not love the work you’re doing but are happy with your comfortable salary, so you show up every day and do what’s asked of you, but nothing more.
Because you’re reading this book and you’ve made it this far, you probably fall into the camp of ambitious programmers who are looking to work hard for a promotion, which is great. The early years of your career are exciting and filled with possibilities and different directions for you to choose. You’re like a sponge—ready to absorb as much knowledge and experience as you can. You’ll spend long hours tracking down a pesky bug or building out the UI for a new page because it’s fun. And it won’t always feel like work because you love to write code and build things and solve problems.
But there are a lot of negative side effects from working too hard.
Unlock expert knowledge.
Learn in depth. Get instant, lifetime access to the entire book. Plus online resources and future updates.
There are other things outside of work that are at least equally as important as working long hours to meet your deadlines. In this section, we’ll explore what a good work-life balance means, and what you can do today to ensure you’ll have a long and healthy programming career.
Time Is Your Most Valuable Resource
You sell your time to your employer in exchange for money in the form of a salary. That might sound weird at first, but this is true for most people who work for a living. For people earning an hourly wage, it’s pretty straightforward: The number of hours they work directly correlates to the amount of money they make. More hours equal more money.
exampleLet’s look at some numbers:
Hourly wage: $50 per hour
Earnings per week: 40 hours x $50 per hour = $2,000 per week before taxes
Earnings per year: 52 weeks x 40 hours x $50 per hour = $104,000 per year before taxes
Pretty simple—more hours worked equal more money earned. For people on a salary, however, it’s a bit different. You and your employer agreed to a predetermined salary, usually on an annual basis, when you signed your employment agreement. If you’re on a salary, you’re not paid directly for the number of hours you work, but you’re expected to put in a certain amount of work and produce a certain amount of output.
exampleLet’s assume a 40-hour workweek:
Earnings per year: $104,000 before taxes
Earnings per week: $104,000 / 52 weeks = $2,000 per week before taxes
On a $104K annual salary and assuming a 40-hour workweek, an hourly employee and a salaried employee will earn the same amount. But unlike someone earning an hourly wage, if you’re on a salary and work longer workweeks in order to meet deadlines, the numbers aren’t in your favor.
exampleLet’s look at what happens if you work a 50-hour week on the same salary:
Earnings per year: $104,000
Earnings per week: $104,000 / 52 weeks = $2,000 per week
While there are many benefits that come with a salary, the reality is that your income for the year is fixed, which means you’ll be paid the same regardless of how many hours you work. Unlike an hourly wage, more hours do not equal more money. In fact, more hours equal less money on a per-hour basis. It’s not because you’re earning less, but because you’re using more of your time to earn the same amount.
caution Just to be clear, I’m not advocating for slacking off or working as little as possible to maximize your earnings per hour. My goal is simply to illustrate the relationship between salary and hours worked per week so that you are more conscious about how they affect each other. Knowing this will hopefully encourage you to work smarter when you are in the office so that you can avoid long nights and weekends when you need to hit a deadline.
In some cases, however, you may have no choice but to put in extra hours. As programmers, we deal with issues when our software fails, and it can fail at any time. You may get a phone call or a chat notification that the server is down, and you’ll need to hop on the computer in the middle of the night to help get the server back online. Or you may be working on a big project and need to have a working demo before an investor meeting, so you may have some long nights during crunch time. Lastly, you may need to work long nights and weekends so you don’t get fired. If you can’t get your work done during normal business hours, your job may be at risk.
There are a number of good reasons why you should work more than 40 hours a week, and everyone’s situation is different, so it’s something you’ll need to figure out on your own. It’s okay to work long hours every now and then, but when you find yourself working long hours week after week, it will start to affect your work-life balance.
It’s important to be aware of when your work starts to affect your personal life. If you’re canceling plans with friends or family, haven’t taken any time off in months, or haven’t been able to find any time for your hobbies because you’re too busy with work, try to take a step back and reflect on your work-life balance.
important Your job does not define your life.
We program for a living, but that doesn’t mean we should be coding all day every day to earn that living. It’s important to create a life outside of work for your own mental health, and to build relationships you can lean on if needed.
You weren’t meant to stare at a screen your whole life. There are plenty of benefits to getting away from the computer and unwinding in the analog world, and in the end, you’ll want to look back on your life and the incredible memories you made, not that you wrote the perfect algorithm or solved a tough programming problem for your employer.
It’s good to focus on increasing your salary early in your career, but you’ll soon realize that with a higher salary comes greater responsibility. You’ll be responsible for keeping projects on schedule, keeping systems up and running, and keeping your team’s throughput high so that they can continue to ship code to production, and so much more. A lot of these responsibilities don’t involve any coding, and some of them will involve sitting in more meetings and spending more time planning and writing feature specs and bug reports. You may have long nights and weekends rotating as the on-call engineer, or triaging and fixing bugs in the middle of the night.
The responsibilities that come with a higher salary are not the most glorious parts of being a programmer, and not everyone is cut out for them. You may not like doing these things, but you’ll justify it because the pay is so good. What’s important to realize though is that higher pay does not always bring happiness. What’s the point of sitting in meeting after meeting if you’re not happy at the end of the day? Is it worth the higher salary if you’re missing out on experiences with friends because you have too much work?
At some point, you’ll need to decide what’s best for yourself and your mental health. You’ll need to find a balance between your work life and your personal life, and that may mean taking a lower salary if it means you’ll be happier and have more time to spend with friends and family. Or it may mean that you stick to the individual contributor route rather than the manager path so that you can continue to write code. It’s up to you to figure out what makes you happy.
You’ll need to decide if it’s really worth it to spend late nights in the office, or if you’d be happier with less responsibility and the freedom to head home earlier in the day. Again, it’s okay to work late hours occasionally if it means keeping an important project on schedule, but if you find yourself working late week after week, even when there are no upcoming project deadlines, you may want to step back and ask yourself if that is really what you want.
More Hours != More Work
A common misconception is that the more hours you spend in the office, or working from home late at night, the more work you’ll get done. While it may feel this way, it can actually have the opposite effect and lead to a negative impact on the quality of your work.
Working longer has diminishing returns, because at some point your brain will hit a wall where you’ll start to drift and lose your ability to focus. A 60-hour workweek is not the same as two 30-hour workweeks. While it may feel like you’re getting more done in half the time, it may be lower-quality work.
Instead, focus on working smarter and more efficiently during your workweek so you can get all your work done in 40 hours. Distractions and context switching can kill your productivity.
exampleHere are some examples of what you can do to stay focused:
Buy a nice pair of noise-canceling headphones to minimize distractions.
Block off chunks of time on your calendar for “focus time.”
If possible, try to stack meetings back-to-back rather than having them spread throughout the day so you’re not switching contexts constantly.
Block social media and news websites on your work computer so you’re not tempted to check them during the day.
The more efficiently you can work during normal business hours, the less you’ll need to work after hours.
Sometimes, you’ll find yourself working on a problem towards the end of the day and it’ll feel like you’re making good progress. You’ll want to keep the momentum going and will feel like working a little late to wrap things up. You’ve almost got your code working; just a few more lines of code and everything should compile without errors.
At some point, you need to find a good stopping point and just call it a day. For your own sake, it’s better to close up your laptop and unplug at the end of the workday. You can always pick up where you left off tomorrow, or next week, so don’t put too much pressure on finishing a task before heading home for the night. The work will always be there tomorrow.
It’s a marathon, not a sprint, so you need to set stopping points and take breaks from the computer. Good software takes years to build, so you’re never going to get it all done in one day or one week. Rome wasn’t built in a day, as they say.
We’re never done building software. There’s always something that can be improved, whether it’s fixing bugs for more reliability, implementing a faster algorithm or a better user experience, or reducing the cost of our infrastructure. There will always be more work to be done, so don’t put so much pressure on yourself to stay late and finish what you’re working on.
You won’t be able to hit every deadline, and it’s not the end of the world if a project runs over schedule occasionally. Software projects are notoriously hard to estimate correctly, and sometimes your estimates will be wrong. In the end, quality software that takes a little longer is better than buggy software that was rushed through to production, so keep that in mind when you’re working late.
An important aspect to a good work-life balance is to keep a regular schedule. It’s easier to close up your computer at the same time every day than it is to decide at different times when you’re done working for the day. You may notice some engineers pack up their computer once the clock hits a specific time because they know how important it is to spend time away from their work. They know the importance of stepping away from the computer and of having a meaningful life outside of the office.
It’s equally important to find a routine in the morning that works for you. Try not to rush into work as soon as you roll out of bed, which can lead to stressful and hectic mornings. It’s important to find time in the morning to relax before getting your workday started. Maybe that involves doing yoga, reading the news with a cup of coffee, spending time with your family or your pets, working on a side hustle, or exercising. Spending time to relax before the stress of your workday is important for your mental well-being and a good habit to build if you want to perform well.
Writing software for work can be fun. You get to use cool technologies, and you get paid to solve tough technical problems. But writing software for fun can also be satisfying. When you’re at work, you don’t get to make every single technical decision, but when you work on side projects, you have a blank canvas. You can build whatever you want, however you want. It’s refreshing, satisfying, and frustrating all at the same time. Experiment and try new things, and don’t worry if the code gets messy because you don’t have other engineers peer reviewing your work. You’re able to cut corners in order to get something to work quickly, and this is where your creativity really shines, because there’s no risk of failing.
The excitement you get when you take an idea in your head, build it with code, and see it come to life is hard to describe. Lots of developers enjoy it so much that they’ll work on their own projects outside of work. It’s easy to get immersed in these projects because coding often doesn’t feel like work. We do it because it’s fun and we love the challenge of problem solving.
But it can be hard sometimes. Not because you can’t solve a problem, but because it often feels like there’s a stigma in our industry if you’re not working on a side project or contributing to an open-source project, especially when you’re applying for new jobs. There’s pressure to work on side projects so that you have some work to show a potential new employer, especially if you’re just getting started in your career and don’t have a lot of professional experience.
It’s completely okay if you don’t have any side projects or any open-source code you feel proud of to show off. You shouldn’t feel any pressure to contribute to the open-source community. If you do, that’s great, but don’t feel like you’re any less of a developer because you don’t code in public.
Contributing to open-source software can often be intimidating for inexperienced engineers. You may not feel like you understand the code enough to contribute, or you may be embarrassed to put your code out in the public—and that’s okay. The open-source community can be pretty harsh, and people often have unreasonable expectations for how software should work, even when it’s free.
Some of the best programmers in the world have never written a single line of code for open-source software. There are a number of reasons why this may be.
They are forbidden by their employer. Sometimes, the contract you sign says you cannot share any code, algorithms, or learnings from your day job with anyone else.
They don’t have time to write open-source software because they’d rather spend their free time with their friends, family, and pets.
They don’t know what to build.
They have other priorities in life outside of programming.
Whatever the reason may be, don’t feel like you absolutely need to work on side projects or write open-source software to be a good developer. It’s completely optional and should be something you choose to do because it brings you joy or maybe because you’re lucky enough to make some side income from a project.
In the end, working on side projects outside of work is a double-edged sword. It’s easy for some people to get home from work, open up the laptop and get right back to coding. Sure, it’s a good way to learn new technologies and level up your skills, but don’t let coding take over your life. You’re a programmer by trade, but don’t let that define who you are. It’s good to step away from the keyboard every once in a while, and honestly, you should find time every day to do things that don’t involve staring at a screen.
We’re all human, and we all need meaningful interaction with other human beings. It’s right there, sandwiched in the middle of Maslow’s hierarchy of needs. After our physiological and safety needs have been met, humans have a need for interpersonal relationships and a feeling of belongingness. This social belonging that we all strive for can come from friends, family, or a significant other.
As you learn to build a work-life balance that works for you, it will be important that you find time to break from the digital world and work on forming new friendships and relationships. And it’s equally important that you nurture your existing relationships with friends and family. We’re social creatures, and it’s good for our mental health to unwind with people we care about.
If you find yourself in a new city or feel like you’re lacking friends at any point, it’s up to you to make an effort to change that. Try to get out of your comfort zone a bit and meet new people. It’s extremely hard at first, but the more you do it, the more you’ll feel comfortable with it.
exampleHere are some ideas for meeting new people:
If you’re close with your coworkers, ask them if they’d like to hang out after work or on the weekend. You already know them well from working together, so try to find any shared hobbies or activities that you’ll enjoy together. Some people personally don’t like to mix work with pleasure, but other people have met lifelong friends and partners who started out as coworkers.
Attend local meetup groups in your city. If meeting other people is hard for you, try attending some technical meetups first to get your feet wet. You’ll be around like-minded people, and you may even learn about a new technology, language, or framework while you’re at it. It’s even better if you can find and attend some nontechnical meetups related to a favorite hobby or interest. You’ll meet some interesting people, and as you attend more meetups, you’ll start to recognize familiar faces and get to know people better.
Join a sports league. Adult sports leagues are popular, and your employer may even sponsor some. You get the advantage of getting exercise in addition to meeting other people and getting out of the house.
Volunteering can be rewarding in more ways than one. Not only are you giving back to your community, but you’ll be working with other people who want to help too.
These are just a few examples of what you can do in your free time to get out and meet other people, but it doesn’t have to always be in person. Even a phone call to your parents, siblings, or close friends can give you a mental boost and lift your mood after a long day of work. It’s easy for us to let our relationships dwindle as we get older, but a little bit of effort to keep in touch with people close to you can go a long way.
Take Care of Your Body
Programming is mentally taxing, but it also has a big impact on our physical health. You may be able to get by on pizza, energy drinks, and sleepless nights when you’re young, but as your career develops, you’ll need to put more focus on taking care of yourself in order to stay sharp. Your health is crucial to your well-being, and issues with your health may contribute to issues in your career and personal life.
If you take care of your diet and your physical health, improvements in your physical and mental health will follow. A few changes in your lifestyle can snowball into daily habits and routines that can pay dividends well into your future, and it doesn’t necessarily take a big time commitment each week to see results.
exampleImproving your diet and physical fitness will:
Increase energy levels
Improve mental health
Help with weight management
Strengthen your bones and muscles
Reduce chronic pain
Reduce the risk of depression
Reduce the risk of disease
Help improve your sleep
The hardest part about improving your physical health is finding motivation, especially if you have a busy schedule and are under a lot of stress at work. Building up to a consistent routine takes time and dedication, but once you get the ball rolling, it will be easier to stay motivated and continue.
exampleHere are some ways to find motivation:
Look for opportunities to make small changes to your lifestyle. For example, go for a walk after each meal to help your body digest instead of sitting down at the desk after lunch or on the couch after dinner.
Set aside time in your day for physical activities. Block off time on your calendar to go for a walk in the morning or a run during lunch. Set it up on a recurring schedule to help build a daily or weekly routine.
Start with activities and locations that you enjoy. Take a hike on your favorite trail with great views, or bike around your favorite neighborhood. Making sure you enjoy what you’re doing and where you’re doing it will help you stay motivated.
Try exercising with friends. They can hold you accountable if you try to skip a workout, and you can hold them accountable as well.
Use fitness trackers as a way to gamify the process and compete against yourself or your friends.
Start slow, and only work up to more intense workouts when you feel like you’re ready. It’s okay to progress at your own pace, and there’s no need to compare yourself to others who may be farther along in their fitness journey.
Exercise and physical activities are an excellent way to improve your mood, your health, and your overall well-being. It doesn’t matter what kind of exercise you choose, whether it’s cardio or weight lifting. What’s more important is that you get up and move. Your body will thank you for it, and it’ll help keep you feeling young.
Reading is a great way to unwind at the end of the day, and it’s an easy way to avoid staring at a screen before going to bed. There’s nothing better than getting lost in the pages of a book that you can’t put down.
It doesn’t matter what kind of books you read; the only thing that matters is that you’re reading. In doing so, you open your mind up to new ideas, new characters, new feelings, and new ways of thinking. You can get lost in a fictional world with vivid scenery and a protagonist, or learn about the history of a famous figure that changed the world. You can improve your confidence with a self-help book, or even expand your skill set with a good technical book. Just pick a book or a topic that sounds interesting to you and start reading.
The hardest part is actually finding the time to read. For busy professionals, good times to read are in the morning right when you wake up, or at night right before going to bed. Try to find time in your schedule that works for you. The good thing about books is that you can take a break and pick up right where you left off, so even if your schedule is busy, you can still read when you’re able to find some time.
The more you read, the more you’ll come to realize what you enjoy and who your favorite authors are. Writing well is a difficult skill, and when you find an author you enjoy reading, they can take you on journeys you never thought possible.
We all need time away from work to unwind and relax. There’s no better feeling than closing up your computer on Friday afternoon after a long week. The weekend has arrived, and you’ve got a few days off to do whatever you want. Time to get out of the house and explore your city.
It’s exciting to find a new restaurant you like, a new park with a great view, or a hidden gem within your city. What’s even better, though, is traveling to a new city where every restaurant, park, or public space is waiting to be discovered.
Traveling to new destinations can be fun, relaxing, and inspiring, and sometimes stressful, but don’t let that stop you. Everyone should travel because it opens you up to new experiences and challenges you to get out of your comfort zone. You’ll need to plan ahead, make decisions on the fly, stay organized, and get to places on time in order to make your connections. Not all of these skills translate well to your professional career, but they give you good experience and help build confidence that you can solve problems on your own.
Traveling for an extended period of time helps to clear your mind so you can come back to the office feeling refreshed and ready to jump back into your work. It helps break up the monotony of your job when the weeks start to blur together. An upcoming trip will give you something to look forward to, and you’ll have memories and stories to share when you get back and are ready to jump back into work.
If possible, try to travel internationally, even if it’s just to a neighboring country. It’ll open up your world to new and exciting perspectives. If you’ve never traveled abroad before, it can be intimidating, but afterwards, you’ll be glad you did. You’ll experience new cultures and societies and see how they solve daily problems similar to ones you experience at home. You’ll learn about their history and experience their art and architecture.
Don’t be intimidated if there’s a language barrier; it’ll force you to get creative with how you communicate as you try to convey your thoughts. Sometimes, it can be surprisingly easy to understand the gist of a conversation, even if it’s between two people that don’t speak the same language. Using hand gestures and simple words and phrases can get you most of the way there. These new skills will help you throughout your career and give you a better sense of empathy when communicating with other people.
It’s a very humbling experience when you return home from traveling abroad. You come back with new perspectives on the world and a new respect for different cultures. You’ll have more appreciation for the things you have and a better understanding of things you might be taking for granted. Traveling can be rewarding and one of the best things you can do to grow as a person. You’ll learn things that you can use both in your career and in your personal life, and you’ll come back with some great stories to tell.
It’s entirely up to you to create the work-life balance that’s best for you. No one else can help you do that, so you’ll need to figure out what kind of balance you really want. If your current employer’s values and policies don’t align with the work-life balance that you’re looking for, it may be time for you to look for one whose does.
If there’s one piece of advice you take away from this section, you should always remember that you are a programmer by trade, but that should not define who you are. It’s not healthy to spend all of your time in front of a computer screen typing into a text editor. That’s not the way we were meant to spend our lives, so get out of the house and away from the keyboard as much as you can.
You won’t regret it one bit when you’re older and look back at the memories you made along the way. There’s more to life than just work, so have fun and make it a life worth living.
We’ve covered quite a bit by now, and it’s okay if it feels overwhelming. You’re not expected to know all of these things right now, and it’s impossible for someone, even a senior developer, to be an expert on every topic covered in this book.
If you take what you’ve learned throughout this book and put it into practice each week, you’ll come to a point where you’ll be confident in your technical abilities and ready to ask for the promotion to a senior role. Asking for a promotion can be daunting, but if you feel like you’re ready to make the jump, it’s important to start having the conversation with your manager.
It may sound easy, but it’s harder than a lot of developers realize. You’ll be putting yourself out there and asking your manager to evaluate your technical abilities and your soft skills. If you’re feeling vulnerable, that’s normal. After all, you’re putting your career trajectory in the hands of someone else. Of course it’s nerve-racking!
You’re reading a preview of an online book. Buy it now for lifetime access to expert knowledge, including future updates.