Category Archives: Uncategorized

10.5 > 12.5 > 14 > 15.6 (Maybe) – Chuwi Minibook X N100 Review

In my quest to find the perfect laptop, I’ve made yet another stride (or slide, we’ll see about that). A week ago (actually a month and a half ago, as I’m publishing this), I bought myself a Chuwi Minibook X, Intel N100 edition. Chu-what?! You might ask. I’m glad you asked.

Motivation for a new laptop

I have a sling bag that I really like. It is tiny but fits everything that I’d generally carry when stepping out for a few hours; headphones, portable power bank, some cables etc. A couple of months ago I got myself a 7in screen that latches to a Raspberry Pi and looks like a cool “cyberdeck”. I thought it would be very cool to be able to carry it everywhere; to have a device with a full desktop operating system running with me that isn’t as bulky as a regular laptop.

I have a Thinkpad X230 as my personal laptop. It is small compared to most laptops, and features a 12.5in screen. Overall it is probably a bit bulkier than a modern 13in laptop like the Dell XPS 13 and cannot be carried in my tiny sling bag. Upon looking for a portable device with a 7-10in screen on the internet that’d fit in my sling bag (around 25cms in length), all I found were tablets and few laptops running Android, iPadOS or ChromeOS.

But I really wanted a device to run my favorite Linux distros on.

Requirements

A device to run a desktop operating system on (ideally a Linux distro) that’s no bigger than 25cms across and 16cms wide. For reference, the generally accepted small footprint laptops like the Dell XPS 13 or the Lenovo X13 Yoga are 30x20cms and 31x22cms respectively, which feels noticeably bigger than a 10in tablet device with a keyboard, the size I’m going for.

The internal specs weren’t as important, but anything that’s relatively power efficient so that I don’t have to then use it with a charger at all times.

Contenders

Given the size constraints, there aren’t very many devices to choose from. In the traditional brands, there is the Microsoft Surface Go 3 and the Surface Laptop Go 3. Outside of traditional brands, there’s GPD Pocket 3 and a whole bunch of 7-8in laptops that all look suspiciously similar to one another. One of the brands I stumbled upon during this search was Chuwi. They had a laptop that checked all of the requirement checkboxes I had, and unlike the other options, wasn’t nearly as expensive.

Upon some reading on Reddit, I realized it was a real company (the experience with their support seems to be mixed; I’ve not had any complaints so far) and the product was reviewed by youtubers and redditors alike. Good signs. I decided to bite and placed an order during their spring sale to effectively get the laptop for EUR 317 (down from the regular >360). It had it in my hands 2-3 days later.

Initial build quality impressions

The build quality is a solid 6/10 in my book. Of course, it isn’t as good as my XPS 17 or M1 Pro Macbook Pro, but it isn’t as cheap as an off the shelf HP or Dell laptop worth a couple of hundred Euros. The hinge feels solid, and the display part of the laptop is solid metal, but the keyboard half is plastic-y. It is hard to tell, thanks to the good color blend.

The packaging is okay. The laptop comes with a 36W USB-C charger out of the box, and it is of okay quality.

The keys on the keyboard are a bit oddly placed and requires some getting used to. The power button doesn’t always register a click, and also takes some getting used to. The indicator LEDs for charging and power feel cheap and are hard to see at steeper angles. The USB-C ports aren’t the highest quality either, and there’s a slight amount of misalignment in the ports, at least on my particular unit’s case. This doesn’t affect its functionality, but is definitely indicative of sub-par QA.

Pictures

Note that the Windows 11 license issue resolved itself automatically. I had already created a support ticket with Chuwi who provided me with another license key which I didn’t need after the issue went away by itself.

Rome trip

A huge motivation for buying this laptop was to be able to use it in tight places, like on an economy seat of my flight from Frankfurt to Mumbai where the person in front has their seat fully reclined (oddly specific, but honest).

I got to use it in an airplane for the first time (for the intended use case, that is) during my Rome trip in the last week of March, and on my way to India in the first week of April. It works well, like 7/10 well. The size of the device and thus the keyboard does become a productivity bottleneck and it strained my wrists typing on it for more than a couple of minutes without breaks. For its intended use case of surfing the web and light documentation, it works well nevertheless.

Linux support is sparse and makes the device unreliable

Of course, the first thing I did after unboxing the laptop and making sure it isn’t completely dead is try and flash Linux on it. I started with Fedora, and upon seeing a lot of hiccups, installed Ubuntu.

