Jotting down what I've learnt. - Hong C.
Programming

How I Learn Programming For Free In The Past 6 Months As A Beginner

Background

I’ve always interested in creating things. Programming does that.

I started learning Swift (iOS) using 100 Days Of SwiftUI since April this year, follow through till 7x days, made a few apps, published to the app store. Swift is nice because it takes care of the UI and logic under the same language.

But, then I realised the potential of web might be greater, because the web has more freedom. Your app don’t need to be reviewed, no need to pay for a developer account and the flexibility of choosing your own stack, etc. Especially if you want your application to be cross-platformed.

Web Dev Learning

After building some small apps for iPhone, for the past 3–4 months I started learning web development using freeCodeCamp and just a bit of Odin project.

I need web dev because I want to build an app landing page for my mobile projects, and some REST API for my mobile app to consume.

  • FreeCodeCamp
    • lots of hands on practice, I actually felt it’s a bit overwhelming & repetitive.
  • The Odin project
    • More theories and deep understanding about the why and how programming works.

So I would suggest people do both at the same time, one benefits the other.

I have only finished the "Responsive Web", "Basic JavaScript" and half of "React" on freeCodeCamp – for now.

My learning was mainly based on text information and official documentation. Really enjoyed the React & NextJS official tutorials.

I didn’t pay any online course to learn at all.

It has been mostly task driven learning – learn that one thing I want to do and keep moving on to the next thing.

My Programming Path So Far

Swift & a bit of local SQLite > simple Flask REST API > HTML/CSS > JavaScript > 11ty (static site generator) > React (Official tutorial) & NodeJS > Next.js (Official tutorial) > ExpressJS > REST API safety (CORS & environment variable) > revisit React (freeCodeCamp) > …

Everyone said making projects is important and I agree very much

I would have lost interest if it weren’t something I want to build. When I get tired of working on one project after a long time, I would substitute it with another project which is in another language to stimulate myself. Task oriented learning works best for me.

Some free hosts I used that are beginner-friendly

  • GitHub page

For free tier, you have to make your repo public to publish it. But you can still map your domain to it.

Very easy to connect GitHub with, it has built-in contact form support which means you don’t need to have your own server. You can also integrate with Netlify CMS authentication, which allows you to log in to your static blog, all for free. (downside being no Next Image support – it means can’t leverage <Image> optimisation. For that you can use Vercel, but you lose the form support, so it’s your pick. I know this because I was pushing my NextJS site to Netlify and it ran into error.)

The UI is not as cool and beginner-friendly comparing to Netlify, but it has unlimited bandwidth, free hosting, even some limited cloud functions you can use. It was not as beginner-friendly as Netlify, but not that hard. It has everything basic that you need & want for free. And I got my domains there, so it’s my go-to static host now.

Free Backend Host

It was my first backend. It is very easy to use for the basic stuff. It has limited CPU calculation time, which means you cannot really run big processing task on this server for free. However, it is very good for a RESTful API, because it is always running.

It is my new choice for hosting express.js – downside being automatic spin down if it’s inactive for 15 mins. I’m yet to find a free always on server that allows hosting JavaScript server. However, a non spin down server costs about $7 per month, which is not too expensive, and it accepts debit card, which I like. The UI is easy too.

Nope, it was too overwhelming for me, but it seems to be one of the best for scalability at reasonable price, yet to touch that because the website UI is not beginner-friendly, and I don’t know much about VPS.

Google Cloud requires a credit card to start even a free tier, I happened to not having one. Firebase is good for easy building authentication system for free. I will explore this later.

To learn the whole website publishing cycle

After building some simple websites with HTML/CSS and basic JS, I wanted to build a blog. Found out there are tons of static site generator does that. Searched for templates with Hugo, 11ty, etc. It was very good for me to understand how to work with NodeJS, because it only needs a bit of coding logic to work with these templates, but you get to practice the whole cycle of building a website:

Creating a new git repository > create the site with NodeJS > connect & auto push to 3rd party host > manage your domain > compare the features & price for each web host to best suits your objective or language.

The only part that is different in most projects is just the "create the site with NodeJS", you can use python here, yet other things you’ve learnt still applies.

More on building a blog

The major difficultly is not the blogging feature itself. It is the comment section. If you want to write a blog and focus on the content as a beginner, I suggest you to just use WordPress, it has everything provided, hassle-free.

Otherwise, to integrate a comment section to your static blog, you can use Disqus (has a not good reputation for privacy issue and a memory hog to load). Or you can use some open source GitHub login alternative. But still, not a single one out there that’s free and allows Google login afaik. Or you can build your own backend comment server, but then you have to also take care of filtering spam or such. Not too ideal to me. I ended up just use Disqus, but it doesn’t autoload until user click "Show comments", to save the loading time.

About ChatGPT

It is helpful only to a certain point. Do avoid using it for complicated logic, it is usually problematic. Some annoying problem includes making changes in your code but not notifying you that. It is helpful for a first draft. It is not suitable if you want a bug free code, it never does that. I also realise that the more you ask it to re-review your code, the more error it makes. Which was annoying and time-consuming than to just learn the thing and write it myself.

What’s next

Learn how to build a real backend with signup/login auth, SQL database server. Maybe I will try Django this time and try to build a backend that works cross-platform app.

The Goal

Keep on learning and building interesting projects.

Thanks for reading!

Share:

Article written by:

Hong C.

Passionate in programming, music, languages, and learning new things.

Currently working on: ZenTube - decluttered: iOS YouTube app

Follow me on: Bluesky

Personal website: HongCT.net

Leave a Reply

Your email address will not be published. Required fields are marked *

back to top