Category Archives: Uncategorized

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!

Recover the cost of a BVG ticket via the USB charging port inside the bus

So I was merrily riding a bus yesterday on my way to Potsdamer Platz for a Dosa lunch when I noticed this:

Image of a usb port inside of the buses in Berlin

And a couple of thoughts hit me: What’s up with the piss stains? 🤷

And something I could actually answer: How long would I need to use this USB port to make up for the 3.20 that I paid for this ticket.

Now, a day later, I have a calm Sunday morning to ponder all of life’s most urgent questions so let’s get back to the thought from yesterday.

Power draw from a USB port

The best way to know exactly how much power I can draw from that port would have been to test it.

The next best thing is to try and guess based on some indicators. From the color of the port, it is safe to conclude it is a USB 2.0 port, and not a USB 3.0 port. From Wikipedia, we see that a USB 2.0 port intended for high power devices allows for a current draw of a minimum of 0.5 amps. The voltage is also standardized to 5 volts.

Amperes times Voltage gives us the power output of the port, which is 0.5 amps x 5 volts which is 2.5 watts (again, at a minimum).

Measuring power consumption

2.5 watts is the power that can be drawn from the port. To calculate how much energy can be consumed over a given time period, we need to simply multiple the watt number by the time number. Typically, it is measured in watt-hours.

My electricity company bills me for the kilowatt-hours I consume. If I use my TV that’s rated at 100 watts for 10 hours, it will be billed as 1000Wh, or 1kWh of energy consumption.

Price of electricity in my area

Electricity does not cost the same everywhere, and not even in the same area. Even the same provider might use different prices depending on the time of consumption and a whole list of other factors.

Looking at Vattenfall’s website (an electricity provider here in Berlin), I can see prices range between 25.07 cents / kWh and 33.37 cents / kWh. To make it easy for calculations, I’m going to go with 30 cents / kWh (all cents).

How much electricity can I buy for the cost of a BVG ticket?

For €3.20, the price of a single BVG ticket at the time of writing, I can consume (3.20 / 0.30) kWh, which is 10.667 kWh (or 10,667 Wh) of energy with my current electricity provide.

How long do I need to use the USB port to cover the cost of the ticket?

To find the time duration in which our 2.5W port will output 10,667Wh of energy, we simply need to divide the target consumption number by our consumption rate:

10,667 (Wh) / 2.5 (W) = 4,266.8 hours (the Watt unit nicely cancels out giving us the number of hours)

Which is roughly 177.8 days, or just under 6 months.

This time can roughly be cut by half if BVG changes the USB ports to 3.0 guaranteeing a minimum current draw of 900mA but I’m not holding my breath.

How much will a ticket effectively cost if I make full use of my ticket’s validity to charge a device?

Now of course being in a bus for 6 months is going to cost more money for season ticket and I might never recover my full ticket.

But what about the journey that I’ve already paid for? A BVG single ticket is valid for 2 hours. If I make 100% use of the time a ticket is valid for to charge my device, what’s the effective cost of my ticket?

At a minimum of 2.5W for 2 hours, I’ll consume at least 5Wh. At 30 cents / kWh, that’s 0.15 cents worth of electricity.

That’s 0.15 cents or €0.0015 that I can immediately recover from my ticket price, effectively making my single journey BVG ticket cost not €3.20, but a jaw dropping €3.1985 😎🫡

In conclusion

So there you have it. Go grab your 0.047% discount on BVG tickets! Subscribe for more financial tips. Thank you for reading!

Want to write more

Back in the day, I’d try to publish an article every month on my blog. It was difficult, but I’d still manage it for most part. I just looked at my last published article, which was in March, and the plethora or drafts sitting there, receiving little to no love.

Whenever I come across blogs with last published articles from years ago, I wondered what might’ve happened. Why (and how) do some people manage to keep publishing long form content after all these years, while others have given up on blogs. Some of them have done so in favour of more short form content that has taken over the web in the last decade or so. And of course, there’s a whole spectrum in between, where I see myself right now.