A major hassle is the default orientation of the screen, which is portrait. So the splash screen and many of the startup options show up in portrait, and only upon logging in successfully does the custom orientation (landscape) kicks in.

There are ways to make it work better, but I wasn’t very patient. Then there was the problem with resuming from a sleep where the screen would be all messed up (think half of the display is black, the other half has strange colored lines across it) and required a reboot. It almost feels like a hardware problem, but it most likely is a driver issue.

The list of issues with Ubuntu installed went on and on, and while a younger me would’ve taken it up as a challenge, I decided to stick to Windows for the moment as my life is pretty busy lately due to work. If I do come back to Linux on this device, I’ll try to make a guide for making the device usable with Linux.

Charging seems slow

The laptop comes with a charger out of the box that charges at 12V 3A (36W). I usually don’t use that charger and stick to my Macbook Pro’s charger. I also use my Anker PowerCore power bank. In either of those cases, the charging speed is fairly low, and the laptop takes a while to fully charge. Chuwi’s website claims 45W PD 2.0 fast charging, but the most I’ve managed out of this device is around 22W (even when charging from a depleted state).

Laptop body prone to decoloration

Sometime during the Rome trip, I carelessly threw around the laptop. For example, I just dumped the device in the carry-on luggage space during takeoff without a sleeve. I noticed a part of the bottom half got bruised and the silver color wore off, exposing white plastic underneath. Now I knew that the bottom half was made from plastic, but I somehow didn’t expect it to decolor after a little throwing around.

I tried to take a picture of the defect, but it is too faint and the light isn’t good enough in my room to actually help you see it. Just trust me it shows in real life.

To be clear, it isn’t a deal breaker. Given the price it is made available at, I probably cannot complain. It is just something to be aware if you decide to get one.

Accessories I bought

I couldn’t find a screen guard or sleeve officially presented so I ended up spending a lot of time measuring the device (and the screen) and finding accessories that fit.

For the screen protector, I went with Samsung Galaxy Tab A8’s screen protector. It doesn’t fit perfectly, but gets the job done for most part.

For the sleeve, I ended up with two sleeves; one is too large and the other too small. Of course these are tablet sleeves, so you have to measure and guess and hope something fits. I for one was too impatient before my trip to India and ended up with two sleeves that don’t fit.

Screen can be overclocked

By default, the laptop’s display is set to 50hz. But some folks on the Chuwi forums posted that they’re running the panel at 90hz and it works just fine. I tried using the Custom Resolution Utility to set the display to be 90hz and it worked well.

Wishlist

If I could make a list of wishes I’d like to see in this laptop (practically, in a future version of this device), it would be as follows

  • 5G SIM slot to have internet on the go, just like a tablet
  • SD Card reader
  • Fully metallic body, and not just the screen-half.
  • Better Linux support

Many of my wishes would likely raise the device’s price. Spending any more than a couple of hundred euros on a lesser-known brand is risky in my book and I don’t know if I’d have bought a laptop that fitted all of those wishes but then retailed at 500+ euros or more myself so there’s that.

Conclusion

It isn’t all sunshine and rainbows with the Chuwi Minibook X, but it is a good device. I intend to make it my daily driver and see how life feels like carrying a small device running a full operating system around. I also intend on not taking too much care of it and using it like a rugged device. I’m allowing myself this luxury after carrying around my Macbook Pro for a long time and having to take extreme care of it (I’ve already managed to break an older Macbook Pro’s screen, and given the price of this current one, I’d rather not risk much).

So that’s it for this laptop review. I really hope a 10.5in laptop works out for me. I’ll post updates if there’s anything interesting to share. Thank you for reading.

I made it to Firefox about:credits page!

This will sound extremely silly but I absolutely adore the about:credits page. This page lists the folks who have spent time of their life to make Firefox and Mozilla products better in some way. Many of them are volunteers and have contributed to Firefox’s success in their free time. There are perhaps as many motivations as there are contributors; some do it for fun, while others because they align with the Mozilla’s mission.

It won’t be an exaggeration to say I wanted to be on that page for a while. To be fair, desire doesn’t necessarily translate to regular contributions, which is why I didn’t make it to that page for the longest time. But getting employed by Mozilla helps, and after working on the Add-ons team for a little over a year, I applied to be on the page. And I was accepted!

