Learn From Masters

Sat, 25 Dec 2021, Bangkok

theravada-novice Image courtesy of Sasin Tipchai

To learn a subject or a domain, it makes sense to learn from the masters of that subject or domain.

I’m trying to solve the problem of sending data/files from one device to another e.g. from laptop to phone and vice-versa without having to rely on a third party tool. One potential solution is to run a webserver on the phone. This way, one can simply point a browser to the phone and download files.

Decided to write a simple web server in C, a language which I’ve only used intermittently. The plan is to write the server from scratch, starting from hello-world.c and learning along the way. This way, I’ll be in a position to port it to Java for Android and to Swift for iOS.

One very interesting resource for writing the web server is AltHttpd which is a simple webserver in a single C file by the author of SQLite.

Reading that code is an instance of learning from masters.

Written on December 25, 2021