tag:blogger.com,1999:blog-3422952687411675652024-03-19T04:47:27.398-04:00Because .com Wasn't AvailableJonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.comBlogger44125tag:blogger.com,1999:blog-342295268741167565.post-63560264054042790692024-03-07T09:15:00.002-05:002024-03-07T09:15:40.066-05:00Business Books for Technical Leaders<p>I get a lot of questions like, "You seem to know a lot about business for a technical CTO. How?" and "I'd like to be a CTO someday. Do you have any tips?" First and foremost, a CTO is a business-focused role. You must be able to do whatever the business requires most at any given moment, whether that's coding, technical architecture, hiring, raising money, selling, conducting a layoff, leading Product, being a stand-in COO, or otherwise. </p><p>One of my common responses to these questions is, "Read and be curious!" But read what, exactly? Since I'm a fan of scalable communication, I'm documenting my recommended reading list here for public consumption. </p><p>This list is current as of March 2024, and I plan on updating it ~yearly.</p><h4 style="text-align: left;">Top Ten Business Books (Must Read)</h4><div>Ten might seem like a lot of books, but an executive should be reading 10-20 books a year, and when you multiply that by a 10-20 year career to become an executive, you'll have read hundreds of books before you land your first CTO job. </div><div><ul style="text-align: left;"><li><a href="https://amzn.to/3PdFyv8">The Power of Full Engagement</a> - You must have energy for the job to be an effective executive. This book is fantastic for learning how to manage your energy and increase your output. <!-- notionvc: 8bdc10b9-e879-4879-8419-064d1555086e --></li><li><a href="https://amzn.to/438B92f">The Effective Executive</a> - Once you have the energy, you must know what to do with it! This is a classic primer </li><li><a href="https://amzn.to/437bXZQ">The Engineering Executive's Primer: Impactful Technical Leadership</a> - A CTO-specific look at executive leadership. I just started reading this, but I love everything by Will Larsen, and I'm confident in recommending it</li><li><a href="https://amzn.to/49H16Zg">How to Win Friends and Influence People</a> - Effective leadership requires influence. This is a classic for a reason<!-- notionvc: 2268c421-b86b-43f9-bd1c-248e35d4407e --></li><li><a href="https://amzn.to/3Vbtdv5">Good to Great</a> - What makes some businesses win while others don't? </li><li><a href="https://amzn.to/4c8OiMX">Built to Last</a> - Sequel to the above, staying great is often harder than getting there in the first place</li><li><a href="https://amzn.to/3wHBlcx">The Innovator's Dilemma</a> - This book coined the term "disruption" as it is used in the tech industry. Almost every tech company is either disrupting or being disrupted at all times, and you must understand why this happens</li><li><a href="https://amzn.to/3uRpOqJ">Turning The Flywheel</a> - A short book explaining how to create virtuous business cycles<!-- notionvc: 8b16807b-cae9-4b6a-ac6b-ed0fa62ce726 --></li><li><a href="https://amzn.to/3TtYs3u">The First 90 Days</a> - The quintessential book for starting a new job or role</li><li><a href="https://amzn.to/3VpXZ3J">Good Strategy, Bad Strategy</a> - I waited far too long to read this book. It brings sanity to a topic that can feel amorphous and useless. </li></ul></div><h4 style="text-align: left;">Good Profiles of Successful Businesses and Leaders</h4><div><ul style="text-align: left;"><li><a href="https://amzn.to/4a4H0Yr">The Everything Store</a> - A profile of the early days of Amazon. </li><li><a href="https://amzn.to/3Tor8L8">Delivering Happiness</a> - Zappos' early days</li><li><a href="https://amzn.to/3V8pcHH">No Rules Rules</a> - Netflix</li><li><a href="https://amzn.to/49WQyp7">Elon Musk</a> - Love him or hate him, you can learn things from this book</li></ul></div><h4 style="text-align: left;">Other Recommended Reads</h4><div><ul style="text-align: left;"><li><a href="https://amzn.to/43eG7dW">High Output Management</a> - A little dated and process-driven, but it has some good tactical tips on how to run a large team</li><li><a href="https://amzn.to/3TpstBb">Thinking in Systems</a> - Most engineers are naturally good at this, but the book helps you apply this outside of engineering </li><li><a href="https://amzn.to/3wDOseK">Amp It Up</a> - How to operate with urgency </li></ul><div>Did I miss any of your favorites? Let me know in the comments!</div></div>Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-8997391875060497212023-03-20T05:54:00.002-04:002023-03-20T06:00:44.429-04:00Trust, but verify<p><span style="font-family: Arial; font-size: 10pt; white-space: pre-wrap;">I’ve always disliked this phrase, and it felt like a pure contradiction - you wouldn’t need to verify if you truly trust. It has come up recently in my life and work, so I decided to dig in and crystallize my thoughts.</span></p><span id="docs-internal-guid-1a3ec91c-7fff-4c56-44e2-5d9178d71e28"><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">The phrase originated as a Russian proverb (doveryai, no proveryai) and is attributed to </span><a href="https://www.rbth.com/lifestyle/330521-reagan-trust-but-verify-chernobyl" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">Vladimir Lenin and Joseph Stalin</span></a><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">. Inauspicious beginnings, to say the least. Ronald Reagan then co-opted it in 1986 to refer to nuclear disarmament, and from there, it entered the American lexicon. People often consider it a leadership principle or some fundamental truth, which needs more nuance. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">As a leader, one must decide how to operate in different contexts. A good initial posture is to distrust and verify often until you have built up the appropriate level of trust over a long enough period. I’ve had so many occasions in my career when I heard some variant of:</span></p><ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">The code is terrible</span></p></li><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">The code we’re writing is excellent!</span></p></li><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">That’s impossible</span></p></li><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">That will take months</span></p></li><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">We’re in a good state now</span></p></li><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">We fixed it</span></p></li><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">I’ll get back to you on that</span></p></li><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">This is only impacting a few users</span></p></li></ul><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">In many cases, I’ve trusted what I’ve been told, only to be proven wrong in a painful manner weeks or months later. As I have grown and taken on larger organizations, I have been inclined to “get out of the weeds” and let the teams do their jobs. Looking over their shoulder is micromanagement, which is evil and should be avoided at all costs, right? I began my career as a manager viewing micromanagement as problematic, and I prided myself on giving teams lots of space to execute independently. In hindsight, I went too far, and I now believe this intuition to step back is incomplete. A better posture is to find ways to empower the team while getting incredibly close to the details.</span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Hands-on Empowerment </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">In my role, being hands-on means reading and writing code, looking at alerts, pulling reports, querying databases, and commenting on JIRA tickets. For a long time, I felt like this work was a poor use of time for a CTO leading a team of ~120 people. I’ve realized that I got into this seat by being good at all of the above, and neglecting to leverage those strengths is a mistake. Here is how I have tried to do this in an empowering way vs. a micromanaging way:</span></p><br /><ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 12pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">First, you have to build trust with your team. </span><a href="https://hbr.org/books/watkins" style="text-decoration-line: none;"><span style="color: #1155cc; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">The First 90 Days</span></a><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"> has a great playbook that is worth following in any new role. </span></p></li><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">You’ll know you’ve built trust when people are “bringing you the bad news,” demonstrating vulnerability in front of you, and asking you for help. </span></p></li><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">At this point, it’s appropriate to become more hands-on</span></p></li><li aria-level="1" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">The most important quality to build as you lean in is curiosity. Whenever I find something that looks off, I start with a question:</span></p></li><ul style="margin-bottom: 0; margin-top: 0; padding-inline-start: 48px;"><li aria-level="2" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Hey, I noticed these error logs spike at 5 pm every day. Do we have any idea what that could be?</span></p></li><li aria-level="2" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">I was reading this code last night, and we might not handle an edge case properly. Am I interpreting this correctly? </span></p></li><li aria-level="2" dir="ltr" style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; list-style-type: disc; vertical-align: baseline; white-space: pre;"><p dir="ltr" role="presentation" style="line-height: 1.38; margin-bottom: 12pt; margin-top: 0pt;"><span style="font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">I looked in the database and noticed that 500 users appear to be in a bad state. Here’s the query I used. Does this look right?</span></p></li></ul></ul><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">These questions need to be genuine and caring, with the right tone. There’s a massive difference between “How the f*ck did this happen?!” and “I understand the team has limited capacity, and I want to support you. Help me understand how we got here and what we can do to prevent another incident like this one.” There are many resources on </span><a href="https://postmortems.pagerduty.com/culture/blameless/" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space: pre-wrap;">Blameless Postmortems</span></a><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">, and that’s the attitude you should bring to any issue you find, even if it’s minor. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Being this close to the details requires fairly deep technical knowledge and the ability to navigate your team's systems daily (source control, monitoring/alerting systems, infrastructure systems, project tracking tools, etc.). This has the side benefit of exposing you to your team's workflows, which is its own form of verification. If it’s tough to correlate logs, that’s a smell! Put a project on the backlog to fix it. If it’s hard to deploy changes, that’s a smell! Make sure the team invests in CI/CD. If something breaks and there’s no automated test to catch because it’s too hard to write a test, that’s a… you get the idea. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">The last piece is fixing things yourself when you find broken things. If all you do is point out the trash on the ground and ask people to pick it up, you will lose the team's respect. Pick the trash up yourself. The garbage can is </span><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">right there</span><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Practically speaking, this looks like writing minor bug fixes, writing terraform to change production infrastructure, deleting unused infra, running Incident Command, and occasionally waking up at 4 AM to conduct maintenance windows. Sometimes this even takes the form of larger projects that are non-blocking. I spent a few months pair programming with someone on my team to rewrite a service that has long been a buggy, poorly performing thorn in our side. We got the work 80% of the way and then handed it off to an internal team once they could take on the job. </span></p><br /><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">I don’t always get the balance right, although I’m trying to raise my awareness and solicit feedback on this regularly. I still have times when a mistake happens, and I wish I had been closer to the work. I also have times when I know I need to back off and educate the team instead of doing the work myself. My focus now is staying close enough to set the tone for the team and make the bar for quality clear.</span></p><div><span style="font-family: Arial; font-size: 10pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div></span>Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-33868456880633704772018-10-26T17:43:00.000-04:002019-04-12T14:00:24.971-04:00Why You Should Buy a Tesla Model 3<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">My wife and I have driven a Model S for over 2 years, and a Model 3 for a couple months. We get a lot of questions about whether we like the cars, Tesla in general, and whether the “cheaper Tesla” is worth buying. This post is an attempt to answer those questions, clear up some misconceptions, and present a clear case why the Model 3 is a great buy if you are in the market for a new sedan. </span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Cost</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Let’s start with the most important thing for most people who are buying a car - overall cost. The Model 3 is available in three trims right now (options add cost on top of this):</span></div>
<b id="docs-internal-guid-a12ec038-7fff-8772-a5fd-a81fb9348bcc" style="font-weight: normal;"><br /></b>
<br />
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Standard Range Plus: $39,500 and 240 miles of range</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Long Range: $49,500 and 310 miles of range (includes dual motor all wheel drive)</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Performance: $59,500 and 310 miles of range (includes dual motor all wheel drive)</span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">These numbers are all before incentives, if you buy the mid range battery and take delivery before the end of Q2, you will get a $3750 Federal Tax Credit, and whatever state incentives you have (Massachusetts </span><a href="https://mor-ev.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">cuts you a check</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> for $1500). This means the car can be as cheap as </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline;">$34,250.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Using </span><a href="https://teslanomics.co/tesla-model-3-fuel-savings-calculator/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">fairly conservative assumptions</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">, you will save $700-$1000 a year on fuel. Most people keep a new car 6 years on average, so using the low end of the range you will save $4200 on fuel over that time period, bringing the price down to ~$30,000. You will also save money on maintenance, since an electric car has about 20 moving parts, while a combustion car has ~2000. This brings the total cost of ownership for a Tesla Model 3 over 6 years roughly in line with a top end </span><a href="https://www.toyota.com/camry/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">Toyota Camry</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">To be clear: I’m not saying this is a “cheap car”, or saying that everyone can afford one, I’m just saying that the mental cost model should be “brand new fully loaded Camry / Accord” not “super luxury sedan”. The car is more affordable than it might seem at first glance.</span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Charging</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">This is probably the biggest concern for new EV owners. I’m happy to report that it’s a total non-issue, and actually a big benefit over a gas powered car. If you spend a few hundred bucks to get a </span><a href="https://www.tesla.com/sites/default/files/downloads/US/universalmobileconnector_nema_14-50.pdf" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">NEMA 14-50</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> outlet installed at home, you will wake up to a full car every morning. No more weekly trips to the gas station! </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">For long distance travel, you can take advantage of Tesla’s </span><a href="https://www.tesla.com/supercharger" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">Supercharging Network</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">, which will take you virtually anywhere you want to go. 20 minutes at the supercharger will get you roughly half a charge, so unless you are regularly taking trips well over 500 miles, this ends up being extremely convenient. If you are worried about the cost of Supercharging (since it’s no longer free with the Model 3), here’s a screenshot of our charges over the past two months:</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"><img height="353" src="https://lh4.googleusercontent.com/KSJqsqE08W3hXSVIOItZh8QWhGJVN8SCRe9lDkraCLmKaUkAaymhpwIKXxnyTmenE44tHsP2DoMLmzhQMgI0jCb8VJ5J3o0ad_rHDzK6qH11KQmnzJVxK7CApYiwzR1bHp40OL0a" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="515" /></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">A bit cheaper than a gas station, huh? Finally, you can get 6 months of 100% free supercharging by buying your Model 3 through </span><a href="http://ts.la/jonathan5948" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">my referral link</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">. You can see the rewards I get </span><a href="https://www.tesla.com/support/referral-program" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">here</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">. There are some cool ones, but the point of this post isn’t to rack up referrals, it’s to get more people driving EVs and </span><a href="http://www.jonathanklein.net/2016/10/what-you-can-do-about-global-warming.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">mitigate the impact of global warming</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">. </span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Software Updates</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Tesla still makes the only cars that get better over time with over-the-air software updates. Periodically, when you wake up in the morning your car has been improved. This can mean a sharper backup camera image, better navigation, easier HVAC controls, or even an </span><a href="https://electrek.co/2018/09/27/tesla-version-9-video-walkthrough-atari-game-easter-eggs/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">Atari emulator</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> built into the car. This is an oft-forgotten but extremely powerful feature.</span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Safety</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Tesla makes the safest cars on the road, and the Model 3 has the </span><a href="https://www.tesla.com/blog/model-3-lowest-probability-injury-any-vehicle-ever-tested-nhtsa" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">lowest probability of injury</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> of any car ever tested by the </span><a href="https://www.nhtsa.gov/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">NHTSA</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">. It’s hard to put a price on safety, but when my wife and son are riding around in the car on a daily basis, I’m comforted by the fact that it’s the best possible car to be driving.</span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Driving Experience</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Yeah, the Model 3 is fast. If you buy the performance trim, it’s </span><a href="https://www.roadandtrack.com/new-cars/road-tests/a22625274/tesla-model-3-performance-track-test/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">really fast</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">. But more than that, it’s </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">fun</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> to drive, mainly due to what people call the “mind-meld”. In a gas powered car, when you press the pedal down you have to wait for the fuel to be injected into the engine, wait for a combustion cycle, and then wait for the engine to translate that energy into wheel rotation. When you floor it in an automatic, you also (usually) have to wait for a downshift. In an electric car, there is no delay, and no shifting. You just go. Combine that with wicked acceleration, and it feels like you are teleporting to wherever you want to be. Words don’t do this feeling justice - drive it to believe it.</span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Autopilot</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">This is a controversial feature, and costs an extra $5000. If you like it and buy it, you get self parking, traffic aware cruise control, summon (great for getting in/out of tight garages), and yes, the car will drive itself on the highway. Other luxury cars have similar features, but Tesla’s is executed well and it is extremely convenient.</span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Environmental Impact</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">I happen to care a lot about this, but not everyone does, so it’s at the bottom. EVs are dramatically cleaner than their gas counterparts, which improves air quality (more immediate </span><a href="http://sites.tufts.edu/cafeh/improving-the-health-of-near-highway-communities/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">health impact</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> than environmental impact) and reduces the impact of transportation on global warming.</span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Wrapping Up</span></h2>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">There are many more small features I could list here, but these are the big ones that truly differentiate it from other cars on the market. The Model 3 is an incredible car, and if you </span><a href="https://www.tesla.com/referral/jonathan5948" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">buy one</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> I promise you won’t regret it. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Below is a short bonus section of FAQs that clear up some common misconceptions about Tesla and EVs.</span></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">FAQ:</span></h2>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">I heard Tesla can’t produce these cars. Will I actually get one?</span></div>
</li>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Tesla is making </span><a href="https://www.bloomberg.com/graphics/2018-tesla-tracker/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">over 5K Model 3’s per week</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">, and has produced over 220K cars so far. The first year was rough production wise, but in August 2018 the Model 3 was the </span><a href="https://www.teslarati.com/tesla-model-3-august-passenger-car-overall-auto-sales/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">5th best selling passenger car</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> in the US. Of all kinds. The production problems are largely in the past.</span></div>
</li>
</ul>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Isn’t the company about to go bankrupt?</span></div>
</li>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">Tesla just </span><a href="http://ir.tesla.com/static-files/725970e6-eda5-47ab-96e1-422d4045f799" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">announced Q3 earnings</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">, and made $312M in profit with $3B in cash on their balance sheet. They are planning on being sustainably profitable, and the company is in a great financial position. There was a rough phase when they were burning a lot of cash, but again that’s in the past.</span></div>
</li>
</ul>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">How long do the batteries last? </span></div>
</li>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">This isn’t like a cell phone battery. </span><a href="https://www.thestreet.com/technology/tesla-battery-degradation-14575199" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">The data shows</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> that your battery will still have 90% of its capacity after 200,000 miles. As long as you take reasonable care of your battery (follow some simple instructions that come with the car) the battery will last many many years. </span></div>
</li>
</ul>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;">What about the Long Tailpipe? Isn’t the energy powering the car produced by fossil fuels? Doesn’t manufacturing the battery use lots of energy as well?</span></div>
</li>
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: circle; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://www.fleetcarma.com/long-tailpipe-argument-debunked/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline;">This article</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline;"> clearly debunks the Long Tailpipe argument. Short version, EVs are better than gas cars for the environment, but not nearly as good if they are powered by coal. This is an argument against coal, not EVs. </span></div>
</li>
</ul>
</ul>
<br />Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-60275353441389752962017-07-12T09:54:00.001-04:002017-07-12T09:54:16.179-04:00React Boston: New England's First React.js ConferenceI'm co-organizing <a href="http://www.reactboston.com/">React Boston</a>, the first react.js focused conference in New England this fall!<br />
<br />
The conference will be held on September 23rd-24th (this is a weekend), in the heart of Boston at Wayfair's main office. It will be a single track event with topics around React itself, Relay, GraphQL, React Native, and more. The <a href="https://goo.gl/forms/e25LNsS3KXPAwO3r2">CFP is open</a>, and tickets are <a href="http://www.reactboston.com/">on sale now</a>.<br />
<br />
We really want this event to be a success, and we'd love to see there!Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-37038900305790768122016-10-15T10:03:00.001-04:002017-06-20T10:36:03.517-04:00What You Can Do About Global Warming<div style="background-color: white; color: #1d2129; font-family: "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif; font-size: 14px; letter-spacing: -0.24px; margin-bottom: 6px; margin-top: 6px;">
<i>This was originally a Facebook post, but I'm preserving it here in a slightly longer format due to the transient nature of Facebook.</i></div>
<div style="background-color: white; color: #1d2129; font-family: "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif; font-size: 14px; letter-spacing: -0.24px; margin-bottom: 6px; margin-top: 6px;">
<i><br /></i><span style="letter-spacing: -0.24px;">August 2016 was the <a href="http://www.theatlantic.com/notes/2016/09/the-hottest-august-ever/499847/">hottest August ever</a>. So was July. And June. And so on for the last 11 months. <a href="http://takvera.blogspot.com/2016/05/global-temperature-spirals-to-new.html">Here’s a scary animation</a>. No country is <a href="http://www.vox.com/2016/10/4/13118594/2-degrees-no-more-fossil-fuels">taking this seriously</a>, and if we continue on our current path the Earth will be uninhabitable in 100-200 years.</span></div>
<div style="background-color: white; color: #1d2129; font-family: "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif; font-size: 14px; letter-spacing: -0.24px; margin-bottom: 6px; margin-top: 6px;">
<span style="letter-spacing: -0.24px;"><br /></span>Global warming may seem easy to ignore, because the effects appear far off and irrelevant to people living in first world countries. Climate change denial (or even acceptance without behavior modification) is perhaps the most extreme example of <a href="https://en.wikipedia.org/wiki/Hyperbolic_discounting">Hyperbolic Discounting</a> in the history of the human race. Partly this is because it can seem impossible to make any changes yourself that will have an impact. I hope I can convince you otherwise.</div>
<div style="background-color: white; color: #1d2129; font-family: "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif; font-size: 14px; letter-spacing: -0.24px; margin-bottom: 6px; margin-top: 6px;">
<br />
I’m sure you’ve heard about global warming <a href="http://www.nature.org/ourinitiatives/urgentissues/global-warming-climate-change/threats-solutions/stronger-storms.xml">causing stronger storms</a>, <a href="http://www.climatehotmap.org/global-warming-effects/sea-level.html">rising sea levels</a>, and a variety of other long term downsides that may or may not impact you. But did you know that global warming almost certainly <a href="https://www.scientificamerican.com/article/climate-change-and-rising-food-prices-heightened-arab-spring/">contributed to the Arab Spring</a>? Or that the <a href="http://www.ucsusa.org/global_warming/science_and_impacts/impacts/impacts-of-climate-on-coffee.html#.WAIylZMrIUE">coffee</a> and <a href="https://www.scientificamerican.com/article/climate-change-could-melt-chocolate-production/">chocolate</a> crops are at risk? THE COFFEE AND CHOCOLATE CROPS. DO YOU REALLY WANT TO LIVE IN A WORLD WITHOUT COFFEE OR CHOCOLATE?!?!</div>
<div style="background-color: white; color: #1d2129; font-family: "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif; font-size: 14px; letter-spacing: -0.24px; margin-bottom: 6px; margin-top: 6px;">
<br />
I could write a long post with doomsday scenarios, but I’m more interested in changing behavior NOW, so we can mitigate the damage. Here are six things you can do immediately, in rough order of impact, that if everyone did would have an enormous impact on the problem:</div>
<ol>
<li><strike><span style="color: #1d2129; font-family: "san francisco" , , "blinkmacsystemfont" , , sans-serif;"><span style="font-size: 14px; letter-spacing: -0.24px;"><b>Vote Hillary</b> - </span></span><span style="color: #1d2129; font-weight: normal;"><span style="font-size: 14px; letter-spacing: -0.24px;">I contend that no other issues in the political landscape today really matter. If we don’t solve this problem we won’t have a world to save. And we won’t have coffee or chocolate. Hillary Clinton is the only candidate with a <a href="http://sciencedebate.org/20answers">rational approach to climate change</a> </span></span>(look at question #3)</strike></li>
<li><b>Fly less</b><span style="font-weight: normal;"> - </span>If you get on airplanes somewhat regularly, it is probably your <a href="http://www.davidsuzuki.org/issues/climate-change/science/climate-change-basics/air-travel-and-climate-change/">largest contribution to global warming</a></li>
<li><b>Buy an electric car</b> - As the grid transitions to renewable energy, auto transport will become a <a href="https://electrek.co/2016/09/26/electric-cars-impact-emissions-transport-emissions-from-electricity/">larger and larger portion of individual emissions</a>. You don’t have to buy an expensive <a href="http://ts.la/jonathan5948">Tesla</a> (although they are awesome), the <a href="http://www.chevrolet.com/bolt-ev-electric-vehicle.html">Chevy Bolt</a> is coming out imminently, is priced under $30K with tax credits, and has 238 miles of range</li>
<li><b>Reduce Individual Energy Consumption</b> - Switch to LEDs, get a Nest, keep your house a little colder this winter and put on a sweatshirt. Depending on how much you can change your usage, this could have a minor impact or a significant one. This will also save you money</li>
<li><b>Stop eating beef/lamb/pork</b> - Agriculture is a significant contributor to carbon emissions, and beef/lamb/pork <a href="http://www.skepticalscience.com/how-much-meat-contribute-to-gw.html">contribute disproportionately</a></li>
<li><b>Buy Carbon Offsets</b> - <a href="https://www.terrapass.com/">TerraPass</a> makes this very easy, and for <$200 you can make your family carbon negative. This can have a big impact, but I put it at the bottom because permanently reducing consumption has a double effect: slowing the greenhouse effect <b>and</b> preventing us from needing to offset so much carbon</li>
</ol>
<div>
<br /></div>
<div>
<span style="letter-spacing: -0.24px;">I’m personally doing or have done all of the above, and I encourage you to do the same.</span></div>
Remember, only you can prevent forest fires. I mean global warming. And also forest fires. Which <a href="http://time.com/4525178/climate-change-forest-fires/">are exacerbated by</a>, and then subsequently <a href="https://www.nwf.org/Wildlife/Threats-to-Wildlife/Global-Warming/Global-Warming-is-Causing-Extreme-Weather/Wildfires.aspx">contribute to global warming</a>!<br />
<div style="background-color: white; color: #1d2129; font-family: "San Francisco", -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif; font-size: 14px; letter-spacing: -0.24px; margin-bottom: 6px; margin-top: 6px;">
<br />
P.S. Keep those "the temperature has changed before" arguments to yourself. If you read none of the articles linked in this post, at least scroll through <a href="https://xkcd.com/1732/">the chart here</a>.</div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-30052577874648367492016-10-02T21:19:00.000-04:002016-10-02T21:19:41.009-04:00"Composer: Getting Started" Published on PluralsightMy second Pluralsight course, <a href="https://goo.gl/2NaA7F">Composer: Getting Started</a>, just went live! This is another course that's loosely based on <a href="http://jkle.in/composer">a talk</a> I've given in the past, with a lot more of the details fleshed out. The course covers the following topics:<br />
<br />
<ol>
<li>The Basics of Composer</li>
<li>Including Third Party Code</li>
<li>Autoloading Your Code</li>
<li>Composer Scripts</li>
<li>Publishing Your Own Composer Package</li>
</ol>
<div>
<a href="https://goo.gl/2NaA7F">Check it out</a> on Pluralsight today, and let me know what you think!</div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-39407517463398384232016-04-18T09:27:00.001-04:002016-04-18T09:27:34.096-04:00High Performance PHP: Now On PluralsightI've just published my first Pluralsight Course: <a href="https://www.pluralsight.com/courses/php-highly-performant">High Performance PHP</a>! I've <a href="http://jkle.in/talks">spoken about this topic</a> a number of times in the past, so it seemed like a good fit for my first foray into the screen casting world. This course also has much more that PHP optimizations in it. The five modules are:<br />
<br />
<br />
<ol>
<li>Optimizing PHP Code</li>
<li>Choosing and Configuring a Web Server</li>
<li>Database Optimization</li>
<li>Performance and Load Testing</li>
<li>Investigating Performance Tradeoffs of PHP Frameworks</li>
</ol>
<div>
<br /></div>
<div>
Modules two, three and four are largely language agnostic, so even if you aren't using PHP you can get a lot out of this course.<br />
<br />
Here's a demo clip going over the different MySQL forks and how best to configure MySQL:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/TlPuOdYwZfg/0.jpg" src="https://www.youtube.com/embed/TlPuOdYwZfg?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I hope you enjoy the course, and I'd love to hear any feedback you have! Watch the full course <a href="https://www.pluralsight.com/courses/php-highly-performant">here</a>.</div>
</div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-19701925236214539222015-05-08T20:01:00.000-04:002015-05-08T20:01:29.821-04:00Joining Attend.comWhen I left Etsy at the end of February, it was because I wanted to join something small where I could have a lot of impact. I did that, becoming a co-founder/CTO at a three person startup in Boston in the online grocery space. Unfortunately that business didn't work out, and closed its doors for good on April 6th. That left me wondering what to do next, and I spent the month of April talking to a lot of companies and exploring opportunities. I wanted to stick with my original plan of joining a small company, but I decided to make post-Series A companies my main focus, to take away some of the risk that I experienced at a seed stage, pre-product company.<br />
<br />
I was introduced to <a href="https://www.attend.com/">Attend</a> by a friend, and the company fit all of my criteria. It has a popular product in the market, has around 30 employees (~5 full-time engineers), just raised a <a href="https://www.crunchbase.com/organization/attendware">Series A</a>, is in growth mode, and has a great team. There's a ton of potential for me to learn technically there and grow as a leader. Attend provides an event management software product, which is also appealing to me since I like to go to a <a href="http://jkle.in/talks">lot of conferences</a>. The company's current focus is in higher ed, but it's only a matter of time before we tackle the tech conference circuit :-).<br />
<br />
I'm starting this coming Tuesday as the "Lead Front End Engineer", although I plan on touching a lot more than just the front-end. That's where the biggest need is right now, but I'm excited to apply my knowledge across all layers of the stack and help grow and scale the business.<br />
<br />
I'm really looking forward to this next challenge - wish me luck!Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-29878218087646250802015-04-30T12:28:00.001-04:002015-04-30T12:28:36.823-04:00Reflecting on 2.5 Years as a RemoteFebruary 27th was my last day at Etsy, concluding 2.5 years as a remote employee (more on what's next in a future post). A lot has been written about remote work, including a <a href="http://www.amazon.com/gp/product/B00C0ALZ0W/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00C0ALZ0W&linkCode=as2&tag=wwwjonathankl-20&linkId=BKQGAIZTLNEESAI4">recent book</a>, but I wanted to talk about my own experience and some of the lessons that I learned over the past few years.<br />
<br />
Overall Etsy does a great job with remote employees, and it continues to get better. During my last couple of weeks at Etsy they were rolling out a new policy that added a number of additional benefits for remotes (including the ability to bring your spouse with you to the main Etsy office in Brooklyn for a week once a year). All that said, at the end of the day I believe that how much you enjoy working remotely is more a function of your personality than the perks that your company provides.<br />
<br />
Generally I think there's a correlation between how introverted you are and how much you enjoy remoteness. Here's how I put it in my last lecture at Etsy, discussing how my expectations <span style="font-family: Arial; font-size: 15px; white-space: pre-wrap;">matched reality.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-118Rko2FbQg/VUI8eP0b_UI/AAAAAAAAESg/LFVqOV4GxaA/s1600/expectation.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-118Rko2FbQg/VUI8eP0b_UI/AAAAAAAAESg/LFVqOV4GxaA/s1600/expectation.jpg" height="184" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-6gVntqdPEKM/VUI8eHFqXkI/AAAAAAAAESk/3XDOLYvHt2c/s1600/reality.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-6gVntqdPEKM/VUI8eHFqXkI/AAAAAAAAESk/3XDOLYvHt2c/s1600/reality.jpg" height="183" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Why the mismatch? A few reasons:<br />
<br />
<ul>
<li>Being remote makes you want to get out more</li>
<li>I like having close friends at work, and this is harder as a remote</li>
<li>The pace of learning is slower as a remote, and a big reason why I came to Etsy was to learn from the amazing engineering team that Etsy has</li>
<li>Fear Of Missing Out translates to the Reality Of Missing Out. There are always activities, free food, and get-togethers that are happening in the office, and as a remote you can't take part in these things</li>
</ul>
<div>
One thing that really stuck out to me throughout my time at Etsy and from reading a lot about remote work is that really successful remote companies/teams have one thing in common: they are mostly remote. For a long time I was the only remote on my team, and part of a company that has roughly 10% remotes. While Etsy does a great job with their remotes, it's tough when you are a small minority at the company or on your team. </div>
<div>
<br /></div>
<div>
Alright so it's challenging, but what are some specific things that companies can do to make remote life more enjoyable?</div>
<div>
<br /></div>
<div>
<b>Team Off-Sites</b></div>
<div>
<br /></div>
<div>
My team came up to Boston for a week, stayed in an Airbnb near my house, and generally just hung out with me and got work done. This was a great way to make me feel like a true member of the team, get to know the folks on my team a little better, and interact socially as opposed to only communicating in a work context. I highly recommend doing team off-sites if you have remotes at your company. </div>
<div>
<br /></div>
<div>
<b>Communication Tools</b></div>
<div>
<br /></div>
<div>
You need to have some sort of real-time chat application with remotes. Etsy uses IRC, many companies these days are using Slack. Pick something and have as much conversation as possible there. </div>
<div>
<br /></div>
<div>
You also need to have outstanding A/V setups in all of your conference rooms. Every time I was part of a meeting with 6+ people huddled around a laptop trying to video chat with me I died a little bit inside. It's ineffective, frustrating, and makes remotes feel like they aren't valued members of the conversation. Luckily Etsy recognized this, upgraded all of their conference rooms, and for the past year or so that I was there this wasn't a problem.</div>
<div>
<br /></div>
<div>
Buy high quality webcams for your remotes. The difference between a $100 webcam and the built in one in a Macbook is incredible, and the cost is negligible. This should just come as part of the package when a remote starts. Here's your computer, here's your webcam. </div>
<div>
<br /></div>
<div>
<b>Remote Bootcamps</b></div>
<div>
<br /></div>
<div>
If your company is serious about having remotes, every employee should have to go through a "remote bootcamp", where they work from home for 2+ weeks straight. This will uncover all sorts of small barriers that are likely easy to fix, and will help everyone understand the challenges of remote work. </div>
<div>
<br /></div>
<div>
<b>Trips to the Office</b></div>
<div>
<b><br /></b></div>
<div>
During my time at Etsy I came to the Brooklyn office roughly once every two months, for a full week. Really successful remotes tended to come more often, up to once every month. This meant that they were in the office 25% of the time, which can be pretty disruptive to your home life, but definitely helps work relationships. I have a lot going on in Boston, so it was tough for me to come to the office more often. I think it's great that Etsy encouraged frequent trips and paid for all of them, but the solution to being a great remote can't simply be "come to the office more". </div>
<div>
<br /></div>
<div>
One big takeaway from these trips was that from my perspective the trip was special - something fairly unusual where I got to spend a lot of time with my coworkers and feel like I was a true part of the team. For everyone else in the office, generally it was just another day at work. My team did a great job planning lunches, dinners, and in person meetings when I was there, and I think it's really important to have a pretty structured week when remotes are in town. Without deliberate planning, you might spend 80% of your week sitting at a desk in the office coding away with headphones on - not the best way to spend your time. A big part of the responsibility for this planning rests with the remote employee, but anything you can do to facilitate that as a team member is beneficial. </div>
<div>
<br /></div>
<div>
<b>Wrapping Up</b></div>
<div>
<b><br /></b></div>
<div>
I'm glad that I had the opportunity to spend a couple of years as a remote. I learned a lot about the benefits and drawbacks of remote work, and how to do it effectively. I saw first hand what works and what doesn't, and what companies can do to make remote work as enjoyable as possible. I think my personality is slightly better suited to working closely with other people in an office environment, so I am unlikely to take another remote job in the near future, but I think having remotes can be a great way to access the best talent from around the world. If you are going to take a remote job, just be aware of the challenges and make sure that you are working for a company that takes remote work seriously (to reiterate, Etsy is a great fit in that regard).</div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-90423801612631786832014-11-05T09:08:00.000-05:002014-11-05T09:08:18.671-05:00Refocusing the Content on This BlogI've decided to narrow the focus of this blog, exclusively covering the following topics:<br />
<br />
<ul>
<li>Software Engineering</li>
<li>Web Technologies</li>
<li>Web Performance</li>
<li>My Career </li>
</ul>
<div>
<br /></div>
<div>
All of fitness related posts (pushupdates, GORUCK events, etc.) are moving to my new blog at <a href="http://fitness.jkle.in/">fitness.jkle.in</a>. I realize that the overlap between people who care about web technology and people who care about my crazy fitness goals is vanishingly small, so head <a href="http://fitness.jkle.in/">over there</a> and subscribe if you are interested in the latter.</div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-10198056305339898752014-09-21T21:25:00.000-04:002014-09-21T21:25:55.378-04:00GORUCK Light After Action ReviewI completed my first <a href="http://goruck.com/events">GORUCK event</a> on 9/13, a <a href="https://www.goruck.com/light">Light</a> in Boston. We covered about 8 miles in 5 hours and I was carrying roughly 30 pounds. Overall it met my expectations as a challenging event, although with significantly less focus on calisthenics than I expected. The vast majority of our time was spent rucking around Boston, with minimal time spent doing push-ups, flutter kicks, etc.<br />
<br />
My class met at the Soldiers and Sailors Monument in the center of Boston Common, although we quickly had to move to the garden nearby to avoid a marijuana legalization festival. Our cadre checked everyone in, opened our rucks to check that we had the right amount of weight, and had us form up to listen to a little background on GORUCK. This particular event was special because it was a 9/11 commemorative event, so we spent extra time talking about the events of that day and why the cadre chose to serve in the military. We were informed that this “would not be a normal Light” and to “get ready for a difficult event”. Being that this was my first GORUCK experience, the apprehension started to mount a little bit.<br />
<br />
We were taken over to the 9/11 memorial in Boston Garden and one of our cadre talked a bit more about the loss of life that happened on that day, what it meant to the people who were involved, and all of the lives that it touched. It was clear from the outset that this was going to be a serious, reflective event. Overall the class seemed motivated, respectful, and ready to begin. We had a moment of silence at this memorial: each person doing 200 flutter kicks on their back quietly - our first physical challenge.<br />
<br />
Our class was large (66 people) so one of the first orders of business was to get a clear count and split us up among the two cadre. Unfortunately our group had a little trouble counting off, and we got a quick lesson in attention to detail. Counting off in a front leaning raise with a 30 pound ruck gets tiring quickly, especially when you have to count 60+ people 5-7 times.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-zxvwJqUNdRU/VB9idGT9hxI/AAAAAAAAEKc/StBPGlvly54/s1600/IMG_3110.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-zxvwJqUNdRU/VB9idGT9hxI/AAAAAAAAEKc/StBPGlvly54/s1600/IMG_3110.JPG" height="300" width="400" /></a></div>
<br />
After this we did a few more exercises in the garden, practiced some buddy carries, and split up into two groups of 33 people each. The rest of the event consisted of the two groups racing each other around Boston, visiting various landmarks, statues, and memorials that were relevant to either 9/11, servicemen and women, or the founding of our nation. The loser of each race had to pay some sort of penalty, typically a few <a href="http://www.wikihow.com/Do-a-Burpee#Doing_a_Basic_Burpee_sub">burpees</a> or some crab walking. On our first movement my team made the mistake of trying to cross a street when there wasn’t enough time left on the walk signal, and we stranded half of our team on the other side of the street. This was a stupid mistake (that I’m at least partially to blame for), and we paid for it by <a href="https://www.dropbox.com/s/ey3xuapvo79yen6/IMG_3121.JPG?dl=0">bear crawling</a> and spending some time sitting in a fountain at our destination. It took this mistake for me to realize how long it takes 33 people with rucks and flags to cross a street (obvious hint: never try to cross when the red hand is already flashing).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-babyItoEnHU/VB9jVxTZ5VI/AAAAAAAAEKk/uSo94FnFmOY/s1600/IMG_3139.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-babyItoEnHU/VB9jVxTZ5VI/AAAAAAAAEKk/uSo94FnFmOY/s1600/IMG_3139.JPG" height="300" width="400" /></a></div>
<br />
Another lesson that we had to learn was how important it is to pick a sustainable pace. We had a wide range of fitness abilities on our team, and this resulted in people in the front breaking into a run, folks in the back yelling for us to slow down, and then other people yelling for us to speed up again. I know that a few of the team leaders got confused during this process, and weren’t sure how to fix the problem. In addition, some of the more experienced members of the group were frustrated that we were pounding the weaker members into the ground with the haphazard pace. My takeaway from this is that it is necessary to circulate among the entire group, make sure that people are okay, and move the slowest members to the front of the column so they can set the pace. This way you can keep up a consistent “GORUCK shuffle” that everyone can sustain for the duration of the movement. It pays to be a winner in these races, but it is more important to make sure that everyone is having a good time and that no one is left behind - especially during a GORUCK Light (the shortest event they offer).<br />
<br />
We finished the event where we started, back at the garden and at the 9/11 memorial. After some final words about the people who lost their lives in the attack, we told each other our stories about where we were during it, and how it impacted our lives. This was a powerful reminder of the damage that was done that day, and it was also a good way to connect with the other members of the class. While this was happening, the cadre handed out our patches and then had us form up one final time to say goodbye. I know that a lot of the people who participated in this event will be back for another one, and the experience made me even more excited for the <a href="https://www.goruck.com/challenge#.VB93QytkGTc">Challenge</a> that I’m doing on Halloween night.<br />
<br />
Physically the event was difficult, and I was sore for 3 solid days afterwards (my shoulders were the worst part by far). That said, I really think that as the website states anyone who can complete a 5K can finish a GORUCK Light. The more you train the less you are going to suffer, but even someone with a really modest level of fitness can gut out a Light and have a great time. If this kind of thing sounds even remotely interesting to you, I highly recommend signing up. You will get way more out of it than your typical road race or obstacle race, and there’s a good chance that you’ll make some new friends.<br />
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-MV_PcqNoDXo/VB9jlAEObgI/AAAAAAAAEKs/Q84JtiW4e74/s1600/IMG_3171.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-MV_PcqNoDXo/VB9jlAEObgI/AAAAAAAAEKs/Q84JtiW4e74/s1600/IMG_3171.JPG" height="300" width="400" /></a></div>
<br /></div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-20537783253230348552014-07-30T19:00:00.000-04:002014-07-30T19:00:03.582-04:00Fixing jQuery Animate FlickeringI just spent over a hour wrestling with this bug, and I'm hoping this post will help spare someone else the same pain.<br />
<br />
The problem that I ran into was an annoying flicker when using the jQuery <a href="http://api.jquery.com/animate/">.animate()</a> function to change the opacity of a DOM node. I did a bunch of Googling, but none of the solutions worked for me. I tried:<br />
<br />
<ul>
<li><a href="http://stackoverflow.com/questions/10614446/jquery-flicker-when-using-animate-scrollto">Calling e.preventDefault()</a> in the event handler.</li>
<li><a href="http://stackoverflow.com/questions/19181776/how-to-stop-the-screen-from-flickering-right-before-jquerys-animate-executes">Using return false;</a> in the event handler (this was being done already).</li>
<li><a href="https://coderwall.com/p/wlwudw">Calling .stop(true, true)</a> on the node being animated.</li>
<li>Calling .off() on the animated node to remove all event handlers</li>
</ul>
<div>
<br />
What ended up working for me was <b>removing a CSS transition from the element being animated</b>. </div>
<div>
<br /></div>
<div>
The code in question (simplified):<br />
<br /></div>
<pre class="brush: js">listing.animate({opacity: 0}, function() {
// some code
});
</pre>
<br />
<div>
<br />
The listing element had the following CSS rules applied (simplified by removing vendor prefixes):
</div>
<pre class="brush: css">.listing-card {
background: #fff;
position: relative;
border: 1px solid #ececec;
border-radius: 3px;
box-sizing: border-box;
transition: all .1s;
margin-bottom: 26px;
}
</pre>
<br />
<div>
I deleted the transition and the flickering went away completely.<br />
<br />
If none of these solutions work for you, I suggest doing the following to troubleshoot your specific issue:<br />
<br />
<ul>
<li>Make a button on the page that toggles your animation back and forth.</li>
<li>Open up <a href="https://developer.chrome.com/devtools/index">Chrome DevTools</a>, and start deleting HTML, testing the animation with the button after each deletion until you have a minimal test case.</li>
<li>Now start turning off CSS rules in DevTools until the animation works smoothly without flickering</li>
</ul>
<div>
<br />
Hopefully this helps someone else avoid a few hours of debugging!</div>
</div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-72566638099382644902014-07-07T07:36:00.000-04:002014-07-07T07:36:37.836-04:00The Road to 100 Consecutive Push-upsIn addition to <a href="http://www.jonathanklein.net/2012/04/1000000-push-ups.html">my goal of doing one million push-ups</a> by the age of 50, I always wanted to be able to do 100 consecutive push-ups. I started training heavily towards this goal on February 1st of this year, and hit that milestone on May 18th. It took a bit of experimentation to find out what worked to increase my push-up max, and there’s a lot of misinformation around this particular goal on the web, so I’m hoping that this post can serve as a useful resource for people tackling this challenge.<br />
<br />
<b>A Quick Word of Warning</b><br />
<br />
If you search for recommendations on how to do 100 consecutive push-ups, you will without a doubt stumble upon http://hundredpushups.com. This site, in a word, is unrealistic. On two separate occasions I’ve attempted to follow their program, and haven’t come anywhere near 100 push-ups in the final attempt. The site doesn’t even make sense…anyone should be able to go from ~10 push-ups to 100 in 6 weeks? That’s a little aggressive. Also they jump people who can do 50+ push-ups to week 3, so they are supposed to go from 50 push-ups to 100 in 4 weeks. This means increasing your push-up maximum by 12 per week, which I would imagine is impossible for most people (it certainly was for me). <br />
<br />
<b>What Worked For Me </b><br />
<br />
The workout that I ended up with was a Monday/Wednesday/Friday schedule with an exhaustion test every other Sunday. Each workout consisted of 10 exhaustion sets with a one minute break between each one, alternating between the following kinds of push-ups:<br />
<ol>
<li>Arms at a <a href="http://yourstudentbody.com/wp-content/uploads/2013/01/Man-Push-Up.jpg">45 degree angle</a></li>
<li>Military style (<a href="http://media2.onsugar.com/files/2013/07/26/864/n/1922729/a565503ffcbea220_push-up-1.preview.jpg">picture</a>, <a href="https://www.youtube.com/watch?v=5i-q3D3ty6s">video</a>).</li>
<li><a href="http://looklikeanathlete.com/wp-content/uploads/2011/09/push-up-routine.jpg">Diamond</a></li>
<li><a href="http://thedcladies.com/wp-content/uploads/2010/06/push-ups1.jpg">Wide angle</a></li>
</ol>
Incorporating a variety of push-ups is important, because it exercises different muscle groups and builds overall strength and stability in your core and shoulders. This is what ultimately allows you to increase your push-up max in a healthy and sustainable way.<br />
<br />
I would do sets in this order twice, and then finish with another set of #1 and #4 to close out the 10 sets. Every push-up was done on the “<a href="http://www.amazon.com/gp/product/B008DNAJ5M/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B008DNAJ5M&linkCode=as2&tag=wwwjonathankl-20&linkId=P5YFMWO3ODB5BE4U">Perfect Pushup</a>” rotating handles. This was primarily to preserve my wrists, and also to add a little difficulty by engaging stabilizer muscles and allowing me to go down further. <br />
<br />
As with any workout plan where the goal is to build muscle and increase strength, the rest of your health has to be at the top of your mind as well. This means:<br />
<br />
<ul>
<li>Getting enough <a href="http://www.jonathanklein.net/2013/05/sleep-testing.html">high quality sleep</a></li>
<li>Eating enough, and eating well (minimal sugar intake, minimal processed foods, enough protein, etc.). This is especially important <a href="http://www.webmd.com/diet/features/what-eat-before-during-after-exercise">post-workout</a></li>
<li>Doing mobility work - stretching/yoga/massage/foam rolling/etc. </li>
</ul>
<br />
One thing that came up during my research was doing pulling exercises to balance out all of the push-ups. This could be pull-ups, rowing, <a href="https://www.youtube.com/watch?v=cszJcRz5UB0">reverse push-ups</a>, or a similar exercise. Unfortunately I don’t have any of the necessary equipment to do those kinds of exercises at home, so I skipped that recommendation. It’s possible that it would have accelerated my path to 100 push-ups, and it makes sense if you have the ability to do that. <br />
<br />
With the plan outlined above, I was able to increase my push-up max by around 5 push-ups every two weeks, and in about 15 weeks I went from a starting maximum of 62 to finishing my goal of 100 consecutive push-ups. The full details of my training are in my <a href="https://docs.google.com/spreadsheet/ccc?key=0AuZTHPrAdDjXdDhRYjVjQ1RySjBCT0lVU3pycWQ2MXc#gid=3">master push-up spreadsheet</a>.<br />
<br />
<b>Next Steps</b><br />
<br />
I still have ~920,000 push-ups left in my goal of doing a million by the age of 50, so I had to find a sustainable training program going forward. After I did the hundred I took some time off, and as a result I have fallen a bit behind on my overall goal. My current approach is a “race to 300” workout, where I do the exact same workout detailed above, but instead of doing 10 sets I try to get to 300 push-ups in as few sets as possible (with a one minute break between sets). On the off days I try to do around 100 push-ups throughout the course of the day in sets of 25, just to keep making progress towards my goal. With summer schedules and a bunch of travel I haven’t been as consistent with this approach as I would like, but will be focusing on it throughout July and try to catch up. <br />
<br />
Reaching this goal was a satisfying milestone on my way to one million push-ups, but it also reminded me how far I have to go. This year has definitely been more of a grind than the first two, and I'm contemplating raising my daily average so I can finish the challenge earlier. I'll talk more about that in my 2014 update, sometime in November or December.Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-91041479905190627772014-02-25T09:19:00.000-05:002014-02-25T09:19:55.169-05:00Revisiting the "Cookieless Domain" Recommendation<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">For a long time one of the recommendations for a faster site has been to “serve your static content from a cookieless domain”. This suggestion shows up in the <a href="https://developers.google.com/speed/docs/best-practices/request#ServeFromCookielessDomain">Google best practices</a>, the <a href="http://developer.yahoo.com/performance/rules.html#cookie_free">Yahoo! performance rules</a>, and in Phil Dixon’s <a href="http://www.youtube.com/watch?v=nKsxy8QJtds&t=19m26s">famous Shopzilla case study</a> from Velocity 2009, where he states that implementing this one best practice resulted in a 0.5% improvement in top line revenue. Case closed, right? Well, due to some recent experimentation we have been doing at <a href="http://www.etsy.com/">Etsy</a>, we had reason to believe that people might be taking this too far. Specifically, our testing indicated that serving CSS files from the same domain as the base page might be a performance win. </span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><b>Why is this a Good Idea?</b></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span></span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">CSS blocks page rendering, because if it didn’t then users would get the dreaded <a href="http://en.wikipedia.org/wiki/Flash_of_unstyled_content">flash of unstyled content</a>. This is the reason why another performance recommendation is to <a href="https://developers.google.com/speed/docs/best-practices/rendering#PutCSSInHead">put CSS in the head</a> of the document, and to combine CSS files and minify them. Getting CSS to start downloading as quickly as possible and downloading as little of it as possible is critical to a fast experience. Here’s the rub: when you put CSS (a static resource) on a cookieless domain, you incur an additional DNS lookup and TCP connection before you start downloading it. Even worse, if your site is served over HTTPS you spend another 1-2 round trips on TLS negotiation. Since the CSS blocks the rest of the page resources, this is extremely expensive. In this case the entire page is waiting on DNS, TCP, and TLS before anything else happens. On high latency networks this can take hundreds of milliseconds, and will ruin any chance of <a href="http://www.youtube.com/watch?v=Il4swGfTOSM">breaking the 1000ms time to glass mobile barrier</a>. This is why in that video Ilya suggests inlining the critical CSS that you need to render the page. </span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><b>The Current State of Affairs</b></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">All of this begs the question: “What is the current state of things? Do big sites already know this, and put their CSS on the root domain?” I set out to answer this question, and empirically prove which approach wins out - putting CSS on the root domain and incurring the overhead of some extra cookies, or putting it on a cookieless domain and suffering the extra DNS lookup and TCP connection. I started by surveying the top 10 US Alexa sites </span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">(Google, Facebook, YouTube, Yahoo!, Wikipedia, Twitter, LinkedIn, Amazon, Wordpress, and eBay) </span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">to see where they stand</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">Almost universally, the top sites (who are obeying this best practice and others) are putting their CSS on a cookieless domain. Google is an outlier because the search page is simple and all CSS is inlined, most likely for the reasons that Ilya outlines in the video above. </span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">Among the rest, </span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">Wordpress is the only site that isn’t serving static assets from a cookieless domain, and it’s not clear if this is a deliberate choice to improve performance, or if it is just to reduce complexity. Armed with this knowledge, I set up a test to see if these sites could be hurting their performance with this approach.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><b>Experimentation</b></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">To make the experiment as realistic as possible, I selected five sites from the ones above to test, and made sure that they all had real content on their homepages as opposed to just a login splash page:</span></span><br />
<ol>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">Amazon</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">YouTube</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">Yahoo!</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">eBay</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">Wikipedia</span></li>
</ol>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">I wanted to eliminate as many external factors as possible, like server side load time, different locations, and network variations, so my methodology was the following:</span><br />
<ol>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">Save the HTML from each of the sites above to a VM that I control. </span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">The server is the smallest <a href="https://www.digitalocean.com/?refcode=d8968c3337aa">DigitalOcean</a> VM, running nginx on CentOS 6.4.</span></span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">Ensure that all static resources are still coming from the original domains.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">Run each site through 9 WebPagetest runs using Chrome (first view only) with a cable connection, and take the median run as the “before” time.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">For the “after” times, manually download all of the CSS referenced by each site to my server, and reference it relatively (e.g. /css/amazon1.css). Ensure that the same number of CSS files are being downloaded, and that the sites still look identical to the “before” runs.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">Use nginx to set a 500 byte cookie, to simulate the downside of having static assets on a cookied domain. </span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">Run 9 more WebPagetest runs for each site.</span></li>
</ol>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">This approach gives a pretty clear comparison between serving CSS from the root domain and from a cookieless domain. I selected 500 bytes as the cookie size because it loosely matches the site that was setting the largest cookies from my test population (eBay). The other four sites set significantly fewer cookie bytes. </span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">Your results may vary if your site sets many kilobytes of cookies, but then again if that’s the case perhaps you should consider reducing the number of cookies you set. One approach that works well is to set a unique identifier in the cookie and store the data on the server, so you don’t need to ship those bytes back and forth on every request.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><b>Results</b></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">The raw data is at the bottom of the post, but the results are conclusive for this particular test - <b>putting CSS on the root domain is a clear win for all sites that I tested</b>. Here is the average improvement for the metrics that I measured:</span></span><br />
<br />
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="*"></col><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border: 1px solid #000000; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Metric</span></div>
</td><td style="border: 1px solid #000000; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Percentage Improvement</span></div>
</td></tr>
<tr style="height: 0px;"><td style="border: 1px solid #000000; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Load Time</span></div>
</td><td style="border: 1px solid #000000; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">10.3%</span></div>
</td></tr>
<tr style="height: 0px;"><td style="border: 1px solid #000000; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Start Render</span></div>
</td><td style="border: 1px solid #000000; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">27.8%</span></div>
</td></tr>
<tr style="height: 0px;"><td style="border: 1px solid #000000; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/metrics/speed-index" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Speed Index</span></a><span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
</td><td style="border: 1px solid #000000; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">20.8%</span></div>
</td></tr>
</tbody></table>
</div>
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">The tests showed a significant decrease in both Start Render Time and Speed Index after moving CSS to the root domain, and the latter metric is rapidly becoming the go-to option for synthetic tests. This is a huge improvement for an extremely small change. It’s worth pointing out that the CSS file(s) on the root domain should still be cached at your CDN. Even if you aren’t caching HTML, you can still put your root domain through a CDN and configure it to only cache certain content types (like text/css). There is another benefit from doing this: putting your root domain through a CDN allows you to terminate client TCP/TLS connections <a href="http://chimera.labs.oreilly.com/books/1230000000545/ch04.html#TLS_EARLY_TERMINATION">at the edge</a>, dramatically reducing the latency that your users experience. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">Moving your CSS to the root domain has other benefits in the world of <a href="http://www.mnot.net/blog/2014/01/30/http2_expectations">SPDY/HTTP 2.0</a>. Header compression means that the cost of extra cookies is much lower, and HTTP multiplexing allows you to reuse TCP connections for multiple resources on the same domain. As long as you keep your cookies to a reasonable size (ideally well under a kilobyte), they won't cause an extra round trip, and you will be much better off having your critical resources on the same domain as the base page, with or without SPDY. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">These results could be further validated by re-running this test with different network characteristics, browsers, and locations, but the numbers are so large that I would expect a similar directional change regardless of the specific test configuration. The fact that I ran this on a cable connection is relevant as well - for people on mobile networks this should have an even <i>bigger</i> impact, since DNS lookups and TCP connections take much longer when latency is high. I'm hoping to validate these assumptions with real user monitoring data soon. </span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><b>Conclusion</b></span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">First of all, I want to be clear that this experiment only looked at the impact of moving CSS to the root domain. It is almost certainly the case that keeping images on a cookieless domain is a performance win. Images don’t block render, there are typically a lot of them on a page, and having them on another domain can make CDN configuration easier. When it comes to JavaScript, assuming you are <a href="https://developers.google.com/speed/docs/best-practices/mobile#DeferParsingJS">deferring JavaScript</a> in some way, having it on a cookieless domain is probably a good thing as well. If your JS is loaded via blocking script tags in the head, you might want to experiment with putting it on the root domain (or just move it out of the head). </span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">With that caveat out of the way, I believe that this experiment conclusively </span></span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;">shows</span><span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;"> that every site currently loading its CSS from a cookieless domain should <i>test</i> loading it from the root domain, to see if it improves performance and business metrics. </span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">Synthetic tests are useful, but it would be great to see some real world data on what kind of impact this has on actual users. There could be implementation details that made this test look more effective than it will be on actual sites, and <a href="http://www.etsy.com/">Etsy</a> will hopefully be publishing data on how this impacts production traffic in the near future.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span><span style="font-family: Arial, Helvetica, sans-serif;"><span style="line-height: 18.399999618530273px; white-space: pre-wrap;">To me this shows that we have to think logically about the rules we are following. In this particular case we are dealing with two valid best practices: reduce the number of bytes on the wire, and reduce the number of DNS lookups on your page. In cases like this where there are tradeoffs to be made, it’s worth testing which approach works best for your content.</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif; line-height: 18.399999618530273px; white-space: pre-wrap;"><i>Raw Data</i></span><br />
<br />
<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: 1px solid #ccc; font-family: arial,sans,sans-serif; font-size: 13px; table-layout: fixed;"><colgroup><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col></colgroup><tbody>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Amazon"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">Amazon</td><td data-sheets-formula="=HYPERLINK("http://www.webpagetest.org/result/140224_SM_7ca42f2bc89660c7352212241d087c60/","Before")" data-sheets-value="[null,2,"Before"]" style="color: #1155cc; font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; text-decoration: underline; vertical-align: bottom;"><a class="in-cell-link" href="http://www.webpagetest.org/result/140224_SM_7ca42f2bc89660c7352212241d087c60/" target="_blank">Before</a></td><td data-sheets-formula="=HYPERLINK("http://www.webpagetest.org/result/140224_PT_74826a95f7d83ef8f642066363dfdd07/","After")" data-sheets-value="[null,2,"After"]" style="color: #1155cc; font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; text-decoration: underline; vertical-align: bottom;"><a class="in-cell-link" href="http://www.webpagetest.org/result/140224_PT_74826a95f7d83ef8f642066363dfdd07/" target="_blank">After</a></td><td data-sheets-value="[null,2,"Difference"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">Difference</td><td data-sheets-value="[null,2,"% Difference"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">% Difference</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Load Time"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Load Time</td><td data-sheets-value="[null,3,null,1.282]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">1.282</td><td data-sheets-value="[null,3,null,0.956]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.956</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.32600000000000007]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.326</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.2542901716068643]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">25.43%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"First Byte"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">First Byte</td><td data-sheets-value="[null,3,null,0.11]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.11</td><td data-sheets-value="[null,3,null,0.115]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.115</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,0.0050000000000000044]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.005</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,-0.045454545454545414]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-4.55%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Start Render"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Start Render</td><td data-sheets-value="[null,3,null,0.693]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.693</td><td data-sheets-value="[null,3,null,0.593]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.593</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.09999999999999998]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.1</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.14430014430014426]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">14.43%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Speed Index"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Speed Index</td><td data-sheets-value="[null,3,null,922]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">922</td><td data-sheets-value="[null,3,null,706]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">706</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-216]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-216</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.2342733188720173]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">23.43%</td></tr>
</tbody></table>
</div>
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: 1px solid #ccc; font-family: arial,sans,sans-serif; font-size: 13px; table-layout: fixed;"><colgroup><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col></colgroup><tbody>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"YouTube"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">YouTube</td><td data-sheets-formula="=HYPERLINK("http://www.webpagetest.org/result/140224_0J_12bd91f6e656ad3e1c161dc30807560c/","Before")" data-sheets-value="[null,2,"Before"]" style="color: #1155cc; font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; text-decoration: underline; vertical-align: bottom;"><a class="in-cell-link" href="http://www.webpagetest.org/result/140224_0J_12bd91f6e656ad3e1c161dc30807560c/" target="_blank">Before</a></td><td data-sheets-formula="=HYPERLINK("http://www.webpagetest.org/result/140224_7H_a1160b91547af37274e26b03c06cd5eb/","After")" data-sheets-value="[null,2,"After"]" style="color: #1155cc; font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; text-decoration: underline; vertical-align: bottom;"><a class="in-cell-link" href="http://www.webpagetest.org/result/140224_7H_a1160b91547af37274e26b03c06cd5eb/" target="_blank">After</a></td><td data-sheets-value="[null,2,"Difference"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">Difference</td><td data-sheets-value="[null,2,"% Difference"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">% Difference</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Load Time"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Load Time</td><td data-sheets-value="[null,3,null,1.103]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">1.103</td><td data-sheets-value="[null,3,null,1.384]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">1.384</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,0.2809999999999999]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.281</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,-0.254759746146872]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-25.48%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"First Byte"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">First Byte</td><td data-sheets-value="[null,3,null,0.112]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.112</td><td data-sheets-value="[null,3,null,0.109]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.109</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.0030000000000000027]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.003</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.0267857142857143]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">2.68%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Start Render"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Start Render</td><td data-sheets-value="[null,3,null,1.086]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">1.086</td><td data-sheets-value="[null,3,null,0.695]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.695</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.3910000000000001]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.391</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.36003683241252316]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">36.00%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Speed Index"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Speed Index</td><td data-sheets-value="[null,3,null,7176]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">7176</td><td data-sheets-value="[null,3,null,6406]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">6406</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-770]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-770</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.10730211817168334]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">10.73%</td></tr>
</tbody></table>
</div>
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: 1px solid #ccc; font-family: arial,sans,sans-serif; font-size: 13px; table-layout: fixed;"><colgroup><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col></colgroup><tbody>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Yahoo!"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">Yahoo!</td><td data-sheets-formula="=HYPERLINK("http://www.webpagetest.org/result/140224_YF_83e0830180d99c005348b41b3b084da9/","Before")" data-sheets-value="[null,2,"Before"]" style="color: #1155cc; font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; text-decoration: underline; vertical-align: bottom;"><a class="in-cell-link" href="http://www.webpagetest.org/result/140224_YF_83e0830180d99c005348b41b3b084da9/" target="_blank">Before</a></td><td data-sheets-formula="=HYPERLINK("http://www.webpagetest.org/result/140224_CG_3a16cc224ac7343a89dc0749a0c820cf/","After")" data-sheets-value="[null,2,"After"]" style="color: #1155cc; font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; text-decoration: underline; vertical-align: bottom;"><a class="in-cell-link" href="http://www.webpagetest.org/result/140224_CG_3a16cc224ac7343a89dc0749a0c820cf/" target="_blank">After</a></td><td data-sheets-value="[null,2,"Difference"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">Difference</td><td data-sheets-value="[null,2,"% Difference"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">% Difference</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Load Time"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Load Time</td><td data-sheets-value="[null,3,null,2.828]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">2.828</td><td data-sheets-value="[null,3,null,2.33]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">2.33</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.4979999999999998]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.498</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.17609618104667601]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">17.61%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"First Byte"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">First Byte</td><td data-sheets-value="[null,3,null,0.115]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.115</td><td data-sheets-value="[null,3,null,0.117]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.117</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,0.0020000000000000018]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.002</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,-0.01739130434782621]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-1.74%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Start Render"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Start Render</td><td data-sheets-value="[null,3,null,1.391]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">1.391</td><td data-sheets-value="[null,3,null,0.797]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.797</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.594]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.594</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.4270309130122214]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">42.70%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Speed Index"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Speed Index</td><td data-sheets-value="[null,3,null,1633]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">1633</td><td data-sheets-value="[null,3,null,1308]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">1308</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-325]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-325</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.19902020820575628]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">19.90%</td></tr>
</tbody></table>
</div>
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: 1px solid #ccc; font-family: arial,sans,sans-serif; font-size: 13px; table-layout: fixed;"><colgroup><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col></colgroup><tbody>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"eBay"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">eBay</td><td data-sheets-formula="=HYPERLINK("http://www.webpagetest.org/result/140224_8E_a0856f8213b426c306cc6ea535386885/","Before")" data-sheets-value="[null,2,"Before"]" style="color: #1155cc; font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; text-decoration: underline; vertical-align: bottom;"><a class="in-cell-link" href="http://www.webpagetest.org/result/140224_4E_e1a3eb7235be8c439d7a56cf8cae4353/" target="_blank">Before</a></td><td data-sheets-formula="=HYPERLINK("http://www.webpagetest.org/result/140224_SG_a568f907abd82c12893394c2710a0c7e/","After")" data-sheets-value="[null,2,"After"]" style="color: #1155cc; font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; text-decoration: underline; vertical-align: bottom;"><a class="in-cell-link" href="http://www.webpagetest.org/result/140224_SG_a568f907abd82c12893394c2710a0c7e/" target="_blank">After</a></td><td data-sheets-value="[null,2,"Difference"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">Difference</td><td data-sheets-value="[null,2,"% Difference"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">% Difference</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Load Time"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Load Time</td><td data-sheets-value="[null,3,null,8.877]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">9.22</td><td data-sheets-value="[null,3,null,8.528]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">8.528</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.3490000000000002]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.692</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.03931508392474936]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">7.51%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"First Byte"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">First Byte</td><td data-sheets-value="[null,3,null,0.149]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.119</td><td data-sheets-value="[null,3,null,0.118]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.118</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.031]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.001</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.20805369127516782]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.84%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Start Render"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Start Render</td><td data-sheets-value="[null,3,null,0.89]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">1.19</td><td data-sheets-value="[null,3,null,0.889]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.889</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.0010000000000000009]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.301</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.0011235955056180247]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">25.29%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Speed Index"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Speed Index</td><td data-sheets-value="[null,3,null,3654]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">4935</td><td data-sheets-value="[null,3,null,3453]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">3453</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-201]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-1482</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.05500821018062396]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">30.03%</td></tr>
</tbody></table>
</div>
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt;">
<table border="1" cellpadding="0" cellspacing="0" dir="ltr" style="border-collapse: collapse; border: 1px solid #ccc; font-family: arial,sans,sans-serif; font-size: 13px; table-layout: fixed;"><colgroup><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col><col width="100"></col></colgroup><tbody>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Wikipedia"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">Wikipedia</td><td data-sheets-formula="=HYPERLINK("http://www.webpagetest.org/result/140224_Z5_a533983468418e46b0b25daf933999f5/","Before")" data-sheets-value="[null,2,"Before"]" style="color: #1155cc; font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; text-decoration: underline; vertical-align: bottom;"><a class="in-cell-link" href="http://www.webpagetest.org/result/140224_Z5_a533983468418e46b0b25daf933999f5/" target="_blank">Before</a></td><td data-sheets-formula="=HYPERLINK("http://www.webpagetest.org/result/140224_AK_e8ae1a1d4bc1a292f90b457bba3fa69b/","After")" data-sheets-value="[null,2,"After"]" style="color: #1155cc; font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; text-decoration: underline; vertical-align: bottom;"><a class="in-cell-link" href="http://www.webpagetest.org/result/140224_AK_e8ae1a1d4bc1a292f90b457bba3fa69b/" target="_blank">After</a></td><td data-sheets-value="[null,2,"Difference"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">Difference</td><td data-sheets-value="[null,2,"% Difference"]" style="font-weight: bold; padding: 2px 3px 2px 3px; text-align: center; vertical-align: bottom;">% Difference</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Load Time"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Load Time</td><td data-sheets-value="[null,3,null,0.894]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.894</td><td data-sheets-value="[null,3,null,0.659]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.659</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.235]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.235</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.2628635346756152]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">26.29%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"First Byte"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">First Byte</td><td data-sheets-value="[null,3,null,0.122]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.122</td><td data-sheets-value="[null,3,null,0.11]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.11</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.011999999999999997]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.012</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.09836065573770492]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">9.84%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Start Render"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Start Render</td><td data-sheets-value="[null,3,null,0.993]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.993</td><td data-sheets-value="[null,3,null,0.787]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">0.787</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-0.20599999999999996]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-0.206</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.20745216515609266]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">20.75%</td></tr>
<tr style="height: 21px;"><td data-sheets-value="[null,2,"Speed Index"]" style="font-weight: bold; padding: 2px 3px 2px 3px; vertical-align: bottom;">Speed Index</td><td data-sheets-value="[null,3,null,1000]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">1000</td><td data-sheets-value="[null,3,null,800]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">800</td><td data-sheets-formula="=R[0]C[-1]-R[0]C[-2]" data-sheets-numberformat="[null,0]" data-sheets-value="[null,3,null,-200]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">-200</td><td data-sheets-formula="=1-(R[0]C[-2]/R[0]C[-3])" data-sheets-numberformat="[null,3,"0.00%",1]" data-sheets-value="[null,3,null,0.19999999999999996]" style="padding: 2px 3px 2px 3px; text-align: right; vertical-align: bottom;">20.00%</td></tr>
</tbody></table>
</div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-13680561105091617022013-12-10T13:01:00.000-05:002016-10-27T14:10:05.400-04:00Reducing Domain Sharding<i>This post originally appeared on the <a href="http://calendar.perfplanet.com/2013/reducing-domain-sharding/">Perf Planet Performance Calendar</a> on December 7th, 2013.</i><br />
<i><br /></i>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://www.stevesouders.com/blog/2009/05/12/sharding-dominant-domains/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Domain sharding</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> has long been considered a best practice for pages with lots of images. The number of domains that you should shard across depends on how many HTTP requests the page makes, how many connections the client makes to each domain, and the available bandwidth. Since it can be challenging to change this dynamically (and can cause browser caching issues), people typically settle on a fixed number of shards - usually two. </span></div>
<b id="docs-internal-guid-79fc1ca6-dda9-099f-aef4-92327c2f711b" style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://insouciant.org/tech/network-congestion-and-web-browsing/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">An article</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> published earlier this year by Chromium contributor </span><a href="https://insouciant.org/about/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">William Chan</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> outlined the risks of sharding across too many domains, and Etsy was called out as an example of a site that was doing this wrong. To quote the article: “Etsy’s sharding causes so much congestion related spurious retransmissions that it _dramatically_ impacts page load time.” At Etsy we're </span><a href="http://codeascraft.com/2013/10/14/september-2013-site-performance-report/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">pretty open</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> with our performance work, and we’re always happy to serve as an example. That said, getting publicly shamed in this manner definitely motivated us to bump the priority of reinvestigating our sharding strategy. </span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Making The Change</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The code changes to support fewer domains were fairly simple, since we have abstracted away the process that adds a hostname to an image path in our codebase. Additionally, we had the foresight to exclude the hostname from the cache key at our CDNs, so there was no risk of a massive cache purge as we switched which domain our images were served on. We were aware that this </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">would</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> expire the cache in browsers, since they do include hostname in their cache key, but this was not a blocker for us because of the improved end result. To ensure that we ended up with the right final number, we created variants for two, three, and four domains. We were able to rule out the option to remove domain sharding entirely through synthetic tests. We activated the experiment in June using our </span><a href="https://github.com/etsy/feature" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">A/B framework</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, and ran it for about a month.</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Results</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">After looking at all of the data, the variant that sharded across two domains was the clear winner. Given how easy this change was to make, the results were impressive:</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">50-80ms faster page load times for image heavy pages (e.g. search), 30-50ms faster overall.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Up to </span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">500ms</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> faster load times on mobile.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0.27% increase in pages per visit.</span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">As it turns out, William’s article was spot on - we were sharding across too many domains, and network congestion was hurting page load times. The new CloudShark graph supported this conclusion as well, showing a peak throughput improvement of 33% and radically reduced spurious retransmissions:</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Before - Four Shards</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-_S3KpkUqK5w/WBJCxtCiPUI/AAAAAAAAEtw/Nu8acl-6X_UsXzbLSomfDD7UVykRS7ENgCLcB/s1600/before.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="https://4.bp.blogspot.com/-_S3KpkUqK5w/WBJCxtCiPUI/AAAAAAAAEtw/Nu8acl-6X_UsXzbLSomfDD7UVykRS7ENgCLcB/s400/before.png" width="400" /></a></div>
<br />
<br /></div>
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">After - Two Shards</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-xG1hPCGbNGU/WBJC4ZaNquI/AAAAAAAAEt0/9hEzIN-7sIQHjXcterdG1KjD6Vl2Yri5ACLcB/s1600/after.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="273" src="https://3.bp.blogspot.com/-xG1hPCGbNGU/WBJC4ZaNquI/AAAAAAAAEt0/9hEzIN-7sIQHjXcterdG1KjD6Vl2Yri5ACLcB/s400/after.png" width="400" /></a></div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Lessons Learned</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">This story had a happy ending, even though in the beginning it was a little embarrassing. We had a few takeaways from the experience:</span></div>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">The recommendation to shard across two domains still holds.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Make sure that your CDN is configured to leave hostname out of the cache key. This was key to making this change painless.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Abstract away the code that adds a hostname to an image URI in your code.</span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 9px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: sub; white-space: pre-wrap;"></span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://codeascraft.com/2011/02/15/measure-anything-measure-everything/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Measure everything</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, and question assumptions about existing decisions.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Tie performance improvements to business metrics - we were able to tell a great story about the win we had with this change, and feel confident that we made the right call.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: disc; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Segment your data across desktop and mobile, and ideally international if you can. The dramatic impact on mobile was a huge improvement which would have been lost in an aggregate number. </span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></b>
<br />
<div dir="ltr" style="line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Until SPDY/HTTP 2.0 comes along, domain sharding can still be a </span><a href="http://www.stevesouders.com/blog/2013/09/05/domain-sharding-revisited/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">win for your site</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, so long as you test and optimize the number of domains to shard across for your site.</span></div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-49951140333237901262013-11-24T16:43:00.000-05:002013-11-24T16:43:52.109-05:00Pushupdate 2013<i style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;">This is a follow-up to my "<a href="http://www.jonathanklein.net/2012/04/1000000-push-ups.html" style="color: #6699cc; text-decoration: none;" target="_blank">1,000,000 Push-ups</a>" post. Check that out for the reasoning behind this challenge.</i><br />
<i style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;"><br /></i><span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;">November 19th was my birthday, and it also marked the end of the second year of my push-up challenge. For the last year my goal was to average 100 push-ups per day, and I finished five push-ups ahead of that goal, with a running total of 54,805 push-ups. This isn't a magical coincidence, there's a strong rubber banding effect with my <a href="https://docs.google.com/spreadsheet/ccc?key=0AuZTHPrAdDjXdDhRYjVjQ1RySjBCT0lVU3pycWQ2MXc#gid=3">color coded spreadsheet</a>. When I get behind, I do more push-ups to catch up. When I get ahead, I know that I can take a day off if I get tired or lazy. This kept me hovering right around my target throughout the year. </span><br />
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;"><br /></span>
<span style="background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 20px;">If you look at the "<a href="https://docs.google.com/spreadsheet/ccc?key=0AuZTHPrAdDjXdDhRYjVjQ1RySjBCT0lVU3pycWQ2MXc#gid=2">Year 2</a>" tab in the doc, you will see that there was a lot more yellow than in year one. This is largely because I got sick at the end of April, and had two consecutive days with zero push-ups. It took me quite a while to catch back up, because I didn't have any time pressure to do so. Why is all of this relevant? Because it has taught me a few things about my motivation and how I should structure the challenge going forward:</span><br />
<br />
<ol>
<li><span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 15px; line-height: 20px;">I really only care about finishing the year on target, being slightly behind in the middle of the year doesn't bother me or motivate me all that much.</span></span></li>
<li><span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 15px; line-height: 20px;">I am unlikely to do more push-ups than the sheet requires, so thinking that I will get ahead naturally is silly.</span></span></li>
<li><span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 15px; line-height: 20px;">Everything is a lot easier if I spread the push-ups out during the day, instead of jamming them all in right before I go to sleep.</span></span></li>
</ol>
<div>
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 15px; line-height: 20px;"><br /></span></span></div>
<div>
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 15px; line-height: 20px;">Because of these learnings, and specifically #2, I've decided to bump my goal for year 3 to 125 push-ups per day. This will allow me to finish the year at over 100,000 push-ups, which is 10% of my goal. If I maintain the 125 push-up average going forward, I will finish the challenge a little over two years early. I also might continue to raise the daily total in future years, so I can shave a little more time off the end, and potentially finish in 20 years instead of 25. </span></span></div>
<div>
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 15px; line-height: 20px;"><br /></span></span></div>
<div>
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 15px; line-height: 20px;">The beginning of this year was a bit of a struggle, but towards the end I got much better about doing my push-ups during the day, which had a dramatic positive impact on my attitude while doing them. Since I work from home this is fairly easy to do, and I'm going to continue to push for that going forward (pun <i>definitely </i>intended). </span></span></div>
<div>
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 15px; line-height: 20px;"><br /></span></span></div>
<div>
<span style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: 15px; line-height: 20px;">Questions? Comments? Ideas for future updates? Let me know, below. </span></span></div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-86485364837802929462013-11-13T11:11:00.000-05:002013-12-03T18:12:56.882-05:00A New Source For WPO Resources<b>** Update 12/03/13 ** </b>- This article was deleted by Wikipedia moderators. If you want the full background on why, check out the <a href="https://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/List_of_Web_Performance_Optimization_Resources">deletion talk page</a>. I have just moved the article to the <a href="http://docs.webplatform.org/wiki/concepts/performance">Web Platform Wiki</a>, which is a more appropriate place for it. <br />
<br />
After my <a href="http://www.jonathanklein.net/2013/11/we-have-long-way-to-go.html">last post</a> with its abundance of footnotes, some people asked for a place on the web where they can see an aggregated list of performance resources. This has been <a href="http://www.strangeloopnetworks.com/web-performance-optimization-hub/">tried in the past</a>, and I believe that it has failed because it has always relied on a single person or entity to update the list. Ideally we would like to have something that fulfills the following goals:<br />
<br />
<ul>
<li>Hosted by a non-partial third party</li>
<li>Anyone can update - no single point of failure</li>
<li>An existing site that people trust, so we don't have to reinvent the wheel</li>
<li>A site with a bright future - we don't want this to be obsolete in a few months</li>
</ul>
<br />
<div>
This is starting to sound vaguely familiar...</div>
<div>
<br /></div>
<div>
That's right, the new home (hopefully) for Web Performance Optimization resources is <a href="https://en.wikipedia.org/wiki/List_of_Web_Performance_Optimization_Resources">Wikipedia</a>. This kind of article has some precedence, and is modeled after this <a href="https://en.wikipedia.org/wiki/List_of_JavaScript_libraries">List of JavaScript Libraries</a>. </div>
<div>
<br /></div>
<div>
I put together the initial resources on this page this morning, so it is far from exhaustive. This is the beauty of Wikipedia - anyone can improve this list, and there will be no single "maintainer". <a href="https://en.wikipedia.org/wiki/List_of_Web_Performance_Optimization_Resources">Go edit it</a> now! I've linked to this new list from the main <a href="https://en.wikipedia.org/wiki/Web_performance_optimization">WPO article</a>, and my hope is that people will continue to keep it up to date. I think this is something that our industry needs: a place to point newcomers where they can find links to all of the great content that our community produces. </div>
<div>
<br /></div>
<div>
That's it - <a href="https://en.wikipedia.org/wiki/List_of_Web_Performance_Optimization_Resources">have at it</a>.</div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-79088944321882090142013-11-03T11:10:00.001-05:002013-11-05T18:26:41.021-05:00We Have a Long Way To GoWhen you work on web performance every day, it is easy to assume that the best practices are widely known, widely understood, and widely followed. Unfortunately, as I have learned through a couple of different experiences recently, this is not the case. It is frankly astounding how many websites are still failing to implement the best practices that <a href="http://stevesouders.com/">Steve Souders</a> outlined in his book "<a href="http://www.amazon.com/gp/product/0596529309/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0596529309&linkCode=as2&tag=wwwjonathankl-20">High Performance Websites</a>" <i>over six years ago</i>. Six years is an eternity when it comes to web development, but I still regularly meet professional software engineers who are surprised when they hear about the rules that the WPO community evangelizes on a daily basis. <br />
<br />
<b><span style="font-size: large;">First, The Data</span></b><br />
<br />
Let's try to scope the problem. Using data from the <a href="http://httparchive.org/trends.php">HTTP Archive</a>, we know that:<br />
<br />
<ul>
<li>Average <a href="https://developers.google.com/speed/pagespeed/">PageSpeed</a> score is still <a href="http://httparchive.org/trends.php#PageSpeed">in the 70's</a></li>
<li>Pages talk to <a href="http://httparchive.org/trends.php#numDomains&maxDomainReqs">17 domains</a> on average</li>
<li>Only <a href="http://httparchive.org/trends.php#maxage0">44% of resources</a> have proper caching headers</li>
<li><a href="http://httparchive.org/trends.php#perCompressed">23% of resources</a> are still uncompressed</li>
</ul>
<div>
Via Radware we know that pages are getting <a href="http://blog.radware.com/applicationdelivery/applicationaccelerationoptimization/2013/10/report-state-of-the-union-for-ecommerce-web-performance-fall-2013/">bigger and more complex</a>, and that adoption of best practices is inconsistent and fairly weak. At this point people are quick to point to the <a href="http://analytics.blogspot.com/2013/04/is-web-getting-faster.html">Google study</a> showing that the web <i>is</i> in fact getting faster, but this is primarily due to browser and network improvements, not due to website improvements. To quote the study, "it is still impressive given that the size of the web pages have increased by over 56% during this period". How much faster would the web be if we had browser, network, <i>and</i> content improvements?</div>
<br />
I mentioned that I have had a few experiences recently that led me to write this post. First, I was recently speaking on a panel at a "Web Performance Day" for portfolio companies of a prominent VC firm in San Francisco. Steve Souders was giving the opening talk, and he opened with a scary comment. He mentioned that as he was putting his talk together, he surfed around some of the portfolio company websites so he could target his material to the audience members. He found that in the vast majority of cases, even the most basic optimizations were not being done. He was forced to alter his talk and give a "Performance 101" talk during which he dredged up slides from decks that he presented over 5 years ago. Yikes.<br />
<br />
The second experience was during a <a href="http://javascriptjabber.com/077-jsj-monocle-with-alex-maccaw/">recent episode</a> of JavaScript Jabber. Alex MacCaw was talking about how he optimized <a href="http://monocle.io/">monocle.io</a>, and he mentioned Google's <a href="https://developers.google.com/speed/pagespeed/insights/">PageSpeed Insights</a> tool. The tool was new to pretty much everyone on the show, and was a lot of "wow, this is so cool!". Remember, these are <b>professional front-end web developers</b> that are recording a podcast about JavaScript and front-end best practices in their free time. If they haven't heard of PageSpeed, and are getting surprised by some of the checks that it exposes, then we have a TON of work to do. <br />
<br />
<b><span style="font-size: large;">What Should We Expect?</span></b><br />
<br />
Perhaps I am an idealist, but I think we should be able to get to 95%+ compliance with <a href="http://developer.yahoo.com/blogs/ydn/high-performance-sites-rule-4-gzip-components-7194.html">gzip</a>. I don't expect every site to sprite all of their images (a best practice that <a href="http://en.wikipedia.org/wiki/SPDY">SPDY/HTTP 2.0</a> will negate anyway), but I <i>do </i>expect every single site on the internet to figure out how to compress text resources. It's probably the easiest, most impactful, most well supported, and safest optimization that you can do. <br />
<br />
This is just an example, but I think it is indicative of the problem, because we're only at 77% compliance with it. There are enormous benefits with literally zero downsides, and we still can't get a quarter of the sites on the internet to do it (and don't talk to me about CPU usage on shared hosting - if a host doesn't let you turn on gzip you should find another host). <br />
<br />
The more concerning thing for me is that people expect new standards and browser improvements to come in and save us, like the aforementioned HTTP 2.0. While I'm extremely excited about HTTP 2.0, I worry that we will run into the same problem that we have today with gzip: it will take years to get up to a reasonable adoption point, even after the browser support is there. <br />
<br />
When it comes to "what we should expect", I think understanding the core technologies behind the web and how to leverage them to build fast applications is a <i>requirement</i> for every single engineer. After all, <a href="http://blog.mashape.com/post/44118215209/10-golden-principles-of-successful-web-applic">speed is more than a feature, it's the most important feature</a>. That's from the guy holding the purse strings, so it's worth taking to heart. If someone can't easily explain at least 3-5 performance best practices, to me that's equivalent to not being able to write a line of JavaScript. In other words, inexcusable if you work on the web as a developer. <br />
<br />
<span style="font-size: large;"><b>Are There Enough Resources For Developers?</b></span><br />
<br />
Yes. Perhaps we could do a better job about getting them in front of people early and often, but the<sup>[1]</sup> number<sup>[2]</sup> of<sup>[3]</sup> tools<sup>[4]</sup> and<sup>[5]</sup> resources<sup>[6]</sup> is<sup>[7]</sup> staggering<sup>[8]</sup> (I<sup>[9]</sup> could<sup>[10]</sup> do<sup>[11]</sup> this<sup>[12]</sup> all<sup>[13]</sup> day<sup>[14]</sup>). I'm obviously extremely biased, since I work on the performance team for one of the top technology companies on the web, and one that happens to care a lot about performance, but these resources are not hard to find. In addition, with the recent healthcare.gov <a href="http://www.infoworld.com/t/e-government/it-experts-healthcaregov-still-mess-228409">fiasco</a>, web performance is much more in the public eye, which should provide even more motivation for software engineers to get on the bandwagon. <br />
<br />
<b><span style="font-size: large;">How Do We Fix This?</span></b><br />
<br />
If you have made it this far, hopefully you believe that there is a problem and that it should be fixed. The easy answer is to do more of what we are already doing - speaking, blogging, writing books, hosting meetups, and publishing case studies. This is all great, and we <i>should</i> do more of it, but it's clearly not working as well as we might like. I'd like to propose a couple of concrete things we could do differently that might help get the word out about performance:<br />
<br />
<ul>
<li>Every tech conference should have at least one talk that focuses on performance.</li>
<li>Every company with an engineering blog should publish a post about performance (and ideally how it affects their bottom line).</li>
<li>Every college with a CS department should offer a course that focuses on web performance (or at least part of a course). Kudos to Stanford for <a href="http://scpd.stanford.edu/search/publicCourseSearchDetails.do?method=load&courseId=4703286">doing this</a>.</li>
<li>We should write more books with the "High Performance" prefix. Steve Souders has mentioned in the past that he would like to see this, and a few have come out recently (like Ilya's <a href="http://chimera.labs.oreilly.com/books/1230000000545">excellent book</a>), but we should do even more. I'd love to see a "High Performance Ruby on Rails" book, as one example.</li>
</ul>
<div>
If you have the ability to influence any of the points above, please do so. With our mobile future rapidly approaching, performance is more important than ever. We will be stuck with 3G and 4G for decades, so networks aren't going to save us. There's a limit to what browsers can do given certain latency and bandwidth constraints, and when you look at how <a href="http://httparchive.org/trends.php#bytesTotal&reqTotal">quickly page complexity is rising</a>, it's not hard to imagine the web getting slower and slower over time. That's not a future that I want, so let's work together to build the tools, resources, and infrastructure that's necessary to make the web faster. <br />
<br />
[1] <a href="https://developers.google.com/speed/docs/best-practices/rules_intro">Google Best Practices</a><br />
[2] <a href="http://www.webpagetest.org/forums/">WebPagetest Forums</a><br />
[3] <a href="http://developer.yahoo.com/performance/rules.html">Yahoo Performance Rules</a><br />
[4] <a href="http://www.webperformancetoday.com/tag/best-practices/">Web Performance Today Best Practices</a><br />
[5] <a href="http://calendar.perfplanet.com/2012/">Perf Planet Advent Calendar</a><br />
[6] <a href="http://chimera.labs.oreilly.com/books/1230000000545">High Performance Browser Networking</a><br />
[7] <a href="http://www.amazon.com/gp/product/059680279X/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=059680279X&linkCode=as2&tag=wwwjonathankl-20">High Performance JavaScript</a><br />
[8] <a href="http://velocityconf.com/">Velocity Conference</a><br />
[9] <a href="http://httparchive.org/">HTTP Archive</a><br />
[10] <a href="http://blog.newrelic.com/2013/07/24/top-22-web-performanc-posts-of-2013-so-far/">The Top 22 Web Performance Posts of 2013 (New Relic)</a><br />
[11] <a href="http://www.webperformancetoday.com/podcast/">Web Performance Today Podcasts</a><br />
[12] <a href="http://www.amazon.com/gp/product/0596522304/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0596522304&linkCode=as2&tag=wwwjonathankl-20">Even Faster Websites</a><br />
[13] <a href="http://yslow.org/">YSlow</a><br />
[14] <a href="http://www.compuware.com/en_us/application-performance-management/products/ajax-free-edition/overview.html">Compuware Ajax Edition</a></div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-90304798131718368522013-10-06T12:06:00.001-04:002013-10-06T12:06:18.749-04:0030 Day Challenge: VegetarianismFor context about 30 day challenges, watch <a href="http://www.ted.com/talks/matt_cutts_try_something_new_for_30_days.html" target="_blank">this Ted Talk</a> by <a href="http://www.mattcutts.com/blog/about-me/" target="_blank">Matt Cutts</a>.<br />
<br />
<div>
My 30 day challenge in September was to be a vegetarian - and a true vegetarian, so no meat whatsoever, including seafood. I've thought about doing this challenge for a while, and <a href="http://vimeo.com/57425074">this video</a> pushed me over the edge. My goals for this challenge were simple:
</div>
<br />
<ul>
<li>See what it's like to live as a vegetarian, and what options are available</li>
<li>Be more conscious about meat consumption in general</li>
<li>See if this is something that I could sustain long-term</li>
</ul>
<br />
<div>
I did pretty well throughout the month, and only slipped once. During the first week of the challenge I was at my great-aunt's 100th birthday party, and it was at a restaurant with a fixed menu. The only options were chicken, salmon, or steak. The kitchen said that they could make me a plate of steamed vegetables, but I decided that I would make an exception and order the steak. I don't feel like this means that I "failed" the challenge, it was a one-time conscious choice and I was still able to accomplish my goals during the rest of the month.<br />
<br /></div>
<div>
Obviously the hardest part of this challenge was eating out. I did a fair amount of traveling in September, which meant finding restaurants with vegetarian options everywhere I went. This was usually doable, but in many cases I only had one choice of entree. Luckily I do like to eat tofu, veggie burgers, and almost all vegetables, so I almost always had decent options available. <br />
<br /></div>
<div>
Once the challenge was over I did go back to eating meat right away, and I had no adverse effects from the month hiatus. I don't think that my eating habits are going to change dramatically after having done this challenge, but I do plan on being more conscious of the quality and source of the meat that I consume. If I don't know its origin I think I will be more likely to skew towards vegetarian options. At some point I might try to follow Mark Zuckerberg's lead and <a href="http://www.huffingtonpost.com/2011/05/26/mark-zuckerberg-killing-food_n_867675.html">eat only meat that I've killed</a> - but I think I'll save that for a point where I have the means to do so.<br />
<br /></div>
<div>
If you have done any 30-day challenges recently, or have ideas for future ones, let me know in the comments!</div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-75457511366491730162013-09-08T21:38:00.000-04:002013-10-06T07:36:38.302-04:00What I Learned From 30 Days Without TVMy <a href="http://www.jonathanklein.net/2013/07/30-day-challenge-no-tv-or-movies.html">30 day challenge for August</a> was to avoid watching any television or movies, and I finished about a week ago. This challenge was tough, primarily since my girlfriend Stephanie (who I live with) was not under the same restriction. As a result I ended up catching a few minutes of TV and movies here and there, but I did manage to avoid watching a complete show or movie for the entire month. Also as a clarification, I exempted things like TED talks, screencasts, and other educational videos from this challenge. The focus was really to avoid "junk food" entertainment that doesn't provide any lasting value. <br />
<br />
<b><span style="font-size: large;">Surprises</span></b><br />
<br />
Two things surprised me about this challenge. The first was how hard it was to go completely cold turkey. In addition to the temptation at home, many of the bars and restaurants I went to in August (obviously) had TVs. I also spent some time in airports, where TVs are never far away. If you truly wanted to avoid even looking at a TV for a month it would be nearly impossible. This is something we take for granted, but I was amazed at how hard it was to go even a single day without seeing something being broadcast. On the flip side, the other surprise was how easy it was to avoid spending any significant amount of time doing it. There were certainly a few instances where I wanted to sit down and watch a movie, but I was able to resist and (typically) spent my time on more productive work. <br />
<br />
<span style="font-size: large;"><b>So What Did I Do?</b></span><br />
<br />
I managed to get through a backlog of magazines that had been sitting on my dresser for months, and I finished three books that I was partway through at the start of the month. I also made some good progress on a couple of side projects, caught up on RSS feeds, and felt a little more in control of my life overall. As <a href="http://hbswk.hbs.edu/item/7007.html">Clayton Christensen says</a>, "it's easier to hold to your principles 100 percent of the time than it is to hold to them 98 percent of the time", and that was certainly true for me with this challenge. If I had simply tried to watch fewer movies, or spend a little less time in front of the TV, it would not have been nearly as effective. By having a firm rule I was able to able to avoid situations where it would have been easy to make an exception, like a rainy night at home with Steph, or an evening watching the game with friends. I just foisted all of the blame for my strange behavior on "the challenge" and moved on to more high value activities. This had the side benefit of making my interactions with people more meaningful - in situations where we might have had the TV on in the background we instead focused our full attention on each other. <br />
<br />
<b><span style="font-size: large;">Going Forward</span></b><br />
<br />
After spending a month without TV or movies, I really got out of the habit of turning towards them as a source of relaxation. I was forced to find alternate ways to unwind, and that has carried over into the first week or so of September. Aside from a Labor Day binge on season 2 of <a href="http://www.hbo.com/the-wire/index.html">The Wire</a>, I've pretty much continued the habits that I developed in August - reading more, coding more, and having more 1-on-1 interactions with friends. It feels great, and I plan on keeping this up as much as I can. My loose goal for the rest of the year is to avoid watching any TV or movies alone. I totally acknowledge that they can be social events, but when I am by myself there are always better things that I can be doing. To be clear, I don't just mean better from a productivity point of view, I mean activities that I personally get more enjoyment out of. For me it's all about finding the "Maximum Fun Quotient", and deliberately spending my time doing things that make me happy and enrich the lives of my friends and family. This challenge helped me realize that movies and TV are not a critical part of that goal. Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-75156743458016365492013-08-23T10:59:00.001-04:002013-08-23T10:59:36.544-04:00Northeast PHP RecapLast weekend was the 2nd annual <a href="http://northeastphp.org/" target="_blank">Northeast PHP</a> conference in Boston. I gave two talks, "<a href="http://northeastphp.org/talks/view/46/Practical-Responsive-Web-Design" target="_blank">Practical Responsive Web Design</a>" (<a href="http://jkle.in/rwd" target="_blank">slides</a>) and "<a href="http://northeastphp.org/talks/view/47/Scaling-PHP-to-40-Million-Uniques" target="_blank">Scaling PHP to 40 Million Uniques</a>" (<a href="http://jkle.in/nephp" target="_blank">slides</a>). I had a lot of fun at the conference, and met some great people. I didn't get to attend as many talks as I would have liked, since I spent some of the sessions preparing for my own, but there were a couple that I really enjoyed:<br />
<br />
<a name='more'></a><br />
<span style="font-size: large;"><b>My Favorite Talks</b></span><br />
<b><br /></b>
<b>Berserk for Responsive Design Frameworks! (Jen Kramer)</b><br />
<br />
<a href="http://northeastphp.org/talks/view/156/Keynote-Ten-Evil-Things-Features-Engineering-at-Wikipedia" target="_blank">This talk</a> was an overview of <a href="http://getbootstrap.com/" target="_blank">Bootstrap</a> and <a href="http://foundation.zurb.com/" target="_blank">Foundation</a>, comparing the two and explaining when to use each one. <a href="http://www.jenkramer.org/" target="_blank">Jen</a> is a great public speaker, and she kept what could have been a pretty dry topic engaging and informative. For me the takeaway was that I'm making the right choice by using Bootstrap for side projects. Bootstrap has a little more styling out of the box, and with the robust set of <a href="https://wrapbootstrap.com/" target="_blank">custom themes</a> you can build a pretty impressive site without needing any design skills whatsoever. You can catch up with the slides <a href="http://www.slideshare.net/jen4web/comparing-bootstrap-and-foundation" target="_blank">here</a>.<br />
<br />
<b>Ten Evil Things - Features Engineering at Wikipedia (Terry Chay)</b><br />
<b><br /></b>
<a href="http://northeastphp.org/talks/view/156/Keynote-Ten-Evil-Things-Features-Engineering-at-Wikipedia" target="_blank">This</a> was the closing keynote, and it was awesome. Terry gave an extremely energetic talk, and exposed a lot of the behind the scenes work that goes on at Wikipedia. The presentation centered around the steady decline in editors that Wikipedia has seen over the last few years, and the steps that are being taken to reverse that trend. Few companies have the impact of Wikipedia, and they do it all with ~140 employees and a few hundred servers. Terry got me excited about the new things that are coming to Wikipedia, like the new editor and better notifications about actions happening on articles that you have edited in the past.<br />
<br />
You can check out other popular talks by looking at the ones with high ratings on <a href="http://joind.in/event/view/1328">Joind.in</a>. <br />
<br />
<span style="font-size: large;"><b>Overall Event Feedback</b></span><br />
<br />
Organizationally everything was great. The food was delicious and on time, the talks were the right length, and the breaks were well placed. It was one of the most smoothly run conferences I have been to, and I know that the organizers put in a ton of work to make it go off without a hitch.<br />
<br />
Content wise I think that the conference could tweak some things and be more successful. Right now it's a mix between UX/UI talks and PHP talks, which tend to attract different audiences. I think the "Northeast PHP" title scares away some people who could get a lot out of the UX side, and I think seeing all of the less technical talks on the schedule scares away some hardcore software engineers. As I told the organizers, in future years I would like to see the conference skew to one side or the other, so it can serve a specific audience more fully. I think this would boost attendance and make it easier to align expectations with reality. <br />
<br />
I'm looking forward to seeing where this conference goes over the next few years, and I hope to continue contributing to it! <br />
<br />Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0Boston, MA, USA42.3584308 -71.059773242.170560800000004 -71.38249669999999 42.5463008 -70.7370497tag:blogger.com,1999:blog-342295268741167565.post-67149566519041090592013-07-27T07:45:00.000-04:002013-10-06T07:36:10.746-04:0030 Day Challenge: No TV or MoviesFor context about 30 day challenges, watch <a href="http://www.ted.com/talks/matt_cutts_try_something_new_for_30_days.html" target="_blank">this Ted Talk</a> by <a href="http://www.mattcutts.com/blog/about-me/" target="_blank">Matt Cutts</a>.<br />
<br />
I'm trying an experiment for the month of August - not watching any television or movies. I've never been someone who watches a ton of TV, but when I get into a show I can power through a ten episode season in a week. Throughout July, I spent more time in front of the TV than usual, and some of my other activities have fallen by the wayside as a result. I got to a point where I was in the middle of four books simultaneously, and working on three concurrent programming related side projects. When you add that to everything else I have going on (Ultimate frisbee, Taekwondo, preparing talks for conferences, seeing friends, walking my dog, <a href="http://www.jonathanklein.net/2012/04/1000000-push-ups.html" target="_blank">push-ups</a>, work) it became unsustainable. I would get a little overwhelmed by my schedule, and default to mindless activities to relax. <br />
<br />
<a name='more'></a><br />
My goal for this challenge is to use the extra time to wrap up some of my existing commitments and stabilize my schedule. I frequently finish work for the day and get a sinking feeling when I look at my seemingly endless to-do list. I remember when I first graduated from college, moved to Boston, and got a real job. I was struck by how much time I had, and how relaxing it was to come home after a day at the office and have complete freedom to do whatever I wanted. Over the last 5+ years I have gradually constricted that freedom by loading up my time with various activities. In theory these are things that I enjoy doing, but there comes a point when something has to give. <br />
<br />
This challenge is all about finding a balance between being productive and finding healthy ways to relax. Sometimes giving something up for a while can put things in perspective and bring some clarity to what is important. As Google is fond of saying, I'm trying to put "<a href="http://googleblog.blogspot.com/2011/07/more-wood-behind-fewer-arrows.html" target="_blank">more wood behind fewer arrows</a>", and become a little more <a href="http://www.jonathanklein.net/2012/09/learning-strategies-for-engineers-part-1.html" target="_blank">T-shaped</a>. Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-10834666795968271572013-06-03T16:50:00.001-04:002018-10-10T20:11:53.903-04:00Cognitive Biases in Software EngineeringHuman logic, unlike that of the machines which we program and use every day, isn't perfect. We make mistakes, we establish bad mental habits, and we have many cognitive biases that negatively impact our ability to be successful engineers. I want to go over five of the most common biases that I see on a regular basis as a software engineer.<br />
<br />
<a name='more'></a><br />
<span style="font-size: large;"><b>Fundamental Attribution Error</b></span><br />
<blockquote class="tr_bq">
<i>In social psychology, the fundamental attribution error (also known as correspondence bias or attribution effect) describes the tendency to overestimate the effect of disposition or personality and underestimate the effect of the situation in explaining social behavior. <a href="http://en.wikipedia.org/wiki/Fundamental_attribution_error" target="_blank">(ref)</a></i></blockquote>
<div class="p1">
This is my favorite cognitive bias, because it shows up <i>everywhere</i>. When someone cuts you off on the road they are a complete asshole, but when you cut someone off it is because you didn't see them, or because you really<i> </i>need to get to work on time for a meeting. When someone else writes a bug or takes the site down, it is because they are a negligent, crappy engineer. If you create a bug it is because you were tired, there weren't enough automated tests, you were rushed, the requirements were poorly defined, or because it was a full moon. <br />
<br />
This is why Etsy puts so much focus on <a href="http://codeascraft.com/2012/05/22/blameless-postmortems/" target="_blank">Blameless PostMortems</a>. The reality is that the "situational aspects of a failure’s mechanism" are where you will find improvements that will meaningfully reduce the odds of failure in the future. Screaming at people is a demonstrably poor way of making them perform at a higher level. We are lucky in the software world, if something breaks we can frequently automate the process or add a test to ensure that it doesn't break in the same way again. By being aware of this cognitive bias and working to focus on the situation instead of the personality of the human involved, we can reduce the negative impact that this bias has on our lives. <br />
<br />
<b><span style="font-size: large;">Confirmation Bias</span></b></div>
<div class="p1">
<blockquote class="tr_bq">
<i>Confirmation bias (also called confirmatory bias or myside bias) is a tendency of people to favor information that confirms their beliefs or hypotheses. <a href="http://en.wikipedia.org/wiki/Confirmation_bias" target="_blank">(ref)</a></i></blockquote>
This bias most commonly occurs in manual testing. When we write some new code, we are biased towards testing the cases that we know will work. This allows us to spend a short amount of time testing (because everyone hates manual testing) and then proudly declare that "it works!". This bias can result in poorly tested code, and the miserable practice of throwing code over the wall and having other people clean up the mess.<br />
<br />
This is one of the harder biases to get over in my opinion, because it means acknowledging our own limitations, and really stressing the fragile parts of the code that we write. We all want and expect our software to work, so we are inescapably drawn to evidence that confirms this desire. Keep fighting this urge, keep testing, and always question your assumptions.<br />
<br />
<b><span style="font-size: large;">The Bandwagon Effect</span></b></div>
<div class="p1">
</div>
<div class="p1">
<blockquote class="tr_bq">
<i>The bandwagon effect asserts that conduct or beliefs spread among people, as fads and trends clearly do, with the probability of any individual adopting it increasing with the proportion who have already done so. <a href="http://en.wikipedia.org/wiki/Bandwagon_effect" target="_blank">(ref)</a></i></blockquote>
The most common area where I have seen this is when evaluating third party software. I've actually walked into meetings where I thought everyone had decided not to purchase a given tool, and then walked out planning to sign a contract. Once one person who is well respected outlines their opinion, it's appealing for everyone else to hop on board. There are various strategies to combat this urge, and things like blind voting can work well in the right situation. If you have a big decision to make (like spending six figures on a third party tool), I think it makes sense to have all of the stakeholders write out their opinions in private first, without having their position influenced by other (potentially more senior) people. <br />
<br />
<b><span style="font-size: large;">Hyperbolic Discounting</span></b><br />
<blockquote class="tr_bq">
<i>Given two similar rewards, humans show a preference for one that arrives sooner rather than later. Humans are said to discount the value of the later reward, by a factor that increases with the length of the delay. <a href="http://en.wikipedia.org/wiki/Hyperbolic_discounting" target="_blank">(ref)</a></i></blockquote>
Stated simply, this means that something less valuable <i>today</i> is more appealing than something more valuable that will come in the future. This is frequently how technical debt is incurred. Poor design decisions and shortcuts are sexy because they give you a small amount of value right now (not having to do the work to architect things properly), and you dramatically discount the value you would get in the future by doing it right the first time. It is very difficult for humans to project the long term cost of shoddy code in terms of time we will spend debugging, refactoring, and interpreting it. I'm sure we've all experienced this, as you get into a project you see a better way to do things, but your mind resists spending the extra few hours it would take to refactor, even when you know that it will save many times that in the long run. <br />
<br />
In my opinion the way around this is to deliberately stop and do an estimation exercise. First think about how long the refactor will take, and be extremely generous (e.g. double your first estimate). Then think about how many people will be working on the code, and how often. Given really conservative estimates for how much incremental technical debt and confusion you are creating, figure out how long it would take to "pay off" the time you spend refactoring. Typically this exercise throws things into stark relief, and it becomes obvious which route you should take. If you are still on the fence, your decision should be based on the type of project you are working on. At larger established companies, do the refactor. At a startup that is trying to release an <a href="http://en.wikipedia.org/wiki/Minimum_viable_product" target="_blank">MVP</a>, maybe do the hack (your code will probably be rewritten anyway). That said, always think of who else will be working on your code...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://24.media.tumblr.com/tumblr_m7fpxfkHM81rzupqxo1_500.png" imageanchor="1"><img border="0" src="https://24.media.tumblr.com/tumblr_m7fpxfkHM81rzupqxo1_500.png" height="300" width="400"></a></div>
<br />
<br /></div>
<div class="p1">
<b><span style="font-size: large;">Negativity Bias</span></b></div>
<blockquote class="tr_bq">
<i>Negativity bias is the psychological phenomenon by which humans pay more attention to and give more weight to negative rather than positive experiences or other kinds of information. <a href="http://en.wikipedia.org/wiki/Negativity_bias" target="_blank">(ref)</a></i></blockquote>
Have you ever worked with someone who always seems to be shooting down ideas, yet commands a lot of respect and seems extremely knowledgable? Are <i>you</i> this person? I know I have been at times. The negativity bias is powerful, we are all hardwired to listen to the naysayers. This is part of the reason why even topics with overwhelming evidence in their favor (like global warming) still have fervent deniers. In software engineering, this often occurs when product managers or designers describe some feature that is fairly difficult to implement. Engineers will frequently push back on this, explaining why the goals are impossible to achieve. Because of the negativity bias we all have, these people can come across as intelligent, mature, and even seem to be saving the company time and money. It is often the right decision to say no to things, but if you find someone who is doing this on a regular basis, take a step back and ask yourself if their arguments have merit or if you are simply falling prey to this cognitive trap. <br />
<br />
<b><span style="font-size: large;">Conclusion</span></b><br />
<br />
For all of these biases, the most important step is to recognize that they exist, and try to identify them when they appear in your day to day life. Once you do that, just take a step back and think about the situation. It can even help to state the bias out loud - especially if other people are involved. By bringing up the idea that you might be falling into a common cognitive trap, you can refocus the conversation and clear your mind. <br />
<br />
If you like learning about rationality, cognitive bias, and how to overcome the limitations of our brains, check out the blog <a href="http://lesswrong.com/" target="_blank">LessWrong</a>, and go read <a href="http://hpmor.com/" target="_blank">Harry Potter and the Methods of Rationality</a> (seriously, just do it). Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-18703113820249387962013-05-12T16:03:00.000-04:002013-05-12T16:03:25.682-04:00Sleep TestingOne of the most important things you can do for your health, happiness, and productivity is to get enough sleep. You have probably heard this so many times that it feels like white noise at this point, but what if you could actually do it? What if you could wake up refreshed and energetic every day, and not struggle to get out of bed? I believe this is achievable for everyone - as long as you are willing to take the time to methodically test your sleep schedule, and make a few minor changes to your bedtime routine.<br />
<br />
<a name='more'></a><br />
There are a few main points that you need to keep in mind when trying to get the most out of your sleeping hours:<br />
<ul>
<li>Eat well</li>
<li>Exercise</li>
<li>Avoid bright lights and turn off all electronics at least 1 hour before bed</li>
<li>Go to bed and get up at the same time each night (even on weekends)</li>
<li>Sleep a consistent number of hours each night</li>
<li>Sleep in <a href="http://psychdigest.com/a-perfect-nights-sleep/" target="_blank">1.5 hour increments</a> (e.g. sleep for 6, 7.5, or 9 hours)</li>
<li>Pay off sleep debt when needed</li>
</ul>
<div>
Let's break these points down a little more. </div>
<div>
<br /></div>
<div>
<span style="font-size: large;"><b>Preparing Yourself For Sleep</b></span></div>
<div>
<br /></div>
<div>
Getting to bed on time and falling asleep quickly are both critical components to establishing a consistent schedule and feeling great when you wake up. There are a few strategies you can use to make this process easier. </div>
<div>
<br /></div>
<div>
At the risk of stating the obvious, exercise <a href="http://www.webmd.com/sleep-disorders/news/20100917/exercise-helps-you-sleep" target="_blank">helps you sleep and improves sleep quality</a>. Consistent exercise will also give you more energy during the day, and provide <a href="http://www.forbes.com/sites/jennifercohen/2012/05/08/6-ways-exercise-makes-you-smarter/" target="_blank">many other benefits</a>. </div>
<div>
<br /></div>
<div>
Eating well is also an <a href="http://www.fitnessmagazine.com/health/spirit/get-to-sleep-guide/what-to-eat-for-better-sleep/" target="_blank">important part of sleep quality</a>. This means not eating a large quantity of food before bed, as well as maintaining a healthy diet. This isn't a post about what to eat, so to keep it simple just follow the rules that (almost) all diets agree on: lower your sugar intake dramatically, eat lots of fresh vegetables, and consume everything else in moderation. </div>
<div>
<br /></div>
<div>
I have also found it helpful to brush my teeth well before bedtime, since it prevents late night eating and removes that barrier to actually getting into bed. Getting your bedtime routine done early is a huge step towards going to sleep at a consistent time each night. </div>
<div>
<br /></div>
<div>
Finally, as I mentioned above it's important to <a href="http://health.usnews.com/health-news/family-health/sleep/articles/2011/03/07/using-electronics-before-bed-may-hamper-sleep" target="_blank">avoid bright lights and turn off electronics</a> around an hour before you plan on going to bed. The impact of this varies from person to person, so it's worth testing how it affects you. I use this time to read and catch up with Steph, but it's also a great time to do things like fold laundry, wash dishes, or do some minor cleanup around the house. The key is to find something relaxing that helps your mind wind down from the day and prepare itself for sleep.</div>
<div>
<br /></div>
<div>
<b><span style="font-size: large;">Figuring Out How Much Sleep You Need</span></b></div>
<div>
<br /></div>
<div>
Only 1-3% of people are "<a href="http://online.wsj.com/article/SB10001424052748703712504576242701752957910.html" target="_blank">short sleepers</a>", and can get by on 4-5 hours of sleep a night. The rest of us usually need to fall into either the 7.5 or 9 hour bucket. On the plus side, it's easy to figure out if you are one of these people. If you are a natural short sleeper, you:</div>
<div>
<ul>
<li>Go to bed late and get up early</li>
<li>Don't drink caffeine, but still feel alert</li>
<li>Don't feel the need to catch up on sleep during weekends</li>
<li>If you are sitting in a dark room during the day (e.g. watching a movie), you easily stay awake</li>
</ul>
</div>
<div>
This is extremely uncommon, and as a result many people are not getting as much sleep as they need. These people fall behind and build up a long term <a href="http://www.health.harvard.edu/fhg/updates/Repaying-your-sleep-debt.shtml" target="_blank">sleep debt</a>. Paying this sleep debt down needs to happen before you can reliably determine how much sleep your body really needs day to day. As a result, when you start your sleep testing project you should sleep at least 9 hours every night for 2+ weeks (longer if possible) to establish a clear, rested baseline to work from.</div>
<div>
<br /></div>
<div>
Once that baseline is in place, and any sleep debt you had is paid down, you can experiment with other amounts of sleep. Start by dropping from 9 hours to 7.5, and stay there for two weeks to see how it feels. It is important that these are hours of real sleep, not just time in bed. The strategies above will help you fall asleep more quickly, but it will still take time. Figure out how long you typically take to fall asleep and add that to the multiple of 1.5 hours that you are shooting for. If you feel great at 7.5 hours you can try going to 6, but it's likely that 7.5 will be your sweet spot - if you start to feel crummy while trying 6 hours a night, go back to 9 to pay off the debt you accrued and then settle in at 7.5. </div>
<div>
<br /></div>
<div>
<b><span style="font-size: large;">Waking Up</span></b></div>
<div>
<br /></div>
<div>
If you have trouble getting up in the morning, even after doing the steps above, you might want to try using a <a href="http://www.amazon.com/gp/product/B003XN4RIC/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B003XN4RIC&linkCode=as2&tag=wwwjonathankl-20" target="_blank">wake up light</a>. I've heard from a number of people that these can work wonders, especially if you have trouble getting out of bed when your alarm goes off even when you get a lot of sleep. The concept is that by simulating the dawn, these light based alarms activate our biological triggers for waking up. I've never tried one, so let me know if you have experience with these in the comments. </div>
<div>
<br /></div>
<div>
It's also important to avoid snoozing your alarm. As <a href="http://www.youtube.com/watch?v=P6zcSFA7ymo" target="_blank">this video</a> explains, snoozing your alarm over and over again simply confuses your body and causes you to interrupt deeper parts of your sleep cycle. You are much better off just setting your alarm for a later time and skipping the snooze button.</div>
<div>
<br /></div>
<div>
<b><span style="font-size: large;">Conclusion</span></b></div>
<div>
<br /></div>
<div>
I was watching an interview with Gretchen Rubin recently (author of <a href="http://www.amazon.com/gp/product/006158326X/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=006158326X&linkCode=as2&tag=wwwjonathankl-20" target="_blank">The Happiness Project</a>), and she made the point that most people these days are knowledge workers, and that our brains are our most valuable asset. Chronic sleep deprivation means chronic underperformance. If you aren't getting enough sleep, you aren't operating at your best, which makes you a worse employee/engineer/friend/significant other/etc. It's not always easy, and sometimes things get in the way of sleep.</div>
<div>
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-3eKfQd6Y8gc/UY_yFL9uiDI/AAAAAAAAB4k/AG6LfRsRxUc/s1600/2013-05-03+20.50.44.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="266" src="http://1.bp.blogspot.com/-3eKfQd6Y8gc/UY_yFL9uiDI/AAAAAAAAB4k/AG6LfRsRxUc/s400/2013-05-03+20.50.44.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Face licking starts at 6:30AM sharp!</td></tr>
</tbody></table>
<div>
That said, if you can make the necessary adjustments to sleep a little bit more, and a bit more consistently, I guarantee you will like the results. </div>
<div>
<br /></div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0tag:blogger.com,1999:blog-342295268741167565.post-88220936304919619122013-04-04T23:28:00.002-04:002020-08-11T10:43:57.559-04:0014 Day Challenge - Information DietIn the spirit of the 30-day challenges popularized by <a href="http://www.ted.com/talks/matt_cutts_try_something_new_for_30_days.html" target="_blank">Matt Cutts</a> (among others), I have spent the last 14 days on an "information diet". This is not a new idea by any means, and in fact there was an entire <a href="https://www.amazon.com/gp/product/1449304680/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1449304680&linkCode=as2&tag=jklein-20&linkId=a6374f179852055e15521064b0515e85" target="_blank">book</a> written about the concept (and <a href="https://www.amazon.com/gp/product/0525536515/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0525536515&linkCode=as2&tag=jklein-20&linkId=4d811d113d3e014f4ef09f71916a5afe">a more recent one</a> from Cal Newport which I highly recommend). I actually heard about it initially from Tim Ferris, and <a href="http://www.4hourlife.com/2012/03/17/the-5-foods-of-a-low-information-diet/" target="_blank">this post</a> on the 4-Hour Life Blog. Anyway, enough with the background - what the heck is this about?<br />
<a name='more'></a><br />
At a high level the purpose of this "diet" is to reduce the amount of media content that you passively consume, and be more deliberate about where you spend your time. The rules are as follows:<br />
<ol>
<li>No newspaper, magazines, audio books or non music radio. Music is permitted at all times.</li>
<li>No news websites whatsoever, and no social media sites.</li>
<li>No television at all, except for one hour of pleasure viewing each evening.</li>
<li>No reading books, except for 1 hour of fiction pleasure reading before bed.</li>
<li>No web surfing at the desk unless it is necessary to complete a task for that day.</li>
</ol>
<div>
These rules are pretty strict, since most of us spend a huge portion of our time doing the things that are prohibited by this diet. Let's go into a little more detail about my motivation for doing this.</div>
<div>
<br /></div>
<div>
<span style="font-size: large;"><b>Improving The Signal to Noise Ratio</b></span></div>
<div>
<br /></div>
<div>
Prior to this challenge I was consistently reading over 100 RSS feeds, getting multiple email newsletters, and spending a fair amount of time reading news sites like Business Insider. It started to feel like I was consuming a ton of content, but not really getting a whole lot of value out of it. Some of the articles were only tangentially related to things that I care about, and some of them were just pure entertainment, or "junk food". This resulted in a feeling of being constantly overwhelmed by how much there is to read and absorb, while at the same time feeling like much it is low value. This is not a great place to be. </div>
<div>
<br /></div>
<div>
By taking a step back and allowing the unread items in Feedly and Gmail to pile up (R.I.P. Google Reader...), I hoped to identify some streams of content that could be pruned due to a low percentage of meaningful content. This was a challenge after all, and I always planned on emerging from my bubble at some point. There <i>is </i>a lot of valuable content that I read which makes me a better engineer and a more well rounded human being - this particular goal was simply to get rid of some of the cruft. </div>
<div>
<br /></div>
<div>
<b><span style="font-size: large;">Becoming More T-Shaped</span></b></div>
<div>
<br /></div>
<div>
As I mentioned in <a href="http://www.jonathanklein.net/2012/09/learning-strategies-for-engineers-part-1.html" target="_blank">Learning Strategies for Engineers - Part 1</a>, the idea of being a T-shaped employee makes a lot of sense to me. Here's the description from Valve again:</div>
<blockquote class="tr_bq">
<span face="" style="background-color: white; color: #333333; font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 15px; line-height: 20px;">"That is, people who are both generalists (highly skilled at a broad set of valuable things—the top of the T) and also experts (among the best in their field within a narrow discipline—the vertical leg of the T)."</span></blockquote>
Reading a ton of blog posts, news sites, emails, and generally just consuming content that is pushed to you is a great way to widen the top of your T, but it doesn't do a whole lot for that vertical leg. One of my goals was to give myself the time to deepen my skills in particular areas through deliberate practice. Whether this meant researching a particular topic in preparation for a talk, writing a blog post about some piece of software, learning a new framework or language, or reading a technical book, it all boiled down to being very focused and specific about what information I take in. <br />
<br />
<b><span style="font-size: large;">Spending More Time in Quadrant Two</span></b><br />
<br />
You may be familiar with Stephen Covey's time management matrix:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.newcoolthang.com/wp-images/covquads.gif" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.newcoolthang.com/wp-images/covquads.gif" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
One of the biggest takeaways for me from Stephen's book (<a href="http://www.amazon.com/gp/product/0743269519/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=0743269519&linkCode=as2&tag=wwwjonathankl-20" target="_blank">The 7 Habits of Highly Effective People</a>) was that to be extremely productive you have to spend most of your time in quadrant two: doing things that are important but not urgent. This is where you have room for creativity, spontaneity, and serendipity, and most truly valuable work comes out of this subset of activities. I classify most passive news consumption as a quadrant one activity - you are basically just firefighting and trying to keep that unread count at zero. Thus another goal of this challenge was to give myself the time to investigate some important things that I had been putting off because they weren't urgent. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-size: large;"><b>So How Did It Go?</b></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I ended up doing this challenge for two full weeks, ending on Sunday, April 7th. During the challenge I definitely felt more relaxed, had significantly more free time, and didn't feel the same fatigue that I usually get after spending hours reading technical material. I tried to use the time to do valuable things, and I managed to get a fair amount done:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul class="ul1">
<li class="li1">Finished the Coursera class I was taking and <a href="http://www.jonathanklein.net/2013/03/coursera-review-computer-networks.html" target="_blank">blogged about it</a></li>
<li class="li1">Spent a lot more time with friends (lunches, dinners, etc.)</li>
<li class="li1">Started and finished <a href="https://www.amazon.com/gp/product/0765319195/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=0765319195&linkCode=as2&tag=jklein-20&linkId=6b4b5eb9c5be7320e271d5300a6b731c" target="_blank">The End of Eternity</a></li>
<li class="li1">Exercised more consistently (no more "I'm too busy" excuses)</li>
<li class="li1">Learned the basics of Ruby</li>
<li class="li1">Installed and played around with <a href="http://ellislab.com/codeigniter" target="_blank">CodeIgniter</a></li>
<li class="li1">Submitted three conference talks</li>
<li class="li1">Started a couple of programming projects</li>
<li class="li1">Refinanced my mortgage</li>
<li class="li1">Finished the first season of The Wire (yes, I really hadn't seen it)</li>
</ul>
<div>
<br /></div>
<div>
It wasn't all fun and games though, there were some challenges and drawbacks:</div>
<div>
<br /></div>
<div>
<ul>
<li>I basically had no idea what was going on with the world. This problem was exacerbated by the fact that I work from home - I was pretty cut off from the media. People would reference major news items and I was largely oblivious.</li>
<li>During the small periods of dead time during the day (e.g. riding the train, the gap between morning exercise and starting work, etc.) I didn't know what to do. It's easy to fill this time by reading a few articles, and without that to fall back on I was often at a loss. The answer here seems to be to have a book ready, or maybe a list of articles that you are reading <i>for a specific reason</i>, like research for a presentation.</li>
<li>Once the challenge ended, I had a huge list of unread articles and emails to power through, on top of all of the additional work that I signed myself up for during the challenge (I had all that free time, after all). This amounted to almost 600 unread items in Feedly and around 50 unread email newsletters. As I mentioned earlier, taking a step back <i>did</i> allow me to take a critical look at all of these streams of information, and I did a lot of unsubscribing/deleting to bring things back to a reasonable level.</li>
</ul>
<div>
<br /></div>
<div>
<b><span style="font-size: large;">Takeaways</span></b></div>
</div>
<div>
<br /></div>
<div>
Overall I really enjoyed this exercise. As I had hoped, it allowed me to get a more comprehensive view of where my time goes, and what information I consume. By trimming out some of the less important information sources, I think I will have more time in the future to focus on work that adds value to the world and gives me more satisfaction. </div>
<div>
<br /></div>
<div>
The downtime that I had also forced me to think more deeply about long term goals, side projects, and what skills I want to build to make myself a better engineer. I found that this type of introspection helped me focus my energies on projects that matter, while at the same time bringing a feeling of satisfaction and control to my life. </div>
<div>
<br /></div>
<div>
I highly recommend that everyone try this for at least a week or two. You might be surprised by what you learn about yourself.</div>
Jonathan Kleinhttp://www.blogger.com/profile/14232876592080837327noreply@blogger.com0