If you’re using Firefox, type about:credits in your URL page and you will find me there, forever. For the non-Firefox users, you can directly navigate to https://www.mozilla.org/credits/

That’s really it. It was a bit showoff-y but I thought this achievement deserved a blog post. Thank you for reading!

Building vs Buying a NAS – A non-hardware nerd’s perspective

After years of contemplating on making or buying myself a NAS, I finally decided to bite and got a Synology DS223j two-bay NAS as a present for myself for Christmas along with two refurbished 16TB Seagate Exos hard drives.

Rewinding a bit

For most of my life, the only “backup” I had was a 500gb hard disk that came preinstalled in the Fujitsu A514, my first laptop. I had also bought a 120gb solid-state disk at the time and immediately replaced the hard disk with it. The hard disk went into an enclosure and I used it to back up any important data as my laptop went through frequent cycles of OS reinstalls during my distro-hopping era.

Any time I’d want to back up my photos, it would become a folder on the hard disk and then cleared from phone storage as phones came with much smaller storage back then. I remember having 16gb internal storage on my Galaxy Note and thinking I’d never fill it up no matter how many pictures I take.

I used Gmail and the 15gb storage the free account comes with was enough for email and the occasional document sharing via Google Drive. Life was good.

At some point I hooked this 500gb drive to my Raspberry Pi running Nextcloud and even had my very first “NAS” setup.

In 2018, I had some INR 300 of Google Play credits that I used to get some of the apps that I wanted to support and use pro versions of, like Nova launcher, Tasker etc. Along with those, I got the 100gb Google storage plan (at INR 130 a month) and started backing up photos to Google Drive. It was an okay cost as I was already working by then and had some money to spare for subscriptions.

Since then, I had kept that subscription and even upgraded it to 200gb after moving to Berlin.

Problem statement

The problem I set out to solve was to get rid of some of the cloud storage subscription fees I’m paying each month. I was paying duplicate fees for cloud between two Google accounts (and an iCloud account), so the plan would help get rid of two of the three subscriptions resulting in some 50 euros saved each year while providing me to actually follow the 3-2-1 backup strategy for some important data that I wouldn’t want to lose.

Requirements

Late last December I got a bit obsessed with watching computer build videos. It was fun to learn something new, and to be honest it also was entertaining. From the videos, I learned some important considerations that I’ll have to think for myself before spending my first Euro on this new project.

  1. Number of drive bays: While a NAS can just be a single drive attached to the network, generally they also offer redundancy (using RAID configurations) for NAS with two or more drive bays. I knew I’d want a RAID 1 so I’d need at least two drives.
  2. Idle power consumption: Power is expensive in Germany and I’d want to stay away from any old hardware that’s cheap to buy but very expensive to run. The last thing I’d want to do is invest in a NAS that I’m going to not keep running all the time.
  3. NAS application / operating system: Ideally, I’d like some bells and whistles like automatic backups to make my life a little easier and not having to do that manually. The popular NAS applications come with add-ons that allow more specific usecases. TrueNAS, Synology and others have public pages where one can see if the application they’d need is available on the platform they’re choosing for the NAS.
  4. Gigabit access speeds: I wanted to NAS to be accessible at the same speeds as the rest of my home network, which is currently at a Gigabit. Fortunately, that seems like the minimum one gets in 2023.

Non-requirements

I also learned about what other people prioritize in their NAS, but it didn’t resonate with me. More specifically, I couldn’t justify the price overhead that acquiring those features needed. Namely,

  1. SSD Cache: While there are many strategies to use an SSD for read and write caching, it primarily makes read/write operations feel faster for some use cases. I thought this was over-optimizing for my modest use case.
  2. CPU / RAM to run containers / VMs: I also found that folks like to run Docker containers / VMs on their NAS and need more powerful CPU and added RAM. This hadn’t even crossed my mind, and as such, I stayed true to the “if I didn’t know it exists, I probably don’t need it yet” principle.
  3. Multi-gigabit or multiple LAN ports: Folks opt for 2.5 or even 10gig LAN ports on their NAS for faster transfer speeds. Now while I’d looove to have transfer rates more than 120 MB/s, I’d need to upgrade my entire home network to multi-gigabit LAN and WLAN, and that’s expensive. That also would mean having a beefier CPU to handle the transfers which would increase the cost of NAS hardware itself.
  4. Four or more drive bays: This was the one I was most unsure about; Most if not everyone one reddit suggested to get at least a 4 bay NAS and then just using a couple of the bays until the requirement arises. It sounds reasonable, but I have a feeling that the requirement for 4 bays would never arise and 16TB in RAID-1 is going to be enough for a very long time.

