<rss xmlns:atom='http://www.w3.org/2005/Atom' version='2.0'>
<channel>
<title>Andrew JV Powell</title>
<description>Updates from Andrew JV Powell</description>
<language>en-us</language>
<link>https://www.andrewjvpowell.com/rss.xml</link>
<atom:link href='https://www.andrewjvpowell.com/rss.xml' rel='self' type='application/rss+xml'/>
<item>
	<title>This Site is no longer Solar Powered... For Now</title>
	<guid isPermaLink='false'>https://www.andrewjvpowell.com/articles/this-site-is-no-longer-solar-powered-for-now</guid>
	<link>https://www.andrewjvpowell.com/articles/this-site-is-no-longer-solar-powered-for-now</link>
	<pubDate>2023-01-28T21:00:18Z</pubDate>
	<description>
	<![CDATA[ 
<h2>This Site Is No Longer Solar Powered (for now...)</h2>
<p>28 January 2023</p>
<p>Been a while since I wrote anything on here and the reasoning actually has little to do with the subject matter: I've just been busy/slack/distracted, whatever you care to throw a dart at, it will hit a target.</p>
<p>Anyway, I made <a href="https://www.andrewjvpowell.com/articles/we-are-solar-powered/">this post</a> back in September 2021. All was trucking along fine until just a few months ago from the time of this writing, when one day I realised I no longer had the Raspberry Pi responding to pings and well, no internet access either.</p>
<p>Upon investigation, no this was no power loss or lack of sun... the little Netgear AC800s modem had blown up. No, not figuratively, LITERALLY.</p>
<p>Images speak for themselves...</p>
<p> 
<img src="../../images/oopsie-ac800s-1.jpg" alt="Figure 1" /></p>
<p><img src="../../images/oopsie-ac800s-2.jpg" alt="Figure 2" /></p>
<p>So yes, lesson learned, lithium-ion batteries do indeed go boom sometimes. I was actually aware this could happen and technically shouldn't have left the battery in the device while it was hooked up to power constantly... but the thing is, the device was never stable unless it was plugged into both USB power and had it's battery inserted. External power was never quite enough, with enough activity the thing was liable to randomly reboot.</p>
<p>Anyway, so that's that. Remarkably, only the modem and a few surrounding cables were destroyed. The solar charge controller and the Raspberry Pi were, remarkably, unharmed, if not carrying a bit of spare black soot on their surfaces. Where to from here? Well, my internet situation is quite different now. I have Starlink and no longer the old satellite broadband now, as a primary internet connection, so the Optus 4G connection was becoming a bit superfluous anyway (except for when the power goes out at home, obviously). But with <a href="https://www.bbc.com/news/world-australia-63056838">Optus' data breach scandal</a> and what not, I wasn't going to be running back to them either.</p>
<p>So, for now, I have no solar powered internet connection but if something cheap and cheerful comes along I would be tempted to set it up again (this time a mini modem/router that doesn't require a constantly inserted battery to function properly). </p>
<p>How is this site running right now, you might ask? Easy, I took the Raspberry Pi back inside my home and hooked it up to the internet there. The RPi does need a new SD card though, as it's been failing for a while now, so I will likely shift this site to my Vultr VPS, but that's the beauty of a lightweight static website - can move it around willy nilly, no problem at all!</p>
	]]>
	</description>
</item>
<item>
	<title>Dear Privacy Aware Android App Devs - Please Use UnifiedPush</title>
	<guid isPermaLink='false'>https://www.andrewjvpowell.com/articles/dear-privacy-aware-android-app-devs-please-use-unifiedpush</guid>
	<link>https://www.andrewjvpowell.com/articles/dear-privacy-aware-android-app-devs-please-use-unifiedpush</link>
	<pubDate>2021-10-06T12:54:16Z</pubDate>
	<description>
	<![CDATA[ 
<h2>Dear Privacy Aware Android App Devs - Please Use UnifiedPush</h2>
<p>06 October 2021</p>
<p>I want to make a call out that I think is needed. Those of us who use "De-Googled" Android phones will be well aware that if you cut out Google Play Services, you generally won't get any push notifications. This makes sense, as most apps out there simply register with FCM (Firebase Cloud Messaging, formally known as Google Cloud Messaging) to provide the push notifications.</p>
<p>For apps distributed on the Google Play Store, this is understandable. FCM is easy to integrate with, well known and since the app is being distributed on the Play Store, obviously the user is already running Google Services and therefore isn't going to care where the notifications come from.</p>
<p>However, if (like myself) you run a De-Googled Android OS, like <a href="https://calyxos.org/">CalyxOS</a>, <a href="https://grapheneos.org/">GrapheneOS</a> or <a href="https://lineageos.org/">LineageOS</a> without the GAPPS package, Google Play Services will be (mercifully) absent and along with that, of course, FCM and push notifications. Services like <a href="https://microg.org/">MicroG</a> are available to help mitigate this, but this still means sending data to Google servers.</p>
<p>In some cases, the lack of notifications is actually a good thing, as suddenly you're not getting spammed with what are somewhats useless and distracting notifications. Other times, this is rather inconvenient, especially if you want those instant messenger notifications to come in right after they are sent. Some privacy-aware app developers have worked around this; notably the <a href="https://f-droid.org/">F-Droid</a> version of the Tutanota email app implements it's <a href="https://tutanota.com/blog/posts/open-source-email-fdroid/">own system for notifications</a>. Likewise K-9 Mail and Signal.</p>
<p>This is admirable, and appreciated, however if every app started doing this we end up with the same problem that push notifications via FCM was supposed to fix - that is, having a single push notification server to register services with, allowing apps to sleep in the background to maximise battery life. If you have a bunch of apps having to wake up regularly and polling for new notifications, battery life suffers.</p>
<p>Ideally, the user would have a choice of more than one push provider. Because of the nature of <a href="https://en.wikipedia.org/wiki/Push_technology">push technology</a>, this isn't as simple as installing some other app on your device to replace FCM. Some of us, especially those getting more and more into self-hosting, would love to be able to host our own push notification servers. Those self-hosted server options are available, but without the apps supporting them, they are useless.</p>
<h3>UnifiedPush</h3>
<p><a href="https://unifiedpush.org/">UnifiedPush</a> is a protocol and small collection of tools for Android and Linux that, as their site says, "let the user choose how push notifications are delivered. All in a free and open source way".</p>
<p>It uses what it calls "Distributors" to give notifications for apps that support it. For example, it currently has three distributors available - FCM (Google Firebase), <a href="https://gotify.net/">Gotify</a> and what it calls NoProvider2Push, a hardcore and experimental way of sending notifications without a push provider, but requires a static IP address on your device.</p>
<p>Of those three, two are the most obvious options - FCM and Gotify.</p>
<p>We already know about FCM, it's ubiquitous and the standard that we've already mentioned. Gotify on the other hand is a well known self-hosted push notification server. For those of us who would want to self-host or know someone who would host it for us, this is the logical replacement for FCM.</p>
<p>What this means is if developers code their applications to be integrated with UnifiedPush, they not only can use FCM as they would have already thanks to the UnifiedPush FCM Distributor, but then users would also have the choice of something like Gotify. Gotify is in fact the default provider on UnifiedPush according to the webpage.</p>
<p>I imagine with increased adoption the distributor options would also increase in number.</p>
<p>But for now, even having the option of Gotify would be a huge boon to those of us wanting to retain reliable and efficient notifications and not have to send data to Google servers. Instead of apps having to exclusively code in support for alternatives such as Gotify, coding in UnifiedPush <em>should</em> make it all easier on the devs too, as it provides an abstraction that allows the Distributors to take care of the rest.</p>
<p>The FCM Distributor is also embedded in UnifiedPush and the website states:</p>
<blockquote><p>Some applications using UnifiedPush installed from the Play Store automatically use Google’s Firebase Cloud Messaging if no UnifiedPush Distributor is detected.</p>
</blockquote>
<p>So, there's nothing to lose here for developers, and a lot to win for privacy-aware users.</p>
<h3>Currently Supported Apps</h3>
<p>Currently, only four applications implement UnifiedPush.
As of writing, this is:</p>
<ul>
<li>FluffyChat</li>
<li>Fedilab</li>
<li>Tox Push Message App</li>
<li>SchildiChat</li>
</ul>
<p>And then a couple of apps currently in progress with UnifiedPush support:</p>
<ul>
<li>Element Android</li>
<li>Nhekho on Linux</li>
</ul>
<h3>Time to Act</h3>
<p>I say we try to spread the word and get this to change. Looking at the UnifiedPush <a href="https://github.com/UnifiedPush">GitHub page</a>, development looks very active on the project itself, so the time is now to start implementing, testing and seeing about finally giving users an option that doesn't mean settling for sending data to Google.</p>
	]]>
	</description>
</item>
<item>
	<title>Syncing Lagrange Bookmarks via the Cloud</title>
	<guid isPermaLink='false'>https://www.andrewjvpowell.com/articles/syncing-lagrange-bookmarks-cloud</guid>
	<link>https://www.andrewjvpowell.com/articles/syncing-lagrange-bookmarks-cloud</link>
	<pubDate>2021-10-06T15:42:15Z</pubDate>
	<description>
	<![CDATA[ 
<h1>Syncing Lagrange Bookmarks via the Cloud</h1>
<p>04 October 2021</p>
<p>If you can forgive the somewhat buzzword-ary nature of the title, here we're going to see how to sync bookmarks for <a href="https://github.com/skyjake/lagrange/">Lagrange</a>.</p>
<p>Lagrange is a superb browser for the <a href="https://gemini.circumlunar.space/">Gemini</a> protocol; just a lovely piece of software that's comfortable and in line with the protocol it's built to be used with, is very good on resources. If only our web browsers could be this nice and light at the same time!</p>
<p>Thankfully it also has the option to save bookmarks to a simple bookmarks.gmi file (press CTRL+S while on the bookmarks page). Try it, it's easy and we'll need it for our next steps further on.</p>
<p>Lagrange <em>ALSO</em> has the ability to use any Gemini page containing links as a <em>bookmark source</em>. This is very handy, and this will allow us to create a (albeit crude) way to sync bookmarks between our devices.</p>
<p>Note that the below instructions apply to a Linux machine specifically, but could be easily extrapolated to any other operating system that Lagrange runs on, you'll just have to adapt the config directory for Lagrange accordingly.</p>
<h2>The Cloud</h2>
<p>Honestly, I hate using this word. The 'cloud'. I'm cringing as I write this.</p>
<p>Nevertheless, though, for lack of a better word, this method of syncing uses some form of cloud syncing. In my case, I use <a href="https://nextcloud.com/">NextCloud</a>. But you could use any similar automatic files syncing service, like Dropbox or any such similar thing. </p>
<h2>Let's Do It</h2>
<p>Assuming on your original computer you have saved the exported <code>bookmarks.gmi</code> file to <code>~/Downloads</code>, the next thing to do is to copy the file to our cloud storage syncing folder, eg:</p>
<pre><code>cp ~/Downloads/bookmarks.gmi ~/NextCloud/lagrange-bookmarks.gmi</code></pre>
<p>Next, making sure Lagrange is closed so nothing gets messed up, you'll want to delete Lagrange's internal bookmarks storage file. Yes, you heard that right. You'll see why in a moment. If the existing bookmarks remain, you'll end up with doubled up bookmark entries.</p>
<p><strong>NOTE - Update 2021-10-06</strong>: The author of Lagrange, 'skyjake', has since told me that he doesn't recommend deleting the bookmarks.ini file as this will also delete any saved feeds and custom icons you may have set. Please keep that in mind. If, like me, you only are concerned with bookmarks then you can delete the file safely, but otherwise either leave it in place as-is or you could edit the file and carefully delete the bookmark entries within, but make sure to back up the file first!</p>
<p>We can do this as thus:</p>
<pre><code>rm ~/.config/lagrange/bookmarks.ini</code></pre>
<p>Please note that prior to Lagrange 1.7.0, the bookmarks file is actually called <code>bookmarks.txt</code>.</p>
<p>Then, fire up Lagrange and enter into your location bar the location of your now syncing bookmarks file from earlier, eg:</p>
<pre><code>file://~/NextCloud/lagrange-bookmarks.gmi</code></pre>
<p>This will bring up the file that you exported earlier. Now for the final bit of magic. Hit <code>CTRL-D</code> or click <em>Bookmark Page...</em>. When the bookmark dialog comes up, then click <em>Use as Bookmark Source</em>. This is important! This is what saves the bookmark as a <em>Remote Source</em>. Call it whatever you want, I called it simply <em>My Bookmarks</em>.</p>
<p>Once your bookmarks file is, well, bookmarked... then go to your actual bookmarks in Lagrange. You'll simply now see an entry called <em>My Bookmarks</em> as the sole bookmark and if you click it, you'll be taken to the full list of the bookmarks that were exported earlier!</p>
<p>Ordinarily, hitting Refresh on the bookmarks page <em>should</em> automatically display the full list of links in Lagrange's bookmark page without having to click on the <em>My Bookmarks</em> entry first, but I found this only works after restarting Lagrange after adding the bookmark source. YMMV and all that.</p>
<h2>Done</h2>
<p>And that's it!</p>
<p>To access your sync'd bookmarks file on another device, you simply repeat the above process of adding that file as a Bookmark Source on that device's install of Lagrange, eg. by bookmarking the file, and setting it as a Bookmark Source.</p>
<p>The obvious downside to this is it's not completely automatic, as anytime you want to add more bookmarks to the synchronised bookmark source file, you'll have to repeat the process of exporting the bookmarks again or simply adding them by hand to the already exported file. Saving a bookmark via the Lagrange interface like normal will still just save the bookmark locally to that instance of Lagrange. Still, it allows us to easily get our bookmarks list across our devices, all without any sync features being built into the browser or using some external service.</p>
<p>Note that if you have your own Gemini capsule, you could <em>ALSO</em> simply store the remote bookmarks file on your server as well, negating even using a file syncing service at all. You would just point Lagrange at the Gemini address of your server where the file is stored and bookmark... save as bookmark source... etc. Very easy.</p>
<p>If anyone has any better ideas or improvements to this, do let me know!</p>
	]]>
	</description>
</item>
<item>
	<title>We are now Solar Powered</title>
	<guid isPermaLink='false'>https://www.andrewjvpowell.com/articles/we-are-solar-powered</guid>
	<link>https://www.andrewjvpowell.com/articles/we-are-solar-powered</link>
	<pubDate>2021-10-03T13:15:32Z</pubDate>
	<description>
	<![CDATA[ 
<h2>We are now Solar Powered</h2>
<p>26 September, 2021</p>
<p>Yes, that's right, this site is now completely solar powered. Actually, it has been for about a week now but I wasn't going to write about until I was sure everything was working correctly.</p>
<p>Also, not only this site - but my <a href="https://yarn.andrewjvpowell.com">Yarn.Social pod</a> as well!</p>
<h2>Technically...</h2>
<p>For a bit of background, I've had the solar setup itself for nearly two years.</p>
<p>What is this 'setup'?</p>
<p>An Optus AC800s 4G/LTE modem (actually a Netgear device, just branded by the carrier), connected to two MiMO Yagi antennas, feeding into to a GL-AR300 Mini Router, powered by a 160W solar panel connected to a regular car battery, albeit a deep cycle one. The GL-AR300 is then connected to a 110 metre (approx) line of Ethernet cable that feeds into the household. The reason for this distance is the location of the solar setup and antennas is where the mobile signal is at its strongest, whereas back at the house the signal is extremely weak.</p>
<p>I live quite rural and this custom setup has served as my secondary internet connection for some time. The primary internet connection is, of course being rural Australia, is a satellite broadband service. The satellite internet actually works remarkably well, no doubt the technology has come a long way. But you can never get around 600~ms pings and limited data allowance, so some time ago I invested in the Optus mobile broadband deal which netted me the AC800S modem and 500GB per month data allowance. Still a far cry from the bandwidth and data afforded to landline and even fixed wireless broadband users, but it's better than nothing. The 4G service also has vastly improved ping, being around 30~ms to other Australian servers and still easily half the latency of the satellite when going elsewhere around the globe. It was then that I set up the solar system, primarily as it would be impractical to run an electrical cord all the way from the house to the spot where the solar installation is. And also because it would be a bit of a little project.</p>
<p>In any case, this service was mainly used for streaming things like Netflix and YouTube, which could obviously chew through the 20GB allowance of the satellite service in no time, but otherwise didn't have a lot of utility.</p>
<p>Until the day, recently, I figured it would be totally sensible to hook up my Raspberry Pi 3+ to the solar installation and use it as a server for this site. As you do.</p>
<h2>Why?</h2>
<p>The answer to that is simply, because I can. But honestly I was heavily inspired by <a href="https://solar.lowtechmagazine.com/">Solar Low Tech Magazine</a>. Check that site out, it is quite an eye opener and some great content on there, even if their battery level overlay thing is a bit weird looking.</p>
<p>Anyway, this site was originally hosted on <a href="https://nearlyfreespeech.net">NearlyFreeSpeech</a> and while in all honestly it cost next to nothing to do so, I had an itch to scratch. Such a basic website could easily be hosted from home, being a static site with deliberately old-school stylings. Seriously, load this site up in a terminal browser like <em>links</em>, it works perfectly.</p>
<p><em>Note: Of course the aforementioned Yarn.Social pod I run on this system (which came a little after I initially set this up) is NOT a static site, but still seems to be quite low on the system resources.</em></p>
<p>So, a ~~Raspbian~~, sorry, <em>Raspberry Pi OS</em> install later on the Raspberry Pi with an Nginx server, I had something I could transfer this little site to.</p>
<p>Well, almost.</p>
<p>Turns out you can't forward ports on a mobile modem/router like the AC800S. Well, you can, but it won't do anything. This is an ISP restriction unfortunately. More about that in a moment. In any case see a couple of images below. These are <em><a href="https://endtimes.dev/why-you-should-dither-images/">dithered</a></em> images, both to save bandwidth and also because in all honesty my setup is jerry rigged <em>AF</em>, and cable management has never been my strong suite. It's not attractive, so not being in full coloured HD glory is a good thing.</p>
<p><img src="../../images/solar1.png" alt="Figure 1" />
<blockquote><p>Bottom Left to Top Right: GL-AR300 mini router, 20A solar charge controller, Raspberry Pi 3+, Optus AC800s modem</p>
</blockquote>
</p>
<p>As I said, this is a very jerry rigged setup. All the bits and bobs are mounted inside an old second hand gutted meter box that I picked up from the local tip shop for $5 and the meter box (and antennas) are mounted on star picket fence posts. The solar panel itself is mounted alongside this on it's own fence post (pictured below). Both the AC800S and the AR300 mini router are powered off the solar charge controller's two USB ports. The Raspberry Pi is then powered off a 5V, 2.1A micro USB power pack connected to the solar charge controller's wired output.</p>
<p>The battery is then at the base of the meter box post under some weather-proof wrapping. And by weather proof wrapping I mean an old unused heavy duty rain coat.</p>
<p><img src="../../images/solar2.png" alt="Figure 2" />
<blockquote><p>Exterior shot of the setup. Jerry rigged!</p>
</blockquote>
</p>
<p>So, yeah, this is almost the sort of thing you would expect to see in a <em>Mad Max</em> setting, but that's kind of what I like about it. It's horrendously unprofessional, make-shift, but it works. And this basic setup has lasted through all sorts of terrible weather events and seasonal changes, including winds that have felled entire trees.</p>
<p>The solar panel and solar charge unit (as a combo) cost about $100 off eBay. The Raspberry Pi I already had from running a LibreELEC install and I can't remember what that originally cost me, but it wouldn't have been a kings ransom.</p>
<p>Otherwise, every thing else was simply what I had lying around. So besides the cost of the 4G/LTE internet connection itself (an $85 per month plan), the overall cost of this has been very very little.</p>
<h2>No Port 80 and 443 For You!</h2>
<p>Indeed, as mentioned earlier, these common internet ports are blocked off at ISP level, so no amount of port forwarding in the router will expose our little web server to the internet. So, to get around this we have to use <a href="https://pagekite.net/">Pagekite</a>, a localhost tunneling solution, similar to the likes of <em>ngrok</em>. Unfortunately, the <em>pagekite.net</em> service itself seems to be lacking attention and while the service itself still works fine, heavy rate limiting is in place. The site says you can request these to be lifted, but I had no luck contacting anyone (as of this writing) to actually get this in motion. Pagekite, the service, never had this rate limiting originally but unfortunately after it was used by some spammers a couple of years ago, they had to put those in place by default.</p>
<p>Thankfully, however, Pagekite is more than just a service. The <em>pagekite.py</em> program that the site provides as a client for connecting to the service can also be used on any server to act as a <em>frontend</em>, which then in turn acts as the tunnel to your localhosted <em>pagekite.py</em> (called the <em>backend</em> - I know, it seems confusing this naming convention, but there you go). Luckily I have an existing hosted VPS I use for a few other things, so I simply run the frontend Pagekite on that VPS, point the DNS at it, and then connect to that frontend from my Raspberry Pi to establish the tunnel. Hello world wide web.</p>
<p>It's not quite that simple insofar as a bit of reverse proxying with Nginx is needed also, but it's not too hard.</p>
<h2>Uptime</h2>
<p>So, you may be wondering about uptime. As a solar system, and being 'off the grid', there are times where no doubt there will be enough lack of sunlight that power will be insufficient and the server will go offline.</p>
<p>This certainly can happen, but unless there's multiple days in a row of foul, very downcast weather, it runs almost indefinitely. These devices hooked up to the system are very power efficient, and the 160W solar panel is admittedly perhaps even a bit overkill for this purpose. It will be a matter of how much the battery degrades and any other factors that work against it. For now, it is fairly reliable, but there will be days here and there where the voltage may drop enough for the solar charge controller to cut power until sufficient power is restored. </p>
<p>And that's okay. The other potential caveat is how much extra power the Raspberry Pi will use while hosting the Yarn.Social pod, versus only serving static content. I don't know, I wouldn't even begin to know how to measure it. I can't imagine it would be much extra, and time will tell if we seem to lose more power than normal.</p>
<h2>Advantages</h2>
<p>It will all depend on what metrics you are measuring as to whether there is any advantages to this setup.</p>
<p>Certainly, it won't be speed or uptime percentages. There's not really even any monetary advantage, as it's a supplementary system and the rest of my home is still very much grid powered. The tangible advantages are very few. </p>
<p>But what it is, is a proof of concept, like the aforementioned Solar Low Tech Magazine site. We don't <em>need</em> high powered, always on servers, all the time. Yes, critical production servers are a different story, but here we're talking about a small personal website and a self-hosted decentralized social network pod. These things do not have to have 100% or even 99% uptime. It just needs to get the job done. </p>
<p>What's more, this is a system that runs off completely renewable energy. All the while providing a fairly speedy (yes, around 50Mbps down is speedy to a rural Australian!) wireless broadband service for a household, streaming video and hosting a couple of servers, all in one little efficient solar powered bundle.</p>
<p>It also has to be said hosting any sort of website on a wireless internet service is rather unconventional, especially one that averages between 5-8Mbps upload. This is why keeping transfers as small as possible and resource usage low makes sense just beyond keeping power usage down. The other downside is relying on an external server (the VPS) to even get this whole thing public facing. That's not ideal, but then again there isn't any other choice that I'm aware of when your ISP blocks port forwarding. At least the VPS was already getting used for other things, so it's not a major additional component.</p>
<p>But, it can be done and that's all that matters to me.</p>
<h2>Final Words</h2>
<p>If anyone has any comments or suggestions, please email me on the address listed at the bottom of this page, or message me on Yarn.Social/twtxt if you are following me on that network. </p>
<p>I am not an expert, I only know just enough to have set this up and I wouldn't be surprised if aspects of it are enough to make more seasoned solar energy enthusiasts/users recoil in horror. Perhaps the same for some web developers etc. But it is what it is, and I've enjoyed tinkering with it.</p>
<p>Lastly, I haven't detailed much on the technical side of things to keep this from getting too long, but if anyone wants more info in regards to things like Pagekite configs or any other aspect of this system, by all means ask.</p>
<p>Peace. </p>
	]]>
	</description>
</item>
<item>
	<title>Recently</title>
	<guid isPermaLink='false'>https://www.andrewjvpowell.com/articles/recently-september-twenty-one</guid>
	<link>https://www.andrewjvpowell.com/articles/recently-september-twenty-one</link>
	<pubDate>2021-10-03T12:41:30Z</pubDate>
	<description>
	<![CDATA[ 
<h2>Recently</h2>
<p>September, 2021</p>
<p>I haven't updated this site much lately, and figured this might be the best way to do it. Totally stealing inspiration from Tom at <a href="https://macwright.com/">macwright.com</a> with his regular <em>Recently</em> articles. Rather than make multiple posts for a given month, I might just update this page (and subsequent monthly Recently pages) during the month as I feel like adding to them.</p>
<p><em>Begin 2021-09-03</em></p>
<h3>Site Downtime</h3>
<p>Occasionally, you might notice (all 2 or 3 of you whoever read this site) that this site is sometimes, well, down.</p>
<p>Never fear though, it's simply because I don't always keep up with the hosting pay-as-you-go credits that my host <a href="https://nearlyfreespeech.net">nearlyfreespeech</a> uses as it's payment model.</p>
<p>Although I will strive to keep up with it, I don't consider occasional downtime on small non-production websites to be too big of a deal. Indeed, the site over at the solar version of <a href="https://solar.lowtechmagazine.com/about.html#offline">Low Tech Magazine</a> explains why they have some downtime and why they have a pretty good excuse for it.</p>
<p>Now, granted, my excuse is less to do with demonstrating renewable energy and lacking sunlight and <em>more</em> to do with being slack and absentminded, but I still like the reasoning that maybe, just maybe, not all websites have to be online <em>all the time</em>. On that note though, I am very tempted to try and move this website to a similar homegrown solution as the Solar Low Tech Magazing site. It would be quite fun and very satisfying, I think.</p>
<h3>Learning C</h3>
<p>Otherwise, recently I've been trying to learn the C programming language. I've tinkered off and on with it in past months, but I'm trying to make a better go of it.</p>
<p>My main previous coding experience is with the likes of PHP, Javascript etc so mostly just web programming (yes, I know, it's not what everyone considers <em>programming</em>). Other than that, just relatively basic shell scripting.</p>
<p>So, I guess C is quite a jump but even having prior PHP and JS experience seems to help adjust to some concepts.</p>
<p>I actually really like C. Not only does learning it help to be able to understand some of my favourite <a href="https://suckless.org">suckless</a> utilities at the source level, I actually find C to be a strangely elegant and simple language. This isn't to say that I've always found C to be a total breeze to learn or haven't had challenges, but once you pick up on some of the basic concepts and typical <em>gotchas</em>, it's a no-nonsense language well worth learning. I also like the fact that if you keep the code as portable as possible, which isn't that hard for relatively basic programs, you can compile and run the program on nearly any device you can poke a stick at.</p>
<h3>Lack of <em><a href="https://www.thelinuxrain.org/">The Linux Rain</a></em> Content</h3>
<p>This one I'm a bit less happy about. It falls both in the slack and also being too busy camps. That sounds like completely opposing scenarios, I know, but it is what it is.</p>
<p>I haven't posted any new articles on there since February of this year, and hope to change that soon. I haven't kept up much with the happenings in the Linux <em>world</em>, so to speak, yet I still use the platform every single day. That's okay though, everyone has different priorities at different times. I never intended for the site to be a fast paced mecha of Linux content, but I would still like to add more and keep it a little more active than it currently is.</p>
<p><em>End 2021-09-03</em></p>
<p><em>Begin 2021-09-19</em></p>
<h3>My own Yarn.social instance</h3>
<p>Finally, have my own <a href="https://yarn.andrewjvpowell.com">Yarn.social Pod</a>!</p>
<p>Been tempted to try this for a while and now it's finally done, helping to contribute to the "decentralised" aspect of the platform. It's hosted on my Raspberry Pi 3+ at home, so that's nice too. Actually, so is this very site now, but all of that definitely warrants a whole separate new article... </p>
<p><em>End 2021-09-19</em></p>
	]]>
	</description>
</item>
<item>
	<title> Write HTML, Not JavaScript</title>
	<guid isPermaLink='false'>https://www.andrewjvpowell.com/articles/write-html-not-javascript</guid>
	<link>https://www.andrewjvpowell.com/articles/write-html-not-javascript</link>
	<pubDate>2021-10-03T12:41:17Z</pubDate>
	<description>
	<![CDATA[ 
<h2>Write HTML, Not JavaScript</h2>
<p>I don't hate it, I just hate overuse of it</p>
<p>If there's one thing we can all appreciate about the rise of <a href="https://jamstack.org/">JAMSTACK</a>, is that it brought about renewed vigor even amongst the mainstream for <em>static</em> built and deployed websites.</p>
<p>This is a good thing. The web has become increasingly bloated for various reasons, and along with that we've also seen increasingly complex websites/apps that put ever increasing load on the server, in terms of those that dwell sorely server-side. With static generated websites being back in vogue since, I dunno, 2016 or so, we've seen more and more pure HTML and CSS being deployed that only do (or connect to) server stuff when they have to, instead of the server itself being responsible for spitting out the HTML and CSS. A healthy bit of Separation of Concerns, if you will.</p>
<p>Unfortunately, somehow this has also led to websites being increasingly written in and depending on JavaScript (JS). Entire JavaScript frameworks have risen (almost too many to count nowadays) and become incredibly popular. I wish I were joking, but it's even fairly common to write HTML (or even CSS) <em>inside</em> JavaScript. Even one of the more sane JS driven frameworks, <a href="https://svelte.dev/">Svelte</a>, tends to save all the HTML and CSS (well, if the CSS is written inline in the HTML anyway) inside the JavaScript bundles. When coupled with it's sister project, <a href="https://sapper.svelte.dev/">Sapper</a>, which allows you to actually generate a static website, this is especially awkward as you have both static pages AND a copy of all the HTML and CSS in the <code>.js</code> bundle files as well. Hello bloat.</p>
<p>For mine, JavaScript has its place. To assist with rudimentary actions or effects on a webpage, or to do a little bit dynamic fetching of data (ala AJAX, as long as it has <em>graceful degraduation</em>). But having a website that could otherwise be written completely statically, instead pulling in hundreds of kilobytes just to "hydrate" the interface and create a kind of "SPA" (Single Page Application) feel...? I don't know, but it seems a little insane.</p>
<p>I know this because I myself once fell victim to the hype and wrote a website that was for all intents and purposes, a normal website. A home page, about section, a few other pages related to the business it was for. I did this with the aforementioned Sapper/Svelte combination. Now, the only really dynamic part of this website was a quotation form, i.e it took user input and generated a quotation of item costs, and then the user could choose to proceed (or not) in which case the system would send an email.</p>
<p>The quotation portion of the site could have been done in, at the very least, just a small Svelte component, accessed only when and IF the user wanted to get a quotation. Instead, no, old mate Andy here decided to build the entire website in Sapper instead. What Sapper does is, at compile time, builds the site and generates the <code>.js</code> bundle files, and also crawls the urls inside the site to generate a static version of the site as well. So you get a combination of good old <code>.html</code> files, that has links to the bundle files in the footer of the HTML which then loads and "hydrates" the interface, therefore handing off routing responsibility etc to the Sapper engine instead of letting the browser follow the URLs and loading say, <code>about.html</code> in it's entirety. This is meant to give that instant loading "app feel". It's nothing new, developers have been using AJAX to achieve similar effects for years, but projects like Sapper/Svelte exist to try make development faster and less fiddly.</p>
<p>Which is noble enough, and I'm not here to bag out Svelte or Sapper. Or even React, even though I find its syntax abhorrent. These projects exist for a reason and can have legitimate use. And of course there is the whole inbuilt "react-ivity" aspect that all three of the projects I just mentioned tout. The problem is impressionable or inexperienced developers, or just plain Soydevs, coming along and using these frameworks for what may be essentially brochure-style websites, instead of say a mobile application. That's pretty crazy, and that's how you get websites pulling in hundreds of kilobytes of JS on top of already existing static HTML/CSS to basically give a slightly faster response and a smooth transition maybe between pages. However, that's after the website potentially takes twice as long to load initially. </p>
<p>Then there's what I'll call technical-debt. That site I mentioned that I made with Sapper? It'll be one heck of a job pulling it apart and converting it to normal HTML/CSS. I essentially created a bit of vendor lock-in for a site that should never have needed to be that complicated or bloated. Lesson learned.</p>
<p>So, <em>TL;DR</em>: If we're going to encourage a more static web, let's write actual static websites rather than deferring it all to JavaScript. Use JS where necessary, but no more than that. if you have to ask yourself, <em>"should I really need JavaScript just to do this?"</em>, then you probably don't.</p>
	]]>
	</description>
</item>
</channel>
</rss>
