<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Peter Cai</title>
	<atom:link href="https://petercai.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://petercai.com</link>
	<description></description>
	<lastBuildDate>Mon, 24 May 2021 12:46:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.2</generator>
	<item>
		<title>More than 10 years on, decentralized finance is still bullshit</title>
		<link>https://petercai.com/more-than-10-years-on-decentralized-finance-is-still-bullshit/</link>
					<comments>https://petercai.com/more-than-10-years-on-decentralized-finance-is-still-bullshit/#respond</comments>
		
		<dc:creator><![CDATA[pcai]]></dc:creator>
		<pubDate>Mon, 24 May 2021 12:36:56 +0000</pubDate>
				<category><![CDATA[Blockchain]]></category>
		<guid isPermaLink="false">https://petercai.com/?p=2879</guid>

					<description><![CDATA[I generally want to avoid talking about the news, but the GameStop fiasco this year has renewed a push for decentralized systems of stock ownership and exchange. And armchair economists who misunderstand how money and inflation works are hyping crypto and decentralized finance as a panacea to looming &#8220;hyperinflation&#8221; that has supposedly been just around [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>I generally want to avoid talking about the news, but the GameStop fiasco this year has renewed a push for decentralized systems of stock ownership and exchange. And armchair economists who misunderstand how <a href="https://www.lynalden.com/inflation/#supply">money and inflation</a> works are hyping crypto and decentralized finance as a panacea to looming &#8220;hyperinflation&#8221; that has supposedly been just around the corner for about a decade. And these inflation truthers are never wrong, its just &#8220;the official stats are manipulated,&#8221; and what about the price of lumber?</p>



<p>Where was I?</p>



<p>Right &#8211; the problem is most of the promised benefits of DeFi still amount to illusory hand-waving [1]. The first and most obvious problem with &#8220;DeFi&#8221; as a concept is that everyone will end up operating through a centralized exchange (a la Coinbase) for convenience anyway, defeating the purpose of &#8220;decentralization.&#8221; And if you <em>don&#8217;t</em>, we&#8217;re going to lose all the mechanisms that protect us from ourselves and that we take for granted in our current financial system:</p>



<ul><li><strong>Forgot your password?</strong> Customer service can help you regain access.</li><li><strong>Added an extra 0 to your order? Transferred your money to the wrong recipient?</strong> No problem, transactions can be reversed due to mistakes.</li><li><strong>Your five year old got on and accidentally traded your net worth for doge?</strong> No problem, call in and fix it.</li></ul>



<p>The main problem/feature of the blockchain that breaks finance is that it attempts to completely dissociate technical rules from legal ones. It is <a href="https://en.wikipedia.org/wiki/Scienter">well established</a> that you cannot legally keep money that was sent to you by accident. Most blockchains though, are irreversible by design, even in cases of <a href="https://ethereumclassic.org/">obvious fraud</a>. This poses real problems for law enforcement and umm, anyone who cares about fairness. Dealing with exceptions, reversing mistaken &amp; fraudulent transactions, and the whole web of &#8220;human judgment and intermediaries&#8221; is treated like unnecessary baggage&#8230;.and the collateral damage is treated with a shrug. Until those are solved, we&#8217;re trading one set of problems for another. But crypto enthusiasts refuse to even acknowledge the tradeoffs &#8211; at least until they (or their exchange) get hacked, and they learn the actual meaning of &#8220;irreversible.&#8221;</p>



<p>And its frustrating because there <em>could be</em> real and tangible benefits to cryptocurrency and blockchain technology. Perhaps the greatest embarrassment of 21st century human technology is that we haven&#8217;t yet solved cross-border payments yet. We might as well try a different approach with crypto. </p>



<p>It&#8217;s just that very few people are actually working on solving real problems like this with blockchain. Overt manipulation, tax avoidance, speculative bubbles, organized crime, and crazy volatility seems to be par for the course. You might think &#8220;it seems kind of silly to try and build a financial system on top of such a foundation&#8221; and I wouldn&#8217;t blame you. Luckily, almost nobody is even trying: crypto is mostly used for crypto. Speculative investments, &#8220;yield farming,&#8221; exit scams, and money laundering seem to be the main use cases. Almost every Ethereum project is either an outright scam or Yet Another Way to Manage your Cryptocurrency Wallets. It would be as if the bittorrent inventors could only think of &#8220;transferring bittorrent clients to each other over bittorrent&#8221; as their main use case. </p>



<p>It&#8217;s a sad joke.</p>



<p>[1] The one possible exception: if it drags the world financial system into the modern age without changing anything else, it will be an unalloyed good. There&#8217;s no real reason money transfers can only occur on weekdays, or for stock trades to take 2 days to settle.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://petercai.com/more-than-10-years-on-decentralized-finance-is-still-bullshit/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>x86 is deprecated</title>
		<link>https://petercai.com/x86-is-deprecated/</link>
					<comments>https://petercai.com/x86-is-deprecated/#respond</comments>
		
		<dc:creator><![CDATA[pcai]]></dc:creator>
		<pubDate>Tue, 19 Jan 2021 03:47:12 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">https://petercai.com/?p=2742</guid>

					<description><![CDATA[ARM will be the dominant CPU architecture going forward. In a few years, x86 will be relegated to specialty use cases. All new consumer devices and most cloud services will be based on ARM. Old workloads will probably run on x86 for decades, because nobody will bother to port and upgrade, but a decent amount [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>ARM will be the dominant CPU architecture going forward. In a few years, x86 will be relegated to specialty use cases. All new consumer devices and most cloud services will be based on ARM. Old workloads will probably run on x86 for decades, because nobody will bother to port and upgrade, but a decent amount will run on ARM under emulation no problem.</p>



<p>How did we get here?</p>



<p>ARM started out as the upstart competitor optimized for low power and great performance per watt. So we stuck em on smartphones and tablets. Now perf per watt matters everywhere &#8211; datacenters and mobile devices are where the volume is. In addition, the performance gap is closing. x86 is still ahead in many single-threaded workloads you just want completed as fast as possible. But once that Rubicon is crossed, there will be very few cases where x86 makes sense as a CPU architecture that anyone intentionally uses.</p>



<p>Most major hardware OEMs are either shipping or looking into ARM. The battery life implications are too hard to ignore. The Apple M1 means Apple is unlikely to release another x86 device ever again. Microsoft has been partnering with Qualcomm to design ARM CPUs for years now, and Windows 10 on ARM has x86-64 emulation in preview as of December 2020. In other words, we are about 1 or 2 hardware cycles away from the mass availability of ARM devices and platforms that support ~99% of use cases consumers need [1].</p>



<p>The major cloud providers will eventually be forced to migrate to ARM for the cost savings. At AWS there&#8217;s already work underway to switch over internal workloads to ARM. Azure may be secretly testing ARM for internal workloads too. The cost savings is just too great not to do it. Google Cloud will come around to it once they start caring about margins.</p>



<p>For customer facing workloads, Amazon graviton2 VMs will soon be a reasonable default for customers, given it can be 40% faster and 20% cheaper than x86. For many cloud services that aren&#8217;t VMs, the ARM switch will be completely transparent, since HTTP and other layer 7 protocols don&#8217;t care what your underlying CPU architecture is. Or layers 1 &#8211; 6.</p>



<p>On a semi-related note, new Intel CEO Pat Gelsinger is taking over while under assault from all sides. Reports are that Intel has been in trouble for years now, with fat margins that are increasingly unsustainable and under attack from AMD, Amazon, and now Apple. Then you have dedicated fabs (but mostly TSMC) that have been pulling away and are now probably a full generation ahead of Intel. So in summary, Intel makes CPUs on a legacy architecture that consumes vastly more power than the competition, and is slowly losing its performance edge without anything on the horizon that can reverse the trend, with manufacturing capability is as much as 5 years behind the state of the art, and can&#8217;t even produce 10nm chips in mass quantities with decent yield even in early 2021. Yikes.</p>



<p>[1] I&#8217;m not sure how x86 on ARM virtualization will work, which may be important for some workstation scenarios so developers can build and test all their software. But the single most important event of the last 2 years has been Apple getting ARM laptops to developers, which lit a fire under folks like Docker to get cracking on ARM support.<br></p>
]]></content:encoded>
					
					<wfw:commentRss>https://petercai.com/x86-is-deprecated/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Storage prices have sort of stopped dropping</title>
		<link>https://petercai.com/storage-prices-have-sort-of-stopped-dropping/</link>
					<comments>https://petercai.com/storage-prices-have-sort-of-stopped-dropping/#respond</comments>
		
		<dc:creator><![CDATA[pcai]]></dc:creator>
		<pubDate>Tue, 08 Dec 2020 05:06:51 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">https://petercai.com/?p=2828</guid>

					<description><![CDATA[Today I want to talk about how hard drive prices have plunged dramatically since 2000 (most data from John C. McCallum&#8217;s disk prices page): We are talking about a roughly 97% decrease in price per GB over 20 years. In fact it&#8217;s kind of hard to see on a linear scale, so let&#8217;s switch to [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Today I want to talk about how hard drive prices have plunged dramatically since 2000 (most data from John C. McCallum&#8217;s <a href="https://jcmit.net/diskprice.htm">disk prices page</a>):</p>



<figure class="wp-block-image size-large"><img width="884" height="547" src="https://petercai.com/wp-content/uploads/2020/12/image-1.png" alt="" class="wp-image-2830" srcset="https://petercai.com/wp-content/uploads/2020/12/image-1.png 884w, https://petercai.com/wp-content/uploads/2020/12/image-1-300x186.png 300w, https://petercai.com/wp-content/uploads/2020/12/image-1-768x475.png 768w" sizes="(max-width: 884px) 100vw, 884px" /></figure>



<p>We are talking about a roughly 97% decrease in price per GB over 20 years. In fact it&#8217;s kind of hard to see on a linear scale, so let&#8217;s switch to logarithmic for this time period:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="878" height="546" src="https://petercai.com/wp-content/uploads/2020/12/image-2.png" alt="" class="wp-image-2831" srcset="https://petercai.com/wp-content/uploads/2020/12/image-2.png 878w, https://petercai.com/wp-content/uploads/2020/12/image-2-300x187.png 300w, https://petercai.com/wp-content/uploads/2020/12/image-2-768x478.png 768w" sizes="(max-width: 878px) 100vw, 878px" /></figure>



<p>Yup. Definitely logarithmic. Let&#8217;s zoom in to the past 10 years or so (linear scale):</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="872" height="531" src="https://petercai.com/wp-content/uploads/2020/12/image-4.png" alt="" class="wp-image-2833" srcset="https://petercai.com/wp-content/uploads/2020/12/image-4.png 872w, https://petercai.com/wp-content/uploads/2020/12/image-4-300x183.png 300w, https://petercai.com/wp-content/uploads/2020/12/image-4-768x468.png 768w" sizes="(max-width: 872px) 100vw, 872px" /></figure>



<p>For fun we can also superimpose a chart from BackBlaze, a backup service that shared their <a href="https://www.backblaze.com/blog/hard-drive-cost-per-gigabyte/">average price per hard drive through 2Q 2017</a>:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="859" height="525" src="https://petercai.com/wp-content/uploads/2020/12/image-11.png" alt="" class="wp-image-2845" srcset="https://petercai.com/wp-content/uploads/2020/12/image-11.png 859w, https://petercai.com/wp-content/uploads/2020/12/image-11-300x183.png 300w, https://petercai.com/wp-content/uploads/2020/12/image-11-768x469.png 768w" sizes="(max-width: 859px) 100vw, 859px" /></figure>



<p>The 2011 Thailand monsoons left a noticeable blip on prices in early 2012, but otherwise the trend is pretty clear: there&#8217;s been a deceleration of progress, with gains getting a lot slower starting around 2016. To date there&#8217;s been a lot of resistance getting below $0.02 per GB. So the era of just assuming storage will get significantly cheaper every year is over, at least for now. In fact, prices don&#8217;t seem to have really dropped <em>at all</em> since mid 2019 when some drives started selling for $0.019 / GB. </p>



<p>However, there&#8217;s a nuance we&#8217;re missing if we look at only price per GB without accounting for density. Let&#8217;s look at a snapshot of hard drive prices at various capacities from December 2020 on Newegg:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="631" src="https://petercai.com/wp-content/uploads/2020/12/image-5-1024x631.png" alt="" class="wp-image-2834" srcset="https://petercai.com/wp-content/uploads/2020/12/image-5-1024x631.png 1024w, https://petercai.com/wp-content/uploads/2020/12/image-5-300x185.png 300w, https://petercai.com/wp-content/uploads/2020/12/image-5-768x473.png 768w, https://petercai.com/wp-content/uploads/2020/12/image-5.png 1052w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>The prices for 3.5&#8243; desktop drives range from $40 for a 500GB drive to ~$645 for an enterprise 18TB. We can conclude that at $40 the cost of the drive is almost entirely dominated by fixed costs, since the price doesn&#8217;t actually change at all between 250GB and 1TB, and barely changes at 2TB (the cheapest 2TB drive is roughly $50).</p>



<p>Because of this fixed cost issue, it&#8217;s very hard to get good &#8220;bang for buck&#8221; at lower drive capacities. Here&#8217;s the cost per GB as a function of drive capacity:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="977" height="604" src="https://petercai.com/wp-content/uploads/2020/12/image-6.png" alt="" class="wp-image-2835" srcset="https://petercai.com/wp-content/uploads/2020/12/image-6.png 977w, https://petercai.com/wp-content/uploads/2020/12/image-6-300x185.png 300w, https://petercai.com/wp-content/uploads/2020/12/image-6-768x475.png 768w" sizes="(max-width: 977px) 100vw, 977px" /></figure>



<p>And here&#8217;s the same chart on a log scale:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="979" height="617" src="https://petercai.com/wp-content/uploads/2020/12/image-7.png" alt="" class="wp-image-2836" srcset="https://petercai.com/wp-content/uploads/2020/12/image-7.png 979w, https://petercai.com/wp-content/uploads/2020/12/image-7-300x189.png 300w, https://petercai.com/wp-content/uploads/2020/12/image-7-768x484.png 768w" sizes="(max-width: 979px) 100vw, 979px" /></figure>



<p>For many years the sweet spot was a 4TB drive, but now it looks like the absolute best deal might be the 8TB drives. However, I&#8217;m surprised to see some 14TB and 16TB drives get within striking distance ($0.021 per GB vs 0.019 per GB). If the larger capacity drives are roughly as reliable, then going for 16TB drives is a no-brainer, since they&#8217;ll consume less space and power than two 8TB drives. </p>



<p>Because of this, and despite $/GB not really dropping much, big datacenters and cloud providers are likely to continue seeing marginal decreases in total cost of ownership and operational costs per GB-month, but absent new breakthrough technology, not <em>that </em>much progress. </p>



<p>What are the implications of this?</p>



<p>A number of startup darlings have succeeded by betting on trends in underlying technologies to make their business viable (e.g., YouTube was founded 15 years ago and would&#8217;ve remained hopelessly unprofitable if not for the massive drop in bandwidth prices). And many a startup capitalized on the drop in storage prices to build attractive data warehousing and database solutions, replacing technology that assumed a GB cost $15. But if you&#8217;re betting on the price of say, AWS S3 pricing to go down significantly in the near future to make your startup profitable, well, bad news:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="876" height="541" src="https://petercai.com/wp-content/uploads/2020/12/image-9.png" alt="" class="wp-image-2838" srcset="https://petercai.com/wp-content/uploads/2020/12/image-9.png 876w, https://petercai.com/wp-content/uploads/2020/12/image-9-300x185.png 300w, https://petercai.com/wp-content/uploads/2020/12/image-9-768x474.png 768w" sizes="(max-width: 876px) 100vw, 876px" /></figure>



<p>Amazon literally hasn&#8217;t reduced prices for S3 since 2016, almost <em>5 years</em> now.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://petercai.com/storage-prices-have-sort-of-stopped-dropping/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>&#8220;The codebase should look like it was written by one person&#8221; and other lies</title>
		<link>https://petercai.com/the-codebase-should-look-like-it-was-written-by-one-person-and-other-lies/</link>
					<comments>https://petercai.com/the-codebase-should-look-like-it-was-written-by-one-person-and-other-lies/#respond</comments>
		
		<dc:creator><![CDATA[pcai]]></dc:creator>
		<pubDate>Fri, 02 Oct 2020 02:08:08 +0000</pubDate>
				<category><![CDATA[Startups]]></category>
		<guid isPermaLink="false">https://petercai.com/?p=2813</guid>

					<description><![CDATA[I&#8217;ve mentioned that its unproductive to adopt cultural values that don&#8217;t actually take a stance on an issue (with more than one plausible answer). &#8220;Be nice to your coworkers&#8221; isn&#8217;t a cultural value, because it doesn&#8217;t tell us how to make decisions; there&#8217;s no trade-off there. Nobody would suggest &#8220;let&#8217;s be mean to our coworkers&#8221; [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve mentioned that its unproductive to adopt cultural values that don&#8217;t actually take a stance on an issue (with more than one plausible answer). &#8220;Be nice to your coworkers&#8221; isn&#8217;t a cultural value, because it doesn&#8217;t tell us how to make decisions; there&#8217;s no trade-off there. Nobody would suggest &#8220;let&#8217;s be mean to our coworkers&#8221; instead.</p>



<p>But it&#8217;s easy to fall into this trap by espousing something that <em>sounds</em> like an opinionated stance without actually taking one, like &#8220;The codebase should look like it was written by one person!&#8221;</p>



<p>No. Stop. Don&#8217;t tell me what ideals you want. Tell me what you are prepared to sacrifice for it. Is there a comprehensive style guide? Has everyone been trained on it? Have you adopted a process for how to amend it? Do you&nbsp;make ship-blocking change requests for style (citing the style guide)?</p>



<p>Saying you want the codebase to be uniform is like saying you want to be a published author, or a PhD. It&#8217;s not the declaration of desire that matters. Are you committing the time and effort it takes to bend reality in that direction?</p>



<p>It&#8217;s more important to live up to cultural values than to have ones that are the nicest-sounding.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://petercai.com/the-codebase-should-look-like-it-was-written-by-one-person-and-other-lies/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>We&#8217;re fast paced</title>
		<link>https://petercai.com/were-fast-paced/</link>
					<comments>https://petercai.com/were-fast-paced/#respond</comments>
		
		<dc:creator><![CDATA[pcai]]></dc:creator>
		<pubDate>Tue, 25 Aug 2020 01:41:25 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Startups]]></category>
		<guid isPermaLink="false">https://petercai.com/?p=2703</guid>

					<description><![CDATA[By custom, all software engineer job postings in the US are required to include the phrase &#8220;must thrive in a fast-paced work environment&#8221;. This is usually not a bona fide qualification, but rather an advertisement (&#8220;we&#8217;re fast paced, so we hope you like that?&#8221;). The reasoning is sound: Engineers generally aren&#8217;t drawn to listings with [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>By custom, all software engineer job postings in the US are required to include the phrase &#8220;must thrive in a fast-paced work environment&#8221;. This is usually not a bona fide qualification, but rather an advertisement (&#8220;we&#8217;re fast paced, so we hope you like that?&#8221;).</p>



<p>The reasoning is sound: Engineers generally aren&#8217;t drawn to listings with &#8220;must be able to grind through mountains of red tape, bureaucracy, and slow process. We deploy once a quarter.&#8221; And every tech company thinks it is fast-paced[1] the way every driver thinks s/he is above average.</p>



<p>But what, exactly, does fast paced mean? No, I don&#8217;t think you can use meter sticks like &#8220;we release every (day|week|month)&#8221; &#8211; or at least, you leave a lot of room for gaming that kind of metric (&#8220;I FTP&#8217;d a new config into the production server today&#8221;). </p>



<p>I think there&#8217;s a reasonable test that is a good proxy for how fast-paced any engineering environment is, phrased as a question: &#8220;Say the app has a <strong>one character typo</strong> in some production code. How long, in the best case, does it take to go from someone in the company knowing about this to it being fixed?&#8221;</p>



<p>Yes, this is stuff they teach in Six Sigma called &#8220;lead time&#8221; and its a metric so simple that it is probably simplistic. But you learn a lot about the maturity of an organization with this one question, because you can ask this of a specific engineer on a specific team and they&#8217;re going to start going down the mental checklist of how to actually deploy changes and then you can have a deep conversation about QA, automation, build times, and deployment process. </p>



<p>You might be surprised about the answers you get!</p>



<p>[1] Conflating &#8216;long hours&#8217; with &#8216;fast paced&#8217; is <img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f602.png" alt="😂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://petercai.com/were-fast-paced/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>We should expect less change in software</title>
		<link>https://petercai.com/we-should-expect-less-change-in-software/</link>
					<comments>https://petercai.com/we-should-expect-less-change-in-software/#respond</comments>
		
		<dc:creator><![CDATA[pcai]]></dc:creator>
		<pubDate>Mon, 10 Aug 2020 04:03:20 +0000</pubDate>
				<category><![CDATA[Startups]]></category>
		<guid isPermaLink="false">https://petercai.com/?p=2743</guid>

					<description><![CDATA[The US is home to a huge industry that has been around in some form or another since the late 60s, but which really began to explode in the 90s. Innovation was rapid: massive leaps forward could be expected every few years, and supporting infrastructure was quickly built out everywhere. At its peak, there were [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>The US is home to a huge industry that has been around in some form or another since the late 60s, but which really began to explode in the 90s. Innovation was rapid: massive leaps forward could be expected every few years, and supporting infrastructure was quickly built out everywhere. At its peak, there were countless startups jumping in every year to compete in the rapidly growing market. And the United States was at the center of it all, leading the world with the most recognizable success stories in the industry. Consolidation means that only a small handful of massive companies dominate the industry today.</p>



<p>I am talking, of course, about automobiles.</p>



<p>It&#8217;s been more than 100 years since mass production at scale, so we can safely say automobiles are a mature industry. Most of the incumbents are quite old, and new startups that disrupt them are rare &#8211; Tesla being a notable exception[1]. You typically do not see rapid advances that make older models obsolete within a few short years. Things today look roughly how they looked a decade ago. Etc.</p>



<p>In contrast, dial-up became broadband became WiFi became 4G LTE in short order. LiveJournal gave way to Friendster gave way to MySpace which gave way to Facebook. The conventional wisdom is that disruption is always just around the corner. That the right college dropout could change the game again at any moment. But perhaps our faith in the perpetual motion machine of the technology industry is&#8230;unfounded? What if we were just in the crazy early wild west days, and are starting to settle into a long haul &#8220;maturity&#8221; phase? What if it&#8217;s already happened?</p>



<p>There is some evidence that this has at least started. Here is Crunchbase data on startup formation over the last 10 years:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="671" height="454" src="https://petercai.com/wp-content/uploads/2020/08/image.png" alt="" class="wp-image-2744" srcset="https://petercai.com/wp-content/uploads/2020/08/image.png 671w, https://petercai.com/wp-content/uploads/2020/08/image-300x203.png 300w" sizes="(max-width: 671px) 100vw, 671px" /></figure>



<p>There is clearly a worrying trend towards fewer startups being founded after peaking in 2014. </p>



<p>US IPOs are noisier, but data going back to 2005 suggests a slightly declining trend as well:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="680" height="394" src="https://petercai.com/wp-content/uploads/2020/08/image-2.png" alt="" class="wp-image-2746" srcset="https://petercai.com/wp-content/uploads/2020/08/image-2.png 680w, https://petercai.com/wp-content/uploads/2020/08/image-2-300x174.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></figure>



<p>More worrying is how much the &#8220;fat head&#8221; has accumulated. The top 5 largest technology companies today (Apple, Amazon, Microsoft, Google, and Facebook) have a collective market cap of $6.8 trillion (reminder: that&#8217;s $6,800 billion, or as many as 6,800,000 millionaires). They&#8217;re worth more than the combined market cap of every health care company in the S&amp;P 500.</p>



<p>There are other signs of maturity in the technology industry. Regulation and enforcement that was unthinkable just a few years ago are now the norm (see: Europe). Countries all over the world are exerting more control over technology and information companies than ever before (see: Google in Europe, Facebook in China, TikTok in the US, Apple in&#8230;everywhere). </p>



<p>What does this mean for policymakers? For entrepreneurs?</p>



<p>For policymakers, there&#8217;s some low hanging fruit around the elimination of startup killers like employment non-competes, and <em>maybe</em> immigration reform that stops discouraging talent from contributing to the industry here. But the secular decline in new company formation follows a yearslong trend that isn&#8217;t just limited to technology startups, suggesting the problem is at least partially &#8220;dynamism in the broader economy,&#8221; and not just some attribute of the technology industry specifically [2].</p>



<p>For entrepreneurs, it can be deceptively expensive to start a new business, depending on your industry. Yes, Amazon Web Services is cheap. But the real costs are regulatory (and the people to deal with the regulations, and the health plans for those people, and the people to deal with the health plans, ad nauseum), especially if you want to reach the broadest audience possible. Learn to love acronyms like CASL, CCPA, and GDPR. And know that regulation will generally have the unintended effect of entrenching the existing big players, so today&#8217;s incumbents are more likely to stay dominant than in the past. That in turn suggests that a successful new entrant&#8217;s best hope is to be acquired, rather than to &#8220;disrupt&#8221; the likes of, say, FAANG.</p>



<p>In other words, we are very, very, far from &#8220;On the internet, nobody knows you&#8217;re a dog.&#8221; It isn&#8217;t necessarily a bad thing if software and the information industry is growing up. But it&#8217;s almost certainly a mistake to assume the churn from the early years will continue at the same pace.</p>



<p></p>



<p> </p>



<p> </p>



<p>[1] Tesla is the leader in the still niche battery-electric vehicle category, but still has only ~1% US automotive market share, which is a tremendouss achievement! But also goes to show how low the bar for disruption is.</p>



<p>[2] We could fix healthcare, which would help tremendously with new business formation across the board, but that&#8217;s not low hanging fruit.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://petercai.com/we-should-expect-less-change-in-software/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Why is it harder to read code than to write it?</title>
		<link>https://petercai.com/why-is-it-harder-to-read-code-than-to-write-it/</link>
					<comments>https://petercai.com/why-is-it-harder-to-read-code-than-to-write-it/#respond</comments>
		
		<dc:creator><![CDATA[pcai]]></dc:creator>
		<pubDate>Tue, 04 Aug 2020 02:09:23 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">https://petercai.com/?p=2718</guid>

					<description><![CDATA[Joel Spolsky once made a famous observation: There&#8217;s a subtle reason that programmers always want to throw away the code and start over. The reason is that they think the old code is a mess. And here is the interesting observation: they are probably wrong. The reason that they think the old code is a [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Joel Spolsky once made a famous observation:</p>



<blockquote class="wp-block-quote"><p>There&#8217;s a subtle reason that programmers always want to throw away the code and start over. The reason is that they think the old code is a mess. And here is the interesting observation: they are probably wrong. The reason that they think the old code is a mess is because of a cardinal, fundamental law of programming:</p><p><strong>It’s harder to read code than to write it.</strong></p><p>This is why code reuse is so hard. This is why everybody on your team has a different function they like to use for splitting strings into arrays of strings. They write their own function because it’s easier and more fun than figuring out how the old function works.</p></blockquote>



<p>It&#8217;s been more than 20 years since, so this is no longer considered a &#8220;subtle reason,&#8221; having firmly graduated into the sphere of common knowledge. But Joel never really explored in depth <em>why</em> reading code is more difficult than writing it. Many explanations have been offered over the years:</p>



<ul><li>Because when you are writing code, you often don&#8217;t immediately clutter it with all the exception handling and edge cases, but this is often present when reading code.</li><li>Because programming languages attempt to balance readability with brevity.</li><li>In most languages, small and seemingly insignificant notational changes can change the meaning of code.</li><li>Because programming languages can&#8217;t be read aloud.</li><li>Because when you are writing code you know the problem context, the mental model, and you know what the code is supposed to do.</li><li>Because reading code requires working memory to remember and hold references to other places and things (functions, variable names, imported classes from other files, etc), only some subset of which will turn out to be relevant. In contrast, when writing code, you only need to remember precisely what you need.</li></ul>



<p>Contrast this with, say, English prose: The meaning of the text does not generally depend on making references to other concepts defined only elsewhere in the text. It can be read aloud, in a linear order. And the grammar and syntax in English is more loose, because ambiguous constructions are allowed (&#8220;John greeted my dog and then he left.&#8221;).</p>



<p>So it&#8217;s hard to argue that working memory requirements, references, and syntax makes code hard to read. They certainly do. But everything mentioned so far hits at peripheral and contributory issues without truly nailing the central reason: human language is designed <em>exclusively</em> to encode ideas. Its <em>only purpose</em> is to record and transmit meaning. But programming languages are instead designed to <em>encode computer commands unambiguously</em>; documenting the meaning of the problem to be solved is left to optional activities like choosing good variable and method names, adding code comments, and generally things that have nothing to do with the correctness or successful execution of the program. </p>



<p>So reading code is hard because we must <em>simultaneously </em>decode the literal meaning of the instructions alongside the documentation about the problem it is designed to solve. And as most professional software developers come to learn, it takes great skill to write non-trivial programs correctly, but even more skill to do it in a way that simultaneously encodes the <em>intent </em>and <em>meaning</em> of the code too.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://petercai.com/why-is-it-harder-to-read-code-than-to-write-it/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Example engineering team values</title>
		<link>https://petercai.com/example-engineering-team-values/</link>
					<comments>https://petercai.com/example-engineering-team-values/#respond</comments>
		
		<dc:creator><![CDATA[pcai]]></dc:creator>
		<pubDate>Tue, 28 Jul 2020 02:46:30 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">https://petercai.com/?p=2714</guid>

					<description><![CDATA[It&#8217;s generally a mistake to adopt values like &#8220;respect your customers.&#8221; True values involve trade-offs. Here&#8217;s my humble attempt to list a few reasonable ones for a potential engineering team. We should&#8230; Hire and pay for world class peopleHire economically Be togetherWork anywhere Emphasize qualityEmphasize speed Emphasize market share growthEmphasize profitability Be highly leveragedBe highly [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>It&#8217;s generally a mistake to adopt values like &#8220;respect your customers.&#8221; True values involve trade-offs. Here&#8217;s my humble attempt to list a few reasonable ones for a potential engineering team.</p>



<p class="has-medium-font-size"> We should&#8230;</p>



<p>Hire and pay for world class people<br>Hire economically</p>



<p>Be together<br>Work anywhere</p>



<p>Emphasize quality<br>Emphasize speed</p>



<p>Emphasize market share growth<br>Emphasize profitability</p>



<p>Be highly leveraged<br>Be highly self sufficient</p>



<p>Prioritize technology updates<br>Prioritize technology stability</p>



<p>Focus on experience<br>Focus on performance</p>



<p>Build for generalists<br>Build for developers</p>



<p>Be disciplined and methodical<br>Have urgency and bias for action</p>



<p>Stretch ourselves<br>Be predictable</p>



<p>Be compassionate<br>Be right</p>



<p>Build simplicity<br>Build robustness</p>



<p>Think long term<br>Think &#8220;winner takes all&#8221;</p>



<p>Value correctness<br>Value shipping early</p>



<p>Be collaborative<br>Be decisive</p>



<p>Deploy and iterate<br>Stabilize the product</p>



<p>Value working software first<br>Value complete and comprehensive documentation</p>



<p>Deliver on schedule<br>Always deliver quality</p>



<p>Be transparent<br>Exercise discretion</p>



<p>Value professional growth over team stability<br>Value stability over learning and growth opportunities</p>



<p>Try to fix problems, even if they&#8217;re not ours<br>Stay in our lane</p>



<p>Be radically candid, even if it hurts<br>All get along</p>
]]></content:encoded>
					
					<wfw:commentRss>https://petercai.com/example-engineering-team-values/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Early build vs buy decisions</title>
		<link>https://petercai.com/early-build-vs-buy-decisions/</link>
					<comments>https://petercai.com/early-build-vs-buy-decisions/#respond</comments>
		
		<dc:creator><![CDATA[pcai]]></dc:creator>
		<pubDate>Tue, 21 Jul 2020 04:02:41 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Startups]]></category>
		<guid isPermaLink="false">https://petercai.com/?p=2704</guid>

					<description><![CDATA[It&#8217;s a well-known truism in software engineering that you shouldn&#8217;t ask an engineer to build and maintain software that only saves you a few hundred bucks a month, because engineers cost more than a few hundred bucks a month. You can distill this down into a few easy calls that apply in almost all situations: [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>It&#8217;s a well-known truism in software engineering that you shouldn&#8217;t ask an engineer to build and maintain software that only saves you a few hundred bucks a month, because engineers cost more than a few hundred bucks a month.</p>



<p>You can distill this down into a few easy calls that apply in almost all situations:</p>



<ul><li>No, don’t code your own database from scratch, use an existing open source or commercial one instead.</li><li>No, don&#8217;t self-host a database on your own hardware, if you can use an equivalent managed cloud service instead. </li><li>No, definitely don&#8217;t build and self-host your own database on your own hardware.</li></ul>



<p>There are a few nuances and exceptions to this rule for small startups:</p>



<p>At the very earliest &#8220;founders and 1-2 employees&#8221; phase, it can make sense to avoid expensive managed services, if you can save precious cash for something else. This is because there can often be a marginal 9th (or 10th…or 11th) hour in a working day that doesn&#8217;t actually displace anything else &#8212; in other words, build some sweat equity in lieu of spending cash, which might work out if it lets you delay or skip fundraising, and keep more of the pie for yourself. If you&#8217;re a small founding team, that might be a reasonable trade to bet on (the benefits get too diffuse once headcount exceeds a dozen or two). This happens to be important for an ancillary reason, namely, it can be a sign that early folks are resourceful enough to not need money to solve every problem. I cringe at co-founder pairs spending hundreds a month on &#8220;time tracking&#8221; and &#8220;project management&#8221; software when Google Sheets and Trello is a thing. </p>



<p>For an early stage company with more than a handful of employees, sometimes DIY or self-hosting can still make sense even if the math doesn&#8217;t appear to pan out. This may be because 1) at this moment there isn&#8217;t anything else that would be more valuable for that engineer to build, and/or 2) it doesn&#8217;t represent incremental cash outflow &#8211; you&#8217;re already paying an engineer, so that salary commitment is a sunk cost; they should do whatever work results in the most cash savings or increased revenue &#8212; even if individual projects don&#8217;t always cover the cost of the employee&#8217;s salary. In other words, it might be smarter to avoid the option that definitely increases cash burn (buying a new service).</p>



<p>Additional build vs buy factors to consider include a few things that are easy to get wrong, and sometimes effectively unknowable:</p>



<ul><li>&#8220;The innocent hack that ends up being a mission-critical beast&#8221;: If something custom but innocuous gets turned into this irreplaceable mission-critical thing, then it becomes a chain around your neck forever and gets harder to rip out as you grow more dependent on it. And you&#8217;ll have this unique snowflake with its own documentation, training and support cost that you can&#8217;t hire externally for. It becomes debt in the classic sense, in that it commits future resources to its care and feeding.</li><li>Feature set and customization: It can be tempting to either &#8220;build your own&#8221; (or fork something, which is <em>almost </em>the same) rather than using just things off the shelf because &#8220;nothing else suits our use case.&#8221; This almost always causes operational issues later [1], and is generally symptomatic of some other issue &#8212; either the team is insufficiently imaginative/adaptable, has adopted unusually broken workflows, or is just plain unskilled enough to actually read existing code and documentation. Some teams do truly need to build something custom for certain business processes, but this should be very rare early on.</li></ul>



<p>So, a couple takeaways.<br><br>Frugality as a value only moves in one direction.<br><br>Have an exit strategy if you DIY, since you usually don&#8217;t want to be trapped maintaining and extending a homebrew solution forever that doesn&#8217;t create a competitive strength for you.<br><br>If you keep saying &#8220;nothing out there suits my use case&#8221; in every domain you encounter, the odds are you&#8217;re doing it wrong.</p>



<p></p>



<p>[1] I always like to say that forking is easy, merging is hard. This happens to be true in a number of domains (like processes), not just code libraries. </p>
]]></content:encoded>
					
					<wfw:commentRss>https://petercai.com/early-build-vs-buy-decisions/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Software engineering salaries, job hopping, and markets</title>
		<link>https://petercai.com/software-engineering-salaries-job-hopping-and-markets/</link>
					<comments>https://petercai.com/software-engineering-salaries-job-hopping-and-markets/#respond</comments>
		
		<dc:creator><![CDATA[pcai]]></dc:creator>
		<pubDate>Sat, 10 Aug 2019 03:56:29 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">https://petercai.com/?p=2627</guid>

					<description><![CDATA[I&#8217;m pondering about software engineer salaries and efficient markets. What intrigues me is how often new software engineers are changing jobs to get significant raises 1, 2, and 3 years outside of school. I see a lot of resumes and it&#8217;s actually somewhat unusual if I don&#8217;t see a new job every ~2 years on [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;m pondering about software engineer salaries and efficient markets.</p>



<p>What intrigues me is how often new software engineers are changing jobs to get significant raises 1, 2, and 3 years outside of school. I see a lot of resumes and it&#8217;s actually somewhat unusual if I <em>don&#8217;t</em> see a new job every ~2 years on average. That seems to be a lot of wasted domain expertise and skills, as its an immediate net loss when a productive engineer leaves an employer to go be a training burden on a different one.</p>



<p>It seems like it&#8217;d be better, <em>overall</em>, if engineers switched jobs less often, because then they wouldn&#8217;t be constantly throwing out experience and domain knowledge from their old employers all the time, and the economy would be bigger from all that extra accumulated productivity. So why is this not the case?</p>



<p>One reason I think the observed behavior makes sense: Relevant real world experience dramatically changes the productivity of a software engineer, and the early gains can be the steepest. And I&#8217;ve mentioned before that I suspect many engineers at many companies aren&#8217;t being re-leveled fast enough to keep pace with the increase in their productivity early in their careers. So maybe the engineer has become much more productive and does the rational thing by jumping to an employer that is willing to share more of that value with higher compensation. I would expect this to be true in thick markets like SF, NYC, and Boston (but haven&#8217;t yet found data to back it up).</p>



<p>Also &#8212; and I recognize this is true because the dot-com bust happened before I started working &#8212; the entire market has been expanding for basically my entire career (OK, markets were in free fall in 2008, but software merely hit the pause button compared to the rest of the economy). So maybe there&#8217;s some kind of wage elasticity / stickiness problem&#8230;I think in labor economics it&#8217;s understood that when demand goes down, it&#8217;s very hard to straight up cut employee salaries, so correspondingly, salaries don&#8217;t magically move upward when the market moves up. Actually, now that we mention it, many firms are still coming out of Great Recession mode, where it seems like everything is on the table <em>except </em>raising salaries. Combine that with the fact that demand has been ahead of supply for a straight decade, and that seems like an environment with lots of natural incentives for engineers to hop around every year or two to get raises (really, just salaries at the new market rate). And so then you get tables like this:</p>



<figure class="wp-block-image"><img loading="lazy" width="491" height="520" src="https://petercai.com/wp-content/uploads/2019/08/image-1.png" alt="" class="wp-image-2679" srcset="https://petercai.com/wp-content/uploads/2019/08/image-1.png 491w, https://petercai.com/wp-content/uploads/2019/08/image-1-283x300.png 283w" sizes="(max-width: 491px) 100vw, 491px" /><figcaption>Source: <a href="https://business.linkedin.com/talent-solutions/blog/trends-and-research/2018/the-3-industries-with-the-highest-turnover-rates">Linkedin</a></figcaption></figure>



<p>And then there&#8217;s the typical whining about millennial job hopping, how they&#8217;re the least engaged generation in the workplace, etc. Employers have become less attached to their workforce in the past generation and vice versa, so there&#8217;s probably a self-reinforcing loop there, but also&#8230;that isn&#8217;t specific to the software industry so it&#8217;s not super interesting to talk deeply about. But the pain of interviewing and starting a new job just usually doesn&#8217;t make sense unless 1) you&#8217;re making more comp / advancing your career, or 2) you&#8217;re optimizing for something else, like lifestyle or geography or deciding you need your career to be rewarding and fulfilling <em>because if I&#8217;m checking my email and answering pagerduty on nights and weekends I want to not hate every moment of it</em>. Maybe there&#8217;s some deeper cultural thing here that&#8217;s really hard to untangle and there&#8217;s nothing anyone can do about it  ¯\_(ツ)_/¯ </p>



<p>So I guess there are a few not-exactly-exclusive reasons the current state of the world makes total sense:</p>



<ul><li>It&#8217;s a &#8220;multi-armed bandit&#8221; problem, where engineers job hop even if they are satisfied, exploring if they might be even more satisfied somewhere else. </li><li>Demand is outstripping supply slightly (and in some markets, a lot), but employers are in denial because they kind of had it easy from roughly 2008 to 2011, and aren&#8217;t responding to market conditions fast enough. There&#8217;s some evidence of this if you look at quit rates over a recent 10 year period:</li></ul>



<figure class="wp-block-image"><img loading="lazy" width="601" height="650" src="https://petercai.com/wp-content/uploads/2019/08/image.png" alt="" class="wp-image-2673" srcset="https://petercai.com/wp-content/uploads/2019/08/image.png 601w, https://petercai.com/wp-content/uploads/2019/08/image-277x300.png 277w" sizes="(max-width: 601px) 100vw, 601px" /></figure>



<ul><li>Engineers get more productive with experience and for some self-sabotaging reason, firms are making it easy for their own engineers to get a raise by switching employers.</li></ul>



<p>The other fun thing to note is that developer salaries are definitely headed up, but outside of a few metro areas the rise in national salaries has been relatively modest and not that far ahead of inflation:</p>



<table class="wp-block-table"><tbody><tr><td>Year</td><td>2010</td><td>2011</td><td>2012</td><td>2013</td><td>2014</td><td>2015</td><td>2016</td><td>2017</td><td>2018</td></tr><tr><td>Median Wage</td><td>$90,530</td><td>$91,940</td><td>$93,350</td><td>$95,670</td><td>$97,990</td><td>$100,690</td><td>$102,280</td><td>$103,560</td><td>$105,590</td></tr><tr><td>% change</td><td>&#8211;</td><td>1.56%</td><td>1.53%</td><td>2.49%</td><td>2.43%</td><td>2.76%</td><td>1.58%</td><td>1.25%</td><td>1.96%</td></tr></tbody></table>



<p>But also, the industry has roughly doubled in these years, so account for the likely fact that the seniority of the average developer has dropped during this observation period.</p>



<p>References</p>



<ul><li><a href="https://fred.stlouisfed.org/series/LEU0254477200A">https://fred.stlouisfed.org/series/LEU0254477200A</a></li><li><a href="https://www.bls.gov/ooh/computer-and-information-technology/software-developers.htm">https://www.bls.gov/ooh/computer-and-information-technology/software-developers.htm</a></li></ul>
]]></content:encoded>
					
					<wfw:commentRss>https://petercai.com/software-engineering-salaries-job-hopping-and-markets/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