Building vs buying

The nerd in me wanted to really go down the route of buying all the parts and assembling everything myself. The videos I had watched made me confident enough that I could pull it off. Building a PC is fun, and truth be told, I’ve never actually built one for myself.

Having said that, I also recognized that I’m mixing two things together; my requirement for a secure and reliable NAS for my critical data and my desire to build a PC that I can experiment on. I’ve lost important data in the past and I didn’t want to risk it. Especially not after having just watched a bunch of videos and never actually having built a decent PC myself.

I decided to pick up a Synology 2 bay NAS DS223j with 1gb RAM and a relatively weak but does-the-job quad-core Realtek CPU. The cost of the NAS was 180 euros. To do with it, I got a couple of refurbished 16TB Seagate Exos drives, each of which was 180 euros, for a total cost of 540 euros.

My rationale behind going down this path was as follows:

  1. I don’t trust my PC building and setting up skills enough to offload all of my data to the built-NAS and then cancel a couple of cloud subscriptions.
  2. At 4-5 watts of idle (hibernation) and 16 watts of under-load power consumption, it is comparable to a relatively efficient Mini PC.
  3. Hardware isn’t cheap in Germany, and actually saving money on hardware would require sourcing parts off Aliexpress which takes time and is often less than reliable.
  4. Building a PC and setting up the necessary software takes time. I could use this time on another project (home server blog post coming soon :D).
  5. Synology’s DSM (their proprietary operating system) comes out of the box with remote access via QuickConnect.

Tradeoffs I’ve ((sub)consciously) made

I feel like I’ve given up on some of my preferences when going down the Synology NAS route. And while some of these are conscious, there are some that will only show up once enough time has passed. In any case, I’m still documenting some of them here.

  1. Open source and free software: Synology DSM only runs on Synology hardware, at least officially. It means I’m stuck to using Synology software for as long as I’m using this hardware.
  2. Synology tax: Like I mentioned, using these off the shelf NAS’s requires paying the software and marketing budget of the companies in addition to the cost of the actual hardware. That’s fair, of course. Just something to be aware of.
  3. NAS hardware: I’m sure my “16TB ought to be enough for me” might not age very well. I also faced some situations where the NAS really slowed down and made me realize that it is running a very under-powered CPU after all. Again, tradeoffs.
  4. Noise: Seagate Exos drives aren’t the most silent hard drives. My wooden floor made it much worse and I ended up putting the NAS on a softer raised surface to absorb some of the vibrations. I believe this problem would’ve not completely vanished had I chose to get non-enterprise drives like the Seagate IronWolf, but it would’ve been better.
  5. Electricity costs: While my Synology NAS is efficient, and consumes single digit Watt power most of the times idling, it will still add 30-40 euros of additional power consumption to my yearly electricity bills (at 10w average power consumption 24x7x365 and 40 cents per kWh).
  6. Breakeven cost: From a purely utility perspective, it will take some years of not using Google Drive and iCloud before the cost of investing in a personal NAS is broken even. This is especially true if I do not fill up the 16TB that I have and then have regular need to access those files. This isn’t factoring in the added electricity cost, nor can I effectively compare the reliability of Google Drive to a NAS set up at home. Overall, for most people without the need to store TBs of data, Cloud is a very logical option.

In closing

I hope that was informative in some way. I am looking forward to seeing how my investment turns out and if the list of tradeoffs grows further. I’ll leave you with some pictures of the NAS.

Fresh out of the box with its accessories
Initial setup in my “Lack rack”. It has since been replaced but wait for an update on that.

Thank you for reading!

I’m A Five Year Old Berliner Today

Some 1,826 days ago I arrived at Berlin Tegel Airport. Missing my connecting flight, losing my luggage due to that and landing in a completely dark, freezing and rainy Berlin wasn’t pleasant, but it also wasn’t that tough. I was just happy that I finally stepped foot in another country, and given how long I prepared for this journey, I was glad it had finally started. The kind HR person from the company I was about to join was at the airport to pick me up which I’m extremely grateful for to this day.

