Website


About the developer's tidbits dot com

a brief history

Welcome to The Developer’s Tidbits, a technical blog and how-to guide on various topics I stumbled upon during work and my life online.

This website first went live in January 2008 using the domain ipggi.wordpress.com. But by July 2013, I had purchased the descriptive domain name devtidbits.com.

In its early life, the focus was on software, specifically Windows. Later, I deep-dived into the Raspberry Pi for its first few hardware generations when little information besides text-only forum posts was online. Later, with Microsoft’s embrace of Linux, I started writing guides on running Linux on Windows. This topic came about from the success of the Cygwin walkthrough and beginners’ guide. As of 2022, the blog is more geared towards programming on the web and Go, but given the constant change in the tech industry, this won’t be the final direction of my postings.

The site theme is built from scratch using Bootstrap 5 but was inspired by the previous WordPress-supplied theme, Button 2 by Automattic.


Privacy

Advertising and analytics

This site uses two third-party resources that track anonymous visitors to this site, both of which are blockable.

Google AdSense provides advertising and revenue by serving personalized ads.

Cloudflare Website Analytics is a privacy-first, lightweight, accurate web analytics.

Disqus is in use for the optional reader comments. These are turned off by default until you enable the Reader comments link.


Technical stuff

WordPress hosting

For the first 15 years of this site’s life, I used the excellent and free hosting provided by wordpress.com. Despite the limitations of the free plan, such as the inability to install extensions and plugins, I was happy with the features provided by Automattic. I could host a complicated WordPress installation for free without worrying about security or maintenance issues.

But some problems have since caused me to move to a different solution. Moving from the free to the premium paid offering requires a sizeable monthly fee suitable for a business but not for a site like mine. Being left on the free service means there is no ability to customise the HTML and CSS, fix the narrow width of the theme or stylise the code blocks I now regularly use.

Finally, I find the frontend content management system is too complicated for my needs. It has to be all things to all people, but it’s like using Office 365 when only notepad.exe is needed.

There will be some negatives to leaving WordPress. I won’t have a mobile app and live notifications to interact with my website. WordPress comes with built-in analytics and statistical data that will be lost. Third-party tools can replace this functionality but add significant bloat and user privacy concerns. And the built-in WordPress reader interactions such as commenting or liking posts will be gone for good.


Technical stuff, Hugo

the static website generator

assembled using Hugo v0.121.2 with Go v1.21.5
tooling date 5 January, 2024
the site was last modified 13 January, 2024

Meet Hugo, a static website generator that builds a complete website using Markdown and custom templates as its source code. Hugo has many advantages and, surprisingly, a couple of unexpected negatives that I will explain.

As a static website, there’s no database requirement. Everything gets made using classic HTML, CSS, and JavaScript, improving the performance and hardening your site from potential security issues. The lack of a database also means the hosting requirements are less complex and are often provided for free by various platform providers, such as Netlify or Pages.

Hugo’s use of templates allows complete customization and extensibility. If you can think of it, you can code it. Hugo is made with Go, which is great for me but also means it is speedy at compiling and generating a site. You can even run live web server builds without a performance hit.

Using plain text Markdown for the site content makes it easy to modify, backup, and archive using any text or programming editor on any operating system. You could write your blog posts on MS-DOS. This ability to use plain text means there are no strange conflicts when pasting source code examples, which is not the case using a WYSIWYG editor or CMS.

Are you considering using Hugo? You should be comfortable using CSS/HTML and know server-side dynamic web pages. Knowledge of a general-purpose programming language would be helpful as there are conditional functions, iterations, and variables. While knowledge of Go isn’t needed, it speeds up the understanding of how Hugo works.


More technical stuff with Hugo

the downsides 😔

Unfortunately, for all the praise, there are plenty of downsides to using Hugo, at least in 2022.

Hugo relies on Markdown, which means it lacks data structures and the safety of a walled garden, so it is an adjustment for writers who use web-based editors.

Hugo’s templating and iterating are very temperamental. Panicking the application with syntax errors, leading to cryptic feedback. For example, this is an error you may get when you mistype the path or name of an image file to display in a markdown file.

$ hugo

execute of template failed: template: shortcodes/image.html "shortcodes/img.html: at <$img.RelPermalink>: nil pointer evaluating resource.Resource.RelPermalink.

You need to use Git. It’s technically not a requirement, but in practice, it is. Git usage is acceptable for developers with the prior experience, but not for most general writers.

I found the documentation a bit of a mess with information all over the place. Some parts are pervasive, even longwinded and others are way too brief. The organisation is poor where there are often no primers or examples for key fundamentals, so it often feels more of a vague reference than a user guide. Functions, for example, are listed alphabetically, so you need prior knowledge of the Hugo syntax to know what you’re looking for, which isn’t great.

I learned the basics on creating a site from scratch in Hugo from the book, Build Websites with Hugo. And afterward, I did a lot of Googling for tutorials before I was comfortable using the actual Hugo docs. But that’s me, based on my experience.

Did you know the first website and server went live 33 years ago, and the site still lives today at its original address, info.cern.ch?