I used to have a very simple homepage before 2022. Below is a screenshot of it:
I liked this version long enough to keep it around for almost 4 years. But there was an itch earlier this year to redo my homepage. I felt like my homepage was kinda boring but maybe I was just feeling something else and projected it on my homepage.
So, once I started working on it again, I created a version using Next.js which was an overkill right from the start. Next.js is great for building an interactive, dynamic, and data-dependent application but not so great for a mostly static homepage.
The next.js version was deployed to Vercel, which was a move away from Github, for no reason except that it was “different”. The deployments were smooth because I wasn’t introducing anything major but at one point, someone I was chatting with mentioned they couldn’t access my homepage and I was surprised that they had even tried to go to my homepage and equally surprised they couldn’t see it. So I checked and yup, there was a 500 error being thrown. It was clearly my fault, I was unable to get the blog posts to show up which caused the next.js app to throw an error while running getServerSideProps. So while fixing that error, I ran into the second issue that bothered me with this homepage, it was hard to develop. The experience required me to install the dependencies on any computer I was using and also have a build process (a strong reason why I used vercel).
And this is what it looked like:
The right side of my homepage (recent blog posts) required me to server-side render the view so it can fetch the json from my blog. This would result in 500 errors when the blog was not available, which ironically happened soon after I deployed this. Not just that, it was also pretty slow.
The mobile performance was bad to the point where sometimes on mobile, it wouldn’t even render and just spin. The PageSpeed results were a bit weird at first since I thought it’d be slow in both environments.
Static sites should have a smooth developer experience
I understand the need to using dependencies when building interaction-heavy and database-backed applications, but for static sites, start with the simplest setup. For me this setup consists of a few extensions for VS Code:
SCSS to CSS compiler This used to be Ritwick Dey’s Live Sass Compiler but now it’s Live Sass Compiler from Glenn Marks.
A local live server (for hot reloading mostly) This is Ritwick Dey’s Live Server (believe it or not, I used these extensions when they were the same a long time ago)
Prettier Use whatever setup you want for code linting and style but Prettier is my go-to for this.
That’s it, three extensions and I have a working environment for a local development setup. This doesn’t require me to use an build tool or any transpilers. My JS is pretty minimal on my homepage so I opted to just use plain JS instead of Typescript or anything else.
So this is what the current site looks like and below it are the Pagespeed scores:
Pagespeed results for my current homepage:
Can’t beat 100 score but for mobile, I’ll take a 98, not a bad score for a simple website. One change I could make to the overall load speed is to minimize or compress the json request that comes from my blog.
The recently released Keychron Q8 was on my radar for awhile. As most mechanical keyboard enthusiasts, I also suffer from never acquiring the endgame. This one is definitely nowhere close to endgame but it was a nice little stint to try out.
I wanted to try the Alice layout (the two spacebars, slightly angled layout) since I first learned about it so this keyboard was the perfect one to try out.
I got the Gateron Red switches which feel pretty good but not as great as the Kailh Speed Silvers.
The knob on this keyboard is way taller than the rest of the keycaps which feels “off”. The RGB is there but with the stock keycaps, it’s hard to see past at most angles.
Spec wise, this board has most of the things you’d want today. USB-C, hot-swap switches, QMK support, and RGB. The VIA support really helps get the keys and layout as you’d want it, I personally had to move the ESC key mapping down to the left control key, Caps Lock to Control. The tilde key missing really messed with me so I just turned the default ESC key to tilde.
Overall, this keyboard is a great mid-range board to have. I call it mid-range because most entry level mech boards don’t have QMK support, hot-swap, RGB, and are not made using aluminum. But it’s far from being perfect. The keyboard still has a tinny sound that comes from either the switches not being lubed along with not enough padding or just the internals having too much space between them.
Whenever I listen to “North” by Phoenix, I’m reminded of sitting at my doctor’s office, the quietness only filled with an instrumental that builds and builds until a howl. Right now, I’m sitting listening to it and it’s on my “Upside Down” playlist created by Spotify. And at times like this, I think to myself, is there some feeling that is captured with these songs stitched together to create these moments? The song that comes on after North is “A Story You Won’t Believe” from the Witcher 3 soundtrack.
And thoughts linger in my head, I sit here looking away from the screen, there’s a spider who has built a web near my office right outside the door and it has been very successful in capturing prey, enough for it to breed spider babies which worries me, will they take over my house?
Instead of cleaning up my office, I look at the happenstances that create stories of things present in my office. Like the lota sitting there, having traveled thousands of miles, here sitting in a cardboard box waiting to be used and all I can think of is how the quality of goods has gone down since my childhood in Pakistan. People will justify brittle and uncomfortable things in favor of saving a few percentages.
As each inch becomes a hoarding ground for my mind’s lacking ability to clean up, I think more and more about what is stopping me from getting rid of so many things, maybe there’s a pattern here? I don’t really know. I think I just wanted to type out on my keyboard today and this is what was on my mind.
I’ve been looking around for a decent theme for the whole time I’ve had this WordPress blog. I’m experiencing a strong case of analysis paralysis, there are so many themes available for WordPress but also there’s a huge hole in the themes available. Most theme authors/creators market their themes as being very design heavy and photo heavy, take a look at the current popular themes on WordPress:
Most blogs with long form text or just text as their primary form of writing are not considered in these themes. The official WordPress themes are decent, I’m using a Automattic created theme at the time of writing this called “Blank Canvas”. I edited a few things like the header to make the logo size smaller:
A few years ago, when I was working on the Leaf theme, I ran into this weird issue where I was working between the theme and trying to make it as simple as possible but I lacked the design sense to make it appear as nice as I wanted to.
I’m writing this post so that I can distract myself from starting yet another theme effort to make my ideal blog theme.
The things I’d love to have in a blog that would just be a perfect theme:
Prioritizes long form text, posts lacking photos still look good.
Homepage displays blog posts as the primary content, no big images or homepage specific content.
Top header is minimal and present on all pages but is not imposing.
Has legible typography, uses the best readability styling on mobile, desktop, dark mode or light mode.
Has a nav item that shows selected or all pages.
Footer is minimal, post footer can have related posts.
Specific content types are styled and covered, e.g. blockquotes have proper styling, code snippets have fixed font.
Is free and open to contributions.
This idealistic list can be used to create a fairly decent theme in my opinion. After typing this out, I am thinking it might just be best I start working on one. So much for resisting the urge 🤣.
SPOF: Single point of failure. I know the title of this post is grammatically incorrect but bear with me.
I had an annoying issue pop up today. My blog stopped responding to all requests without any changes from me. At first I thought it might be related to digital ocean’s downtime but then that was completely unrelated (was not affecting nodes in SF2 region). SPOF #1.
Then I realized something might be happening at the Cloudflare level. I love using Cloudflare for virtually any projects outside of work because it combines all the networking related work into one place. SPOF #2.
Now comes all the various plugins I’ve accumulated on my blog over the past 2-3 years that have added maintenance load and cruft that is unnecessary. Each one of those is a point of failure, so I won’t say plugins are a single point of failure but many little issues waiting to happen, dependent on each plugin maintainer.
There’s just too much of this Single Point of Failure waiting to happen. I felt like I was chasing a digital criminal within one system. This is why devops isn’t my favorite thing but often, you’re faced with doing it.
After about 2 hours of debugging, countless restarts, restoring from a backup, I wasn’t able to tell what was happening.
What I am able to tell is that no requests were making it all the way to apache or the wordpress PHP runtime since no logging was happening there and I was able to SSH into the machine. What might have caused all this to happen was some wonky behavior at the Cloudflare level that redirected too many times. This crops up early on when setting up things with Cloudflare but once it gets going, CF works like magic, until it doesn’t. SPOF again.
In May of this year, I traveled to Pakistan to be with my family for my dad’s funeral. My dad passed away unexpectedly after suffering from a heart attack which was brought on after he fell off of a ladder. This happened on his first day in Pakistan so the shock and timing made it unbearably painful.
I have been trying to write about my dad’s passing and his life but I just haven’t had enough emotional strength to do so. I am writing this as a way to get me to talk about it and share some photos I took while I was there with my mom and my siblings. This post will only contain some photos of things and buildings, I will hopefully post some portraits of family as time goes on.
To my slow eyes and ears, Chance the Rapper came and went so quickly, I had a feeling music was about to get a different flavor of hip hop but it felt so short-lived. There was a short of bright music that came from him and now I’m looking around to find it but it seems to be long gone.