Become a programmer: The missing lessons
Tags: programming, intro, basics
Published: 2020-12-19 20:49:36

## Table of Contents
* [Intro](#intro)
* [File system management](#fs)
* [Computer communication](#computer-comm)
* [Logic](#logic)
* [Problem solving](#problem-solving)
* [Conclusion](#conclusion)

## Intro <a name="intro"></a>

If you Google “getting started in programming” articles, you’ll find a ton. As a code boot camp instructor I looked at a lot of "getting started in programming" content. There are a few lessons that these "getting started" articles miss. This article is for folks who don't fit the classic mold of people getting into programming. Many people aren't comfortable with computers and intimidated by the idea of programming. Having the ability to build small applications can solve many day to day problems. My goal with this article is to make learning programming feel less daunting.

The assumptions I'm making in this article are the reader:
- Knows basic arithmetic
- Has a working knowledge of English

If there are other assumptions I'm making, please let me know in the comments. I plan to keep this post up to date. We will go over the following topics.

- File system management (save something and find it later)
  - Downloading
  - Create a text document and save it.
  - File naming conventions
  - Use a file browser
- Computer communication (typing/or alternates)
- Logic (booleans)
- Problem-solving
  - Scientific method
  - Instructions
  - Knowledge base

## File system management <a name="fs"></a>

![Windows 10 file explorer](https://dev-to-uploads.s3.amazonaws.com/i/4blv1z3xsasjnn5ek0ji.jpg)
<figcaption>A Windows file explorer</figcaption>

### Expected outcomes
- Save a file.
- Find that file using a file browser.

To develop any application, you need to be able to create a file on your computer and save it. Then you need to be able to find that file and update it, if you want. There are a few different ways to [save files](https://www.computerhope.com/issues/ch001695.htm), and it is specific to the [operating system](https://edu.gcfglobal.org/en/computerbasics/understanding-operating-systems/1/) your computer has.

You can save files pretty much anywhere on a computer. I see most folks, in the beginning, overload their Desktop with tons of files. While this isn't a hard and fast rule, in general, [don't save files on your Desktop](https://www.makeuseof.com/tag/3-better-ways-store-files-desktop/). The main point I get from the linked article is that you will have a lot of different files. A cluttered Desktop can make things overwhelming. Keep your workspace clean; you don't need extra frustration. The article goes in-depth about why not to save files on your Desktop. But trust me, if you're going to write a program, you're going to want a special place for your files. Determine the unique location for all your coding practice work. I like to keep my code in a folder called "code" in my "Documents" folder.

We've solved where your code is going to live. But now what should you call each file when you save it? There are a lot of file naming strategies out there. Go to Google and enter "file naming conventions". You'll find some of the top universities with a bunch of opinions. Here's a strategy on [what to call files](http://letmegooglethat.com/?q=file+naming+conventions). Whatever your file naming strategy is, keep to it. Losing files is frustrating. The key here is that you want to find your files with no problems.  When you're coding something, usually you're going to have a lot of different versions. Those versions could get confusing if you don't have a good file naming convention.

Having an excellent strategy to save files is vital. There are a few different ways you'll be able to find your files. The program you saved your files with has a way to open files too. Another way to open saved files is by using a file browser. A [file browser/file explorer](https://www.computerhope.com/jargon/e/explorer.htm) is a program on your operating system whose main job is to help you find files. A file explorer shows your computer's file system. If it's your first time opening this program, then it can be pretty overwhelming. Computers have many different files they need to operate. There are some folders on your computer that should be there no matter the operating system. Most operating systems have a `Documents` folder. Also, many file explorers have search functionality. So you should be able to type into a search, "Documents" to find the folder. If you have any code saved there, you should be able to see it in the main window. Finding your files and opening them without losing them is a huge win deserving a pat on the back.

## Computer communication <a name="computer-comm"></a>

![Microsoft's Notepad](https://dev-to-uploads.s3.amazonaws.com/i/s2sblsi64kzp3j597jft.png)
<figcaption>Notepad is a basic text editor</figcaption>

### Expected outcomes
- Put text into an editor

I have some good news and some bad news for you. The bad news first, computers are not smart. I'm talking these machines don't know anything. If you asked a computer to tie your shoes and then waited for it, then you would be waiting for a long time. I Googled "what is the simplest computer". I found [this post](http://codemines.blogspot.com/2012/02/simplest-possible-computer.html) that says the simplest computer is a light switch. Try and ask a light switch what day it is. (If you are reading this from a future house where light switches can answer your questions. I'm not writing this for you.) Light switches only understand on and off, electricity and no electricity.

The good news is that people are building more ways to communicate with computers. At a surface level there are a ton of [different programming languages](https://en.wikipedia.org/wiki/List_of_programming_languages). No one will ever know every single language. No single programmer knows every application of a single programming language. Don't get overwhelmed by a list of programming languages. 

Each programming language solves a different problem with a computer. Computers pose a lot of various issues. So now we have tons of programming languages. Don't worry, there are many common languages with a bunch of people here to help you out. Once you learn how to use one language the other ones become that much easier to understand.

Another great piece of news is that there is a lot of work done to interface with a computer. Some common interfaces are monitors, keyboard, speakers, and mouse. On top of that there is a lot of work going into adding more interfaces for different people. For example, [voice user interfaces](https://www.interaction-design.org/literature/topics/voice-user-interfaces) are becoming more customizable and intuitive. There's also software that lets you [code with your voice](https://www.nature.com/articles/d41586-018-05588-x). 

No matter the technology you use to communicate with a computer, in the end you are sending text. Computers come with [text editors](https://www.computerhope.com/jargon/e/editor.htm) already. Down the line some fancy editors will help you code faster. Don't worry about those for now.  Like the list of programming languages, choosing an editor can be paralyzing.  To type this article, I'm using [VS Code](https://code.visualstudio.com/). For now, the goal is to be able to communicate with your computer, and editors are the way to do it.

## Logic <a name="logic"></a>

![AND OR logic gates](https://dev-to-uploads.s3.amazonaws.com/i/e2c4rp6gam8a8zqcbh8t.png)
<figcaption>Different logic gates</figcaption>

### Expected outcomes
- Given an OR gate and two inputs, be able to predict the outputs.
- Given an AND gate and two inputs, be able to predict the outcomes.

Programming a computer at the most basic level is the practice of turning switches on and off. Computers only understand 1s and 0s. Either electricity can pass through a switch or not. Programmers usually don't deal with the 1s and 0s (also called bits). Programming languages try to emulate human language as much as possible. Often we will call these binary decisions `true`/`false` (also known as [Boolean](https://techterms.com/definition/boolean)). There are some languages that are more understandable than others. At first, programing languages look challenging to understand. It's because it's a different language than what we usually interact with daily. But as you learn the vocabulary, grammar, and structure, it becomes second nature.

All languages ever created at their core, do one simple thing, and that is to label things. We can relay information to one another because of communication. Programming languages are just groupings of labels. At a basic level, they are labels that describe binary decisions. Should a particular path be open or closed? In modern computers, should the switch conduct electricity or not? Programming makes it easier to communicate these binary decisions. 

When you make these binary decisions a pattern starts to form. We call this pattern logic. All programmers are doing is coding lots of logic. It will be helpful to know a few different combinations about how these logic switches work. [Logic gates](https://www.khanacademy.org/computing/computers-and-internet/xcae6f4a7ff015e7d:computers/xcae6f4a7ff015e7d:logic-gates-and-circuits/a/logic-gates) represent different switch combinations. When you put enough of these logic gates together, you get a computer. Check out this [logic gates visualization](https://www.bloomberg.com/graphics/2015-paul-ford-what-is-code/#lets-begin). If this is your first time looking at logic gates, then they look pretty strange. You don't need to become a logic gate expert. You'll get pretty far knowing the difference between an `AND` statement and an `OR` statement. An `AND` statement returns true if both inputs are true. An `OR` statement returns true if either of two inputs are true. If you're interested in playing around with logic gates here's a [logic gates game](http://nandgame.com/).

## Problem solving <a name="problem-solving"></a>

![Thinking](https://dev-to-uploads.s3.amazonaws.com/i/veyzpqhg67dcw0kr0dsq.jpg)
<figcaption>You are going to have to think</figcaption>

### Expected outcome
- Be aware that you will make assumptions
- Be prepared to troubleshoot your program
- Be comfortable with the scientific method in your troubleshooting process


The [Wikipedia definition of critical thinking](https://en.wikipedia.org/wiki/Critical_thinking) is the analysis of facts to form a judgment. To be able to code, you will need to learn a ton of facts. On top of that, you will need to put those facts together to make judgments. The reason is that your code is going to break. You'll be working with someone's code and their code will break. You will then need to gather facts about the state of the code and make judgments on how to fix it. Another reason you'll need critical thinking skills is that coding problems are ambiguous. Much of the work involved is in clarifying the question as opposed to solving the problem.

Here's a report that dissects [a study on teaching critical thinking](https://hechingerreport.org/a-study-on-teaching-critical-thinking-in-science/). A few takeaways from the article are:
1. Critical thinking skills aren't particularly transferable between disciplines. 
  - Critical thinking in social studies doesn't make you better at critical thinking in math.
1. Studying critical thinking skills is not as effective as people thought.
1. To improve critical thinking in a topic you have to study the material in depth. While you are studying, ask questions about what you're learning.

Critical thinking is a pretty hand wavy term that is general and abstract. If you want to study critical thinking strategies. The [scientific method](https://www.khanacademy.org/science/high-school-biology/hs-biology-foundations/hs-biology-and-the-scientific-method/a/the-science-of-biology) is an excellent strategy that has concrete steps you can learn and use. You can apply this method to many programming challenges that you'll face. One of the first challenges for someone on a developer's journey is "what tool do I need to solve this problem?", or "what programming language should I learn first?" If you're asking those questions then you've already started using the scientific method. 

This may lead you to think that you need a [computer science degree](https://undergrad.cs.umd.edu/what-computer-science#:~:text=Computer%20Science%20is%20the%20study,design%2C%20development%2C%20and%20application.) to develop an application. It is easy to feel overwhelmed. Sometimes problems seem so big that you can't break them down by yourself. Sometimes, this feeling gets so intense that some think they need to go to school for it. When these times happen, breathe. Break the problem down into manageable, small challenges. Apply the scientific method to answer each question. Doing this, you will gain confidence in yourself as you solve each little problem. You're also building critical thinking skills making these problems more manageable in the future.

University degrees are geared more towards developing applications at massive scales. This type of education is vital at the [FAANG](https://www.businessinsider.com/what-is-faang#:~:text=FAANG%20is%20an%20acronym%20that,Apple%2C%20Netflix%2C%20and%20Google.) level. This is an acronym used in the tech industry for Facebook, Amazon, Apple, Netflix, Google. There could be 100 people working on the same project. There needs to be a foundational trust in coding styles and best practices to move faster. Boot camps can teach this knowledge, as well. If that is your goal, there are many ways to get there. My main goal here is to let you know that it is normal to feel overwhelmed. I would like to tell you that you may be able to solve many of these challenges without an instructor.

Think of coding as a long set of instructions (like a recipe). As you write out your specific recipe you'll need to test and troubleshoot it. Are all the ingredients mixed well? It tastes weird. What's missing? There are also many different ways to cook something, and no one has a 100% correct answer. This [exact instructions challenge](https://www.youtube.com/watch?v=Ct-lOOUqmyY) demonstrates how computers think. You will write instructions that a computer won’t understand. Your job then is to find the root cause of the breakage and fix it.

Sometimes you are trying to make something. You have a general feeling about how to do it. But you don't know all the steps or all the ingredients. For situations like these, you will need to access a knowledge base. There are many knowledge bases: e.g., books, manuals, the internet, and other people. To solve some challenges, you'll need to consult a knowledge base. Many people are working hard to make knowledge accessible to as many people as possible. You know what they say, "knowledge is power". Even though it may be scary sometimes, ask questions so you can solve problems.

Problem solving skills are vital. The best way to learn these skills is to practice solving problems. When you build something, most of the time it isn't going to work the first time. That frustration that you'll feel is perfectly normal. To improve these skills, you need to ask questions. You need to face challenges and solve those problems to gain confidence. I can not overstate how many people want to help you in your journey. Ask those questions and find those answers.

# Conclusion <a name="conclusion"></a>
No matter where you are in your coding journey there are folks out there who want to help you. Please don't be afraid to reach out when you run into something you think is overwhelming. Please let me know how I can improve this article. You may help someone else with the answer to your question. I hope you're excited about your coding journey.