Rabbit Garden

My Naive Outline For a Programming Study Plan

This article was scavenged from my old blog. It's the only one that survived as I forgot to pay my VPS and lost the files. Way to go, me!

People learn programming for different reasons. Maybe they want to do research on something, maybe they think they have the idea for the new billion dollar app (they probably don’t), maybe it’s just for the money.

One thing I see most of them having in common in their first years of programming is the inability to apply programming to anything, knowing how to use a language, grasping the fundamentals of it but not knowing how to get it to do what they want (which is the point). Programming languages are tools for someone to use with a clear objective: making the computer do what it’s told to do. But if you don’t know exactly how to make it display an image on a screen from the ground-up, how are you supposed to do it?

This is a problem that I hope to solve in this bite-sized guide to practical programming. It aims to show how you can utilize other people’s code (e. g. what most people call frameworks and packages) to make useful applications using technologies you already know. Granted, you are going to have to learn a lot of stuff.

An aside: don’t be stupid, read the docs.

If you are not an idiot, you know everything you make that someone else is going to use has to be documented properly. How you did it, how to use it, how to make it work if it doesn’t, it’s standard procedure. That’s why EVERY. GOOD. PIECE. OF. SOFTWARE. HAS. DOCUMENTATION. Read it.

I’m going to talk about a lot of frameworks and technologies other people made. They were not dumb people, and that’s why the software they wrote has extensive documentation and manuals. I’m not telling you not to learn from books, it’s amazing to do so, but the official documentation is always up-to-date unlike most books and video courses, describes all of the features, and most importantly: it’s written by people who WROTE the code you’re using. Always read the docs.

Making Websites

Requirements: HTML, CSS, Javascript (or any language you want, essentially), a little bit of networking, a lot of patience and lots of coffee.

Apparently, you can make websites out of code. Wow! You probably knew that, so what? Well, if you don’t know the use cases for a website and still have the idea of websites being something you can interact with directly via the browser only, it’s obviously going to be hard to know what to do with a lot of web technologies.

Front-end

Front-end is what you’re seeing right now. It’s the text that appears on the screen, the images, the sounds, the interface. That’s the front-end. The back-end is everything that is not this. The servers, a search algorithm, database queries, the manipulation of the data you send, that’s back-end. Both communicate to make a website that is dynamic.

If there was only UI, nothing in the website would change unless someone actively messed with the code, and it would be static forever (just like this website). Actually, there is no website without a web server, so that’s the heart of it all.

Front-end is probably where you want to start if you don’t have knowledge of networks and programming, and you should start by learning HTML, CSS and Javascript. These will be enough for you to do some stuff with websites, and will be great for you to actually see progress, as in seeing your program work and be of use. If you want to go further, you should explore front-end frameworks, single-page applications, templating engines and more intermediate front-end concepts.

Back-end

As this guide is aimed for people with a bit of knowledge about computers, you should know about the client-server architecture, how it works (roughly) and how it applies to the internet. Long story short, a client and a server are two computers that communicate with each other via a protocol. For the sake of simplicity, I’ll not go deep into networking because it’s a completely different topic, but it’s good to know how the internet works before starting to make websites.

As you may or may not know, websites can have no interface at all. Based on the HTTP protocol, you can input something to a web server and get a response, with no need for a user interface! HTTP has the concept of requests, you send a request with some data and get a response that the server has for that data you sent as the input.

The server can manipulate the data, process the data or do nothing at all, and you can design and make these servers through a web framework. Luckily, you don’t have to reimplement the HTTP protocol (unless your language is from God knows where), because someone has already done it, it’s only your job to learn how to use the library they developed.

Actually, you can use a back-end web framework to make a website without knowing the nits and grits of networking and how stuff like IP, TCP and even HTTP work, although I advise you to do so. If you know Javascript, read about Node.JS, which is a Javascript runtime on the Chromium engine. For web servers, there’s Express, Fastify and many others (most of which run on Node, Javascript is the language of the web, after all).

You can even make desktop applications using web technologies through something called Electron. Electron is a framework for converting standard websites (HTML, CSS, Javascript) into a fully-fledged desktop program.

A second aside: Deployment and learning how to get by in Linux environments

If you’re going the web route, please learn Linux. At least the command line. There are a lot (and i mean A LOT) of developers that have no idea about how the Linux command line work. This consumes a lot of time and requires more people to be hired for deployment, making the team larger and harder to manage. Most of them don’t even know how to run a shell script and it baffles me.

How are these people supposed to survive in a deployment environment? What if they have to fix something that is only accessible via a machine that you are supposed to ssh into, with the only editor available being vi (or God forbid, nano) and no possibility to install anything else because the company that manages the server doesn’t allow it? Yes, this happened. It sucked.

Before learning anything about development and computers, learn how they work. Learn the different processor architectures, the different operating systems, know how to use every single one of them, because there is no way to know when you’re going to need it. I’ve been learning plan9 recently with 9front, it’s fun.

GUI Development

Requirements: Any programming language (prefferably C++, Python or Javascript), knowing what a GUI is

So, user interfaces. As I said in the web development back-end section, Electron can be used for this, but a lot of people complain about it for lots of good reasons, so let’s search for alternatives. C++ is one of the most popular languages for GUI programming, mainly because of Visual Studio.

There is also Qt for C++, GTK+, MiniGUI, NanoGUI, FLTK, FlatUI, CEF, Ultralight, you name it. There are lots and lots of frameworks and libraries for UI development in C++, you only have to learn it. For Javascript, Electron is the most relevant, but there are alternatives to it like NW.js, reactXP, SciterJS and more. Python has Tkinter natively, Qt and a lot more.

There is a lot of freedom of choice, and my job is not to educate you on these frameworks, neither to teach you how to do everything from scratch. It’s your job to learn these technologies and develop with them to reach your project goal.

Operating Systems

Requirements: Assembly, C, computer science fundamentals, some math, knowing how computers work and how to Google

You can make an operating system if you want to. Yes, it’s as hard as you think. Yes, it requires you to google a lot and learn a lot of low-level stuff. But it sure as hell is great practical application. You can make it UNIX-like if you want to. Learn Assembly (any flavor of it), Write a bootloader, write a kernel, make stuff work, persist on the project and make it run a simple shell.

That’s it

Thanks for reading this mess of a blog post, and I hope it shed some light on how you can apply your knowledge on the real world.

#development #guide #internet #programming #study #web