







Pdawg Entertainment
This is a great read. Reading regularly is one of the key ways to make sure that one continues to grow in whatever endeavor being pursued. In a matter of sitting down for a few hours, there is usually a wealth of insights that can be obtained by reading. I definitely recommend this one to engineering managers and those that may be curious about the role.
I am officially a Southern California resident.
I started this blog with a post having the picture of me moving out of the first apartment I moved to in Seattle. My time in that apartment formed the foundation of what was to come next in my life. From that micro-apartment, I moved into what would be my first purchased property in the US & used that as motivation & fuel in pushing myself further.
Now the time has come again for me to pack bags, and set my compass to a new location — only this time my bags will be little heavier from when I first moved to the states with barely a luggage full.
I am moving to Southern California. Stay tuned as I share more updates.
Even though this book was published in 2018, recommend buying & reading this book. I both listened to the audio book of ‘Prediction Machines’ from Audible and also read the physical copy purchased from Amazon. I still refer to my notes from the book from time to time. Overall it is a great book to ground your thinking in machine learning and how it may impact your strategy and/or company. Sharing the notes below that I’ve kept in my Evernote. Let me know your thoughts or any other books you recommend on this topic.
Chapters
Introduction: Machine Intelligence
Cheap Changes Everything
Prediction Machine Magic
Why Itâs Called Intelligence
Data is the New Oil
The New Division of Labor
Unpacking Decisions
The Value of Judgement
Predicting Judgement
Taming Complexity
Fully Automated Decision Making
Deconstructing Work Flows
Decomposing Decisions
Job Redesign
AI in the C-Suite
When AI Transforms Your Business
Your Learning Strategy
Managing AI Risk
Beyond Business
Pure inspiration.
Saw this problem in LeetCode.
Problem statement:
Given the root
of a Binary Search Tree and a target number k
, return true
if there exist two elements in the BST such that their sum is equal to the given target.
Python based solution:
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def find(self, root: TreeNode, k: int, alreadyUsed: TreeNode) -> bool:
if root.val == k and root is not alreadyUsed:
return True
if k < root.val and root.left is not None:
return self.find(root.left, k, alreadyUsed)
if k >= root.val and root.right is not None:
return self.find(root.right, k, alreadyUsed)
return False
def findInPart(self, part: TreeNode, root : TreeNode, k: int) -> bool:
toFind = k - part.val;
if self.find(root, toFind, part):
return True
if part.left is not None and self.findInPart(part.left, root, k):
return True
if part.right is not None and self.findInPart(part.right, root, k):
return True
return False
def findTarget(self, root: TreeNode, k: int) -> bool:
toFind = k - root.val;
if self.find(root, toFind, root):
return True
if root.left is not None and self.findInPart(root.left, root, k):
return True
if root.right is not None and self.findInPart(root.right, root, k):
return True
return False
This is a very simple solution.
The solution given here has time complexity of O(n Log n) for average case assuming the binary search tree is somewhat balanced. Space complexity is O(1) as I don’t allocate any new data structure.
By keeping track of the the elements you have already seen in a Set as you are doing the traversal you can improve the time complexity here to O(n) with space complexity of O(n).
Paper: I. J. Mojica Ruiz, M. Nagappan, B. Adams, T. Berger, S. Dienst and A. E. Hassan, “Analyzing Ad Library Updates in Android Apps,” in IEEE Software, vol. 33, no. 2, pp. 74-80, Mar.-Apr. 2016, doi: 10.1109/MS.2014.81.
This article explores the cost of app updates caused due to ad library updates in Android apps. Typically, app releases have non-zero cost from development and QA perspective. The cost may also vary based on the complexity of the app. If an update is being released, oftentimes it needs to go through a full QA pass. Even when an update is released to an app store such as Google Play, it is not guaranteed for customers to update. Customers may choose to skip an update if they feel that it could disrupt their existing experience. The authors posit that ad library updates may be impactful to the developerâs bottom line, and hence it is important for them to get out to customers.
The authors mention that about 51-60% of free Android apps have some sort of ad integration (with free apps accounting for ~91% of the overall apps available in app stores). The cost of performing ad updates, are categorized into the following by the authors: software maintenance (making changes for new ad library versions), app delivery delays (due to adoption rates can cause revenue impact), lack of ads (due to old ad libraries), and poor user experience (due to bugs in the ad libraries that have not been updated).
The data the authors have gathered has been done via crawling Google play and doing static analysis on downloaded APKs. They concentrated on apps that have at least 10 raters (effectively 5,937 apps / 13,983 app versions). They found that 65% of app updates included updated ad library, 44% included added ad library and about 28% included removed ad library. Even a stable app such as a calculator app may need to be updated due to its ad integration. They have categorized the top ad providers and have provided stats in regard to the number of updates they have required in 2011. Â
In regard to recommendations provided, the authors suggest developers to choose an ad provider that is stable in regard to frequency of library updates. Additionally, if the app relies on a webview, that can be updated more easily through a server-side deployment. Ads can be served through a webview owned by the developer. Though some of the ad targeting may be not as good as native ads when served through a webview as the ad may not have access to all the same data as if it was running natively. In Android, it is also possible to patch some code during runtime (for example Java code can be patched via classloader). This mechanism is fairly complex and thus the additional complexity would only be justified in exceptional cases. I chose to read this article due to my interest in Android. The uber takeaway for me from this article is to always question your dependencies when building and to have some data in regard to frequency of updates required by your dependencies and how that matches with your intended release cadence.
Paper: S. Afonso and F. Almeida, “Rancid: Reliable Benchmarking on Android Platforms,” in IEEE Access, vol. 8, pp. 143342-143358, 2020, doi: 10.1109/ACCESS.2020.3014533.
https://ieeexplore.ieee.org/document/9159586
This is a recent paper (published August 2020) talking about the problem of benchmarking code on Android platform. Benchmarking allows us to gather data in regard to how our software is performing as well as potential opportunities for additional optimization. The author mentions how benchmarking on Android poses unique challenges. Android is built on top of Linux OS. Application code is typically written in Java (and now more recently potentially in Kotlin). Android also does allow Native code (C/C++) to be written and then it can be referenced in Java through the JNI. There are few challenges that come into play when benchmarking on Android: there could be other processes & apps running in the background that could skew results, processor frequency which can be updated (for example due to power constraints), temperature (temperature throttling), and processor affinity. In the case of processor frequency, there are two separate governors for CPU and GPU. Temperature can impact processor and memory frequency, since the frequency may be reduced by the governors to cool the device. This means that even the ambient temperature which the device is in can impact test results. The author observed sometimes cores being shut down due to this thermal throttling. One thing that I learned from this paper about Android is the concept of processor affinity and how it impacts performance. The author mentioned that modern architecture is built around Armâs big/little multicore CPU. This architecture consists of having two processors with one that is more performant than the author (hence the name big/little). This means that the performance of the code will be impacted by which processor it runs on.
The author introduces a framework they have developed called âRancidâ, which can be used to mitigate some of the issues outlined earlier when benchmarking Android code. For me, the greatest take away from this paper was the additional understanding it gave me when it comes to Android code optimization and how things such as background processes, processor frequency, processor affinity and temperature impact it. I chose to read this paper because Android continues to grow in influence as a mobile operating system. The mobile space itself does not show any signs of slowing down. Learning Android deeply is a valuable asset to have.
I tried searching for âRancid Android frameworkâ to find the website where it can be downloaded, however the only results that came up were references to the paper. So it seems as though the authors have not yet released this framework for public consumption. It would be interesting to play around with this framework to get a better sense of how it works and perhaps eventually it can be incorporated into developerâs standard toolchain when developing on Android.
For me, this was a very interesting talk by Jack Tang (former UW EE alum) who was Director of Verizonâs Innovation Center at the time of recording. I am interested in entrepreneurship and tech innovation in general so I found this talk enjoyable to watch. For one, it made me further appreciate Verizon as a company. Prior to this, I did not know that Verizon is a relatively young company (founded in 2000), with headquarters in New York, has over 175k employees, yearly revenue on the order of $120B and growing 5-8% annually.
Verizon Innovation Center is a program that entrepreneurs, and companies can take advantage of where they can consult with experts from Verizon and utilize some of Verizonâs own testing labs & services to help facilitate in bringing their products to market. Verizon can also play the role of matchmaker where they can connect companies for their mutual benefit. The interesting thing here is that Verizon has committed to not taking any intellectual property or ownership claim from these companies in the context of their collaboration. Verizonâs long term hope is that the companies eventually do use Verizon services and products for their companies but Verizon does not require this. There are two Verizon Innovation Centers currently: one in San Francisco, California and the other in Boston, Massachusetts.
Jack Tang recognized the following growth trends in his talk: Connecting Computers (originally led by AOL through providing internet to folks in 1995), Connecting Information (led by Google and Wikipedia in 2000), Connecting Expressions (led by Youtube in 2005), Connecting People and Activities (led by social networks such as LinkedIn, Facebook and Yelp) and the next subsequent trend to be Connecting Everything Intelligently (such as cars, devices, trees, trash cans, houses, etc.). The last trend is where Jack Tang believes Verizon is well positioned to continue to innovate and help companies and entrepreneurs accelerate. Verizon has helped build solutions in a wide array of domains such as Smart Grid, Broadcast Audio, Education, Healthcare, Network Access and Entertainment. I do agree with this trend that Jack illustrates and I believe that this democratization of being able to build internet access in devices is a very powerful driver for innovation in the IOT space.
Another observation I made is that looking at the website for Verizonâs Innovation Center is that they also seem to offer cloud services. One of the areas they are proving service for is in video streaming, which can help facilitate live streaming of content. This area seems to somewhat overlap with other cloud providers such AWS, which also has similar offering through Elemental suite of services (called AWS Elemental MediaLive).
For more information on Verizon Innovation Centers feel free to visit their website: https://www.verizon.com/about/sites/default/files/annual/delivering-innovative-solutions.html