Life lessons I’ve learned from programming
Posted on September 20, 2015
I taught myself how to program in PHP when I was 15 so I could start a blog where my friends and I could share funny stories. For some reason, it was incredibly easy for me to pick up even though I had no formal training at the time.
Why was it so easy to pick up? Who knows. Maybe it’s because I’m awesome. Maybe it’s because I have a very logic brain. The latter is most likely, but I’d like to think it’s the former. Programming is logical. So following a set of rules to get the language to do what I want seemed natural.
I’ve since had a more formal education. I received my B.S. in Computer Science from Northern Illinois University in 2008 and I’ll complete my M.S. in the same from Depaul University in 2016. In school, I learned that there was a lot more to programming than pounding out line after line of code. There was a method to the madness. Code could be beautiful. To write awesome code, you had to practice.
It’s been 14 years since I started programming and I’ve come to realize that many of the lessons I’ve learned about programming also apply to life.
1. Attack things with a plan
When I first started programming, I would open up Dreamweaver (oh man, that’s dating myself) and just start hacking away at code without any forethought into what I was doing. I never looked at the big picture, just the task at hand. This lead to a lot of really inefficient, duplicative and hard to manage code.
In school I was taught that there was a vital step that was missing in my process. A step that made everything easier down the road. Design.
Before ever touching a line of code, there needed to be a certain amount of planning. How would different parts of the application interact with one another? What is the end goal of this piece of code and how do I separate it into logical pieces? What are road blocks that I may run into, and how do I avoid them?
Applying these same design principles to life situations can help produce more successful outcomes. For example, if you’re looking to pay off debt, come up with a monthly budget that your comfortable sticking to every month. If you mindlessly throw money at that debt without a plan, not only are you more likely to fail, but more importantly, you have to constantly think about it every month instead of just following the plan you laid out.
Good design is a game changer.
2. There’s no such thing as perfect
Perfectionists of the world, you’re going to hate me for saying this. And as someone who’s suffered from OCD their entire life, it pains me to say this as well. But I needed to hear it, and you do too. There’s no such thing as perfect.
Even my man Dwight Schrute knows what’s up.
For the longest time I would obsess on writing perfect code every time I worked on a project. I did this relentlessly, didn’t matter if it was homework or my own personal coding projects. I wouldn’t stop unless it was perfect.
Perfect variable naming. Perfect amount of comments. Perfect use of white space. It all had to be perfect. PERFECT PERFECT PERFECT!
What I’ve realized over the years is that nothing will ever be truly perfect and I was wasting valuable time striving for something I could never achieve. Sure, things can be ideal and done well, but they’ll never be perfect. Never. It’s a tough pill to swallow, but we need to learn how to accept that. Because when we strive for perfect and never achieve it, we’re sabotaging our own happiness.
From coding to life, there’s always going to be room for improvement and growth in everything we do.
3. Break down large problems into small manageable pieces
If I asked you to tell me how to build a skyscraper, you’d most likely have no idea where to start. That’s because the problem is too big. If you take a step back and deconstruct a problem, you can start imaging the individual pieces involved.
Once you deconstruct a big problem into smaller pieces, suddenly everything becomes more manageable. To build that skyscraper you first design a plan (lesson #1, see what I did there?). Then dig out and lay the foundation for support and then start building up floor by floor. I’m crazy over simplifying how to build a skyscraper, but you get the point.
4. There’s more than one way to skin a cat
There’s always more than one way to solve a problem. Just because you’ve always done something one way, doesn’t mean there aren’t better, worse or equally effective ways of accomplishing the same task.
Take creating this blog as an example. There’s literally a BAJILLION ways that I could have gone about creating this blog. When I set this site up I decided to host the site at Host Gator, use WordPress for my content management system and purchased a theme from Theme Forest to make it pretty.
But the truth is I could have taken a ton of different paths and came to the same outcome. Which in this case, is an awesome blog 🙂
5. Be pro-actively lazy
Pro-active. Laziness. Those two words sound contradictory right? But hear me out.
Pro-active Laziness is where you plan so well that you can do fuck-all all day and still accomplish so much without lifting your ass off the couch.
In the programming world you often find yourself doing repetitive tasks over and over and wasting a ton of time. If you stop for a minute and realize instead of spending 1 hour every day on this repetitive task, you could spend 4 hours today and write a program that does it for you. It’s more of an upfront time investment, but it will save you even more time in the future.
Invest extra time in this now that will make your life easier later. Hate cooking every day? Make food in bulk over the weekend and prepackage it for the week. Spend too much time paying bills? Setup automatic payments. Does cleaning your house take forever? Pay someone else to clean it.
The point here is to stop wasting time on things that don’t contribute to your happiness.
If you’re looking for an amazing book on this topic, I highly recommend The Four Hour Workweek by Tim Ferriss. I read this book about 6 months ago and it was a huge game changer in the way I devote my time and energy to things.
6. Learn from your mistakes, laugh, and move on
As a software developer, there’s no worse feeling in the world than when a production website or application goes down because of something you screwed up. You made one tiny little code change that you thought wouldn’t impact anything and everything comes crashing and burning to the ground.
I’ve done it multiple times now in my 10 year career as a software developer. It sucks, but there are some great lessons to be learned from it.
When you make a mistake, take responsibility for it. You broke it, you fix it.
You should learn from your mistakes to make sure they don’t happen again.
Once it’s all done and over with. Laugh about it.
7. Sometimes you just have to wing it
Every once and a while you need to throw caution to the wind, trust your gut and just wing it. Do what feels right in the moment.
I know, I know. This one completely contradicts #1. But whatever, I make the rules.
When I was in the process of building and running my first startup I had no idea what I was getting myself into 90% of the time. Sure, I knew how to develop the website, but that was only half the battle. Most of the time, the other co-founder and I were out and about trying to make connections and had absolutely no idea what we were doing.
But you know what, we put ourselves out there despite being outside of our comfort zone and just went with the flow. Not everything we did worked and every once and a while we were caught off guard, but we survived.
So those are a few of the life lessons I’ve learned from programming. I’d love to hear what programming has taught you in the comments below!
- S Prev