I’m not doing this for the sake of tradition or anything like that. Instead, I’d just like to make use of the pensiveness that comes for free at the end of the year to do some visualisation of what the new year is going to be like for me, my wife, and my dog.
All the success in the world means nothing if you don’t have good health to enjoy it.
Charlane (my wife) seems to be down with food poisoning tonight. It’s one of those unpredictable, common-ish illnesses that can swoop down on you without warning and render your body totally useless.
One moment we were going to enjoy a simple dinner together in between her makeup gigs, and the next moment she’s puking in the toilet 3 times in 20 minutes. Ugh. We’re biology after all.
Hello, friend. If you’re here for an actual guide on what to do when your bike runs out of fuel, skip ahead to the “What to do when your bike runs out of fuel” section below. I’ll be recounting my own experience today first in the proceeding section.
Today after knocking off from work, I hopped on my Honda Shadow 400 and rode away from the office. I was ready to go home to my wife and dog after a long day at work.
Three minutes into the 30 minutes journey though, I noticed my engine getting softer… and I immediately knew that it was running out of fuel. My eyebrows grew heavy.
As a programmer, you probably get a little carried away once in a while. You know, getting engrossed in the sophistication of another developer’s implementation, be it beautiful or ugly (or both) and having an engaging conversation with your colleague about it. Yeah, I can tell you know what I’m talking about!
But I recently realised that that can sometimes happen at the expense of good user-centric development.
Array data type to simulate a stack without obvious performance penalties.
Array already has the typical methods you’d need for a stack to work, like
pop(), you can just use an array to simulate a stack.
The goal of bubble sort is to sort an array in ascending or descending order according to a sortable property.
In our example below, we just use an array of integers to directly simulate the sortable property (a number), but in reality, you can imagine that that probably isn’t a frequent use case. What’s probably more common is sorting an array of objects by one of their properties, like IDs.