Previous Page

Next Page

Table of Contents [ Show]


Why do you have a website anyways?

I know, right? There is nothing interesting here, I don't have anything to sell and I'm not even looking for a job (at the time of writing; My Resume Coverletter might say otherwise)! Well, it started out somewhat innocently. In 2015 I took a job at Roaring Penguin Software, a company that produces anti-spam, email archiving and secure messaging software (this has become a trend). In order to test things and actually make sure that I'm good at my job, I have opted to run the self-hosted version of the software for my own personal email. This means owning a domain name so that I can actually point mail at the machine running the software. From there, it would be silly to own a domain and not also have at least the bare minimum of a website. I could have just opted for something simple on WixSpace or through my registrar, but in case there was any doubt, let me be clear: I'm a total dork!

The various website building services always make a pitch like: "You don't want to learn HTML or JavaScript just to make a website." But, yes. Yes, I do. There is a reason that the "Projects" tab is lit up above. I am not a person that likes to be idly watch TV and even reading books will only hold my attention for so long. So I waste my time doing things that are somewhat more mentally engaging. A lot of that is tinkering with physical objects, but as time goes on and I continue to move to smaller and smaller apartments closer to downtown, more and more of those projects have involved messing around with code. As a result I'm slowly becoming more and more competent at doing so which makes it a much more enjoyable thing to do. It's a vicious cycle. This is good because physically building and fixing things results in extra physical objects which conflicts with my minimalist sensibilities. Unfortunately, writing articles for this site is generally much less engaging, so I spend a lot more time tinkering with the nuts and bolts than creating anything that would be worth visiting the site for. Luckily, when I work on the site I am right her, sitting at a terminal, so the barrier to entry in writing this article has be a little bit lower.

Meta-Data

.me.tz?

So, despite the fact that the domain was originally acquired in order to process email, this has been perhaps the most poorly executed part. This is not because I don't know how email works; I can administer the crap out of Sendmail or Postfix. The reason it hasn't worked out great is that nobody knows what the heck I'm talking about when I give them my email address. A common conversation is something like:

  • contact@john.me.tz? Then what? @gmail.com?.
  • Nope. That's it. You know how there are .com and .net addresses? Well there are also .me.tz addresses.
  • Oh. So, what was it? john@me.tz?
  • <sigh> Let me start again...

This was a short sighted decision based on a not-very-funny joke that very few people will understand. I explained that joke with an easter egg if you click the domain name or logo in the banner at the top. This should quickly flip the dots though various characters and eventually stop on my name, John Mertz. It is a domain name hack which matches my name if used as a Regular Expression. These are a standard set of characters that can be used in some software to search for patterns rather than literal strings. With Regular Expressions, you can use a dot to represent any single character of text. So searching for "te.t" would find "test", "text" and "tent". This is incredibly useful for manipulating text, but much less useful when you are explaining for the third time that, despite there being an "r" in my last name, there isn't one in my email address.

So, what the heck is a .me.tz domain? Fun fact: any domain name that has 2 characters after the final dot is called a ccTLD, or Country Code Top-Level Domain. The "Top-Level Domain" part is the highest level of organization of the internet, the same as .com or .org. This helps computers find each other when they perform a lookup using the domain name service (DNS). The Country Code part means that rather than representing a specific category of website like .org or a specific industry like the pleathera of new designations like .accountant, and .zookeeper (I don't think that one actually exists, but at the rate ICANN is approving new TLDs, it will soon), it instead represents a country. My fellow canucks are very familiar with this concept given the .ca top-level domain, and Americans are probably much less familiar with .us. Despite what some might like to think, .com does not mean it is the american equivalent to the .ca, it is just the generic; all country-code TLDs are 2 characters and all 2 character TLDs are country-codes. The .us domain is just highly abused by spammers and malware sites, so no one really uses it on the web.

.tz is then, the ccTLD for the great nation of Tanzania. I have no affiliation or recent heritage (to my knowledge) in Tanzania, but luckily they don't vet these things or generally require it to register a domain there. I couldn't even point out Tanzania with it highlighted on the map here. The .me part is a Second-Level domain which indicates it's category as a "personal" page. Canadians will be very familiar with the similar .gc.ca as the designation for government websites.

The Tech

For my fellow nerds, talking back-end infrastructure is always fun. The current answer to that is:

  • OS - Debian Bookworm (12)
  • Hosting - OVH VPS, 2 vCore, 8GB RAM, 80GB SSD
  • Server - Nginx with HTTP2
  • Nameservers - Mine, Bind9 on this machine and my mail server
  • Language - Primarily PHP
  • Frameworks/CMS - Custom
  • SSL - Let's Encrypt
  • VCS - Git

The website has gone through several iterations and so too has the hardware and software. Some changes have been practical. For instance the site started out running in a Linux Container (lxc) on Debian Wheezy (7) on my desktop computer attached to a static IP on my home internet connection. That machine was a heck of a lot more powerful than the VPS, but it lived and died at the whims of TekSavvy's DSL line and the Ottawa power grid. Other changes were not necessary but I made them just out of curiousity. It started out as a very vanilla Apache installation, but I administer Apache servers at work and thought I'd expand my skillset. Similarly, I used to just use the DNS services provided by my registrar but having never run my own name servers, I thought I'd learn that as well (this one also saved me a few dollars a year, but that wasn't the point). Early on I added HTTPS support. Despite the fact that there's no real privacy need for it, Let's Encrypt just makes that process so easy that it would seem silly not to set it up.

Everything was initially pretty much static HTML with a lot of copy-pasting, then I split the duplicate stuff into JavaScript files using document.write functions and loading them on each page that they were needed. That reduced the need to apply changes across multiple pages but also meant that processing had to be done on the client-side and was dependent on a JavaScript enabled browser. It did also allow me to get the primary functions of the CMS working, including to programatically generate all of the common elements for page blocks given just the variable content strings and images. This was still not ideal because it was: 1) inefficient - it meant sending the complete contents of an article or list page even when only a handful of items might be rendered. 2) static - plain JavaScript cannot access the filesystem to know what content needs to be loaded, so I had to maintain separate files that listed all of the directories that needed to be included.

Previous Page

Next Page