I came across this idea of perceived cost of doing things, depending on how much time it takes. For example, if I have an article that took my 2 months to finalise (and thus get satisfaction from), my brain might associate the cost of writing a long form article to be 2 months, thus discouraging me from picking up my computer to write again. If the actual satisfaction is derived from people finding my writing useful, then the gratification is delayed by several months or even years.

Creating a meme for Instagram, on the other hand, gets me gratification within minutes. Of course I know how these things work. But possession of a piece of knowledge isn’t very useful if it cannot be applied in a meaningful way.

Again, there’s nothing inherently wrong about creating short form content, and there’s nothing superior about people who create long form content. Personally, as long as I retain my ability to do either when I wish, I’d be pretty happy. I want to make memes and make my friends laugh, and keep publishing valuable content on the internet.

And that’s why I started writing in the morning today as I was on my way to meet some friends: To publish it immediately and remove some of the cost burden that has creeped into my head around publishing on my blog. Hopefully I can write more soon.

Thank you for reading!

Focusing on the beauty in the world with a camera

In late 2021, my friend Ed handed me his Canon 7D for me to try my hands at photography. I already had an itch to get into it but didn’t have the “gear”, or so I told myself. The camera came without a lens or SD card so I rode my bike to the Saturn store at Alexanderplatz and got myself a Nifty-Fifty; a Canon 50mm f1.8 lens. It is still to this day the most fun-to-shoot-with lens I own.

I’ve taken thousands of pictures since then. What’s changed between owning a smartphone (that features brilliant cameras) and owning a dedicated camera is that when I have a dedicated camera on me, I go looking for something interesting, something beautiful, something funny, something new. It is deliberate and intentional.

The world is full of patterns, symmetry, life, history, people, clues, colors, shades. There’s just so much that sparks curiosity. Would I find it interesting even if I wasn’t trying to take a picture? Probably. The camera on me reminds me frequently that I’m trying to focus on the beauty in the world that I can sometimes forget to notice.

Having a camera just gives me an excuse to step out, wander around, stare at walls, look at people and dogs and cats and insects and flowers.

The best camera is the one you have you on

I’ve read this quote at a bunch of places, and that’s why I got a paid pro camera app for my iPhone last year. A smartphone is perfect as a camera. It is always there, always charged and it is getting better at a rate faster than any dedicated camera system can imagine. It is getting to the point where smartphones are taking pictures that isn’t reality but what the phone thinks you wanted to shoot, but that’s a different topic.

But smartphones don’t just take photos. They have our social and work life on them, and they’re always connected. I struggle to stay intentional about anything with a smartphone around me, probably because it does so many things. And that constant state of being distracted by nothing in particular is quite exhausting.

What I wanted, for lack of a better excuse, was a camera that was just a camera. And that’s why I decided to get my self a relatively cheap point and shoot camera from Sony.

With the little Sony, it is as fun to take pictures with as my DSLR, but at the same time it is more subtle and it fits in my other pocket. It is like the best of both worlds! Of course, it isn’t without its drawbacks. It needs to be charged separately from the smartphone, the photos are worse than the DSLR and so on. But it is always with me and it forces me to be intentional with my hobby which makes it all worth it.

Photography as a memories generation tool

I remember watching this video where that idea of routine making time fly faster was exposed to me. I watched it many years ago and thought it was very true, although I had not had any real routine back then. Today, I kinda still think it holds true.

Photos are a good way to get back some memories, especially when they’re taken intentionally. I read somewhere that good photographers are intentional with their shots. They try to remember what made them take a picture. There’s a story associated with a picture in their heads that they can tell you. It isn’t about the camera or the lens or any of the technicality. Just the moment captured on film.

I’m trying to copy this–to think why I’m taking a picture before clicking the shutter button so that when I’m looking at the pictures later, I can really remember the scene very vividly; the scene in the frame, sure, but just as importantly, the scene outside of the frame–the sun’s warmth or the cold wind and rain on my skin, the sounds and my thoughts, and also did I decide to take picture of this very thing of all the other things. Like a wormhole back to that moment in time. That somehow helps make memories easier to go back to and make the time spent doing event the mundane-est of things count.

