What Being a First-Time Parent Taught Me About Programming

October 24, 2019

My partner and I finally felt like everything was in order. I was a few years removed from Dev Bootcamp and reached mid-level developer, she was starting her first job as a Nurse Practitioner after grad school, we owned a cozy house in a nice neighborhood, everything was falling into place.

Then we decided to start a family and almost a year later, Addison was born.

Any first-time parent will tell you how there’s no way to prepare for a new child. You can plan, take the classes, buy the must-haves, but nothing will prepare you until you dive into it. As I look back on the first seven months, I realize how much I could equate being a new parent with programming.

You get a fresh ticket, you try to estimate what it will take, but then you find an edge case you’ve never seen before, or it turns out the complexity is way deeper than it appeared on the surface. The more story points completed, and the more diapers changed, the more I realized just how similar programming and being a first-time parent really is.

If it stinks it probably needs changing

You’re in the grocery store and that all too familiar smell of a dirty diaper fills your nose. You tell yourself that you’re almost to the checkout and that it can wait, but as any parent can tell you if you can smell it, it needs to be changed now, or it’s only going to get on your shoes.

The same thing applies to your code. You’ve been staring at the screen for three hours, slowly working on a way to get the data you need to show up just right, and you finally have a working solution. The problem is that your code stinks. You can count at least three code smells and you don’t have any tests written. The business needs the feature today and this is the last thing you need to do before moving on to a new project so you just want to push it up.

If it stinks, it probably needs changing. That code may work great now, heck, it might be good enough, but more often than not it’s going to come back to bite you. If you do not take time to write good tests, you're going to have the user find that edge-case bug that could have been avoided if you had tested for it. If you don’t remove the duplicated code that you have in six different places, you will be performing shotgun surgery after you have to make an update to the logic. Take it from a new parent, the best way to keep your codebase, and your shirt, clean is to change it when it stinks.

It’s okay to start fresh

There was one point during my paternity leave that I had run out of options and didn’t know what to do. Addi just wouldn’t stop crying. I had tried to change her diaper, tried to feed her, tried to put her down for a nap, and tried rocking her, nothing seemed to work. In a desperate attempt, I just started from the beginning. I got her all different clothes, a new diaper, different sheets, and a different lullaby, and it worked. I’m not sure if there was something that was poking her from her clothes that I didn’t see, but she finally laid down for a nap.

It’s okay to start fresh. We’ve all had that ticket that we just keep trying different things to get the logic to work right. We keep adding and adding to the code until it’s unrecognizable, and then we try to sort out what has and has not worked. It’s okay to `git stash`. It’s okay to create a new branch and start fresh. Don’t look at this like time wasted! It’s not time wasted as long as it got you closer to the solution. See that stash or old branch as a learning experience about the things that didn’t work. Use your fresh start to your advantage. Starting fresh just means that you have a better idea of what your goal is and how to achieve it. Use Test-Driven Development to write tests that remove the possibility for you to make the mistakes you did in your old branch, and write tests that help clarify what return you want. Just like with Addi, sometimes the best solution is to just start with a clean slate.

You have to dedicate yourself to it

G2 is very generous with their paternity/maternity leave, giving us twelve weeks. My partner and I decided that she would take her maternity leave first and then I would take my paternity leave. That meant that for 12 weeks I would be the sole care-provider for Addison, and that was very intimidating to me at the beginning. But as the weeks came and went, it really gave me an understanding of what it takes to be the best parent that you can be. It means that you have to immerse yourself into being a parent. It means doing the little things like reading on what you should be doing at what stages, practicing “tummy time” even though it makes her upset, waking up to make sure she’s fed and changed. There is no off day as a parent.

You have to dedicate yourself to it. Programming is a craft, and it’s a creative process. You might be able to get by if you treat it like a nine-to-five job, but you will never excel at it unless you constantly are trying to become better. You have to read books and articles to see how you can improve. You have to practice new things. Programming is an ever-evolving world and unless you are improving, you will be left behind. It is just like raising a child, as soon as you think you have figure out the immobile baby stage, they are starting to crawl.

In conclusion

Raising a new kid is hard, and so is becoming a professional programmer. But it’s also fun. It’s a creative process that constantly gives you feedback on where you are at. You are sculpting and shaping the future of your child’s world, and you are doing the same for your codebase. If there is one piece of advice to give either a new parent or a new programmer, it would be patience. Take your time to do it right. Do not take the chance that a stinky diaper or stinky code will be okay. Stop what you are doing and change it. Start with a new file when code has become convoluted, taking time to set up a new file and writing tests to eliminate what you’ve already tried. Immerse yourself into your craft. Take your time and enjoy the process. Some things might take longer than you expect. Make sure you are stopping and learning from the experience. Before you know it she will be another month older, and you will be on to your next project.

What Being a First-Time Parent Taught Me About Programming My partner and I finally felt like everything was in order. I was a few years removed from Dev Bootcamp and reached mid-level developer, she was starting her first job as a Nurse Practitioner after grad school, we owned a cozy house in a nice neighborhood, everything was falling into place. https://learn.g2.com/hubfs/eng-blog/first-time-parent-programing.jpg
David Bicanic David Bicanic works with G2 as a Software Engineer. He was born and raised in Waukegan, IL and learned engineering from Dev Bootcamp. His interests include Chicago sports, video games, and creating web apps. https://learn.g2.com/hubfs/_Logos/david-bicanicUpdated.jpeg

Never miss a post.

Subscribe to keep your fingers on the tech pulse.

By submitting this form, you are agreeing to receive marketing communications from G2.