Inline classes are a new language feature in Kotlin and they are currently in alpha. Inline classes are simple wrapper classes that are optimized by the Kotlin runtime to avoid the performance hit of initializing a class. Let’s look at a few examples. This is a standard Kotlin class and is perfectly usable. However, classes are more expensive to initialize than fields. These classes have an especially high cost if you are wrapping a primitive, because primitives in Kotlin are heavily optimized by the runtime. This class wouldn’t get any of those optimizations. Alternatively we could just have the phone number be a property that lives in another class a la: Of course we now lose type safety and could[…]
I have been a huge fan of caster.io for years. I’ve recommended it to countless colleagues and whenever I want to learn anything about Android it is always my first resource. I’m am thrilled to announce that my first course, Refactoring Legacy Code is live on the site. The course is 30 minutes and has a total of 12 lessons. I have also published the source code for the course here. This course forks the Minimal-ToDo open source Android app. This is a real app on the play store but it hasn’t been updated or maintained in years. In the course I take old legacy code and convert it into a modern app. I use Room for storing data, an[…]
This is satire. On the 84th time I played the Thomas the Train Theme song for my sons I actually listened to the lyrics. My gut wrenched and beads of sweat formed on my thin, receding hairline. We all think of Thomas as a fun-loving character who serves his community in high stature. Nothing could be further from the truth. The proof has been right under our nose for years. We need not look further than the main verse of the theme song which I’ve broken down, line by line, below. 🎵 Thomas- he’s the cheeky one 🎵 Love the opener. Introducing the protagonist right off the bat. Letting the viewer know that this show is goofy. Our main character[…]
The original iPhone was released twelve years ago. When a new technology is released it takes time before we go from “this is the most amazing thing ever” to “maybe we should think about if this is good for us.” Henry Ford released the Model T in 1908 but drivers licenses weren’t adopted until much later. By 1930, only 24 states required a driver’s license to drive a car. Just 15 mandated a driving exam. I believe we’re at the beginning of this transition for phones and social media. Facebook’s early adopters, millennials, are running away from facebook. Over 11,000,000 users in the US alone have left. We will continue to see this trend continue across other domains in technology.[…]
I wake up with a jolt at 5:58 AM. My eyes are foggy, my throat is dry. I quickly throw throw on a plain white T and sweatpants. I head downstairs, close my eyes, slowly open the door. We make eye contact. I’m twitching my hand. Our eyes are locked, both waiting for each other to make their move. I stand strong, holding my ground. My opponent holds tight, not moving a muscle, not giving away his position. The tension is building. This goes on for several tense seconds, neither of us willing to break. You see, our family rule is that our (almost) two-year old does not get up for the day before 6 AM. If it was 5:50[…]
I go through major reading phases. Some months I will read for an hour+ every single day, other months I won’t pick up anything. 2019 for me was mostly an “on” reading phase. I read 41 books in total. 23 of those were novels. The remaining 18 were nonfiction ranging from software engineering, personal finance, business and memoires. Here are my favorite reads of 2019. Top 5 Novels 5. Alex Cross Series (James Patterson, 1993-Present) I’m grouping these all together since I’m currently engrossed in James Patterson’s Alex Cross series. It is a 29(!)-book-and-counting series and I’m currently on book 23. I read book 6-22 in 2019 so I’ll be mostly not counting those as “best novels.” All 29, I[…]
I have a lot to say about remote work and how it has changed my life. Rather than park all of my writings here, I decided to start a new blog: RemoteNook. A few posts on there will look familiar as I will be reposting from here, but most content will be new! Thanks for reading and supporting!
On July 1st I was promoted from Senior Android Engineer to Staff Android engineer. I thought it would be a good time to think back and reflect upon my career as a software engineer, but more specifically as an Android Engineer.
Stripe announced their new engineering hub on Thursday- remote! They have “hubs” in San Francisco, Seattle, Dublin and Singapore already, and remote will be their fifth. They said they were hoping to hire 100 remote employees this year. Stripe went out of their way to praise their remote workers, saying “Stripe has had hundreds of extremely high-impact remote employees since inception” and “…remote employees have outperformed all expectations”. It is exciting to see a silicon valley unicorn (for lack of a better word) pushing forth the remote work trend. Although remote work continues to be on the rise, large companies haven’t fully embraced it. No huge tech companies like Google, Apple, Amazon, Netflix have fully embraced remote work as Stripe[…]
Earlier this year I finished the book Tools of Titans by Tim Ferriss. I could say a lot about this book (and Tim) in general, but I’m going to focus on one of the sections that was valuable to me: The Canvas Strategy (AKA Canvassing). I don’t recall the name’s meaning but the strategy goes like this: Do stuff that nobody else wants to do to make yourself valuable. My favorite example that Tim gives is that of Patriots’ head coach Bill Belichick. Belichick volunteered to watch film for hours on end to prepare for upcoming games. He did this extraordinarily well and shared his learnings during team meetings. His expertise eventually made him useful in increasingly important decisions which[…]