October 31

I built a dashboard to calculate when you can retire

Using the awesome Tableau application once again, I was able to create an interactive visualization depicting the point in time an individual can expect to effectively converge or replace their active income with their passive investment income (generated from compounded earnings and investments).

One of the things I’m particularly proud of, is that this dashboard uses no data sources whatsoever. Everything is self contained in the workbook, which is simply an increasing sequence of “years” from 2020 upwards, and several calculated fields.

My goal was to keep this the best of all worlds between: simple, interactive and informative.

Users of this dashboards likely have varying levels of income and varying spending habits, so at the very least this dashboard should require 2 inputs: Gross Income and Annual Savings, to better personalize results.

The output in terms of the visualization should be, in its simplest form, 2 lines that intersect: Gross Annual Income and Change in Net Worth(synonymous to earnings from passive income/growth). What makes this challenging is that in a perfect world, neither the gross annual income – nor the passive income that is compounding will be stagnant throughout time. Both tend to trend upwards due to income raises and accumulated investments, respectively, over time. In short, the following is how the two output lines were generated.

Annual Adjusted Income

This is the income generated from work. It will take the input, Annual Gross Income, and apply a raise of 2.25% compounded annually. There is also a somewhat arbitrary inverse of “Year Multiplier” I factored in, intended to reduce or taper-off that 2.25% raise over time as income from wages tends to slope downward late in careers (i.e. finding a new job as you approach retirement years).

Net worth Gains

Before we get to Net worth Gains, we have to define what our Net Worth is. This will be a running sum of our Annual Savings (the input provided by the user), multiplied by the Rate of Return of investments (defaulted to 7%).

For our Networth Gains calculation, this will be our principal starting balance of Net Worth of the current year, multiplied by the Rate of Return of investments. In our case, we defaulted the Rate of Return to 7%.

With that being said, our “NW Gains” and “Annual Adjusted Income” as dual-axis measures, in aggregation, across number of years, as dimensions, enable us to achieve a converging visualization depicting the year in which our investment returns will begin to exceed our earned income.

Hope you enjoyed this small write-up as much as I did building it!

Leave a comment below – when can you retire?

September 30

Time-Traveling with VR

Virtual Reality and Augmented Reality have been gaining traction and adoption at exponential rates. In my opinion, they will be major disrupters for many, if not all, industries, particularly gaming, fitness and on-hands skill training for example.

But one area that particularly interests me is video recording. I enjoy recording family events, precious moments and even my driving trips (for liability protection, with the use of a dash cam). When dash cameras first started becoming popular in USA about a decade ago, I felt they did the job but didn’t necessarily capture the entire picture. At best, cameras claim to be wide-angle, and unfortunately that’s their hard limitation.

Since then, we’ve seen 360 cameras being introduced. Most of them work by means of utilizing dual cameras, 180 degrees each, that can then stitch the videos for 360 degree interactive viewing.

It would be exciting to take that another step further. Imagine, you are at a family event, or on an adventure. Your friends or family or subjects of interest are not necessarily in the primary focus area of the camera. Perhaps they are behind you, to the left. Or at the very edge of the 180degree seams of your 360 degree surrounding. When you go to recollect that moment, it’ll be far from the actual, original view. There are obvious reasons for this. By Using just 2 cameras, even with the modern sophisticated software to stitch frames together, you’ll find that the image is skewed, distorted or even relatively lower resolution in certain areas. What you REALLY want, is to be able to relive that very moment that you have on video without the obvious missing gaps and distortions.

Luckily, this is possible, with the integration of 2 technologies. A VR Kit and a better 360 Camera. The solution would be to increase the number of cameras from 2, to maybe 4 in the 360 degree camera unit. Now, each camera has a 90 degree reach. Although this may require more processing power to seam the frames together, the image would come out cleaner with less distortions, and less of a need for complex computations to account for and render the angles to fit a square frame. So, now you have a 360 degree camera, perfectly capable of capturing in full resolution, all angles in your immediate 360 degree radius.

Couple this with a VR headset and sensors, and what you get is the ability to view your recording as if you’re back in time of that recording. As you turn your head to your right, or left, or turn around completely, you gain the ability to literally re-live what that moment was like.

This ability, to view all the expressions and interactions of people around you, from first person view, on-demand, will certainly be a game-changer for both the future of VR and 360 cameras.

August 31

The End of Humans.

