☕ Big Tech Crushes
Big Tech released their financials last week and they had an amazing quarter. We go through all the companies and analyze how they did. Plus, how to write beautiful Python code!
Quastor Daily is a free daily email that goes out to over 10,000 Software Engineers!
It consists of Software Engineering News, Tech-related links and a Coding Interview Problem (with detailed solution)!
Sign up here!
Industry News
Big Tech crushed earnings this past quarter. We’ll go through each company and talk about how they did…
Google
Google crushed analyst expectations on earnings with $26.29 dollars in earnings per share (EPS). They also beat on revenue with $55.3 billion dollars in revenue.
Google’s advertising revenue rose 32.3% and now comprises 81% of their total revenue. 28.9% of digital ad spend by companies in 2020 was spent on Google ads, showing Google’s absolute dominance in the industry.
Google Cloud is another key business segment of Google and revenue for Google Cloud rose 45.7% compared to last year, indicating a massive surge in use.
Google search now comprises 92% of online search and YouTube comprises 73% of online videos.
Facebook
Facebook had a huge quarter in terms of revenue making $26.17 billion dollars. In terms of profitability, Facebook beat analyst expectations by 40% on earnings ($9.5 billion dollars in net income).
Facebook’s Monthly Active Users (MAUs) rose by 10% compared to one year ago, which is a slight deceleration from the final quarter of 2020. Facebook defines a Monthly Active User as someone who has visited Facebook through the website or mobile app or used the Messenger App sometime during the 30 day measurement period.
25.2% of digital ad spend by companies in 2020 was spent on Facebook ads, which makes them second only to Google.
Apple
Apple had an amazing quarter, completely demolishing investor expectations. They made $89.6 billion dollars in revenue, beating analyst estimates of $77.4 billion dollars by 15%. Apple’s revenue is up 53% year over year.
The company made $1.40 per share in EPS (Earnings Per Share), crushing analyst expectations of $0.99 per share.
Apple has been investing heavily in the services business (iCloud, Apple TV+, Apple Music, Fitness+, News+, etc.) because of its predictability in terms of revenue and it’s higher profit margins (Apple’s services profit margin is 70% compared to 36% for Apple’s profit margin for their products).
Apple beat analyst expectations on Services revenue too, with $16.9 billion dollars compared to analyst expectations of $15.7 billion dollars.
Microsoft
Microsoft also beat analyst expectations on revenue and earnings with $41.7 billion dollars in revenue vs. expectations of $41.1 billion. They made $1.95 in earnings per share.
Microsoft’s cloud computing business, Azure, grew 50% year over year. The business has now captured nearly 20% of the global cloud market as of the end of 2020.
This makes Azure second only to AWS (Amazon Web Services) in terms of global cloud market share!
Microsoft also has a More Personal Computing business unit, which consists of the Windows OS, gaming and computing devices (Surface). That unit saw it’s revenue rise 19% year over year, primarily driven by the Xbox gaming system.
Amazon
Amazon crushed analyst expectations on earnings with $15.79 in earnings per share vs. analyst expectations of $9.56 per share. They also beat on revenue with $108.5 billion dollars in revenue vs. analyst expectations of $104.5 billion dollars in revenue.
Amazon Web Services also grew quite well with $13.5 billion dollars in revenue.
AWS’s revenue is crucial for Amazon since it’s a steady revenue stream (not as cyclical as Amazon’s e-commerce business) and it has much higher profit margins. AWS has a 30.8% operating profit whereas Amazon’s e-commerce business has an operating profit of 4.9%.
AWS represents 12.4% of Amazon’s total revenue but it represents 47% of Amazon’s total operating profit this quarter.
Tech Snippets
Pydon'ts - An awesome series of articles on how to write beautiful python code.
Reverse Engineering the COVID Vaccine Source Code - a fantastic video that goes into detail on the source code behind the mRNA vaccine. The parallels to software engineering are fascinating.
Join 10,000+ Software Engineers who read Quastor Daily! It’s completely free!
Previous Solution
As a refresher, here’s the last question
You are given a positive integer as input.
Print the next largest number that has the same number of 1 bits in it’s binary representation.
Solution
We can solve this question using Bit Manipulation.
Remember, we want the next largest number, not just any larger number with the same number of 1 bits. Therefore, we’ll want the smallest number that is bigger than our input (that also has the same number of 1 bits).
Therefore, we’ll have to flip 2 bits in our integer input.
We’ll have to flip a 0 bit to a 1 in order to make our number larger. We’ll call this bit b1
.
Then, we’ll have to flip a different 1 bit to a 0 in order to keep the number of 1 bits the same. We’ll call this bit b2
.
b1
must be a more significant bit than b2
(b1
must be to the left of b2
), otherwise our new number will be smaller than the original.
Because we want to make our number bigger, but also the next biggest, b1
will be the right-most non-trailing zero.
We want the zero to be the right-most since we want it to be the smallest bigger number with the same number of 1 bits.
We want the zero to be non-trailing (it should have at least one 1 bit to the right of it) because we’ll have to flip a less significant bit from 1 to 0 (that bit will be b2
) in order to have the same number of 1 bits as the input integer.
So, now we know that b1
will be the right-most, non-trailing zero.
We’ll flip the bit at b1
from a 0 to a 1.
Now, we have to
Flip a bit from 1 to 0 (
b2
bit)Select the
b2
bit so that our number is the next largest (and not larger)
In order to do this, we’ll first count the number of 0s and 1s that are to the right of our b1
bit.
Let’s say we have a 0s and b 1s where a is the number of 0s and b is the number of 1s to the right of b1
.
Then, we’ll add one additional 0 (a = a + 1) and take away one of the 1s (b = b - 1) in order to go back to the original number of 1 bits in the input.
Now, we’ll place all the a 0s to the left of the b 1s when we arrange the bits to the right of b1
. This guarantees that we have the next largest integer.
Interview Question
You are walking up a staircase with n steps.
You can hop either 1 step, 2 steps or 3 steps in a single time (you have long legs).
Write a function to count how many possible ways you can walk up the stairs.
We’ll send the solution in our next email!
Want more practice with real FAANG software engineers?
Check out Interviewing.io!
You don’t have to pay anything until you get that job at FAANG!