Learn to Code in 5 Minutes a Day: Lesson 1
By Code with ADHD
- 4 minutes read - 683 wordsLesson 1: Set up
General rules for this course:
- Commit to at least 5 minutes a day.
- Figuring things out on your own is better than being given the answers.
The general idea is, instead of spending hours following along typing what you see on a YouTube video and then realizing you retain none of it, each lesson will be a small programming puzzle to solve that gets you along the way to being a programmer.
If you really get into it, feel free to take on the next lesson. But do not skip ahead without really mastering each day’s lesson.
Mastery often involves repetition. So when I say day 1, it’s really ok if this turns into days 1 through whatever over and over until you’re done exploring. Really. As long as you’re putting in effort each day.
Goals:
At the end of this course you should be able to:
- write basic programs in the go programming language
- test your programs using unit tests.
- do your own research to figure out answers (which is actually 95% of programming)
The first 5 sessions will be basic set up and then we will spend the rest of our time writing a program that converts numbers into roman numerals. I use this exercise myself whenever I want to learn a new programming language because it covers nearly all the major features of a language.
By analogy, if you learned enough French to be able to travel around Paris and speak fluently at restaurants and hotels, you would be doing pretty well. You wouldn’t be able to write a novel in French, but you would understand enough of the basic language to be able to learn how to write a novel in it.
Likewise, we will learn enough go that you will know the go programming language. Enough to be able to call yourself a programmer and be on a path where you can think about how to build a bigger project.
And you can use this same method to teach yourself other languages. For example, if you want to build video games and want to learn C# or Python, well… I’ve taught myself the basics of C# and python this same way.
If you don’t remember how roman numerals work, here is a nice refresher
This will not be as sexy as building your own video game. But video games are usually big and complicated and this is fairly small and simple.
Why should you trust me?
Maybe you shouldn’t. The internet is full of weirdos. That being said:
- I’ve been programming across 5 decades now in one form or another.
- You can check out my side project at MzFit.app or download the iOS app directly from the App Store and make up your own mind.
- Finally, it’s a pretty small commitment – 5 minutes a day.
If you like this I’ve also written a post about building exercise habits using the 5 minute a day trick. It turns out that exercising regularly is beneficial for all kinds of reasons, including it helps you manage the anxiety that comes with learning new things.
Lesson 1 - Install Golang
For this series we will be learning to program with the Go programming language. Why? Because it’s the simplest general purpose language I’m aware of.
Imagine being able to learn French if French only had 25 words.
And we aren’t even going to use them all. Sounds pretty easy right? Anyone can memorize < 25 words pretty quickly.
So let’s dig in.
Today I want you to install go. That’s it.
Follow these instructions:
You just spent 3 minutes reading this article, 1 minute reading the go docs, and a minute installing it (or maybe more, depending on the speed of your internet connection).
That’s 5 minutes! Good work! Come back tomorrow for the next step!
(And if you want to stop now but didn’t finish installing, that’s fine! You put in your 5 minutes! Finish it up tomorrow!)
Tomorrow we will cover writing your first program in go (hello, world)