How I Would Learn To Code If I Had A Time Machine ⏰
Mar 19, 2023 8:14 pm
Hey everybody! 👋
Full disclosure: I've been busy this week between work, writing/filming a course, and keeping up with the content treadmill.
Since this newsletter has grown considerably in the past couple of months, I decided for the sake of time to share one of my favorite newsletters from the early days.
Enjoy!
__________________________
Read Time: 4.5 minutes
It took me 3 years before I was able to understand and write code that I was comfortable contributing to a product.
If you want to learn to program, you will have to push through a lot of discomfort.
There will be challenges, frustration, and mindset shifts that need to happen over a long period of time.
There is not much I would change about the process I used to learn code.
But there are things I would change about what I learned to code. Looking back there were important topics I didn’t spend enough time learning that would have excelled my ability to move forward.
If you’re new to programming, these are 3 things I recommend to learn.
You will face them time and time again in any type of career, whether that is employment or building a product.
I’m going to write these in a way that feeds into each other. Meaning #1 needs to be learned to build #2, and #2 needs to be learned to build #3.
Let’s jump in.
1. Databases
It doesn’t matter what kind of application you make. I will be damned if it doesn’t need some type of database.
The earlier you learn how to use databases, the better off you will be. And it isn’t just about learning how to implement a database.
You will find — similar to coding — that structuring a data in a logical way takes constant learning and iteration.
Your first database will probably suck, and your 100th will suck less.
I recommend you spin up many small databases, and consider ways of modeling data for your applications.
If you want to take the route of employment to begin your career knowing databases will fast-track you from a junior to a senior developer if you flex your database muscles.
To get started, here are 2 popular databases I see used in the industry:
- SQL Server (relational database)
- MongoDB (document database)
2. APIs
An API (Application programming interface) is how almost every application in the world interacts with a database.
Go to your favorite website (like YouTube), hit F12, click the Network tab, and look at all the calls while you navigate around. Most of the calls you see are making calls to an API.
So what is the benefit of calling an API? Why not just call the database?
With an API you can change the data in the database, restructure data, and even add database-specific data (creation dates, tracking tables, association tables, etc.)
These changes can increase speed, reduce data size, and do whatever you need them to do. Then when you make these changes you don’t have to change anything in your app.
The API will be changed to respect the database and manipulate the data in a way that the app is expecting.
Before API:
You make a data change —> You change 200 lines of code in your app to match the data because it broke everything
After API:
You make a data change —> You change 1 data model in your API to match the data —> Your app can’t tell the difference
This is why every company needs people to build solid APIs. It’s one of the most important skills in the industry.
Actionable advice:
Google “How to build an API in Express.js”.
If you are familiar with Node.js you can have an API up and running in 5 minutes then take it from there.
2. Cloud Services
Once you know APIs it is good to get comfortable using cloud services. The most popular ones are:
- Amazon Web Services (AWS)
- Microsoft Azure
- Google Cloud Platform (GCP)
(Yeah — I know — they own everything)
All of these platforms pretty much offer the same things:
(The parentheses reference the services that do this in AWS)
- A way to store your data (DynamoDB)
- A way to host code that you can execute (Lambda)
- A way to rent a virtual computer (EC2)
- A way to host an API (API Gateway)
- A place to store files (S3)
With those 5 things alone you could build almost any application.
Learn how to do those 5 things in a cloud service of your choice.
Every cloud service will have 100 things you can do within it, but focusing on those 5 will give you an advantage when you get into the industry.
(Note: Googling “How to use AWS” is like Googling “How to use the App Store”)
You want to learn how to use the individual apps, not the App Store.
TL;DR:
1. Databases
Pick a database and learn it.
It is likely whatever tutorial you follow will lead you along to make a database.
If you want an exercise:
Build a database of dog walkers. Each dog walker can have multiple customers. Each customer can have multiple dogs.
2. APIs
Learn how to build a simple API.
Every real software project I have ever worked on has an API of some sort. Knowing how to build and maintain them will give you a serious head start.
Google “How to build an API using Express.js” to get started.
3. Learn Cloud Services
Every cloud service offers these 5 things at a minimum:
- A way to store your data
- A way to host code that you can execute
- A way to rent a virtual computer
- A way to host an API
- A place to store files
The big ones are AWS, Microsoft Azure, and Google Cloud Platform.
Thank you all for signing up for my newsletter! These will only get better with time.
If you ever have any questions:
- Connect with me on LinkedIn
- Add a message saying “From the Newsletter” (I will accept)
- Shoot me a DM
Best of luck out there!