The first super market trip was nerve wrecking, and not just because I only had 100 Euro bills with me and was worried I’ll get yelled at by the cashier. But I managed to have dinner that night (as depicted in my picture above), and sleep well. And then to my surprise I also managed to survive the rest of the week. And the rest of the month, and the year, and then some.

I did more than just survive, as one ought to aspire for. I made friends, traveled to pretty places and ate good food. I learned a new language and experienced a culture that was totally foreign just five years ago. I learned to play a musical instrument, play chess and cook tasty food. I did a lot of what I had only dreamed of, including landing my dream job at Mozilla.

Reminiscing on the time from my first day in Berlin till today, I have a lot to be grateful for, lot to smile about and a lot of notes on how to do better in the future.

I’m writing this eating delicious glutinous rice ball dessert, to celebrate the little milestone. The past few years brought us all a lot of changes, and it feels like the world is caught in turbulence. I wonder if I am only thinking so because I’m getting older and tend to pay more attention to what’s happening around me, or if everything is actually happening faster.

It was undoubtedly an interesting journey living through these last five years here in Berlin, and I’m looking forward to the next.

Thank you for reading!

Wifi Router Keeps Disconnecting Exactly When Speed Testing

I got a cheap Huawei Wifi 6 Router (AX2 Pro) which was the only sub-20 Euro router I could find on the market that supported Wifi 6. It is a used one of course, and the person I got it from got it from their previous tenants, who I assume got it from China (or Aliexpress?) because the product doesn’t support any language other than Chinese.

I knew that before buying, but I thought it was an okay tradeoff given the Wifi 6 capabilities at the price. So after an hour of Google Translating every item in the UI and setting everything up, I was very excited to run an internet speed test.

To my surprise, the Wifi connection just dropped as soon as the speed hit 100Mbps, crashing with a “socket broken” error. It was as if someone pulled the plug exactly when I ran the speed test. I tried again with the same result. I could surf the internet, watch youtube and do other things just fine. Just not run a speed test.

Connecting my laptop with the Ethernet cable gave me the full 1Gbps, what I was expecting. Interestingly, I could replicate the behavior of the router restarting via any device and exactly while speed testing.

I was a bit disappointed, but not a lot. After all, blindly buying cheap imported routers off kleinanzeigen ought to have its risks. I sat down to write the seller (who probably had never once tried to run the router, just passed it on from her tenants to me) that the product they sold was kaputt, simultaneously trying to come up with a search query that’d probably match someone else’s description of this problem.

Eureka!

As I was writing my seller a message (not exactly expecting a refund, as these things are sold with zero guarantees), it occurred to me that benchmarking an electronic device ought to push its power utilization. It would make sense why the device would operate normally otherwise. I immediately checked the output of the power supply and the required input from the router. TADAA!

The seller gave me a TP-Link power supply that supplied 9V at 0.6A but the Huawei router was expecting 12V at 1A. I fanatically searched my box of cables and adapters to find a power supply and found a variable power supply that could help with the case.

As expected, that was it. As soon as the router got the right juice, it started pushing 900mbps+. I find that very impressive, given I picked it up for just 20 euros! Welcome to your new home little guy.

Thank you for reading!

Living a couple of nights at Marine Drive, Mumbai

When I was little, going to downtown Mumbai used to be exciting. A huge metropolitan city with double-decker buses, zoo, planetarium etc was sure exciting for a kid. Even as a young adult, my university friends and I would take the train to the city center to sit by the water front at Marine Drive or Bandstand. The city of Mumbai has fascinated me for a long time, and I’ve always wondered what it must be like to live in the center.

Of course, living in the fancy areas of downtown Mumbai is close to impossible if you don’t already live there or are extremely wealthy. Since I was neither, it always remained a wonder. Back in the day perhaps I’d have said that I’d love a home in the city center, but lately I’m over that thought. The steeply rising prices, the commodification of places of residence and prevailing view of buying a home as sort of a financial investment has been quite off-putting for me, to the point where I no longer desire to own my own place in the city.

But that doesn’t mean I’ve stopped being fascinated by the idea of living in downtown Mumbai.

Fortunately for me, a friend was visiting Mumbai and decided to book a room in one of the poshiest parts of the city; Marine Drive. The “fortunately” part is about him booking a room big enough to accommodate me during his three day stay in the city.

Living at Marine Drive

