Categories
Uncategorized

Challenges Ahead!

I have a couple of challenges in the coming months to (hopefully) keep my life more interesting in these colder months.

micro∙blog photoblogging challenge for October 2021

In October 2021 there will be a photoblogging challenge by micro∙blog, in which for every day of the month there will be a prompt to post a photo that day onto the micro∙blog Timeline.

Micro∙blog is a relatively new and restraint (in growth) social network, that aims to get people blogging without the negative influence of a devisive algorithm, used by the mainstream social networks to keep users engaged through feelings of indignation about what’s being shared on the platform. Micro∙blog has strict policies against harassment and trolling, and offending posts are regularly removed, accounts disabled from adding to the timeline. It’s all done by a human, paid for by monthly subscriptions of those who host their blog with micro∙blog. Joining the social network is free, though. You can even post for free on the timeline, using another provider, like WordPress∙com, Tumblr∙com, etc.

Photoblogging, as I understand it, is posting photos in a reverse chronological order, with or without a caption. It’s a logical conclusion from mobile blogging (blogging on a mobile device), now most—if not all—mobile devices have a camera included as one of the sensors. So it seems a valid method of creating messages, separate from text-only messages, or messages with an image as an illustration with the text.

For this photoblogging challenge there are no rules, other than posting an image daily, illustrating the daily prompt provided by micro∙blog’s community manager, Jean.

I’ve created a separate Tumblr blog for it, where I hope to post daily during the month of October.

Inktober Classic 2021

Also in October, I plan to do the Inktober challenge. It has been years since I looked at the website, so I was surprised there are now 2 challenges, one in the month of October (aka Classic), and one for an entire year (Inktober 52). Presumably, the difference is that for the Classic version one draws one new ink drawing per day, per two days, or per week, and for the 52 version, it’s one per week, presumably more refined than the more casual Classic version, as it’s meant to “stay sharp with your drawing skills throughout the year.”

31 Prompts for Inktober Classic 2021

I guess I’ll pick the one per two days version, so I can more easily manage doing it with the photoblogging challenge, and pick one of the two prompts available, or perhaps be more creative than that. My inking utensil will be the Lamy Safari fountain pen, filled with black Platinum Carbon Ink, on 190 g/m2 A4-size paper I bought on Amazon a while ago.

I’ve created yet another Tumblr blog, which technically isn’t on micro∙blog, but I’ll use it as my social network of choice, rather than Twitter or Instagram. Anyway, Tumblr is a well-known social network as well, isn’t it?

Story-blogging challenge

In November, instead of NaNoWriMo (which I failed a few times), I’ll be doing a story-blogging challenge. I’m not quite sure about how to do this, so I’ll have to give it more thought. My current idea is one story idea per day, worked out in a first rough draft. The idea is to stimulate my creative writing skills. Since that seems to work best longhand, I might opt for that, in a notebook.

I believe writing prompts works best as strings of words instead of a single word. Here’s a list of 100 story ideas. A typical short story is between 2000 and 8000 words, so that’s a bit much for a daily challenge. Flash fiction seems more appropriate. It’s less than 1500 words, typically in the 500 to 600 words range. It’s main feature is getting to the point, be impactful in as few words as possible. It’s much like telling a joke, where the last line leaves an unexpected clue and then a chuckle, here, an impactful, meaningful idea, behind in the reader.

So, still a work-in-progress, this challenge, but certainly more achievable than 50,000 words in 30 days.

I already have a Tumblr blog, of course, to post a scan of my written story, in whatever state it will be when I decide to post it. One thing’s sure, it will be messy and probably bad writing, getting better with each next attempt (one can only hope).

Marathon running challenge

On November 28, 2021, I will run my fourth marathon event, in Spijkenisse, the Netherlands. It may not seem much of a challenge, compared to the more lengthy ones above, but it certainly asks for self-control, preparation, and, yes, luck. While I’ve finished all three marathons before, it’s never a given one will. The first time I finished without problems, the next two times I had to struggle (read: walk) with cramps due to bad preparation (taking it too lightly as a challenge). The marathon distance is hard, and demands full attention and dedication of the athlete.

This one-day event will be my main focus for the remainder of the year. Note that there will be a recovery period after the marathon, which can last as long as 5 week. So, in principle, I’ll be dealing with this marathon until the first week of the New Year.


Thanks for reading.

Categories
Uncategorized

Using Rasberry Pi 400 for web development – part 1

My Raspberry Pi 400 set up

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

Introduction

When I started to use micro∙blog for real, with a domain name for a Dutch running diary blog, called Loopgenot, I discovered that my hosting provider of choice, micro∙blog, only lets you change so much of your site’s appearance and functionality through settings. Since it’s based on the templating language Hugo, most is done through templates, CSS, JavaScript and plug-ins. While you can modify existing templates, knowing how to required knowledge I didn’t possess. So I really needed to teach myself templating language, specifically Hugo. Micro∙blog isn’t 100% compatible with Hugo, but it’s close enough, so I’m told. After that I might dive into CSS, JavaScript and plug-ins, maybe.

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.

Raspberry Pi running Raspberry Pi OS

🗂 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.

BTW I also installed the Hugo extension from the VS Code Marketplace. I can also imagine needing Javascript and CSS, since those are also part of web development. However, this would require more time and study. The focus now should be on Hugo and templates.

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.

Visual Studio Code on Raspberry Pi OS

🗂 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…