Blogposts
To solve or not to solve
Avoiding unnecessary investment on problems that can be ignored.
2023JAN30
2023JAN30
That is the question.
So, as you can see, the website I have right now is...not good.
Both the technology aspect and the design aspect, no matter how you look at it.
Static Site Generator?
For example, I should have used a static site generator instead of writing everything by hand.
To list some problems of writing everything by hand:
-
When writing any page other than the homepage, I need to write lots of duplicate code.
Most prominently, the
header
andfooter
.This doesn't seem like a big problem at first, until I realize that when I change my implementation of the header and footer, I need to change them on every page.
Same goes for every other piece of code.
My solution:
-
Write everything, and I mean absolutely everything on the homepage.
Contrary to many people's expectations, it wouldn't be too much a problem at first.
Why? Because modern browsers are capable of handling a lot raw, text content. And I mean a lot.For example, here is the full text of Alice in Wonderland in one GitHub gist.
Loaded in under a second for me.Of course this is not scalable, but I guess I would probably have time to set that up once the amount of text I generate exceed the size of Alice in Wonderland.
GitHub Pages?
-
I'm using GitHub pages to host this website despite owning a server.
-
That means it'll go down if GitHub deletes it.
- Also, GitHub pages cannot be accessed in certain countries.
-
-
I'm (ab)using jsDelivr to host fonts instead of serving them from same-origin.
Surely those are problems. Problems which can be solved by self-hosting.
But do I really need to solve those problems?
I do want to solve the problem of website being inaccessible in certain countries due to using GitHub pages.
However, to self-host means:
-
If GitHub deletes it (unlikely, at least for now), I still have all the content, locally, due to using Git to deploy to GitHub Pages.
-
Website can be easily blocked due to me having limited ip addresses, and we are back to square one.
-
Having to keep up with dependencies, which, let's be honest, lots of us just don't.
-
Maintaining a server is time-consuming. It's not about I'm actually typing the commands to update, it's about remembering to type the commands in the first place.
Therefore, security problems wouldn't get fixed in a timely manner(or would just never get fixed).
Therefore, I conclude that: now is not a good time to self-host this website.
Remember, use technology to create, not use technology to use technology.