So how does it feel to living at Marine Drive? Amazing. With a sea view, the sunsets are a delight to see from a french style full height glass windows. I could see all the people sitting exactly where my friends, family and I have sat numerous times. I woke up early to go for a morning walk and grabed a coffee along the way, something I literally dreamed of doing for years.

Eating casually at some very good restaurants, or going to a evening musical at the Opera House just a short walk away or having problems like having to travel quite far up north to get to the “regular” part of the city were a delight and I felt extremely privileged and fortunately to be experiencing it.

In closing

Yet another of those silly bucket list items got ticked. Sure, living the permanently would be cooler, but this is probably a close second. Or perhaps living there permanently wouldn’t have made me appreciate it as much as I did now.

Even as I was living in that hotel room, I knew how much I’m going to miss the couple of days that I’ll spend there. Now, as I’m writing this, I can see how my past self very accurately predicted that. I’ll end with a picture of sunset over Arabian sea from the hotel room’s window.

view of marine drive from my hotel room

Thank you for reading!

Something about enjoying the journey

Last Sunday I visited the Bergpark Wilhelmshöhe near Kassel, Germany. I was wow-ing the entire time at probably one of the most impressive pieces of architecture I’ve ever witnessed with my own eyes. If you do get a chance, I’d highly recommend paying it a visit.

So we started our hike from the Schloss Wilhelmshöhe and started climbing the hundreds of steps that lead all the way up to the Hercules monument. I read somewhere it is a 250 meter elevation. Whenever I paused to take a look at how high I had reached, it got more and more impressive.

I was eager to reach the top. I tried to rush my way through some of the points of interests along the way to reach ever so higher to get a better view. I had my little camera with me, and I wanted to get the best view. Finally, we reached the top of the hill, but there was a whole building up there, on top of which was the Hercules statue.

Of course, I wanted the best view, so I started going up the stairs of the building trying to get ever so higher. The stairs got narrower and narrower as I rushed to the top. But finally, I was there and tried to look outside through the small windows.

The view was underwhelming. It was more or less the same that we’d been seeing for some time during this hike up the tower but this time through tiny windows that had a lot of dust built upon them. I took a picture, and started walking down after not too long up there.

I was thinking about it in the car on the way back to Berlin, and I realized this is just how I sometimes go about my life; rushing towards a goal while not appreciating the views along the way, thinking something better awaits me at the end of it. I’d have slowed down, had I known how little joy the reaching the destination would bring.

Fortunately, I could appreciate everything a bit more on the way down the hill. Unfortunately the same cannot be done with passed time and experiences.

In closing

We live we learn, and such experiences are always a good reminder to slow down and appreciate the views around us; appreciate the present consciously and intentionally for it cannot be re-experienced.

Thank you for reading!

Mai bada hokar kya banunga?

(Note: This article is written in Hinglish, and requires the reader to know Hindi in addition to English)

Socha ek post Hinglish mai likh du. Whatapp aur baki saare apps pe dosto ke sath toh aise hi baatein hoti hai, toh phir iss blog pe kyu nahi.

Koi khaas aisa topic hai nahi mere pass. Saturday ko ek dost se baatein chal rahi thi, aur vo kisi baat pe mazak mai bola “Mai bada hone ke baad…” aur hass diya. Joke yeh tha ki bade toh already ho gaye hai, aur kitna bada hona baaki hai?

Usse milne ke baad jab ghar jaate jaate maine socha, akhir bade hue hi kab? Kab vo pal aaya zindagi mai jab hum sab bade ho gaye. Socha maine akhri baari “Bade hone ke baad…” kab kaha hoga.

Kuch khaas yaad nahi, par shayad college ke shuruvat ke saalon mai. Tabhi vo transition hota hai na, hum chahe jo vo kar sakte hai to humari placement hogi ya nahi. Shayad ussi wakt kaafi logo ke sapne chote ho jaate hai aur life ke boundaries thode jyada clear ho jate hai. Ussi ke sath responsibilities aa jati hai aur society ke set template pe zindagi aage badhti chali jaati hai.

Job, uske baad shadi, shayad bacche, agar naseeb hua toh ek acha ghar, gaadi. Bas yehi sab mai vo “bade hokar kya banana hai” wala savaal kahi dabb jata hai. Aur phir yuhi kabhi baaton baaton mai yaad aa jata hai vo saval, jo bachpan mai kitna aksar pucha jata tha.

Padhne ke liye shukriya!