***I apologize in advance if the language used in this article is hurtful to those using or affiliated with those using any sort of implants or prosthetics, or those with any sort of disability. My intention is solely to pose a thought-provoking question. These are just my thoughts, after all. Reader discretion is advised***

We’ve heard many times – one way or another – that human life is at risk. We’ve seen it in movies and we’ve seen some of the greatest minds in the world express how Artificial Intelligence needs to be handled with care, or it WILL pose a risk to mankind.

but that’s not what this write-up is in reference to.

This is about a question I couldn’t help ponder. Just a couple days ago (08/28/20), Elon Musk debuted a demonstration of the Neuralink brain implant. Long-story-short, he demonstrated his experiment on a pig, but the underlying idea is that a coin sized chip implanted into a brain can govern your state of mental wellness. That’s HUGE! But that’s when it got me thinking. This isn’t the first case of using software or robotics, albeit an insanely advanced one, to improve human life. There are numerous other examples. We have witnessed the use of prosthetics and orthotics to replace and reinstate the function(s) of human organs and limbs. This has not only resulted in improved mobility and quality of life for humans, but has also significantly improved human longevity.

But wait, That’s cheating..

This is when my mind started to wander. The advancement of technology from prosthetics to brain implanted chips could one day mean humans would be invulnerable to most types of disabilities and medical or mental health issues which are awfully common today. But this is inhumane. Humans, by nature, as mammals, as animals are meant to be part of a natural life cycle. We are born, we grow, we live, we diminish and we die. As part of our gift of being humans, we can innovate and build technology to improve these stages of life.

But, once we instead cross the line and start using technology to alter or prolong our stages of life artificially, we aren’t humans anymore. We’re Cyborgs.

The underlying question.

This begs the question: If chip implantation (and I’m not just talking about as-needed brain implants, I am talking about mandated chip implants at birth) and prosthetics become widely adopted, which I have a strong feeling they will, and nearly the entire world population at that point has one form or another of technology implanted in them, does that era mark the end of man-kind, and in turn propel us into a Cyborg society?

July 31

The 2020 Micro-wave

The year 2020 has been a unique one thus far, to say the least.

The COVID-19 pandemic has wreaked havoc among the planet’s population. It has proved to be an eye-opener and shown that mankind is and always will be at the mercy of nature, despite all the technology we have today to combat it when we need to.

Coronavirus is absolutely terrible and evidently life-threatening to those vulnerable. However, it has also done some good. It has accelerated the inevitable push for flexible work environments. That is, the ability of employees to work from wherever (home). Of course, this isn’t applicable everywhere in the world – predominantly in established countries with the technical infrastructure and culture to support it. More and more employers are now allowing temporary or permanent work from home ability, and this will only grow with time. I can go over the benefits in another post, but working from home is a no-brainer for many employees. You save commute time, you can complete errands during breaks, you can often wear almost anything without being judged, and you have a sense of not being watched. It’s almost like you’re your own boss, as long as you work your hours and meet and exceed expectations!

There isn’t necessarily a need to feel like you’re not being watched, but part of the joy of being an autonomous employee (should your role allow it), is not having someone breathing down your neck and watching your every move.

The unfortunate news for us ethical, responsible employees who don’t take things for granted (this is why we can’t have nice things…) is that many workers are abusing these privileges. Currently, even at my current employer, I’m hearing nothing but positive feedback all around. The employees are happy for the most part, and our leadership is becoming more open to allowing this flexibility down the road since everyone is doing such a good job and also cutting some corporate costs (i.e. travel).

However, I have a very strong feeling that performance of remote workers will plateau and curve down to low productivity levels as time goes by. I sense this has already happened, and this is also why many organizations will begin to really crack down and install software on the employees’ machines that track productivity. To what extent the following is legal, I do not know. But do not be surprised if any or all of your microphone, camera, screen, keystrokes, mouse movement, VPN use, idle time and internet usage are tracked and monitored.

You thought being confronted about walking into the office by fifteen minutes late used to be bad? Try getting confronted about what you were doing between 3:05 and 3:25 PM on a Monday since no keyboard activity was recorded during that window. Yeah, THAT is bad. And it is inevitable.

“Remember to block your breaks and lunches and tasks on your calendar and share them with me. Oh and I see you’ve been idle for 15 minutes, do you need help with something?”

-Your Supervisor

