Do you really want to learn how to be a programmer?
Tags: programming, beginners
Published: 2019-03-06 00:10:48

---
title: Do you really want to learn how to be a programmer?
published: true
description: Insight in to programming for those wanting to make the switch.
tags: programming, beginners
---

## So you want to change careers?
You hate your current job/career... You don't make much money, and it's not satisfying. You heard that learning to code is the future, and you can make great money. But is this really the career you want to choose?

I want to talk about what it's like to be a programmer. It's easy to learn how to write code. `puts "This is code"`; That's a full valid ruby program. That is literally code you might write at some point. Writing code doesn't make you a programmer though. I know plenty of people that know how to write code, but they're not programmers. Being a programmer requires a specific mindset, and hopefully this post will help you to decide if you have that specific mindset or not.

Let's start with an analogy, shall we? What would you consider to be the difference between a "cook" and a "chef"? Well, for me, a cook can follow a recipe and prepare a meal. A chef can create a recipe. How about a classical musician VS a jazz musician? They both can read sheet music, but a jazz musician can think on the fly to create music. This thought process is what separates the two.

## Let's look at code
Writing code is similar to learning to speak a new language. There's plenty of spoken languages out there from Spanish, to German, or French, Swahili, Mandarin, and many others. In programming we have Ruby, Javascript, PHP, Python, C++, Rust, Crystal, and a million more. Each language is a tool that aims to have a very specific usage with pros and cons for each. We don't have to know all of them, we only need to the ones we want to use to complete a specific task. 

So what does this look like?

```ruby
# Basic variable assignment in Ruby
a = 1
b = 2
c = a + b
```

```javascript
// Basic variable assignment in Javascript
let a = 1
let b = 2
let c = a + b
```

```rust
// Basic variable assignment in Rust
let a: i32 = 1;
let b: i32 = 2;
let c = a + b;
```

```php
// Basic variable assignment in PHP
$a = 1;
$b = 2;
$c = $a + $b;
```

As you can see from these examples, we are just doing a little basic math in a few different languages. If you stare at each of these examples close enough like you're looking at one of those [Highlights Magazine image difference](http://mediad.publicbroadcasting.net/p/shared/npr/201805/196231009.png) pictures, you'll see a few similarities, and a few differences between them.

So the first question we must answer is, would you be ok with looking at this code every day? If your first reaction is "that seems really boring", then you'd be right! It **is** really boring. But staring at code isn't what make being a programmer fun, it's the problem solving. Though, you do stare at a LOT of code, so you have to be ready for that.

## Problem solving 101
Let's think of something you know how to do now. Maybe shuffling some playing cards? The problem is that I don't know how to shuffle a deck of cards, so your goal is to teach me. There's a few "gotchas" though. You have to do it over the phone, and you can't see what I'm doing, and I can't see you. I've also never seen a deck of cards shuffled in my life, so I have no point of reference as to what it should even look like. All I know is that I've been tasked with shuffling a deck of cards, and I need you to teach me how. 

Where do we begin? Take a moment to think through the steps of how you shuffle cards. There's several different ways that people do it, but how do you do it? Picture your hand movements. Picture the placement of the cards. Now explain to me step by step how to shuffle.

Now let's take this one step further. Imagine we're in this situation, but we don't speak the same language. You have to explain to a translator, then the translator explains to me. I report back to the translator who then tells you what I said. Think of how much longer this will take to teach me now. Remember, we're doing this over the phone, so you can't just show me. This is problem solving for a programmer. Computers only understand 2 things: `0` and `1`. That's it, binary. We have to write code similar to what's above and pass that to a translator that in turn translates to the computer. Sometimes you'll say something to the translator with one thing in mind, but the translator interprets it a specific way doing what you said and not what you meant. The computer gets these instructions, and now you have a bug in your app because it's doing something different than what you meant for it to do.

Here's an exercise for you to try on your own. If I have a song to be processed, and it costs $0.03 per minute but only if I go over 100 minutes otherwise it's $0.04 per minute plus $1 for each song. Then I have to process an album of 12 songs which is about 2 hours of music. How much would it cost me to process the music? Don't use a calculator to figure this out. Instead, write out the formula. I should be able to replace the length of the songs and the number of songs to calculate what my next album or someone else's album may cost. 

That is called writing an algorithm inside of a function. Did you have fun doing that?

## Problem solving 102
Let's imagine we're talking about being a chef, and not a programmer. You need to make a sandwich. You might think to yourself "that shouldn't be too hard". Well, this is what every non-programmer thinks when they come to me asking me to build them a website or app. Yeah, you'd like to _think_ it wouldn't be too difficult, but let's talk about this sandwich.

We're going to make a smoked ham, turkey, and smoked cheddar sandwich on an italian roll with lettuce, tomato, onion, pickle, olive, spicy peppers, vinegar, oil, salt, and oregano. Sounds pretty delicious, right? What, you don't want the peppers on yours? Ok, fine, we'll make a second one that doesn't have that on there for you. Oh, but someone else doesn't want the onion or pickles? Hmm... So I guess we just make a third one like that? Oh great, now someone else wants to add black pepper, and no olives. At this point we have an unknown number of permutations of sandwich combinations, and we haven't even started prep!

Before we start making the sandwich, we have to weigh our options for ingredients. Do we save money and make our own bread? Or do we buy bread to save time? If we make our own, we can really customize it to taste exactly how we want, but it will take a bit more work. If we buy it from a bakery, we are at the mercy of that bakery. What happens if they mess up the bread? What happens if they go out of business? What happens if they run out of the bread we use? What happens if their cost goes up?