In closing

That was a bit all over the place, so apologies if you kept searching for a topic in this article and failed to find it. I just wanted to get it out. On a different note, I want to document my photographs better, but I’ve not found a good way to do so. Instagram isn’t ideal, and while Flickr might work, I find myself questioning how long will it be around. In the end, I think hosting an image gallery plugin on WordPress with my showcase-worthy photos might be a good idea. We shall see.

Thank you for reading!

10,000 Days Old Today!

I don’t know why I started keeping track of my age in number of days, but I’m willing to bet it was in anticipation of this very day. I’ve not tracked it for long though. Just a couple of months really.

If you’re curious when you’ll turn or you turned 10k days old, it comes around when we’re 27 years, 4 months and 16 days old. 20k days is, naturally, when we’re 54 years and 8 months which feels much more further away than it should. What does that tell us about time?

The day itself is pretty ordinary. I’ll get myself a little cake to celebrate, but I’d have probably done that in any case. It is raining the whole day today. Not sure what’s up with that. I wanted to go to Conrad to get a USB-A to USB-B cable, and just window shop, but doesn’t look like I’ll be doing that given the weather situation.

I don’t have much to write about here. Just wanted to make this milestone post. Having said that, I’ll link to some of my poorly written past articles talking about time below.

My birthdays

Turning 20 – Birthday Week

Turning 24 – Twenty-four

Turning 27 – Twenty-seven 🎂

My blog’s birthdays

1st anniversary of blog

4th anniversary of blog

6th anniversary of blog

Year reviews

2015 year review

2018 year review

2019 year review

University

4/8 Engineer

6/8 Engineer

7/8 Engineer

8/8 Engineer

Misc

Time and measuring time precisely with C++

When will we become engineers?

Be easy on yourself

The best time of your life is right now

In closing

Thank you for reading!

Let’s talk about Radio Clocks

After arriving in Berlin in January of 2019, I treated myself to a Casio F-91W. It was my first (non-essential) purchase in Germany, and for less than 10 Euros, it was a steal. Plus, a colleague of mine wore it and it looked cool. Easy decision!

Little did I know that this watch had a cult following on the internet. People collected all versions and variants of it and wore it with pride. I got pulled into the hype surrounding the F-91W and eventually more of the Casio retro digital watches.

It was an easy “hobby” to pursue given it is basically just buying more stuff. Nevertheless, it isn’t all that bad given how cheap these retro watches are. It is all relative of course, but given I’m also into photography, acquiring Casio watches is easier on my wallet.

Today, I own a couple more and I’m low-key proud of my collection.

Learning about Radio Clocks

Like with anything I get obsessed with, I spent a lot of time reading and watching YouTube videos about Casios. At some point I stumbled upon the Casio Wave-Ceptor series of watches. It struck me as something different: This fairly low tech wrist watch could set and correct its time automatically!

“But wait, it isn’t a smart watch” I thought. How does it do that?

That sent me down the rabbit hole which I’m still on my way down right now. Turns out, the watch can receive signals transmitted by a time signal transmitter and correct its local time.

In Germany, there’s Mainflingen longwave transmitter transmitting DCF77 time signal. The carrier signal has a 77.5 kHz frequency and the time signal is generated from the local atomic clock which syncs with the main atomic clock in Braunschweig. It is operated by the Physikalisch-Technische Bundesanstalt which also hosts four public NTP servers:


ptbtime1.ptb.de

ptbtime2.ptb.de

ptbtime3.ptb.de

ptbtime4.ptb.de

Querying the time using the commandline utility sntp and watching the network activity in Wireshark gives us some interesting data.

Wireshark

What’s next?

I’ve ordered a cheap radio receiver to play around with the radio time signal. On the watch side, I’ll look for cheap used radio Casio watches on the local Ebay here and try to acquire. I hope this new obsession ends up teaching me a thing or three about analog signals.

That is it for this side-quest post. Thank you for reading!