What was once a dream-job type of work environment for many may quickly become a modern age sweat-shop through technology. It’s even easier to micro-manage employee activity through technology than it was in the old-fashion office. Maybe it isn’t significant enough to notice yet, but it will quickly become a reality.

Welcome to this new wave of micro-management.

The 2020 Micro-wave.

June 30

Automate PC Hibernation

As summer is getting summer-ish, it’s important to ensure that you’re not engaging in activity that is inadvertently emitting more heat inside your home – thus over-utilizing your anti-heat remedies such as the air conditioner and electric power. One prime example I can speak for personally is my home office. I have several Windows based PC’s/Servers and several monitors that I find had been running overnight in idle. Although many people opt to simply put their PC’s on sleep mode, I found that mine would often still wake up (largely due to intermittent current surges), so sleep mode was not effective. Apart from the unwarranted heat, an idle running PC or Server means the hardware will fail quicker due to wear and tear.

Alternatively, I found that putting PC on hibernation was better for this application. The difference between sleep and hibernation is that sleep mode still uses power, as it maintains all your open applications in RAM, whereas hibernation mode does not use power since it actually saves your applications physically to the hard drive. This is also why putting your pc into and out of hibernation can take substantially more time than that of sleep mode.

I did a bit of research to find how we can force hibernation because wouldn’t it be awesome to just have your PC hibernate automatically based on a schedule of your choice? I am all for automation and bots to outsource my responsibilities whenever possible!

We can use the following command (in command prompt) to signal the PC to hibernate:

rundll32.exe powrprof.dll,SetSuspendState 0,1,0

We can actually go ahead integrate this into a batch file. Open any text editor and paste the command in, making sure to save as a .bat or equivalent extension.

Now, we can simply use the windows task scheduler to run this file (which would execute the hibernate command) on a scheduled basis. In my use-case I found 12:30A.M. to be the ideal time.

And there you have it, an automated hibernation solution.

Now, if you don’t mind, I have to go catch some sleep.

May 31

The Converging target ads

It’s absolutely crazy how advertising has evolved just over the last 20 or so years alone. I remember growing up watching Batman Beyond and DragonBall Z among many other favorite cartoon/anime shows. I’d have to always sit through about 5 minutes of quite irrelevant commercials during the breaks, anxious for the show to continue its next bit.

Fast forward to 2020 and a lot has changed. Not only have we shifted from television to cord-cutting alternatives – such as YouTube – for entertainment, but an interesting phenomenon has emerged, despite these services also serving commercials.

I actually enjoy the commercials

Sometimes. Okay, maybe slightly more than sometimes. But what does this mean? Well, obviously, it means targeted ads work. Based on our behavior on the web, cookies store data points which are then sold to marketing agencies to properly gauge and classify our interests, and then serve us generated ads based on our interest, thereby increasing the likelihood of us getting more engaged to those ads and eventually becoming more likely to make a purchase.

That’s pretty cool, but also pretty dangerous (we’ll get into this in a later thought). What I find interesting, though, is that ads are increasingly becoming more relevant. While this is expected behavior of any new technology, this particular technology is close to becoming mind blowing. What I mean when I say this, is, if in the year 2010, I found 20% of YouTube ads interesting (all hypothetical examples and numbers here), and decided not to skip them, then today, in 2020, I’m finding about 40% of them interesting enough not to skip them. Does this mean it will take an additional 30 years to reach 100% accuracy in targeting if the technology improves 2% per year?

Probably Not

I find the accuracy of ads on YouTube, Instagram, Sponsored Amazon Listings etc., to be improving at an exponential rate. I already find myself, sometimes, becoming shocked at how well these advertisements know exactly what I want to buy – or what I will want to buy, thanks to integration of multiple new technologies such as Internet of Things, which can generate an ad later at night based on a vocal conversation I have with a human sitting in my car about things that interest me earlier that morning.

Conclusion

Not-so-slowly but surely, the lines between our interests, and our acceptance/engagement to targeted ads served to us will converge.

I expect (again, hypothetical but still on a serious note) that within 5 years – by the year 2025 – targeted ads will reach a new norm. A 100% successful “wow, holy smokes I don’t want to skip this ad, and actually will buy this good/service” targeted ad norm.

And just what will not only help drive, but exponentially accelerate IOT and Data Science integration to bring marketing success rates to 100% precision at an unimaginable pace?

Artificial Intelligence.

April 30

I wrote a Bot to track RuneScape’s new skill