Trying Cloudflare’s Automatic Platform Optimization

If you’ve looked at this blog’s theme repository, it wouldn’t surprise you when I say I’m obsessed with website performance optimization.

I admit that it almost feels like cheating boasting about performance figures of a website that has very few images, much less any other form of media. But that is what I have, so that is what I’ll try to optimize.

I came across Cloudflare’s Automatic Platform Optimization a couple of days ago while trying to move my website to a bigger EC2 instance on AWS. I was upgrading the EC2 instance mostly for the admin side of the website, which really struggled with image uploads, but this juicy piece of optimization was too good to not try and apply. At least temporarily.

What is Cloudflare’s Automatic Platform Optimization for WordPress?

I use Cloudflare for content delivery. Cloudflare, among the plethora of things they currently do (and do well), is a very good CDN. They have a more than adequate free plan for personal websites. For a website like mine, it means the CSS and JavaScript (and the occasional images) get served from a location closest to the visitor via Cloudflare’s edge network.

The initial request to the HTML file, however, is still served by my origin. There’s some caching in place so that not every request has to hit the database, but the content is still travelling to the visitor all the way from Frankfurt, Germany.

This is where Cloudflare’s APO comes in. It allows the entire WordPress website to be cached, including the HTML parts. What that means is that the initial request is served through Cloudflare’s edge cache and nothing touches my origin server.

Setup

Setup includes buying the appropriate plan on Cloudflare’s website. At the time of writing it is US$5 / month. The setup includes a WordPress plugin, which is fairly simple and minimal in customizability (not like there’s much to customize here). It does have an option to cache by device type and apparently it can purge caches upon site update, which is neat.

How does that look in practice?

Here’s an example of what it is that you get for the price. Below is the default duration for the initial document load of my blog’s homepage.

Turning on APO through the included WordPress plugin, we immediately see a huge 10x improvement. I believe at this point my own internet connection might also be a bottleneck. The cf-cache-status: HIT suggests that the HTML document was served through Cloudflare’s cache.

I am a bit unsure if this is possible to achieve using page rules within the free plan (it does look like it is to some extent), but APO also has the added advantages for WordPress.

In conclusion

I admit I don’t really need this optimization. My blog already scores full points on many website performance measurement tools (low-key proud writing this). I also admit that I find it extremely cool to do such things. In any case, hope the article was interesting. Thank you for reading.

Puzzle Time – Rate Of Growth Of Shadow

Note: The draft of this article had been staring back at me since April 2022. I’m only now getting around to publishing it. Consistent, timely and regular publishing is a natural skill of mine.

Have you ever walked at night on a street that’s lit with street lights? As you pass the lamp post, you start to see a small shadow in front of you. Slowly, as you walk further, the shadow grows, and it keeps growing until it fades to the point where you can’t see it, the next lamp post’s illumination overpowers it or both.

I had this question pop in my mind about the rate at which such a shadow grows, and if is a constant speed or somehow accelerating as the person goes further and further away from the pole. To find it for myself, I spent some time figuring it out today; a lazy rainy Sunday afternoon.

Assuming that

  • A person 1.8m tall
  • Walks at 2m/s
  • Past a lamppost 9m tall

We’re asking,

  1. How fast is the head of the shadow moving away from the lamppost and
  2. How fast is the head of the shadow moving away from the person

Let’s draw some figures to better visualize the question.

To solve this problem, the first piece of information that we note is that the top of the pole, the bottom of the pole and the head of the shadow form a right angled triangle.

The top of the person’s head, their feet and the head of the shadow also form a right angled triangle.

Since we drew a line from the lamp to the person’s head extending all the way to the head of the shadow, the angles thus formed at the lamp and the person (θ) are the same. We conclude here that the smaller triangle is similar to the larger triangle.

Using the property of similar triangles, we get an equation of x in terms of y.

or x = 4y

Since we already know the rate of change of x, which is just the walking speed of the person, we can take derivative on both sides to get the rate of change of y.

So the shadow is growing at 0.5m/s relative to the walking person. Or, if we want to get rate at which the head of the shadow is moving away from the lamppost, we express z in terms of y and then apply derivative on both sides.

2.5m/s away from the lamppost or 0.5m/s faster than the person walking, which it why it seems to grow in length away from us the further we go from the lamppost.

In closing

Hope you enjoyed reading this silly thought, and perhaps even learned something. Thank you for reading!