Yeah, I know, I’m rambling a bit here. Remember, I’m not an expert at web development, using the Raspberry Pi, nor its software tools. I’m a Noob, and don’t feel qualified to offer guidance to other Noobs. There’s no how-tos, tutorials, not even wise words to share, just my experience as an absolute beginner. So I suggest you adjust your expectations before reading the Wall Of Text below.
(Estimated reading time: 14 minutes.)
Table of contents
So there’s my next (big, yet narrowly focussed) self-challenge: learn enough about Hugo to be able to modify a micro∙blog theme to my needs and taste.
🗂 back ToC
How does one become a web developer?
Quick answer, by doing.
Slightly longer answer, by using a computer with a suitable OS, like Windows, MacOS or Linux, and installing the appropriate software, go through the tutorials, read the manuals, and try stuff.
🗂 back ToC
Step one, get a computer, and skip sleep
Only thing was, I didn’t have a working computer with such a system. I had a working iPad and iPhone, but those don’t qualify.
Some Dutch libraries offer a subscription for a few tens of euros a year for unlimited use of the library’s computers. However, my particular local library sucks, because of budget cuts caused by local government, in which overzealous politicians seemed more concerned about climbing the political ladder toward the big city or national parliament, perhaps even national government (and beyond), rather than serving their citizens. So the library was a no-go.
Windows just scares me, with all its security and privacy problems, together with a lackadaisical attitude by Microsoft (Windows 11 is unsafe by design). It seems to require a security expert IT manager, and a corporation to finance. MacOS requires a Mac, which I can’t afford, frankly. I tried in the past, and every time I went bankrupt, especially when one still had to pay for yearly upgrades. I have an old iMac from 2009, unsupported, hence unsafe on the Internet. What was left available to me was Linux Desktop.
Someone on micro∙blog suggested to use a Raspberry Pi 400 instead. They are very affordable and come with everything I need, except a screen. Any somewhat modern TV or computer monitor will do, as long as it supports HDMI (and even that isn’t strictly necessary). Another snag; I don’t own a television set, nor a separate computer monitor. How could I possibly afford this?
Well, enter my marathon ambition (November 28, 2021). In order to loose weight I had to put myself on a strict calorie-deficient diet, because I was 16 kg (35 lbs) overweight on August 1. This meant buying significantly less groceries, like 130 euros less in August, compared to July. I already was living quite frugally, with a tiny monthly budget to spend on things like new clothes (which I can buy only once in a while, budget allowing), storage space (closets instead of cardboard boxes) for my rather austere (read: empty) house interior, and in general, for home improvement.
I had a budget!
I could buy the computer monitor from my monthly budget and the Raspberry Pi 400 from the money I saved by eating less (though healthier, with lots of veggies). So I bought both at the same day. It may sound weird to “starve” for a computer, but, hey, it worked. Also, Raspberry Pi (aka RPi) sounds like fooood 🥧 The monitor I got on Wednesday (when I decided I had a budget) from a local computer shop, and the Pi from a Dutch online retailer arrived a day later.
The next day I got up before 5 in the morning, to be able to do my marathon training session early in the morning on Thursday before the mail delivery might arrive at my door with my Raspberry Pi 400. After it arrived in the afternoon, it was past midnight before I went to bed, after a very long day. I didn’t have much sleep that night either, too excited about my purchases and what’s ahead of me, much like a kid excited about unwrapping present come Christmas Morning 😆 I’m 61 years of age, but apparently, the youthful excitement is still there.
That afternoon, I had already ordered a bigger (128 MB) micro-SD card than the stock 16 MB, and a card reader. Both would arrive by mail a day later (it was small enough that both packages fitted through the mail slot).
After receiving both items the next day (again, in the afternoon), I had to reinstall my software all over. That went faster than the first time, because I knew what to do. In time I’ll need a 3-2-1 backup solution, though, to secure my data as an individual (corporations need even more, with the threat of mal- and ransomware). My bed time was Saturday morning after 3 AM 🥱
Because I had a rough few days, with little sleep, I decided for my marathon training to make Friday and Saturday recovery days, without running sessions. Not that I had much reason to do any running; the running statistics site Runalyze already had me in the red because of too much training that week. So, a word to the wise—recovery is key for sustainability in long-distance and marathon training.
🗂 back ToC
Step one-and-a-half, setting up the computer in a roundabout way
After buying the computer, I needed to get comfortable with it. It has been a long time since I used Linux desktop (Ubuntu and Xubuntu). Back then it was out of curiosity. What I distinctly remembered is that, if you’re not careful, you can spend a lot of time fidgeting with the OS, without any real productivity. Because one can, it doesn’t mean I should. Remember why I bought this device? Right!
😂 Famous last words…
Though I should’ve known better, my feeling was one of disappointment when I couldn’t get any sound out of the computer through the monitor. Turned out the monitor had HDMI sound… output, via a 3.5 mm jack. The computer had Bluetooth sound, so I dug up an old BT speaker, with a battery that no longer could hold a charge, was annoying to use, and made me wonder why I didn’t dispose of it before my previous move in October/November 2019. I guess sentiment? Anyway, sound worked. Not that I will need it, because I have the iPad to watch YouTube instructional videos. Even so, on Saturday afternoon I bought a cheap over-the-ears headset, just to have a makeshift audio solution, before eventually buying something recommended by Marco.org.
That was a bit of waste of time, wasn’t it? 🤷♂️
Then there was the frivolous time-waster of trying to implement emoji fonts and an emoji picker. The latter I didn’t get working, after many hours of fruitless effort, the former I did, after manually grabbing the raw image of a Google font called
NotoColorEmoji.ttf from GitHub. It had been moved since the article was written, and I got as a tip on micro∙blog. Now all I (still) need to write is a cheat sheet with
Ctrl+Shift+U hex codes. It’s one of the many chores still ahead of me, buying a cheap computer, expecting the functionality of an expensive one. Ah well, one learns from experience.
And, BTW, this certainly feels like I remember using Linux 😉 in the oughts. It’s patchwork and more patchwork, tinkering heaven 🔧😇
Another snag on Friday was finding out how to best transfer files between my iPhone or iPad to my Raspberry Pi. I tried SMB (aka Samba), and it worked after installing the necessary apps on the Pi. Then, the next day (Saturday), someone from the micro∙blog community suggested using Secure ShellFish, an SSH enabler for the Apple Files app. It worked flawlessly. Of course, I already had my password on the Raspberry Pi set to very secure and hard to guess (thanks 1Password!). I suppose once I’ve paid for Secure ShellFish, I’ll remove the SMB server and its software via an
sudo apt purge [name] command—where
[name] is the name of the installed Linux software, according to the full Raspberry Pi OS documentation.
The next tiny piece of rough-edginess left on Saturday morning was that the Pi doesn’t seem to have Display Power Management Signaling (DPMS) out of the box. Instead of the (possible) headache of installing it myself, I opted for XScreenSaver to keep my screen alive, so I could SSH into my Pi while away from the keyboard, also preventing possible burn-in my monitor complains about while booting (any way to turn that off?).
So it seemed my problems were solved! Well, the ones I encountered in the first days, anyway. There’ll be many more to come in the weeks ahead, I’m sure. Until then, I’m a happy camper with a budget development system of a few hundred euros.
🗂 back ToC
Step two, install the software
Installing software on Linux is somewhat odd, coming from MacOS. It’s mostly done through the command line, with the
apt install command. I read Snap was quite universal across different flavors of Linux, so I tried that first. However, I got all kinds of strange error messages and unexpected results, so I uninstalled the Snap version, and next reinstalled the Hugo app via the built-in apt instead, which worked fine.
Raspberry Pi OS (renamed from Raspbian) is based on Debian, a solid version of Linux, and runs on a 64-bit Arm processor. It makes sense that a more dedicated version for Debian works better than a more generic cross-platform Snap Store version. Still, I’ll keep Snap installed, since I might need it again, some day.
The funny thing about installing on Linux is that it can take a really long time, because of all the dependencies, libraries upon libraries, from all over the Internet. Some connections are fast, others not so much. My basic connection through crappy ISP WiFi could easily keep up. There’s waiting, though. Patience is a virtue.
Next, I installed Firefox ESR, because the built-in webbrowser, based on Chromium confused me too much. Cookies and passwords weren’t saved for some reason with Chromium, so I had to log in with every new session. I’m sure I could’ve figured it out, but I think I shouldn’t; a webbrowser should “just work.” So, Firefox it was.
For repositories on GitHub, I installed a Desktop client called Git-Cola. This came in handy when following the excellent Giraffe Academy YouTube Hugo course by Mike Dane. He had me install a custom theme from GitHub, and I didn’t know how. A quick web search gave me Git-Cola, and it worked as expected (to clone a project, enter an URL, point to the local folder, and let it do its thing). No futzing with incomprehensible git commands on the command line. Just remember to replace in the url the leading https:// by a git://
For more serious development, I also downloaded Visual Studio Code, by Microsoft. This is a more refined piece of software, which I assumed has a learning curve. So I guessed it more like a back-burner thing, while I learn Hugo using a text editor, the command line, a web browser, and the already mentioned YouTube tutorial (using VS code as an IDE on MacOS). However, I was wrong, again, in my assumption. VS Code is quite intuitive and easy to use. The development team did a great job hiding complexity 👏 Which complexity is certainly present, judging from the one tutorial I did, clearly written for experienced coders instead of a newbie like myself.
Because I couldn’t help myself, I also installed Go and the VS Code extension for Go. I probably won’t need it anytime soon, but, hey, it’s free.
🗂 back ToC
Step three, education, finally!
After four days of—sometimes a bit obsessively—gathering and setting up equipment and software (and a little break to recover), come Sunday I will be able to start studying in earnest, IOW, learning how to use Hugo, and in order for me to apply all the gained knowledge and skills on modifying themes on micro∙blog. Remember that was actually my goal?
Rereading the previous paragraph, I realize that me, getting to this point, did quite well. It was pretty quick too, because I worked late hours and long days, slept short nights. If I had done it on “normal hours”, it would’ve taken much longer, possible frustrating me to the point I’d quit the whole project/self-challenge. Four days is not bad, I’d say when asked (and self-talk when not).
To celebrate, I decided to publish part 1 before starting with step 3. I needed a rest, to recover from the lack of sleep and trying to learn new things. A well-rested brain learns faster and better 💤
I already went through some of the Giraffe Academy YouTube tutorial, mentioned above, not just by listening, but by actually doing while listening, which often meant re-listening several times, especially if I was confused about what was exactly meant or what to type as commands, or what to change in settings files to make things work. Doing it in Visual Studio Code, instead of separate applications sped things up, kept it manageable for me. The less friction, the better, I suppose.
So far, I got the impression that by doing the tutorial, I gradually got more comfortable with using the Hugo commands. It turned out that, instead of creating the files yourself from scratch, you let Hugo create them for you, and then modify those files afterwards. It’s a somewhat different workflow from regular programming, that usually starts with writing code in a file, and feeding it to an interpreter or compiler, which spits out runnable code, or runs the code (in the case of an interpretative language). So not only is Hugo a templating language, writing in Hugo is templating as well. Hugo creates the core file, which the programmer modifies to specifications.
One of the skills I’ll need to run Hugo is using the command line 🙄
Luckily, there’s the online Raspberry Pi OS documentation I mentioned before, which will be invaluable. However, I will be going through it only when I need to, to solve a problem.
In the beginners’ guidebook that comes with the hardware (there’s also a free PDF that can be downloaded, together with other titles), there’s already enough about the CLI to get started, and the rest, I’ll learn piecemeal.
As an example of the latter, I already made the SSH sessions require a password. I stopped there, because creating the next layer in security (SSH private/public key pair instead of user name and password) was still a bit too much for me, and, frankly not yet necessary for the sole user of a home network—that would be me 🙋♂️
However, since I visit websites, running a password-less SSH server is asking for being taken over by an evil script. So I guess, that’ll keep the script kiddies out the door.
Next up is actually doing the entire tutorial, and hoping I will learn enough to start reading the documentation on Hugo, without it looking like Greek (actually, I can read Greek characters, studied classic languages in high school).
So, step 3, now for realz.
🗂 back ToC
To be continued in part 2…