Yes, you heard right.

I don’t always write bots. But when I do, it’s for a good reason!

Some background: Runescape is one of the most popular online multiplayer role playing games. It has a plethora of skills, adventures and activities one can pursue. Recently, a new skill was released – archeology. While we can always tell who the FIRST person was to get maximum experience in the skill, I thought it would be pretty cool to see the journey in doing so when compared to their top competitors in the final days.

The stack used in this ad-hoc project was a combination of PHP, MySQL and Tableau.

I’ve written several bots before for the hiscores on this game, so what I did was salvage a lot of the code in PHP and store it in a separate MySQL table. The script was set to run on a cron job hourly indefinitely until stopped. It would store up to the top 100 players of the skill on each run.

I let several days (or weeks) pass before I decided to actually look at the data and do something with it, and now was the time! Here’s what the table looks like:

Each record represents a player, and the rank, xp and record insertion timestamp at the time the data is captured. Unfortunately, no primary keys or players ID were configured as this was meant to be an ad-hoc analysis and I was lazy.

The next step was to decipher the data and prep it for analysis. What I really would like to know ultimately was who first got to 200M XP, and what their days leading up to it looked like. Were they consistently first place? Or was it a neck and neck battle for days?

We’re well past the day when the first player got to 200M XP. First, I had to figure out what date to look back from:

Turns out that day was 4/14/2020. Now, we want to identify the top 50 players when the first person reached 200M XP, so we can filter out all the other players that may have been top 50 at one point or another, but not on this 4/14/2020 run. I later re-learned the hard way that I couldn’t use limits in a sub query, so I created a temp table which we’ll use later on.

Now, the other piece to the puzzle we need is pulling just one record per user per day. To do this, we’ll identify the latest capture of each day so that we can filter based on just those exact times. In doing so, we won’t get any duplicate records for any users on any day – just the highest, latest data that was recorded for them for that day.

And now, we can finally write our beautiful query that will give us what we need. We want a data-set of all of those final top 50 players, and what their latest daily positions were.

We get 514 records (we have fallouts because those final 50 players may not have been in the top 100 the entire time). Then, we store these results in an excel file and add a connector in Tableau for ingestion and build some quick views.

Yikes! That’s messy…perhaps we should limit it to the top 5 players instead (I went through all that SQL trouble for nothing!)

That’s much better. And we see something interesting…

Le Me got first place, congratulations! It appears that he and several others have consistently been the top 1-3. What we do notice is Omid came out of nowhere for a very close finish. They were around rank 40 in early April, and made a huge comeback, securing the 3rd spot as of April 14th.

This bot may have been a waste of time, but it only took about an hour to set up and the trend I witnessed was fulfilling and made it all worth it! Who knows, maybe I’ll do more with this data later!

March 21

Analytics: COVID-19 Impact on Gaming

It is inevitable that the crisis arising from the spread of COVID-19 will result in more individuals staying at home during recreational time. Does this mean the Gaming and Streaming Services industries will witness a spike for the duration of the crisis?

It seems logical but it may be too early to tell without having the data.

Fortunately, for several years, I’ve been collecting hourly data on player volumes of a game I used to play in my childhood – RuneScape, through an automated script. I’ll be sharing the process on that at a later time if there is interest, however we’re not going into the weeds of it just yet.

I consumed the data in Tableau to analyze any recent spikes in average weekly volumes, and observed that for 2020, there is an abnormally high spike in the game’s player volumes occurring in the weeks leading into April, compared to previous years.

Click here to view the visualization on Tableau Public.

Thus far, this may support the hypothesis that the crisis is in fact causing a surge in Gaming.

February 29

The SWE Mindset

The SDLC mindset is one that is often instilled in a software engineer’s brain, even when it comes to his/her approach to solving real world problems. For those who don’t know, SDLC stands for the Software Development Life Cycle. It is essentially a series of phases throughout the entire lifecycle of a software project from request inception through delivery. There are sometimes variations of the incremental steps in the cycle, but generally, they are as follows:

Requirements

When approaching a real world problem, you can expect someone with a SWE background to first understand the nature of the problem in its context and in its entirety. We don’t jump directly into solving the problem, we first process all the contextual information available to understand the big picture. We must understand not only the micro-level components but also the maco-level interactivity and impact.

Design

