Website


About Dev, 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 the use of software and specifically Windows. Later, I deep-dived into the Raspberry Pi for its first few hardware generations when there was little information online besides text-only forum posts.

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 probably won’t be the final direction of my postings.

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


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. While being left on the free service means there is no ability to customise the HTML and CSS, to fix the narrow width of the theme or to 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.101.0 with Go v1.18.3
tooling date 16 June, 2022
the site was last modified 30 October, 2022

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 often provided for free by various platform providers, Netlify or Pages.

Hugo’s use of templates allows complete customization and extensibility. If you can think it, you can probably 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.

The use of 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 even write your blog posts on MS-DOS if you wish. And 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.

If you are thinking about using Hugo, you probably 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 templating and iterating are very temperamental. It’s easy to panic 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.

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 32 years ago, and the site still lives today at its original address, info.cern.ch?