Now we need to do this for our meats and cheese. Do we buy cheddar, and ham, then smoke them ourselves? Or buy them pre-smoked? Have you ever made ham? It doesn't fall off the pig ready to eat, you have to cure it.

> The duration of the curing process varies by the type of ham, with, for example, Serrano ham curing in 9–12 months (https://en.m.wikipedia.org/wiki/Ham)

If we decide to go this route, we won't have our sandwich for the next year. 

If you're following along still, you can see that this 3 minute sandwich could potentially be a year long process, or it could be really expensive. This is not far off from programming. There's so much more that goes in to writing code and building an app. I often hear "well, can't you just use someone else's code? You can't be the first to do this." Well, yes, I can in fact. That is, provided the person that wrote that code has given it a license that allows me to use it. I know we're programmers, but now we have to consider the law. If they wrote the code for all to use for free, can I reuse it and sell it for money legally? Maybe I have to pay them to use their code? Can you afford that cost?

## Clearing up some misconceptions
* It doesn't take long to build an app.
  
We need to first determine the type of app. It could take a week, or it could take a year. I have no idea without understanding the entire scope of the project, and the amount of money the project has to spend.

* A programmer can build an app alone.
  
Some can, yes. Of those "some", only some of those know how to design. Have you seen an app that looks ugly? Yeah, they probably didn't hire a designer.

* Selling an app is easy.
  
No. It's not. Someone buying an app will want to get their money back in about 2 years or so. If you want to sell for $1 Million, you better hope your app makes near $500k/year. If not, then it has to be revolutionary technology, or have a few million active users on it. Keep in mind that the more users you have, the more expensive it is to run your app. [Lyft](https://www.businessinsider.com/lyft-ipo-amazon-web-services-2019-3) is spending $8 Million a month to run their app. That doesn't include employee cost.

* Working on a computer all day is easy.
  
Wrist pains, shoulder pains, back pains, fatigue mentally and eye strain. Have you ever laid in bed so long that you felt tired when you got up, and you felt sore? Our bodies aren't designed to stay in one spot for several hours a day unless we're sleeping. Is it easier than doing construction? Maybe, but then again, I'd say you get fit doing that work so when you get off work, you just relax. With being a programmer, you get off work and need to go be active like hitting the gym and stuff otherwise your health drops real quick.

* Programmers make a lot of money
  
In most cases, yes. However, this isn't always the case. My first programming job was $12/hr. I was coming from a min wage job ($7.50/hr), so this was a bump for me. My next job was $15/hr. I was stoked to have a pay raise. After a few years, I was at a job making $55k/yr but then finding out that other companies were starting their devs out at $50k/yr. People without a degree and less time working were making basically what I was making. 

Now we have devs in the silicon valley making anywhere between 45% equity while living out of cardboard boxes to a crazy 7 figure salary both doing the same job. Your amount will be based on so many factors. You may or may not make a lot of money. Sound like every other job?

* Everything has been programmed already, just copy others code.

Sure, lots of code has already been written. That doesn't mean we have access to 
that code. It also doesn't mean that it's been written in a language I understand. Just because google solved a problem, doesn't mean I can solve that same problem. They have tons of engineers with doctorate degrees in mathematics. I have a degree in playing tuba. This job involves a lot of researching, and digging around, and playing with different bits to see what works and what doesn't.

* Becoming a programmer doesn't take much time.

There's a lot of people that go through a 3 month bootcamp and get a job as a jr dev right after. These are the people that have a very decent level knowledge of computers before starting the class. Then they worked their ass off and worked outside of class for those 3 months. These people are usually really inquisitive types that pick up on the concepts rather quick. For me, it took at least a year of doing this full time before things really started to click for me. Concepts don't come naturally to me like they do for some others, so I have to study, and do the rinse/repeat often before I really get something.

## Let's Recap

Are you still interested in becoming a programmer? Let's go back over everything real quick to be sure.

1. You're going to have to learn a lot of technology, and it's a never ending battle of learning. What you learned last week may be out dated next week.
2. You'll stare at code most of the day, almost every day, and sometimes you won't understand it.
3. Being a problem solver is the key. You're just trying to solve everyone's problems. Your goal is to work your way out of a job by making things so automated, you don't need to do anything.
4. By trying to work your way out of a job, you'll create bugs that keep your job, and make you very frustrated.
5. Everyone will want you to build them an app, but that doesn't mean you'll be able to.
6. You're not guaranteed to make a ton of money.
7. You're also not guaranteed to work less than 40 hours in a week. (Especially when you first start out).
8. Desk jobs can be bad for your health. Plan accordingly
9. The level of stress you get can be bad for your health. Plan accordingly
10. Your job may be to handle the data of a billion dollar company. (see #9)
11. You will make a mistake, and it could potentially cost the company a ton of money. (see #9)
12. Are you willing to "nerd out" on the latest CVE patch fixing a year long "monkey patch" you've had allowing you to delete 100 LOC?
13. Does reading #12 make you cringe?

If you're at this point feeling a little nervous, but still thinking it'll be a better move for you in the long run, then I say go for it! It's an amazing job, and you can have a lot of fun with it. 

### Side note:
If you're already a programmer, leave your thoughts to how your day looks below. Different perspectives always help newcomers.