Once we have a clearly defined problem to solve, we begin to design the solution. We determine all the different paths we can take, and narrow them down by assessing the resources available, feasibility, efficiency and long term sustainability of each solution. Often there are many ways to solve a problem. But one of the primary responsibilities of a good SWE is to employ the BEST solution by weight factoring the above mentioned attributes of each.

Development

Once we’ve nailed down the golden path we want to pursue, we then develop the solution to the problem.

Testing

Before adding the missing piece (solution) to the puzzle (problem), we must first ensure that it remains the best solution by means of testing against the attributes to ensure we get the desired results that were initially intended. The solution often can be optimized prior to implementation based on findings of the test phase.

Implementation

Once we pass the testing phase, we implement our solution to solve the problem.

Now that the problem is solved, we’ve done our job. But wait! Our job isn’t just to solve the problem and forget about it.

Enhancements / Maintenance

As a great SWE, we also have a responsibility to ensure that with requirements changing, our solution must be agile and be maintained and enhanced throughout the course of time! We make incremental improvements and optimize the solution based on the ever-changing environment.

And this is the thought process a SWE might engage in when faced with even the simplest real world problems. Hopefully this gives you some insight into what powers the light-bulb in our brains.

January 31

Why I Bought the Pixel 3A

My current phone is a Google Pixel 1st Gen, the second one I’ve owned since the debut. Why? Because I like a quality experience at a quality price.

My Pixel, having been out for several years now, is quite outdated in terms of hardware; which also translates to an accordingly lagging experience with the OS and software. Moreover, since it’s a 32GB storage phone, I’ve been consistently getting “Running out of space” alerts, despite proactively backing up everything to Google Drive.

I was casually strolling and scrolling around on SlickDeals, one of my daily rituals to snag good deals, and came across the perfect phone for the perfect price. Specifically, this was the Pixel 3a. My reasoning for getting this device was two-fold:

The Bargain

The deal was, for $349, a brand new Quite Black Pixel 3a 64GB handset could be had, along with a $100 Amazon Gift Card. So in actuality, this brand new phone would cost just $249, all while it’s currently retailing for $399 MSRP. A flashy Pixel 4 device would be $699, in contrast. This offer was an absolute steal, so I had to jump on it.

The Quality

Touching back on the why. The Pixel 3a is a relatively new phone, less than a year old. This is subjective, as most users would consider anything over 6 months past launch date, “old”. I don’t care about any of that stuff. The Pixel has an amazing camera, and beautiful color interpretation. It’s great for social media. I’m a fancy car fanatic, but when it comes to a daily-driver cellphone, all I want is a reliable, fast, durable cell-phone. I’m happy with my Pixel 1 but I wanted something more powerful and up to date but not necessarily latest-and-greatest flashy.

I’m going to be unbiased here and say I’ve definitely owned Apple iPhones in the past. Their quality and reliability (for the first 2 years) is second to none. Unfortunately, iPhones never allowed the ability to customize apps, colors, fonts etc or incorporate widgets to the extent that Android devices did. Additionally, having that “developer” mind-set, building apps out of the blue for iOS was unlikely, as their barrier to entry is much higher given the high cost required to publish apps. I’ve also tried Samsung Galaxy phones in the past, which obviously run on android, and they weren’t nearly as fast, consistent and reliable as the iPhones. This is why many people including myself had a negative connotation towards ALL android-based devices. However, the Google Pixel changed that. It had the quality of an iOS device, with the open capabilities of an Android device.

The Undelete

The downside of technology is sometimes manufactures will go out of their way to do something absolutely unnecessary for the sake of technology. Electronic Parking Brakes, WTF? We’re unfortunately seeing a similar trend with smartphones, or maybe I’m just becoming old-school. I work in tech, so I have no choice but to embrace change and it’s just part of my career now to adapt to changes. But once you replace a fingerprint sensor with a facial recognition unlock feature, and delete the aux port, you’re really testing my loyalty. Yes, I’m talking to you, Mr. Pixel 4. A fingerprint unlock and an aux port are must-haves for me. Like I said, I like the Pixel 1, and I wanted something better, but don’t take away the staples because everyone else is doing it. So what should one do, if they want the latest Pixel, but with the “un-delete”, because they don’t want to be in the gym with an aux dongle or wireless earphones? They purchase the Pixel 3a of course!

Overall Synopsis:

$250 Phone? Check

64GB Storage? Check

Aux Port? Check

Fingerprint Access? Check

Badass? YOU BET!