<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Ivan Vanderbyl: Writing</title>
		<link>https://ivan.dev/writing</link>
		<atom:link href="https://ivan.dev/rss.xml" rel="self" type="application/rss+xml" />
		<description>Essays on software, AI and building companies.</description>
		<language>en-au</language>
		<item>
			<title>SOC 2 penetration testing: you don't need a pentest firm anymore</title>
			<link>https://ivan.dev/articles/soc-2-penetration-testing-without-a-pentest-firm</link>
			<guid>https://ivan.dev/articles/soc-2-penetration-testing-without-a-pentest-firm</guid>
			<pubDate>Sat, 07 Nov 2026 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Security</category>
			<description>A SOC 2 pentest used to cost US$5,000 to US$20,000. AI agents now do it better for about US$1,500, and neither SOC 2 nor ISO 27001 needs an outside firm.</description>
			<content:encoded><![CDATA[<p>Six months ago, penetration testing for our SOC 2 audit cost somewhere between US$5,000 and US$20,000. Today I can get a better test for about US$1,500, run by AI agents, and I don’t have to talk to a single salesperson to get it.</p> <p>The short answer to the question most founders ask: <strong>SOC 2 does not require penetration testing by an outside firm, and neither does ISO 27001.</strong> Both want you to test your security, fix what you find, and prove it. Who does the testing is up to you.</p> <p>That is a big change, and I don’t think many people have noticed it yet. Here is what changed, what it costs, and what the standards actually ask for.</p> <h2>How SOC 2 penetration testing used to work</h2> <p>If you have been through SOC 2 or ISO 27001, you know the routine. I first went through it <a href="https://ivan.dev/articles/flood-is-now-soc2-compliant">at Flood, when we got SOC 2</a>.</p> <p>Your compliance platform or auditor tells you that you need a penetration test. You ask who to use. They give you a short list of firms you have never heard of. There is usually a middleman taking a cut somewhere along the way. You get a quote for somewhere between US$5k and US$20k, depending on how many “applications” and “IP addresses” they decide you have.</p> <p>Then you wait. Some weeks later, you get a PDF.</p> <p>The PDF is about 30 pages long. Most of it is screenshots from automated scanners. The rest is explanation that is either badly written or copied and pasted from a vulnerability database. A missing security header gets a full page. A TLS cipher nobody has used in years gets a “medium” rating. Behind all of it, as far as I can tell, is someone at an outsourcing shop running the same scripts against every client and pasting the output into a template.</p> <p>It is bullshit. It ticks a box for the auditor. It gives your engineering team almost nothing they can act on.</p> <p>The worst part is that it happens once a year. Your code changes every day. A test from last March tells you very little about the code you shipped last week.</p> <h2>What AI penetration testing looks like now</h2> <p>AI agents got good at this work. Not “fancy scanner” good. Actually good.</p> <p>Two tools changed how I think about it: deepsec for the code, and AWS Security Agent for the running app.</p> <h3>Deepsec: find vulnerabilities in your code</h3> <p><a href="https://vercel.com/blog/introducing-deepsec-find-and-fix-vulnerabilities-in-your-code-base" rel="nofollow">Deepsec</a> is an open-source tool from Vercel. It runs over your repository and flags code that looks risky. Then it sends coding agents (Claude or Codex) to look at each flagged file properly, the way a security engineer would. It filters out false positives and tells you who on your team is best placed to fix each problem. You can run it locally or in CI. It finds, and helps you remove, a very large class of problems before anyone outside ever sees them.</p> <p>Two tips to get the most out of it:</p> <ul><li><strong>Use the best model, at its highest effort level.</strong> Vercel publishes <a href="https://vercel.com/blog/deepsecbench-evaluating-model-performance-in-finding-cybersecurity-vulnerabilities" rel="nofollow">DeepsecBench</a>, which compares models on 231 real vulnerabilities. When it came out in July 2026, the leader was GPT-5.6 Sol at <code>xhigh</code> effort. It found about 45% more issues than the same model at <code>medium</code> effort, and 96% of what it reported was real. That run cost about US$56 for 50 files. Check the leaderboard before you start, because the leader changes.</li> <li><strong>Run it 3 times.</strong> Agents don’t find the same things every time. Even the best model finds only about a third of the known issues in a single run. Run it 3 times and combine the results. That catches much more than one run does, and it still costs far less than a day of a consultant’s time.</li></ul> <h3>AWS Security Agent: pentest your running app</h3> <p>AWS launched <a href="https://aws.amazon.com/blogs/security/introducing-aws-continuum-security-at-machine-speed/" rel="nofollow">Continuum</a> in June 2026 as a continuous security service. It finds, ranks, checks and fixes security risks. The penetration testing part, previously sold as AWS Security Agent, uses agents to attack your running application the way a real attacker would. They chain findings together, try exploits, and confirm what actually works.</p> <p>It also produces a report that looks like it came from a serious security firm. Here is the cover page and table of contents from one of ours:</p> <figure><img src="https://ivan.dev/_img/images/pentest-report-cover-1200.webp" alt="Cover page of an AWS Security Agent penetration test report, pentest-261106, dated 7 November 2026." width="1275" height="1650" srcset="https://ivan.dev/_img/images/pentest-report-cover-400.webp 400w, https://ivan.dev/_img/images/pentest-report-cover-800.webp 800w, https://ivan.dev/_img/images/pentest-report-cover-1200.webp 1200w, https://ivan.dev/_img/images/pentest-report-cover-1275.webp 1275w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/> <figcaption>The cover of our AWS Security Agent report.</figcaption></figure> <figure><img src="https://ivan.dev/_img/images/pentest-report-toc-1200.webp" alt="Table of contents of the report: filters, executive summary, scope, methodology, 6 findings and detailed findings, running to page 70. The finding titles are blurred." width="1275" height="1041" srcset="https://ivan.dev/_img/images/pentest-report-toc-400.webp 400w, https://ivan.dev/_img/images/pentest-report-toc-800.webp 800w, https://ivan.dev/_img/images/pentest-report-toc-1200.webp 1200w, https://ivan.dev/_img/images/pentest-report-toc-1275.webp 1275w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/> <figcaption>The table of contents. I blurred the finding titles.</figcaption></figure> <p>That test ran on 6 November 2026. The report is 76 pages long, with 6 findings: 2 high and 4 medium. I have blurred the finding titles, because some of them are still open.</p> <p>What matters is what is inside. Each finding starts with “What this is” and “Why it matters”, in plain English. Then it gives the exact steps to reproduce it, with tokens and secrets already redacted. Every finding in the report has high confidence, which AWS defines as confirmed by actually exploiting it. There is not a single screenshot of a missing security header.</p> <p>This is the document you hand to your auditor. It also gives your engineers something they can fix the same day.</p> <p>In my experience, these agents do a better job than any manual pentester we have paid for. The findings are specific. Each one comes with proof that it is real. You can retest a fix straight away, instead of waiting for next year’s engagement.</p> <h2>How much does a SOC 2 penetration test cost?</h2> <p>With a traditional firm, expect US$5,000 to US$20,000 per test. With AWS Security Agent, a full test of a SaaS app costs about US$1,500.</p> <p>AWS charges <a href="https://aws.amazon.com/security-agent/pricing" rel="nofollow">US$50 per task-hour</a> for penetration testing. A task-hour is one hour of agent work. Agents work in parallel, so a test that runs for an afternoon can use 20 or 30 task-hours.</p> <p>That means about <strong>US$1,500 buys 30 task-hours of pentesting</strong>. AWS’s own example of a full pre-release test of an enterprise SaaS app comes to about US$1,560. New AWS customers also get two months free, with up to 400 task-hours each month.</p> <p>Compare that with US$5k to US$20k for a PDF of scanner screenshots. It is crazy cheap for what it does.</p> <p>Because it is cheap, you can stop treating pentesting as a yearly event. Run it before a big release. Run it after you change your auth. Run it every month if you like.</p> <h2>Does SOC 2 require penetration testing?</h2> <p>Not by name, and not from an outside firm. This is the part most people miss.</p> <p>The SOC 2 Trust Services Criteria mention penetration testing once. It is in a “point of focus” under CC4.1, which is about how you monitor your controls. It is listed as one example of an evaluation you might use, next to things like independent certifications. Points of focus are guidance. They are not a list of requirements.</p> <p>Many auditors do expect to see some kind of security testing, especially for a Type II report. But nothing says that testing has to be bought from a third-party firm.</p> <h2>Does ISO 27001 require penetration testing?</h2> <p>ISO 27001 doesn’t name penetration testing as a requirement either. The 2022 version asks you to manage technical vulnerabilities (Annex A 8.8) and to test security during development and acceptance (Annex A 8.29). It asks you to do this in a way that fits your risks, and to keep evidence that you did it. It does not name a type of vendor, and it does not say the work must come from outside your company.</p> <p>What both standards care about is simple. Do you test? Do you fix what you find? Can you prove it? You can do that work yourself. Or you can use a nearly free service like AWS Security Agent, and keep its reports and retest results as your evidence.</p> <p>Before your audit, talk to your auditor. Tell them what you plan to use and show them a sample report. In my experience, an auditor is much happier with continuous testing and a clear record of fixes than with a once-a-year PDF.</p> <h2>What I would do now</h2> <p>If you are working toward SOC 2 or ISO 27001 today, this is what I would do:</p> <ol><li><strong>Scan your code first.</strong> Run deepsec over your repository 3 times, with the top model from DeepsecBench at its highest effort level. Fix what it finds. This is the cheapest work you will ever do on security.</li> <li><strong>Pentest your running app with agents.</strong> Point AWS Security Agent at a staging copy of your app. Expect to spend a few hundred to a couple of thousand dollars.</li> <li><strong>Fix, then retest.</strong> Close the findings and run the retests. That record of “found, fixed, proven fixed” is the evidence your auditor wants.</li> <li><strong>Keep doing it.</strong> Put it on a schedule or tie it to big releases. Security testing should follow your code, not the calendar.</li> <li><strong>Only hire a firm if you have a reason.</strong> Some customers will still ask for a named third-party test in their contract. That is fine. Buy one then, for that customer. Don’t buy one by default because someone selling compliance software told you to.</li></ol> <p>The old pentest industry was selling a checkbox. Now you can get the checkbox and a real security improvement, for less than the old price of the checkbox.</p> <h2>Common questions</h2> <p><strong>Can I run my own penetration test for SOC 2?</strong> Yes. Neither SOC 2 nor ISO 27001 says the test must come from an outside firm. What your auditor needs is evidence: what was tested, what was found, and proof that you fixed it.</p> <p><strong>Will my auditor accept an AI penetration test?</strong> Ask them before the audit, and show them a sample report. The AWS Security Agent report has an executive summary, scope, methodology and reproduction steps for every finding, which is what an auditor looks for.</p> <p><strong>How much does AI penetration testing cost?</strong> AWS Security Agent costs US$50 per task-hour. A full test of a SaaS app is about 30 task-hours, or about US$1,500. Deepsec is free and open source. You pay only for the model, about US$56 for 50 files with the top model in Vercel’s July 2026 benchmark.</p> <p><strong>When do I still need a pentest firm?</strong> When a customer contract names one. Some enterprise customers ask for a third-party test by name. Buy it for them when they ask, not by default.</p>]]></content:encoded>
		</item>
		<item>
			<title>Get faster by running slower: what two VO2 max tests taught me about heart rate zones</title>
			<link>https://ivan.dev/articles/get-faster-by-running-slower</link>
			<guid>https://ivan.dev/articles/get-faster-by-running-slower</guid>
			<pubDate>Fri, 25 Sep 2026 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Running</category>
			<description>The most useful number from my VO2 max test was not my VO2 max. It was the heart rate at which my breathing first changed.</description>
			<content:encoded><![CDATA[<p>The most useful number from my VO2 max test was not my VO2 max. It was the heart rate at which my breathing first changed.</p> <p>Before the test, running metrics felt like three languages that nobody had translated. My watch showed five heart rate zones. Training plans talked in paces: easy pace, tempo pace, 10 km pace. Everyone online talked about “80/20”. I followed each one separately and never saw how they connected.</p> <p>They connect through two points in your breathing. Once I had those two points measured, the zones, the paces and the 80/20 rule turned into one picture.</p> <h2>What the test actually measures</h2> <p>A VO2 max test is simple. You run on a treadmill with a mask over your face. Every few minutes the speed goes up. The mask measures how much oxygen you take in, how much carbon dioxide you breathe out, and how much air you move per minute. You keep going until you cannot.</p> <p>The headline number, VO2 max, is the ceiling: the most oxygen your body can use per kilogram per minute. It is a good number to have. It does not tell you how to run tomorrow.</p> <p>The two numbers that change how you train sit below the ceiling. They are the ventilatory thresholds.</p> <ul><li><strong>VT1, the first ventilatory threshold.</strong> The point where your breathing first starts to rise faster than your oxygen use. Below it, you can talk in full sentences. It sits close to what coaches call the aerobic threshold.</li> <li><strong>VT2, the second ventilatory threshold.</strong> The point where your breathing rises steeply a second time, because acid is building up in your muscles faster than you can clear it, and your body breathes harder to blow off the extra carbon dioxide. Above it, you manage a few words at a time. For a trained runner it is roughly the pace you could hold for an hour.</li></ul> <p>I did two tests at The Mill, seven weeks apart. In August, my VT1 was 131 bpm at 7:09 per km. My VT2 was 159 bpm at 5:13 per km. (All my paces are flat equivalents. The Mill runs the test at a 3% incline and converts the speeds.)</p> <p>That is a gap of almost two minutes per km between the two thresholds. It is also the most important thing the test told me.</p> <h2>Why the zones on my watch never made sense</h2> <p>Watch zones are usually percentages of an estimated maximum heart rate. The common estimate, 220 minus your age, can be wrong by 10 bpm or more for a given person. And even with a correct maximum, a percentage does not know where your thresholds are. Two runners with the same maximum can have VT1 at very different heart rates.</p> <p>That is why “Zone 2” meant different things to different people. It is a band on a five-zone scale, and the band only means something when it is anchored to your thresholds.</p> <p>The Mill builds its zones from VT1 and VT2. My Zone 2 is 118 to 131 bpm, which ends exactly at VT1. In pace, that is 7:14 to 7:59 per km. That is what easy means for me.</p> <p>The test swaps the guess for two measured points, and every useful zone hangs off them:</p> <table><thead><tr><th>Zone</th><th>Where it sits</th><th>What it feels like</th></tr></thead><tbody><tr><td>Easy</td><td>Below VT1</td><td>Full sentences. Could go for hours</td></tr><tr><td>Grey zone</td><td>Between VT1 and VT2</td><td>Comfortably hard. Short phrases</td></tr><tr><td>Hard</td><td>Above VT2</td><td>A few words. Minutes, not hours</td></tr></tbody></table> <p>When people say “Zone 2 training”, the useful version is running just under VT1. “Sub-Zone 2” is the same idea with a margin for error: stay a few beats below VT1 so heat, hills and a bad night’s sleep do not push you over it.</p> <h2>What seven weeks changed</h2> <p>Put pace along the bottom and heart rate up the side. Every runner has a curve on this chart: how hard your heart works for a given pace. Here are mine from both tests.</p> <figure><img src="https://ivan.dev/images/running-slower-chart-1-tests.svg" alt="Heart rate against pace in two lab tests, 30 June and 18 August 2026. VT1 stayed at about 7:09 per km. VT2 moved from 5:35 to 5:13 per km." width="960" height="600" loading="lazy" decoding="async"/> <figcaption>My two lab tests at The Mill. The first stage (8:00 per km) is read off The Mill's chart. All other points come from its results table.</figcaption></figure> <p>The top of the curve moved. VO2 max went from 57.5 to 61.3 ml/kg/min. About a quarter of that came from being 1.4 kg lighter. The rest was real: my body used 5% more oxygen at its peak. VT2 moved 22 seconds per km faster, from 5:35 to 5:13, and its heart rate rose from 151 to 159 bpm. I can now run faster and harder before my breathing tips over.</p> <p>The bottom did not move. VT1 went from 129 bpm at 7:08 per km to 131 bpm at 7:09 per km. That is the same point, inside the normal day-to-day noise of a heart rate reading.</p> <p>That surprised me, and then it made sense. The ceiling responds to training in weeks. The aerobic base takes months.</p> <h2>The lever: same heart rate, faster pace</h2> <p>The base is where the lever sits. Heart rate is the cost. Pace is what you get for it. Easy running does not lower the cost of running hard so much as it moves the whole curve to the right, so the same heart rate buys a faster pace.</p> <figure><img src="https://ivan.dev/images/running-slower-chart-2-lever.svg" alt="My August curve and an illustrative goal curve moved 30 seconds per km to the right. At 131 bpm, pace goes from 7:09 to 6:39 per km." width="960" height="600" loading="lazy" decoding="async"/> <figcaption>The goal line is illustrative, not a test result.</figcaption></figure> <p>The mechanism is not mysterious. Hours below VT1 build more mitochondria in the muscle (the parts of the cell that burn fuel with oxygen), more capillaries to deliver blood to them, and a heart that pushes out more blood per beat. Each beat buys more speed.</p> <p>My two-minute gap between VT1 and VT2 is the room this lever has to move. The top end is already strong. The base is not yet.</p> <p>So the number I now track is not race time and not VO2 max. It is <strong>pace at VT1 heart rate</strong>. After seven weeks it had not moved. If it gets faster over the next few months, the training is working, whatever my last race said.</p> <h2>The 80/20 pyramid</h2> <p>The 80/20 rule comes from Stephen Seiler, an exercise physiologist who studied how elite endurance athletes actually train. Across rowing, cross-country skiing, cycling and running, he found the same shape: about 80% of sessions below VT1, and the other 20% at or above it.</p> <figure><img src="https://ivan.dev/images/running-slower-chart-3-pyramid.svg" alt="Share of a 5 hour running week by intensity: 80% below VT1, 12% between VT1 and VT2, 8% above VT2." width="960" height="400" loading="lazy" decoding="async"/> <figcaption>An example 5 hour week. Seiler's 80/20 counts sessions, not minutes. Counted in minutes, the base is usually wider still.</figcaption></figure> <p>For a 5 hour week, that is 4 hours easy and about an hour of harder running, split across one or two sessions. The pyramid is a good way to think about it because the width of the base limits how high the top can go. The easy running builds the curve shift. The hard sessions sharpen what the base can support.</p> <p>Most recreational runners build the opposite shape. Almost every run lands in the grey zone: too hard to count as easy, too easy to count as a real workout. Even the names work against you. The Mill labels my grey zone, 131 to 151 bpm, “Endurance”. It feels productive because it is tiring. But it leaves you too flat for proper hard days, and it does not pile up the volume that moves the curve.</p> <h2>The best argument against</h2> <p>If you only run three or four hours a week, spending 80% of it slow feels like a waste. And there is real evidence behind that worry. Hard intervals raise fitness quickly in people who are new to training, often within a few weeks.</p> <p>That is true, and it is the reason the grey zone is so tempting. The answer is what happens after those first weeks. Gains from intensity level off quickly. Gains from easy volume keep coming for months and years, and easy running lets you keep adding volume without breaking down. Studies of recreational runners point the same way: in a <a href="https://pubmed.ncbi.nlm.nih.gov/23752040/" rel="nofollow">2014 study</a> of 30 recreational 10 km runners by Muñoz, Seiler and colleagues, both groups improved over 10 weeks, but the group that trained polarised (mostly easy, some hard, very little in between) improved more. Among the runners who stuck closely to their plan, the polarised group ran 7.0% faster and the between-thresholds group 1.6% faster.</p> <p>The rule also scales down. On a small week, 80/20 still means one or two sessions with real intent and everything else genuinely easy. What it rules out is a week of medium runs.</p> <h2>What heart rate cannot tell you</h2> <p>Heart rate is a good guide, not an exact one. A few things caught me out.</p> <ul><li><strong>It lags.</strong> On a 400 m rep, your heart rate is still climbing when the rep ends. Use pace or effort for short intervals.</li> <li><strong>It drifts.</strong> On a long run, especially in heat, heart rate climbs at the same pace as you dehydrate and warm up. Slow down to hold it under VT1. Do not chase the pace.</li> <li><strong>Wrist sensors are noisy.</strong> A chest strap is far more reliable, especially in the first 10 minutes and on intervals.</li> <li><strong>Thresholds move.</strong> My VT2 heart rate rose 8 bpm in seven weeks. Zones set from an old test go out of date. Retest every few months, or use a field test in between.</li> <li><strong>A lab curve is a snapshot.</strong> Heat, sleep, caffeine and stress all shift heart rate by a few beats from day to day. A 2 bpm change between two tests is noise. Compare like with like.</li></ul> <h2>What I do now</h2> <ul><li>Easy runs sit a few beats under VT1, no matter how slow that feels.</li> <li>One or two sessions a week are genuinely hard, above VT2 or at threshold.</li> <li>Once a month I run the same flat loop at VT1 heart rate and record the pace. That single number is my progress chart.</li></ul> <p>It took two lab tests to show me where the work is. The fast end of my curve is already moving. The slow end is the one that needs time, so I now expect most of my running to feel too easy.</p>]]></content:encoded>
		</item>
		<item>
			<title>The 2%</title>
			<link>https://ivan.dev/articles/the-2-percent</link>
			<guid>https://ivan.dev/articles/the-2-percent</guid>
			<pubDate>Mon, 11 May 2026 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Strategy</category>
			<description>About half of workers use AI daily. Only 2% have re-engineered how the work itself gets done. The other 98% are using AI to type faster.</description>
			<content:encoded><![CDATA[<p>About six months ago something changed about how I work.</p> <p>I’ve been writing software for twenty years. I started in 2006 building automated credit decisioning systems for personal loans and mortgages. I worked on hypervisor code at a cloud company that’s now worth ten billion dollars. I built a performance testing company that HotStar used to simulate the two billion live streamers who tuned into the IPL in 2019, and later sold it. By rough count, I have spent something like thirty thousand hours in front of an editor.</p> <p>For most of that time my output was a straight line. Hours in, code out. I got faster, but the relationship between effort and result was linear. If you’d asked me to draw it on a graph, I could have.</p> <p>Six months ago the line broke.</p> <p>Last week I needed an iOS app for one of our products. The old playbook would have been to pick a hybrid framework like React Native, accept a slightly worse experience on both platforms in exchange for not having to write two apps. The new playbook is to build the iOS app properly, in SwiftUI, with Claude. Then have Claude build a native Android version that follows Android’s own conventions. Two genuinely native apps. Three days.</p> <p>Used to be a team. Maybe two teams. The better part of a year.</p> <p>The interesting part isn’t the speed. It’s that the compromise went away. I didn’t pick a worse architecture to save time. I picked the right architecture for each platform, because the cost difference disappeared.</p> <p>That’s a small example of something much larger.</p> <hr/> <p>About half of workers in advanced economies now use generative AI daily. Only one in eight say it’s changed how their organisation operates. And of those, only a fraction — call it 2% — have actually re-engineered how the work itself gets done.</p> <p>The other 98% are using AI to type faster.</p> <p>This is the part nobody quite says out loud. Most uses of AI right now are decorative. People draft an email and have AI tighten it. They write a brief and have AI summarise it. They produce the same outputs they always produced, but with fewer keystrokes. The underlying business runs the same way it ran two years ago.</p> <p>The 2% are doing something different. They’ve stopped using AI as a tool and started using it to ask whether the job should still exist.</p> <hr/> <p>For a decade, every essay about which jobs AI <em>wouldn’t</em> replace had programming near the top of the list. Programming is technical. It takes years to learn. There’s a famous claim that mastery requires ten thousand hours, and that claim was almost certainly low for serious software work. Programming requires creativity, abstract reasoning, and judgement about messy real-world systems. If any white-collar job was going to hold the line, it was this one.</p> <p>It didn’t hold the line.</p> <p>I’m not saying programmers are out of work. Most of us are doing fine. But the <em>shape</em> of the work has changed completely. The job I trained twenty years for — typing code, debugging line by line, holding the model of an entire system in my head — that job is essentially gone. What’s replaced it looks more like what a creative director does: pointing at the product, applying taste, deciding what’s worth building, managing a flock of agents that do the actual construction.</p> <p>If programming wasn’t safe, what is? Look at the work your team does and ask yourself: was programming <em>meaningfully harder</em> to automate than what your accountant does? Your operations manager? Your associate three years out of school? Your back-office team running invoices and onboarding?</p> <p>The honest answer is no. Programming was the canary in the coal mine. The canary just died.</p> <hr/> <p>The instinct, when you hear “AI is coming for white-collar work,” is defensive. Protect your job. Protect your team. Treat AI as a threat. That’s only the right instinct if your work is the kind that gets replaced.</p> <p>There are two kinds of work in any business. The first kind is linear: time <em>is</em> the product. One hour in, one unit out. Data entry, bookkeeping, document handling, scheduling, routine compliance. The work itself is execution — typing, processing, moving things from one place to another. AI doesn’t help with this work. AI replaces it.</p> <p>The second kind of work is non-linear: time <em>directs</em> the product. One hour in, ten or a hundred units out. Strategy, system-level decisions, directing agents, client relationships. The work itself is directing taste — pointing it at the right problems, recognising what’s worth doing, knowing when an output is excellent versus merely correct.</p> <p>AI doesn’t replace this kind of work. AI multiplies it.</p> <p>There’s a term from cybernetics that fits here. In the 1950s a researcher named Ross Ashby coined “Intelligence Amplification” — the idea that the most powerful use of computing wouldn’t be to replace human thought but to amplify it. The term was largely forgotten, partly because the technology to do it didn’t exist yet. It exists now. The 2% aren’t using Artificial Intelligence. They’re using Intelligence Amplification.</p> <hr/> <p>I gave a version of this argument recently in Queenstown, where I live. Queenstown is a small town in New Zealand built almost entirely on selling experience to people who flew here for it. Tourism makes up about a third of our GDP, against four per cent nationally — an eight-times concentration in the part of the economy where the product <em>is</em> a human experience. Unemployment here is around 1.4%. Nationally it’s over five. We are operating at near-total labour capacity, which means the constraint isn’t demand. It’s people.</p> <p>So when I make the case that AI is coming for white-collar work, the room hears it differently than it would in most rooms in New Zealand. For these businesses, AI isn’t a threat to the workforce. It’s a force multiplier for the workforce they can’t hire.</p> <p>I think this is true of most businesses, not just ones in tourist towns. Clients don’t pay their wealth manager for paperwork. They pay for judgement. They don’t pay their architect for AutoCAD time. They pay for taste. They don’t pay their tour operator for logistics. They pay for the experience itself. The administrative work was never what they were buying. AI just makes that visible faster than it would have been otherwise.</p> <p>When the cost of execution falls, the part of the work that’s left — the part the client was always actually paying for — gets <em>more</em> valuable, not less.</p> <hr/> <p>If you want to be in the 2%, the path is unglamorous. Don’t build an AI strategy. Don’t hire a head of AI. Don’t write a roadmap.</p> <p>Find one task. One repetitive thing eating five or more hours a week somewhere in your business. Invoice coding, lead qualification, report generation, email triage — pick one. Hand it to an autonomous tool. Watch what happens to the people who used to do it. They won’t run out of work. They’ll move up the value chain.</p> <p>Do it once. Learn what worked and what broke. Then do it again.</p> <p>That’s the whole programme.</p> <p>The 2% aren’t working harder. They aren’t running faster. They’ve just stopped doing the work that doesn’t require them.</p>]]></content:encoded>
		</item>
		<item>
			<title>Nature's Razor: Why Simplicity Always Wins</title>
			<link>https://ivan.dev/articles/simplicity</link>
			<guid>https://ivan.dev/articles/simplicity</guid>
			<pubDate>Mon, 10 Nov 2025 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Philosophy</category>
			<description>Nature is lazy, and that's why it works. What light, evolution and Gall's Law teach us about building products and software that last.</description>
			<content:encoded><![CDATA[<p>Nature is lazy. Light, water and evolution all find the cheapest route that works, and the products and codebases that last do the same. It’s the most practical rule I know, and nobody ever taught it to me in a classroom.</p> <h2>Nature takes the cheap route</h2> <p>Physics calls it the principle of least action. Of every path a system could take, it follows the one where a quantity called action is smallest. Light crossing from air into water bends at the exact angle that gets it there in the least time. Water runs downhill. A thrown ball follows the same arc every time, because every other arc costs more.</p> <p>You can derive most of classical mechanics and optics from that one idea.</p> <p>Evolution runs on a similar budget. Every extra structure costs energy to build and to keep, so it only survives if it pays for itself. A stick insect doesn’t carry camouflage and armour and speed. It looks like a stick, and that’s enough.</p> <h2>Gall’s Law</h2> <p>In 1975 John Gall, a paediatrician who wrote about why systems fail, put the same idea in a form engineers can use:</p> <blockquote><p>“A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system.”</p></blockquote> <p>Gall doesn’t say complexity is bad. He says you can’t design working complexity in one step. You can only grow it from a simple system that already works.</p> <h2>What this means for products</h2> <p>Most of the failed products I’ve watched started complex. They tried to solve ten problems at once and had feature lists that read like CVs. Then they died.</p> <p>The ones that won started with one thing:</p> <ul><li>Google launched as a search box. No portal, no directory.</li> <li>Instagram was photo filters and a feed. Stories, Reels and shopping came years later.</li> <li>Slack was chat rooms you could search. Not an everything app, just chat that didn’t suck.</li></ul> <p>All three are complex now. None of them started that way. They worked first, then they grew.</p> <p>Every feature costs your users something: one more thing to learn, one more option to skip past. It costs your team too, because someone has to keep it working. The simplest product that solves the problem wins because it asks the least of the people using it.</p> <h2>What this means for code</h2> <p>In software I haven’t seen an exception.</p> <p>The systems I’d happily maintain started small. They had clear boundaries and did one job well. They grew when real use demanded it, and each addition had to fit the shape of the original design.</p> <p>The systems I dread started with microservices before they had users. They had abstraction layers over their abstraction layers. They were built to scale for load that never came, and they solved problems the business didn’t have yet.</p> <p>Those systems don’t evolve. They set hard. Every change breaks something else, and every new developer needs a PhD to follow the architecture. Eventually someone proposes a rewrite, which is an admission that the team built complexity before it built something simple that worked.</p> <h2>Using it as a razor</h2> <p>A razor is a rule for cutting away bad options. This one cuts like this:</p> <ul><li><strong>A new feature:</strong> does it solve a real problem in the least complex way? Or are we adding it because we can?</li> <li><strong>A new system:</strong> what’s the simplest version that could work, and can we ship that first?</li> <li><strong>A design that feels complicated:</strong> take the feeling seriously. It usually means you’re designing complexity instead of growing it.</li> <li><strong>A “comprehensive solution”:</strong> be wary. Comprehensive usually means designed complex from day one. Ask what simple system you could start with instead.</li></ul> <h2>The hard part is discipline</h2> <p>Understanding this is easy. Following it is not.</p> <p>It’s tempting to design for scale on day one, to add flexibility you might need later, to fix the next problem while you’re in there. It’s tempting to look sophisticated.</p> <p>Don’t. Build the simplest thing that could work and ship it. Let real use show you where the complexity belongs. Then add it reluctantly, and only when living without it hurts more than the complexity will.</p> <p>Simple is usually harder to build than complex, because you have to decide what to leave out. It’s also what survives. Nature has been selecting for it for billions of years.</p> <p>Be lazy like the universe.</p>]]></content:encoded>
		</item>
		<item>
			<title>Bootleg Starlink: connecting family properties in rural Australia</title>
			<link>https://ivan.dev/articles/bootleg-starlink</link>
			<guid>https://ivan.dev/articles/bootleg-starlink</guid>
			<pubDate>Fri, 16 May 2025 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Hardware</category>
			<description>A long-haul flight, $0.30/m fibre from AliExpress, and a self-described 'old dog' running 1.5 km of cable through the bush to fix our video calls.</description>
			<content:encoded><![CDATA[<p>My parents had the same ADSL connection from the early 2000s. It was fine for email. It was useless for video calls, and after I moved overseas, video calls were how I saw them. Every call was a frozen face and a round of “you’re breaking up” and “can you say that again?”</p> <p>My cousin has a holiday home on the other side of my parents’ property, about 1.5 km away over hilly bush. They got Starlink before our area filled up, and whenever they visited, their internet just worked.</p> <p>So the plan was to share my cousin’s Starlink with my parents. The hard part was getting a network connection across 1.5 km of hills and gum trees.</p> <h2>Picking the cable</h2> <p>I already had a trip home booked, so I spent the long-haul flight and the layovers reading about rural networking. There were three options:</p> <ol><li><strong>Wireless point-to-point link.</strong> Out straight away. The hills block line of sight, and fixing that means building towers.</li> <li><strong>Ethernet cable.</strong> Copper Ethernet is rated for 100 m per run. Covering 1.5 km would need more than a dozen repeaters out in the bush, and each one needs power.</li> <li><strong>Fibre optic.</strong> I assumed it would be expensive and fiddly. Once I read more, it was clearly the most reliable option and the one that would last.</li></ol> <p>By the time I landed I’d settled on single-pair OS2 outdoor shielded fibre. Then I found it on AliExpress for <strong>$0.30 per metre</strong>. Local suppliers quoted over $3. A 2 km spool, with spare for slack, cost $600.</p> <h2>What we used</h2> <ul><li>2 km spool of OS2 single-mode fibre from AliExpress ($0.30/m)</li> <li>Linksys unmanaged switch with an SFP module, at my cousin’s holiday home</li> <li>Linksys unmanaged switch and a media converter, at my parents’ place</li> <li>High-tensile steel wire and steel braid cable to hang the fibre from</li> <li>2-inch cuts of poly pipe as cable protectors (Dad’s idea, more on that below)</li> <li>A 250 m span of high-tensile wire to carry the fibre over the road, from the house to a gum tree</li></ul> <h2>Dad did the install</h2> <p>I ordered the network gear on Amazon and the fibre on AliExpress before I flew back to New Zealand. The network gear arrived quickly. The fibre took <strong>two months</strong>, long after I’d left.</p> <p>So my technophobe dad had to install it himself. I drew diagrams with every connection labelled, put together colour-coded instructions with photos, and spent several video calls teaching him the basics of fibre.</p> <p>He surprised me. He strung high-tensile steel wire between the trees and added steel braid cable, which gave him a support line that was strong but light. Then he had to attach the fibre to it. Cable ties can pinch fibre and break down in the sun, so he cut 2-inch pieces of poly pipe and used them as sleeves where the fibre meets the steel. I hadn’t thought of that.</p> <p>The road was the hard part. Going under it would have meant road works, so Dad went over it instead, on a 250 m span of high-tensile wire from the house to a gum tree. Telstra’s poles along the road already carry the old phone line, and hanging our fibre from them would have been easier. We decided not to. It’s technically allowed with Telstra’s permission, but it’s a legal grey area, so we kept to our own wire and trees.</p> <figure><img src="https://ivan.dev/_img/images/bootleg-starlink-suspension-1200.webp" alt="A black aerial cable strung between trees across a clearing, with a forested hillside and Mount Warning in the distance under a blue sky." width="1400" height="1195" srcset="https://ivan.dev/_img/images/bootleg-starlink-suspension-400.webp 400w, https://ivan.dev/_img/images/bootleg-starlink-suspension-800.webp 800w, https://ivan.dev/_img/images/bootleg-starlink-suspension-1200.webp 1200w, https://ivan.dev/_img/images/bootleg-starlink-suspension-1400.webp 1400w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/> <figcaption>The suspended run between the properties. The small black bobbins are the poly-pipe sleeves Dad cut to stop the fibre chafing on the steel cable.</figcaption></figure> <p>Over one weekend, while I waited anxiously in New Zealand, he ran the full 1.5 km and connected everything by following my diagrams. The unmanaged switches meant there was nothing to configure. Plug it in and it works.</p> <h2>The network</h2> <p>At my cousin’s end, a Linksys switch with an SFP module takes the fibre directly. At my parents’ end, a media converter turns the fibre signal back into ordinary Ethernet for a second switch.</p> <figure><img src="https://ivan.dev/_img/images/bootleg-starlink-enclosure-1200.webp" alt="The inside of a blue plastic tub mounted as an outdoor enclosure. A TP-Link MC220L gigabit media converter labelled 'Media Converter MC 1' sits next to an Ethernet switch labelled 'Ethernet Switch #1', both wired to a small power board with two adapters." width="1350" height="1800" srcset="https://ivan.dev/_img/images/bootleg-starlink-enclosure-400.webp 400w, https://ivan.dev/_img/images/bootleg-starlink-enclosure-800.webp 800w, https://ivan.dev/_img/images/bootleg-starlink-enclosure-1200.webp 1200w, https://ivan.dev/_img/images/bootleg-starlink-enclosure-1350.webp 1350w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/> <figcaption>The receiving end: a TP-Link MC220L media converter and an unmanaged switch, both labelled and bolted to a plywood base inside a repurposed plastic tub.</figcaption></figure> <p>The receiving end runs entirely on solar, so power draw mattered. The switch and media converter together use less than <strong>10 watts</strong>, and the battery bank keeps them running for days through cloudy weather.</p> <figure><img src="https://ivan.dev/_img/images/bootleg-starlink-tub-1200.webp" alt="The outside of the blue plastic tub on a wooden table, lid set aside, with a red Ethernet cable and a white fibre cable feeding in through a drilled hole on the side." width="1350" height="1800" srcset="https://ivan.dev/_img/images/bootleg-starlink-tub-400.webp 400w, https://ivan.dev/_img/images/bootleg-starlink-tub-800.webp 800w, https://ivan.dev/_img/images/bootleg-starlink-tub-1200.webp 1200w, https://ivan.dev/_img/images/bootleg-starlink-tub-1350.webp 1350w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/> <figcaption>The enclosure: a blue plastic tub with a hole drilled in the side for the fibre and Ethernet, and a snap-on lid to keep the rain out. Cost of housing: roughly nothing.</figcaption></figure> <h2>The results</h2> <p>Dad plugged in the last cable and we tried a video call. The picture was sharp and the sound didn’t drop once. I could see how proud he was, in HD.</p> <p>My parents went from 3–5 Mbps on ADSL, with almost no upload, to <strong>150+ Mbps down and 15+ Mbps up</strong> on the shared Starlink. Our calls are now just calls. When you live overseas, that matters more than any speed test.</p> <p>The part I didn’t expect was what it did for Dad. He now helps the neighbours sort out their internet. This is a man who used to ring me to find the power button on his computer.</p> <p>My parents also found streaming. They’d had little beyond broadcast TV, and now they watch Netflix, Disney+ and YouTube. Dad sends me links to documentaries he thinks I’d like.</p> <p>The fibre has come through several storms without dropping out. The old ADSL line went down whenever it rained hard. The Starlink and network gear also stay on when my cousin isn’t at the holiday home, so my parents are always connected.</p> <h2>What it cost</h2> <ul><li>OS2 single-mode fibre from AliExpress: <strong>$600</strong> (2 km at $0.30/m)</li> <li>Linksys switches and media converter: <strong>$320</strong></li> <li>Tree mounting hardware: <strong>$85</strong></li> <li>Road-crossing wire and materials: <strong>$120</strong></li> <li>Miscellaneous networking bits: <strong>$90</strong></li></ul> <p><strong>Total one-off cost: $1,215.</strong></p> <p>At local prices the fibre alone would have cost over $6,000, and the project wouldn’t have happened. It took two months to arrive, but the quality has been excellent.</p> <p>My parents chip in towards my cousin’s monthly Starlink bill. It costs them less than the ADSL did.</p> <h2>Is this allowed?</h2> <p>Starlink’s residential plan prohibits reselling the service. We don’t resell it. We extend a home network between two family properties, which is no different from a very long Ethernet cable, minus the wallabies chewing through 1.5 km of copper.</p> <h2>If you want to try this</h2> <ol><li><strong>Use single-mode OS2, not multi-mode OM3.</strong> Past about 500 m, OS2 is the right choice, whatever some sellers tell you.</li> <li><strong>Check AliExpress.</strong> $0.30 a metre against $3+ locally. Allow for slow shipping.</li> <li><strong>Use unmanaged switches</strong> if someone non-technical is doing the install. Nothing to configure means nothing to get wrong over a video call.</li> <li><strong>Over-document.</strong> Colour-coded diagrams and labelled photos are why Dad could do this without me there.</li> <li><strong>Use poly-pipe sleeves, not cable ties,</strong> where the fibre meets the support wire.</li> <li><strong>Cross roads overhead, on your own wire.</strong> Going under a road means road works. The phone company’s poles need their permission.</li> <li><strong>Hang the fibre from a support wire</strong> instead of fixing it straight to the trees. High-tensile wire plus steel braid is strong and light.</li> <li><strong>Plan for shipping delays</strong> of a couple of months on international orders.</li> <li><strong>Test every part before you fix it in place.</strong></li></ol> <h2>Why it mattered</h2> <p>I wanted better video calls with my parents, and I got them. I also got something I didn’t plan for. Because I had to teach Dad the install from another country, we spent those calls working through diagrams together, and the project brought us closer before the fibre was even connected.</p> <p>It took some reading on a long flight, a spool of very cheap fibre, and a self-described “old dog” willing to learn a new trick.</p>]]></content:encoded>
		</item>
		<item>
			<title>Browser vs Protocol based load testing</title>
			<link>https://ivan.dev/articles/browser-vs-protocol-based-load-testing</link>
			<guid>https://ivan.dev/articles/browser-vs-protocol-based-load-testing</guid>
			<pubDate>Fri, 19 Feb 2021 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Load testing</category>
			<description>Browser-based load testing is a new type of testing we developed at Tricentis to enable teams to quickly test modern applications that are increasingly difficult to test using traditional protocol-based load testing.</description>
			<content:encoded><![CDATA[<p>Browser-based load testing is a new type of testing we developed at Tricentis to enable teams to quickly test modern applications that are increasingly difficult to test using traditional protocol-based load testing.</p> <p>Browser-based load testing is very similar to traditional automation testing. We simulate a user’s actions, allowing us to test how the application we’re targeting reacts. We can do this by interacting with the UI of the application using the mouse or keyboard and following a set of steps in our test script.</p> <p>As the test runs, the browser makes requests to the servers for more information, inserts records, or performs a business function. For each action, dozens or sometimes hundreds of network requests happen in the background. With protocol-based load testing, we would simulate these requests and increase the rate of requests to increase the load.</p> <p>Protocol-based load testing has become more difficult as applications have grown in complexity. This means that simulating requests is often challenging to do realistically and requires huge commitments to maintain, which is why we see teams doing load testing only for critical releases at high demand times of the year, such as Valentines Day, Black Friday, or before Christmas sales periods.</p> <p>Modern apps are becoming easier to use, and this makes it easier to test. Using browser-based load testing, we can increase the load against the application under test by increasing the simulations we run concurrently without increasing our tests’ complexity, as would be the case with protocol-based tests.</p> <p>Overall, browser-based load testing makes testing more straightforward, more maintainable and generates realistic load without needing an intimate understanding of the network protocols connecting the app and the servers.</p>]]></content:encoded>
		</item>
		<item>
			<title>Flood is now SOC2 compliant</title>
			<link>https://ivan.dev/articles/flood-is-now-soc2-compliant</link>
			<guid>https://ivan.dev/articles/flood-is-now-soc2-compliant</guid>
			<pubDate>Tue, 16 Jun 2020 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Security</category>
			<description>After a year of work by our SRE team, Flood is excited to announce we have reached SOC2 Type I compliance, bringing audited Security and Privacy controls to our product and business operations.</description>
			<content:encoded><![CDATA[<p>After a year of work by our SRE team, Flood is excited to announce we have reached SOC2 Type I compliance, bringing audited Security and Privacy controls to our product and business operations.</p> <h3>What is SOC2 compliance?</h3> <p>SOC stands for Service and Organization Controls. It defines a set of controls covering five trust service principles: Security, Privacy, Availability, Processing Integrity, and Confidentiality.</p> <p>In Type I compliance, an independent Auditor verifies that we have implemented the controls as said we would. In Type II compliance, the Auditor checks the “operational effectiveness” of the controls, which is to say they verify we continue to comply at various times throughout the year and grants Type II compliance after we have maintained compliance for one year.</p> <p>For many security-minded customers, SOC2 is the minimum requirement of a vendor before doing business with them.</p> <h3>The 5 Trust Service Principles:</h3> <p>SOC2 is organization-specific, meaning each organization defines its controls to comply with each trust principle. The principles are very detailed, running into dozens of sub-categories. We don’t go into them here, but I’ll give you an overview of what is covered.</p> <p>Generally speaking, we can say that the five principles cover Security and Privacy, because Security, in the standard Security triad, covers Confidentiality, Integrity, and Availability.</p> <h3>Security</h3> <p>Security refers to the protection against unauthorized access. Implemented through access controls, monitoring, and organizational changes to ensure everyone in the organization understands the security requirements, and they are understood and implemented from senior management down through all teams.</p> <p>Security principles include controls for correcting for deviation from changes that may occur from time to time, how we track and document changes, and how we detect changes, including conducting vulnerability scans.</p> <h3>Availability</h3> <p>The Availability principle relates to ensuring we maintain, monitor, and evaluate our services’ availability in line with our SLAs. Availability is squarely in our wheelhouse as a core principle of performance engineering, and an activity we have been doing in the general day to operations of Flood for the past seven years.</p> <p>The availability principle includes measuring and forecasting usage, ensuring our systems scale with demand, performing backups, and ensuring we can restore from backups with minimal disruption and running critical services in multiple availability zones for redundancy.</p> <h3>Confidentiality</h3> <p>The Confidentiality principle relates to how we identify confidential information, how we handle it, access it, store it, and the processes in place to destroy it when no longer needed.</p> <p>At Flood, we’ve implemented strict controls to enforce encrypted transfer and storage of all customer data, bound by access controls to restrict further access to only those who need to access it.</p> <h3>Privacy</h3> <p>The Privacy principle addresses the collection, use, retention, disclosure, and disposal of personal information in conformity with our privacy policy.</p> <h3>Processing Integrity</h3> <p>The processing integrity principle addresses whether our systems produce the correct results when processing information, including what data is needed, and whether the result is accurate, and ensuring the results are only available to the right parties.</p> <h3>Summary</h3> <p>Whether you’re running load tests on the cloud, or your premises or private data center using Flood Agent, the Flood team and the rest of our organization have taken a considered and careful action to ensure that any data send us is protected and only used as needed while you’re a customer.</p> <p><em>Update, November 2026: penetration testing for SOC 2 has changed a lot since this post. Here is how I would do it today: <a href="https://ivan.dev/articles/soc-2-penetration-testing-without-a-pentest-firm">SOC 2 penetration testing without a pentest firm</a>.</em></p>]]></content:encoded>
		</item>
		<item>
			<title>The State Of Open Source Testing survey results, 2020 edition</title>
			<link>https://ivan.dev/articles/state-of-open-source-testing-survey-results-2020</link>
			<guid>https://ivan.dev/articles/state-of-open-source-testing-survey-results-2020</guid>
			<pubDate>Tue, 26 May 2020 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Testing</category>
			<description>Tricentis, in collaboration with Flood, SpecFlow, and TestProject, conducted our annual State Of Open Source survey, with nearly 2,000 responses.</description>
			<content:encoded><![CDATA[<p>Tricentis, in collaboration with Flood, SpecFlow, and TestProject, conducted our <a href="https://www.tricentis.com/state-of-open-source-2020/" rel="nofollow">annual State Of Open Source survey</a>, with nearly 2,000 responses.</p> <p>In this post, we’ll explore the findings relating to performance and load testing for 2020.</p> <p>Our biggest surprises this year were the combination of load-testing and continuous integration, which has seen a considerable increase from previous years and the consensus that it was a more niche workflow.</p> <p>Not so much of a surprise, the continued adoption of open-source tools across organizations of all sizes, including large enterprises that have historically shunned open source products due to existing commercial vendor agreements. However, as we’ll see, security and training remain as roadblocks for around a sixth of companies surveyed.</p> <p>In terms of geographies and demographics, Asia is leading the adoption of open-source testing tools, making up 61%. With Europe leading the western market at 16%, the United States at 14%, and Australia trailing at 3%.</p> <p>India and Vietnam are growing faster than any other region, and I expect we’ll see substantial growth here in the coming years.</p> <p>The main questions we want to answer from this survey are: is the role of performance testing changing? And is s open-source testing here for the long haul?</p> <h2>Major roles in testing</h2> <p>It comes as no surprise that QA teams are still responsible for about half of testing. At the same time, engineers do the remainder with broad functional responsibilities across operations, development, security, and performance.</p> <p>We’ve seen a steady increase in our customers’ technical skills over the last 5 years due to the technical nature of load testing. Still, we’re now seeing this spread into broader testing disciplines, driven by the adoption of open-source tools.</p> <p>Additionally, 33% of companies surveyed had specifically tasked performance engineers or teams that conduct performance tests regularly, which means QA is doing slightly less load testing overall than specialized teams.</p> <p>And yet, around 10% of companies surveyed said that nobody was explicitly responsible for load testing.</p> <h2>Experience Level</h2> <p>Due to the rise of automated testing over the last 20 years, we haven’t seen any breakout group in terms of years of experience.</p> <p>There is perhaps a slight increase in the number of people who started in the field around 2010 to 2015—those who now have 5-10 years under the belt.</p> <h2>Top programming languages</h2> <p>If you’re not doing model-based testing, you’re likely writing tests in some form of programming language.</p> <p>No surprises that Java is still the most popular choice, no doubt driven by Selenium/TestNG. On the other hand, 40% of customers use JavaScript, which compares well with the adoption of JavaScript in all fields, not just testing or web apps.</p> <p>“Any application that <em>can</em>be written in JavaScript, <em>will</em> eventually be written in JavaScript.”</p> <p>— Jeff Atwood, Cofounder of StackOverflow</p> <h2></h2> <h2>Biggest Roadblocks to Adoption</h2> <p>While a wide range of organizations have adopted open-source tools, they still face roadblocks in some enterprises.</p> <p>We’ll break these down as Support &amp; Training, Security, and Technical Capabilities.</p> <p><strong>Support and Training</strong></p> <p>Support and training remain a roadblock for adoption across all open-source projects, with very few investing the time required to write proper documentation, tutorials, and training material. This is a critical challenge is training your team when adopting a new tool.</p> <p>For open-source, this has spawned multiple companies that focus specifically on supporting the implementation of open-source testing tools within organizations that would usually get training directly from a vendor.</p> <p>Another risk is how often a project is updated, as most open-source projects don’t follow regular release cadence, or provide an easy upgrade path between major versions — a challenge with all software, whether you pay for it or not.</p> <p>As more and more testing tools move to the cloud, updates are becoming a thing of the past.</p> <p><strong>Security</strong></p> <p>Interestingly, 15% of organizations still say that security and perceived vulnerabilities are a roadblock. However, when you talk to security experts, they say open source provides greater assurance of security because it increases the pool of eyes looking for vulnerabilities.</p> <p>However, the ability of maintainers to implement fixes can increase security or leave projects open to exploitation. But at least the vulnerabilities are known.</p> <p>In recent years an entire ecosystem of code analysis tools has been developed, which help automate the discovery and repair of vulnerabilities in open source projects, so it will be interesting to see how security trends as a concern next year.</p> <p><strong>Technical Capabilities</strong></p> <p>Support for more esoteric protocols within a chosen tool, setting up a test environment, maintaining test scripts, and managing test data were all viewed as technical impediments to regularly conducting performance tests.</p> <p>Testing systems built on SAP or Citrix that don’t expose accessible testing interfaces, compound the problems faced by open-source tools in the enterprise.</p> <p>With SAP, organizations spend millions on the software and the internal adoption, but finally, the transformation from one legacy system to something a few generations newer.</p> <p>The CEO of one of the world’s largest pharmaceutical companies once said it would be a competitive advantage to implement SAP for less money and time than their competitors.</p> <p>These types of enterprises are still the holdout for open-source adoption.</p> <h2>Biggest Benefits</h2> <p>While 16% of customers identified customer support as a roadblock, a similarly sized cohort prefers the community-based support offered by open-source tools.</p> <p>The number one driver of open-source adoption is still cost, which is no surprise as commercial testing tools have historically run into the hundreds of thousands of dollars before training and professional services. Organizations can quickly make a significant saving on their QA effort by adopting open-source in the current climate.</p> <p>Performance testing tools have a more storied history than a lot of modern QA testing tools, which is why performance testers view cost as less of a motivator for adoption then technical capabilities.</p> <p>Lastly, freedom from vendor lock-in and ease of customization is still a strong driver for most surveyed companies.</p> <h2>The role of load testing</h2> <p>Automated testing has well and truly unseated manual testing, and load testing makes up nearly a third of testing overall.</p> <p>At Flood, we’ve seen a strong trend to browser-based load testing in the last two years, as it now makes up 35% of all tests run on Flood. As a result of this, we hired three more engineers for the Element Core Team this year.</p> <p>An interesting finding we’re seeing is that performance testing has moved from a reactive to proactive testing discipline, with nearly two-thirds of customers conducting performance tests within a typical sprint cycle.</p> <p>Thanks to easy integrations between Flood and most Continuous Deployment services, you can easily add load testing into your release process to prevent regressions that could catch you in production.</p> <h2>Tooling</h2> <p>For performance testers, open-source tooling is critical to the job, which shows a significant move away from vendor apps of the past decades.</p> <p>JMeter is still the most popular, with a little over half the market. The developer-focused tools such as Element, K6, Locust, and Gatling have seen an increase in adoption and now make up most of the backfield.</p> <h2>Final thoughts</h2> <p>Is the role of performance testing changing? I think there is strong evidence that more generalists are conducting performance testing in development teams.</p> <p>It is clear to say open-source testing here for the long haul, as we see a substantial move away from commercial closed-source tools where organizations can make that move. I have no doubt this is increasing in the coming years.</p> <p>Still curious about the results? Check out the <a href="https://www.tricentis.com/state-of-open-source-2020/" rel="nofollow">survey results infographic here</a>.</p>]]></content:encoded>
		</item>
		<item>
			<title>9 collaboration tool tips for remote teams</title>
			<link>https://ivan.dev/articles/9-collaboration-tool-tips-for-remote-teams</link>
			<guid>https://ivan.dev/articles/9-collaboration-tool-tips-for-remote-teams</guid>
			<pubDate>Fri, 24 Apr 2020 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Remote work</category>
			<description>Prior to the COVID-19 pandemic, many organizations considered remote work a perk, perhaps even one that was limited to a handful of trusted employees.</description>
			<content:encoded><![CDATA[<p>Prior to the COVID-19 pandemic, many organizations considered remote work a perk, perhaps even one that was limited to a handful of trusted employees. Now, millions of people are connecting on Slack, Zoom, and other collaboration tools every day to help keep their companies functioning.</p> <p>Not surprisingly, many of these remote workers report that communication is their biggest challenge. Here are some tips to help your teams stay connected, build trust, and get work done.</p> <h2>1. Use a chat app</h2> <p>When you’re working remotely, most communications are asynchronous – you can’t simply drop by a colleague’s cube to ask a question. To address this, plan your tasks so you won’t be blocked while waiting for an answer.</p> <p>If your team doesn’t use a chat app, such as Slack, that enables everyone to see a discussion, now’s the time to start.</p> <p>When using such tools, effective organization is critical for keeping conversations on topic. Break out channels for different product areas, projects, and teams, and use a prefix (such as <em>#prod-</em> for product teams) to make them easy to find. (At <a href="https://flood.io/" rel="nofollow">Tricentis Flood</a>, some of our most popular Slack channels include <em>#anything</em> (watercooler chat), <em>#eng-</em> prefixed engineering channels, and <em>#sales</em>, where a bot posts the logo of each company that signs up for our load-testing service.)</p> <p>It’s normal to have more channels than team members. Be sure to make them long-lived so team members can search back to gain context about previous discussions. Also, acquaint yourself with the “Remind me about this” feature; it’s especially helpful when you’re scanning messages on your phone, for example, and see a request that’s easier to address from your computer.</p> <h2>2. Over-communicate everything</h2> <p>Keeping everyone on the same page can be tricky, especially for companies that are growing quickly. Consider recording any communications that happen outside of Slack in a tool such as <a href="https://www.notion.so/" rel="nofollow">Notion</a> so that the entire team can follow all discussions and decisions. At Flood, this has been invaluable for helping everyone catch up across time zones. We think of Slack as transient conversation and Notion as persistent thought.</p> <h2>3. Establish online etiquette</h2> <p>If your teams work in different parts of the country or the world, be mindful of time zones. Get a good world clock app to avoid calling colleagues at inappropriate times (Slack and other tools can also remind you of other people’s time zones). At Flood, we use flag emojis as our status icons to indicate what time zone each person is in on any given day.</p> <p>We use flag emojis as our status icons to indicate what time zone each person is in on any given day.</p> <p>Even if your teammates are just down the street, it’s important to establish an etiquette for notifying channels or pinging people. Don’t assume, or require, an immediate response. We use a simple thumbs-up emoji to acknowledge messages to each other and eye emojis to indicate we’re taking a look.</p> <h2>4. Give feedback</h2> <p>Writing feedback to colleagues in a public chat can sometimes feel awkward or unsatisfying, but with no feedback, your team members will feel isolated and unmotivated.</p> <p>Our team uses the “HeyTaco!” Slack chatbot, using a taco emoji to reward each other for helping out, achieving goals, or just doing great work. Every taco, and its rationale, is visible to the whole team, and tacos are tied to rewards such as paid days off and Amazon gift cards.</p> <h2>5. Keep everyone up to date</h2> <p>Many teams meet daily at the office, formally or informally. A stand-up meeting typically gives each team member 30 seconds to update the team on what they plan to do that day and where they need help. This is important for sharing intent as well as identifying blockers.</p> <p>Stand-ups work well for remote teams but expect them to be asynchronous. There are several Slack bots available that can help with this. We use Geekbot, which pings each team member at 9:00 a.m. in their local time zone to ask: “What did you achieve yesterday, and what will you work on today?” Responses are posted in our #standup channel, along with stats on team-wide standup participation.</p> <h2>6. Increase communication bandwidth</h2> <p>We use Zoom for quick video calls, but we always take notes and share them with the team afterward. To ensure that everyone knows what was discussed, record and share details such as:</p> <ul><li>Who attended the call</li> <li>What was discussed</li> <li>What alternatives were mentioned</li> <li>What was decided</li> <li>Who approved any changes</li></ul> <h2>7. Make decisions thoughtfully</h2> <p>Whether your team is debating a simple icon color change or a critical business decision, the underlying thought process is just as important as the decision itself. We tend to “rubber duck” (using a duck emoji) to indicate when we are thinking or talking through a decision and input is not necessarily required within Slack. When we need participation, we ask others to comment in threads.</p> <p>Recording thoughts and discussions helps others understand the context of decisions later. Once decisions are made, we record them in Notion for traceability and transparency.</p> <h2>8. Be open</h2> <p>Remote team members obviously can’t rely on the nonverbal cues that happen in face-to-face communication, but they can use methods such as emojis to help gauge each other’s mood and status.</p> <p>Remote team members can use methods such as emojis to help gauge each other’s mood and status.</p> <p>For example, at Flood, we use the following emoji-based system:</p> <ul><li>Carrot: Trying to focus</li> <li>8 ball: “Snookered” or stuck</li> <li>Cactus: Distressed, feeling awful</li> <li>Watermelon: A little fragile, in need of support</li></ul> <h2>9. Look for signs of success</h2> <p>Once your team settles into remote work, look for the following signs that indicate things are running smoothly:</p> <ul><li>Most of your email is coming from people outside the company because you’re using more efficient channels internally</li> <li>Team productivity has reached previous (non-remote) levels</li> <li>Group chat is noisy, and discussions of both work and home life (including hobbies – think <em>#homebrew</em>) have developed</li></ul> <h2>Staying remote</h2> <p>Once all these communication tools are in place, you might wonder what will happen once the world returns to a more normal state. If your team is just as productive working from home, should you commit to maintaining a culture of remote work?</p> <p>Remote work will be an integral part of workplace culture for the foreseeable future. I hope the strategies we’ve developed at Flood help make it more enjoyable and productive for your team.</p>]]></content:encoded>
		</item>
		<item>
			<title>Calculating How Many Nodes You Need For Load Testing on Flood</title>
			<link>https://ivan.dev/articles/calculating-how-many-nodes-you-need-for-load-testing-on-flood</link>
			<guid>https://ivan.dev/articles/calculating-how-many-nodes-you-need-for-load-testing-on-flood</guid>
			<pubDate>Wed, 14 Mar 2018 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Load testing</category>
			<description>The first thing that you’ll likely be confused and possibly intrigued about is the way we handle pricing at Flood.</description>
			<content:encoded><![CDATA[<p>The first thing that you’ll likely be confused and possibly intrigued about is the way we handle pricing at <a href="https://flood.io/" rel="nofollow">Flood</a>.</p> <p>Through our experience, we found that the classical approach of charging per Virtual User (VU) just didn’t map to the reality of how you do testing, which is to say it is an iterative process and often results in a few test fires and misses in the beginning.</p> <p>We believe that you shouldn’t be paying the same amount for miss firing tests because we’re not delivering the same value to your business as we do when your tests run correctly.</p> <h2>Introduction and terminology</h2> <p>We designed Flood’s pricing to be aligned with our underlying costs, which are the servers that we distribute your tests on, collectively called Grid nodes.</p> <p>Which raises the immediate question of “How many nodes do I need?”, and the answer is, “it depends”.</p> <p>First of all, let’s make some assumptions; You want to <strong>simulate 5,000 users load for 1 hour</strong>.</p> <p>Before running anything, we typically say that with JMeter and Gatling, all things being equal (network latency, throughput, server speed, etc.) that you’ll be able to achieve the load of <strong>1,000 users per node — this is our typical planning figure</strong>.</p> <p>For Selenium it is much lower at <strong>5 users per node</strong> due to the large memory and CPU footprint of running full browsers.</p> <p>So for our test, we’ll run five nodes, with 1,000 threads each, representing 5,000 total users.</p> <h2>Approach 1: A single node test for free</h2> <p>The easiest and cheapest approach is to run a single node test for free. Each free account lets you try up to 5 grid node hours for free.</p> <p>Once you have completed a Flood on your Grid, review your results. If you achieved less concurrency than planned, it is likely that your test script is too complex or target site performance is poor. (If this is the case, our blog has tips on tuning each load testing tool.)</p> <p>If your test performed as intended, you can assume that you’ve picked a good planning figure and you can scale out from here. Flood’s infrastructure is decoupled by design and can scale linearly out to 90 nodes per grid without any performance penalty with as many grids/regions as you need.</p> <h2>Approach 2: Going all in</h2> <p>Sometimes you’re confident that you’ve got a good starting point with the test scripts at hand, typically from running them locally on your development machine.</p> <p>In this case, we suggest firstly upgrading to a paid plan, and then launching five nodes in a Grid, in your region of choice.</p> <p>Once you have a Grid starting, you can create a Stream to launch your Flood from.</p> <p>Configure the Load Generation tool to run 1,000 threads per node, for a duration of up to an hour (if your Grid is running for an hour, less or more as you desire) and click Launch Test.</p> <p>Once you have results, compare the concurrency to your desired load.</p> <p>If your results came in below, then you might consider running fewer threads and more Nodes or optimising your test scripts by removing unnecessary assertions.</p> <h2>Scaling out</h2> <p>Once you have a planning figure, you can scale out your load as needed to any amount by multiplying your baseline figure by the number of nodes you want.</p> <p>You can split the load between multiple regions to simulate peak user load across coasts or continents.</p> <h2>How much will this cost?</h2> <p>We charge per node per hour. That is, if you run a Grid of five nodes for one hour, it will cost you five node hours.</p> <p>We bill nodes in 15-minute blocks so that you can run them for any duration from 15 minutes, up to 48 hours.</p> <h2>Choosing a plan</h2> <p>If you’re only going to run a handful of one-off tests, then a PAYG or Standard Plan will probably suit your needs. If, however, you’ve calculated from the above tutorial that you’ll need more hours, we offer plans up to 400 hours per month or more as needed.</p> <p>Overages are charged at our PAYG rate once you exhaust the hours included in your plan unless you upgrade to a larger plan.</p> <p>All plan changes are pro-rated for the month of change.</p>]]></content:encoded>
		</item>
		<item>
			<title>Level Up Your Load Testing with Browser Level Users</title>
			<link>https://ivan.dev/articles/level-up-your-load-testing-with-browser-level-users</link>
			<guid>https://ivan.dev/articles/level-up-your-load-testing-with-browser-level-users</guid>
			<pubDate>Sun, 18 Feb 2018 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Load testing</category>
			<description>Over the years, countless customers have mentioned that getting started with Load Testing is a daunting task.</description>
			<content:encoded><![CDATA[<p><img src="https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-1-1200.webp" alt="Flood Chrome Scripting Language" width="1712" height="990" srcset="https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-1-400.webp 400w, https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-1-800.webp 800w, https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-1-1200.webp 1200w, https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-1-1600.webp 1600w, https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-1-1712.webp 1712w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" fetchpriority="high" decoding="async"/></p> <p>Over the years, countless customers have mentioned that getting started with Load Testing is a daunting task. That’s why it’s often left until the last minute before launch. At Flood, it’s our mission to make Load Testing less daunting and accessible to everyone. We want to give developers and testers an easy way to ensure that whatever part of the system they’re responsible for meets expectations for both functionality <em>and</em> performance.</p> <p>Today, we’re excited to launch a new load generation tool that we’ve been building in-house for the past six months. It’s called <a href="https://chrome.flood.io/" rel="nofollow">Flood Chrome</a>, and it helps you build maintainable and performant load tests which run in real browsers. This greatly reduces the amount of time and complexity involved in placing a realistic load on your application.</p> <p>We call this approach Browser Level Users or BLUs. It can be thought of as a higher level abstraction on Protocol Level Users (PLUs) – Load Testing only the network layer, as is done with tools like JMeter and Gatling.</p> <p><img src="https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-2-1200.webp" alt="image" width="2182" height="1228" srcset="https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-2-400.webp 400w, https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-2-800.webp 800w, https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-2-1200.webp 1200w, https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-2-1600.webp 1600w, https://ivan.dev/_img/images/archive/level-up-your-load-testing-with-browser-level-users-2-2000.webp 2000w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/></p> <p>As with programming, generating load at a higher level of abstraction reduces the cost of implementation and maintenance - ideally with little tradeoff on performance. To achieve this, we’ve developed a Selenium JS-compatible scripting language which drives a high-performance implementation of Google Chrome to generate load by interacting with your application in the exact same way as a real user does.</p> <p>This means you can easily turn your existing Selenium functional tests into load tests without learning a new mental model for how to test your application. You can also create new tests with an extremely-minimal learning curve - even if you’re not well-versed with scripting.</p> <p>Since it works at the browser level, you no longer need to script each individual network call. This makes your tests more resilient to application architecture changes which affect the network characteristics.</p> <h3>Realistic Load</h3> <p>One of the biggest mistakes we see in performance testing is failure to create a realistic load scenario of your target users. This can be attributed to not using adequate sleep time between requests or thrashing a single endpoint without considering the load characteristics of a real user.</p> <p>Both of these mistakes are eliminated with Browser Level User load testing because the ratio of network requests is directly correlated to real user actions.</p> <h3>Load Testing Single Page Applications</h3> <p>As the web platform matures, one trend that’s becoming hard to ignore is the move to Single Page Applications and Server Rendered SPAs. These applications typically load a User Interface shell and then initiate hundreds of network requests to an API in response to user interactions.</p> <p>Load testing these types of applications at the Protocol Level can be extremely difficult. You not only need to deal with authentication and session management; you also need to create realistic load scenarios which remain realistic as the front-end develops. This often leads teams to ditch the effort entirely or treat it as a “best effort” to load test (not surprisingly, this rarely gets taken seriously).</p> <p>Browser Level User Load Testing solves a number of these problems because the browser takes responsibility for authentication and session management - as well as initiating network requests.</p> <h3>More to measure</h3> <p>With Protocol Level Testing, we’re usually only concerned with the top level measurements (Response Time, Concurrency, and Transaction Rate) because these are easily understood on the wire. BLUs opens up entirely new measurements which directly impact the customer experience, including Time To First Interactive (TTFI) and script evaluation and execution time, which can be greater than the time it takes to load over the wire. We’ll be making these measurements available once Flood Chrome transitions out of beta.</p> <p>Flood Chrome is now in public beta and available to all Flood customers. To help you get started, we’ve put together a <a href="https://chrome.flood.io/examples/scenario_1_wordpress.html" rel="nofollow">step-by-step guide</a> and <a href="https://chrome.flood.io/" rel="nofollow">API documentation</a> for you to explore. Stay tuned for more resources in the coming days.</p>]]></content:encoded>
		</item>
		<item>
			<title>More Transaction stats</title>
			<link>https://ivan.dev/articles/more-transaction-stats</link>
			<guid>https://ivan.dev/articles/more-transaction-stats</guid>
			<pubDate>Mon, 12 Sep 2016 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Product</category>
			<description>Today we added more advanced transaction stats to give you a more complete picture of each step within your test plan.</description>
			<content:encoded><![CDATA[<p>For the last couple of months we’ve been hard at work building our new dashboard which is now <a href="https://flood.io/app" rel="nofollow">generally available</a>, and we’re continuing to add improvements.</p> <p>Today we added more advanced transaction stats to give you a more complete picture of each step within your test plan.</p> <p><img src="https://ivan.dev/_img/images/archive/more-transaction-stats-1-1200.webp" alt="Individual Transaction overview" width="1600" height="477" srcset="https://ivan.dev/_img/images/archive/more-transaction-stats-1-400.webp 400w, https://ivan.dev/_img/images/archive/more-transaction-stats-1-800.webp 800w, https://ivan.dev/_img/images/archive/more-transaction-stats-1-1200.webp 1200w, https://ivan.dev/_img/images/archive/more-transaction-stats-1-1600.webp 1600w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" fetchpriority="high" decoding="async"/></p> <p><em>Individual Transaction overview</em></p> <p>We’re now exposing transaction statistics including Passed and Failed counts, Total transactions for the current view, and Maximum and Mean Transaction Rate per transaction.</p> <h4>Pro-tip™</h4> <p><img src="https://ivan.dev/_img/images/archive/more-transaction-stats-2-1200.webp" alt="Transaction table with timing bars and error rates. Arrows show that clicking the error rate or timing opens a transaction" width="1600" height="339" srcset="https://ivan.dev/_img/images/archive/more-transaction-stats-2-400.webp 400w, https://ivan.dev/_img/images/archive/more-transaction-stats-2-800.webp 800w, https://ivan.dev/_img/images/archive/more-transaction-stats-2-1200.webp 1200w, https://ivan.dev/_img/images/archive/more-transaction-stats-2-1600.webp 1600w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/></p> <p>This sometimes isn’t the most intuitive UI, but clicking on any of these bars will open the transaction. You can also click the label to select it and show only that transaction on the Timeline chart.</p> <p><a href="https://flood.io" rel="nofollow">Happy Testing</a></p>]]></content:encoded>
		</item>
		<item>
			<title>Paying per Test or Virtual User is Broken</title>
			<link>https://ivan.dev/articles/paying-per-test-or-virtual-user-is-broken</link>
			<guid>https://ivan.dev/articles/paying-per-test-or-virtual-user-is-broken</guid>
			<pubDate>Sun, 05 Jun 2016 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Startups</category>
			<description>Selling performance testing services by the number of tests you can run or virtual users you can simulate is a thinly veiled process of extracting the most money in the shortest amount of time from performance testers globally.</description>
			<content:encoded><![CDATA[<p><img src="https://ivan.dev/_img/images/archive/paying-per-test-or-virtual-user-is-broken-1-1200.webp" alt="The Flood dashboard on a desktop monitor, showing a load test timeline and per-transaction response times" width="1600" height="900" srcset="https://ivan.dev/_img/images/archive/paying-per-test-or-virtual-user-is-broken-1-400.webp 400w, https://ivan.dev/_img/images/archive/paying-per-test-or-virtual-user-is-broken-1-800.webp 800w, https://ivan.dev/_img/images/archive/paying-per-test-or-virtual-user-is-broken-1-1200.webp 1200w, https://ivan.dev/_img/images/archive/paying-per-test-or-virtual-user-is-broken-1-1600.webp 1600w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" fetchpriority="high" decoding="async"/></p> <p>Selling performance testing services by the number of tests you can run or virtual users you can simulate is a <strong><em>thinly veiled process</em></strong> of extracting the <strong><em>most money in the shortest amount of time</em></strong> from performance testers globally.</p> <p><strong>Artificially limiting the concurrency (virtual users), time or quantity of these tests is inherently broken!</strong></p> <p>If you have ever used these sorts of services, then you know exactly what I am talking about.</p> <h3>A real world example</h3> <p>In our experience at Flood IO, most tests run like this:</p> <ol><li>Create a test plan</li> <li>Shakeout the test with some virtual users</li> <li>Realise 10 minutes in that the test plan is wrong</li> <li>Stop the test and mutter to yourself, fixing the test plan as you go</li> <li>Get it running with some more virtual users</li> <li>Realise 10 minutes in that the test plan is less wrong</li> <li>Stop the test, face palm and fix the test</li> <li>Get it running with another bunch of virtual users</li> <li>Realise 10 minutes in that you might have it right and stop to really ramp it up</li> <li>Get it running with lots of virtual users and a smug grin on your face</li> <li>Realise 10 minutes in that you forgot to to turn off instrumentation on your site and nothing makes sense at load</li> <li>Stop the test, swearing, fix the test plan</li> <li>Get it running with lots of virtual users again</li> <li>It runs well and you extract some usable data, get the data from the system and send it off with a <em>“Yeah, this was no sweat”</em> note to whomever wants it.</li></ol> <h3>The addiction of billing</h3> <p>In the world of <strong><em>per test or per virtual user</em> <em>billing</em></strong>, you would have been charged (penalised) for every one of those <em>“stop and fix the test plan”</em> steps. More often than not rounded up to the nearest unused quantity of your quota.</p> <p>Seriously?</p> <p><em>“Yes, that’s right.”</em></p> <p>Just used your monthly quota of tests? Need to run 1100 virtual users instead? “<em>Sorry but you can’t proceed until you upgrade to the next plan</em>”.</p> <p>The worse thing is that the load testing industry is <strong>so addicted to this idea of selling per test or per virtual user</strong> that it’s become the norm and everyone just accepts it.</p> <h3>Wean yourself off the addiction</h3> <p>At Flood IO, one of our most common questions is <em>“How many virtual users does your XYZ plan include?”</em> to which we always answer with totally true but seemingly confusing statement of <em>“As many as you want”</em>.</p> <p>All the planning in the world can’t predict actual concurrent loads and response times. You might have ramped up too fast, you might have forgotten to take into account a user flow, you might have left some debugging in place which skews your results, your test plan may be unnecessarily complex or your site may already have serious performance issues. Any number of things that make getting concurrency right the first time, every time, impossible.</p> <p>If that is the way load testing goes, <strong>then why is it that most performance testing platforms charge per user or per test?</strong></p> <p>This frustration was one of the primary factors in why we created Flood IO and is what sets us apart.</p> <h3>Do something different</h3> <p>At Flood IO, we do something different.</p> <p>You boot some load generation server nodes, collectively called a grid. Then you can run as many tests as you like on that grid. <em>Instead of paying per test, or per virtual user, or per report or per anything,</em> you just simply pay for the minutes your grid is running.</p> <p>So instead of the real world example blowing out your test or virtual user quota with our competitors, on Flood IO, it would cost you an hour or two of grid time.</p> <p>This also means you can start up a small grid for testing at a very cheap rate (or use the free grid hours you get every month as part of your plan) and then when you are ready to scale out, boot up multiple grids to generate as many virtual users as you like.</p> <p>Because of our distributed shared nothing architecture the performance you get from a single node is representative of many nodes. We let you start up to 30 nodes per grid with as many grids in as many regions as you like attached to your flood test. Run as many tests as you like. Throw as many virtual users in as you like. This makes it easy for you to baseline performance and plan to scale out from there.</p> <p>As one of our happy customers once said:</p> <blockquote><p>Flood IO, stupid simple, stupid cheap!</p></blockquote> <p>We believe strongly that the tools made for our profession should be designed for our profession to be as efficient as possible. We believe penalising quick exploratory load experiments is counter productive. We don’t want to get in the way of your testing, just help you get your testing done.</p> <blockquote><p>Flood IO is an insanely easy to use load testing service that saves you time and money, allowing you to focus on what’s important — Your product.</p></blockquote> <blockquote><p>Visit <a href="https://flood.io/?utm_source=medium&amp;utm_medium=smoothscaling&amp;utm_term=story&amp;utm_campaign=paying-per-virtual-user-is-broken" rel="nofollow">flood.io</a> and sign up for a free account.</p></blockquote>]]></content:encoded>
		</item>
		<item>
			<title>Why you don’t need Socket.IO</title>
			<link>https://ivan.dev/articles/why-you-don-t-need-socket-io</link>
			<guid>https://ivan.dev/articles/why-you-don-t-need-socket-io</guid>
			<pubDate>Tue, 15 Mar 2016 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>JavaScript</category>
			<description>Asynchronous communication between browsers and servers has come a very long way in the last 6 or 7 years.</description>
			<content:encoded><![CDATA[<p>Asynchronous communication between browsers and servers has come a very long way in the last 6 or 7 years.</p> <p>Back then, if you wanted to send a message asynchronously, you had to employ a bunch of hacks. These typically included some or all of the following:</p> <ul><li>Long polling</li> <li>Flash Sockets (yes, Adobe Flash)</li> <li><em>Possible</em> upgrade to WebSockets</li></ul> <p>These hacks were commonly employed as part of the very popular abstraction library, <em>Socket.IO</em>. Which was designed to initiate a connection with the lowest common denominator, then ‘upgrade’ the connection if the client supported a better feature.</p> <p>This approach worked in nearly all cases, right back to browsers which nobody cares about anymore. However it came at the cost of expensive connection times, excess CPU/Memory/Garbage collection, extra resources to load, and a limited ability to support the developing standard features of the WebSockets protocol, which most notably until very recently, that meant <em>binary streams</em>.</p> <h3>Socket.IO</h3> <p>Over the years, Socket.IO became insanely popular, with over 25,000 stars on Github, and 5,000+ forks.</p> <p>But the project always felt like it was trying to do too much. Is it a chat library? Is it a presence service? Is it a Socket? Is it a Sledgehammer? (I would have named it Sledgehammer.IO)</p> <p>Nowadays Socket IO is actually two libraries. Engine.io which powers the socket abstractions, and connection management. And Socket.IO, which from what I can figure handles reconnection, event emitting, and message namespacing (kind of like chat rooms).</p> <p>This is all excess when all you really need or want is a Socket.</p> <h3>Socket programming</h3> <p>Sockets are the basis for all connections over the internet. They are the end pieces which both a client and server terminate a connection with.</p> <p>Low level sockets are essentially a stream of bytes. You write to one socket, and it appears byte for byte on the other socket’s read buffer.</p> <p>When you make an HTTP request over the internet, it typically opens a socket connection to the server, and sends a request header, followed by an optional request body. This is just a stream of bytes, and it’s up the the receiving socket to know when the message is completely received. For HTTP this is handled by specifying the Length of the payload. The client can then just receive until it has Length bytes, then take those bytes and parse them as a request. To reply, it would then send back a response using the same semantics. Before closing the connection (unless instructed not to by a Keep-Alive header).</p> <p>This is essentially what we call Framing messages. More on this later.</p> <p>Some streams can be essentially endless and continue to write data, such as a video stream or audio stream. The underlying socket functions the same way, except messages are delineated using a special byte sequence, such as a null byte.</p> <p>Up until relatively recently, the Web, as in browsers, didn’t have an equivalent to sockets. You could only make asynchronous requests for resources from the client, but the server never had a way to reply without the client asking it something. Around the time Node.js came along, the ability for the server to send out of band messages to the client was seen as incredibly useful, especially for an async server, which is why Socket.IO became so popular.</p> <p>WebSockets were still very young, and there wasn’t yet a protocol standard which all browsers agreed to implement. It took a number of years, and many completing standards before in 2011 <a href="https://tools.ietf.org/html/rfc6455" rel="nofollow">RFC 6455</a> became the offical WebSocket protocol.</p> <h3><strong>WebSockets</strong></h3> <p>WebSockets aren’t <em>real</em> sockets. But they’re pretty damn close, and they work remarkably well.</p> <p>The WebSocket protocol introduced a couple of extra attributes over the humble TCP socket. Firstly, in order to establish a connection, the client must request an “upgrade” from HTTP to WebSocket during the handshake process. This is initiated using a standard HTTP request to a given WebSocket endpoint. If the server supports WebSockets it will respond with a <em>HTTP/1.1 101 Switching Protocols</em> response, which instructs the client to keep the connection open, and use it as a stream.</p> <p>After upgrading the connection, you’re free to send data down the socket in both directions, but here comes the second main difference: You’re not receiving a stream of bytes. All messages are framed automatically by the socket. So once one end finishes writing, the message will be available on the other end, and the socket will automatically decide how many bytes belong to this message. This makes WebSockets considerably easier to program with compared with regular sockets.</p> <p>WebSockets also implement their own Ping/Pong semantics to keep the connection alive in the absence of any data being sent. This is something you typically have to account for with TCP sockets to ensure the other end hasn’t gone away.</p> <p>Another useful feature of being able to establish a connection using HTTP is the ability to use HTTP authentication semantics for the socket, such as the Authorization header for Basic Auth or Bearer Token Auth.</p> <h3>Authentication strategies</h3> <p>I mentioned earlier that you can use standard HTTP authentication semantics, however sometimes you want to handle authentication at a later stage, or asynchronously.</p> <p>A common pattern for this is to require that the first message over the socket is an authentication message, commonly called an “<em>authentication handshake</em>”. This is where the two parties exchange enough information about each other that they agree to keep the connection open.</p> <p>Typically the client exchange with the server something like this:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>CLIENT > AUTH: secretpasscodeletmein</span></span>
<span class="line"><span>SERVER &#x3C; OK</span></span></code></pre> <p>The server — which is waiting for a message of type AUTH — would take the value and check its authenticity. If the value turns out to be correct, the connection stays open and server replies with some sort of <em>OK</em> message. Otherwise it simply closes the connection.</p> <p>Because you can send whatever you like down the socket, it’s up to you to design a protocol which makes sense to both your server and client’s needs. This commonly would include a protocol negotiation message so you can support different features as your app develops without breaking older clients.</p> <p>Or using an existing protocol, like <a href="https://stomp.github.io/" rel="nofollow">STOMP</a> or similar.</p> <h3>Use case: Chat</h3> <p>Socket IO’s initial attraction was that you could build a chat service which didn’t require continually polling the server for new messages, and anything you types could appear on multiple clients seemingly immediately.</p> <p>To implement something like this with WebSockets is actually quite easy, and a lot more flexible than you might expect.</p> <p>On the server side you need to handle clients connecting. These will represented as client objects, one for each connection which is open. You might have a flag to indicate a few required attributes about the client:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">let</span><span style="color:var(--code-foreground)"> client </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)"> &#123;</span></span>
<span class="line"><span style="color:var(--code-foreground)"> id</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-constant)"> 1</span><span style="color:var(--code-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--code-foreground)"> isAuthenticated</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-constant)"> true</span><span style="color:var(--code-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--code-foreground)"> protocolVersion</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-constant)"> 1</span><span style="color:var(--code-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--code-foreground)"> connection</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-foreground)"> &#x3C;</span><span style="color:var(--code-token-constant)">WebSocket</span><span style="color:var(--code-token-function)"> Connection</span><span style="color:var(--code-token-function)"> instance</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">&#125;</span></span></code></pre> <p>Once authenticated you would set the isAuthenticated flag to true, as there will be some delay between the connection opening and the client sending the initial authentication sequence, and you’ll probably want to exclude this client from certain broadcasts.</p> <p>To handle broadcasts to each client, either one-to-one, or one-to-many, you could create a Map, keyed on channel name, with a Set of values representing the IDs of each subscribed client.</p> <p>How you establish a subscription is up to you, but it could be as simple as the client exchanging:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>CLIENT > SUB:general</span></span>
<span class="line"><span>SERVER &#x3C; OK</span></span></code></pre> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>CLIENT > UNSUB:general</span></span>
<span class="line"><span>SERVER &#x3C; OK</span></span></code></pre> <p>Then when you have a message to deliver — which could come from another client, internally, or an API request — you just need to look up all the clients associated with that channel, and send the message to each one. Example:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">const</span><span style="color:var(--code-token-constant)"> subscriptions</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-keyword)"> new</span><span style="color:var(--code-token-function)"> Map</span><span style="color:var(--code-foreground)">();</span></span>
<span class="line"><span style="color:var(--code-token-constant)">subscriptions</span><span style="color:var(--code-token-function)">.set</span><span style="color:var(--code-foreground)">(“general”</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-keyword)"> new</span><span style="color:var(--code-token-function)"> Set</span><span style="color:var(--code-foreground)">())</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-comment)">// Subscribe a client to “general” channel.</span></span>
<span class="line"><span style="color:var(--code-token-constant)">subscriptions</span><span style="color:var(--code-token-function)">.get</span><span style="color:var(--code-foreground)">(“general”)</span><span style="color:var(--code-token-function)">.add</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">client</span><span style="color:var(--code-foreground)">.id);</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-comment)">// Send message to a channel</span></span>
<span class="line"><span style="color:var(--code-token-constant)">subscriptions</span><span style="color:var(--code-token-function)">.get</span><span style="color:var(--code-foreground)">(“general”)</span><span style="color:var(--code-token-function)">.forEach</span><span style="color:var(--code-foreground)">((clientId) </span><span style="color:var(--code-token-keyword)">=></span><span style="color:var(--code-foreground)"> &#123;</span></span>
<span class="line"><span style="color:var(--code-token-constant)">  clients</span><span style="color:var(--code-token-function)">.get</span><span style="color:var(--code-foreground)">(clientId).</span><span style="color:var(--code-token-constant)">connection</span><span style="color:var(--code-token-function)">.send</span><span style="color:var(--code-foreground)">(message);</span></span>
<span class="line"><span style="color:var(--code-foreground)">&#125;);</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-comment)">// Unsubscribe</span></span>
<span class="line"><span style="color:var(--code-token-constant)">subscriptions</span><span style="color:var(--code-token-function)">.get</span><span style="color:var(--code-foreground)">(“general”)</span><span style="color:var(--code-token-function)">.delete</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-constant)">client</span><span style="color:var(--code-foreground)">.id);</span></span></code></pre> <p>See <a href="https://www.npmjs.com/package/websocket" rel="nofollow">https://www.npmjs.com/package/websocket</a> for a good starting point for a NodeJS server implementation, of if you’r using Go, <a href="https://github.com/gorilla/websocket" rel="nofollow">https://github.com/gorilla/websocket</a> is a good choice.</p> <h3>Compatibility with other clients</h3> <p>A major advantage of adopting WebSockets over Socket IO is interoperability with many different clients. There are standards compliant WebSocket client implementations in ObjectiveC, Javascript, Go, Haskell, Erlang, Ruby, Swift, and of course all major browsers. And this is the way it should be. You shouldn’t need to adapt your code to many different transports that do the same thing.</p> <h3>Thanks to Socket IO</h3> <p>Without Socket IO a lot of very cool and useful apps would never have been built, and without the hard work of hundreds of contributors the library wouldn’t be were it is today. But I think its time to upgrade to pure WebSockets, and remove the extra cruft from your app.</p> <h3>Conclusion</h3> <p>If you’re a browser and you need a socket, use WebSockets. <a href="http://caniuse.com/#search=websockets" rel="nofollow">All major browsers have supported</a> WebSockets for years, so go forth and be async.</p>]]></content:encoded>
		</item>
		<item>
			<title>Customer Success Story: How Five Million New Users Joined Rally Without a Hitch</title>
			<link>https://ivan.dev/articles/customer-success-story-how-five-million-new-users-joined-rally-without-a-hitch</link>
			<guid>https://ivan.dev/articles/customer-success-story-how-five-million-new-users-joined-rally-without-a-hitch</guid>
			<pubDate>Fri, 05 Feb 2016 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Load testing</category>
			<description>We love hearing how our customers use Flood to help scale their businesses, and recently our friends at Rally Health shared the story of how they onboarded 5 Million new users.</description>
			<content:encoded><![CDATA[<h4>We love hearing how our customers use Flood to help scale their businesses, and recently our friends at Rally Health shared the story of how they onboarded 5 Million new users, using Flood to ensure it was smooth sailing.</h4> <p><img src="https://ivan.dev/_img/images/archive/customer-success-story-how-five-million-new-users-joined-rally-without-a-hitch-1-1024.webp" alt="Illustration of two waving people in Rally Health T-shirts" width="1024" height="512" srcset="https://ivan.dev/_img/images/archive/customer-success-story-how-five-million-new-users-joined-rally-without-a-hitch-1-400.webp 400w, https://ivan.dev/_img/images/archive/customer-success-story-how-five-million-new-users-joined-rally-without-a-hitch-1-800.webp 800w, https://ivan.dev/_img/images/archive/customer-success-story-how-five-million-new-users-joined-rally-without-a-hitch-1-1024.webp 1024w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" fetchpriority="high" decoding="async"/></p> <p>Rally Health began the new year with a bang. On January 1 we added more than 350 new clients to Rally, which meant we suddenly had 5 million new users eligible to register. Add that to our current users, and it’s a bit like trying to expand your airplane in midair.</p> <p>How did we handle it? By all accounts, it was smooth sailing — despite this massive influx of new users, our engineers report that we set up all these clients with no errors whatsoever, which surpassed even our most optimistic predictions.</p> <p>How does a company that is barely six years old handle such a huge increase in traffic? Chris Brown, Rally’s vice president of engineering, discusses the challenges his team encountered and how they triumphed over them.</p> <p><strong>Chris Brown, Rally Health VP of Engineering:</strong> The challenge we faced is that we had to add a large number of new users to the site. On a daily basis, Rally is actually a pretty predictable platform. We know that on a given Wednesday, the traffic will be pretty much the same as the Wednesday before that. Once people establish the habit of using the system, they tend to stick with it.</p> <p>Our user growth doesn’t come on a continuous daily basis, but instead comes in spurts tied to key dates around the start of an employer’s plan year. This has some advantages and disadvantages. The advantage is that our site is predictable and stable. The disadvantage is that we’ve never really had to be ready for massive bursts of traffic.</p> <p>This year we had a large onboarding event. We brought on a couple million additional users into the system. And even though we knew about this in advance, we still had to make sure that our systems were ready to handle that increase in traffic.</p> <p>So we followed a multi-step process. First, we worked with our sales and support teams to understand how many more users we should anticipate, and roughly what the profiles of those users would be. For example, we know that users who have incentives to use the platform are much more likely to use it.</p> <p>Our data team tracks key details of site usage, like which users join Challenges or Missions, which ones use incentives, etc. And we used that data to get a sense of how many new people would be joining Challenges, how many would be joining Missions, and so on.</p> <p>So we had a rough sense of the number of new users we had to take into the system. We wrote a program that pretends to be a user who does the things a user does when they register for the site. They choose a name, they choose a password, they go through the survey, and then a certain percentage of the time they join a mission, and a certain percentage of the time they join a challenge, and so on.</p> <p>And then we took that little program, put it on an external platform called <a href="https://flood.io" rel="nofollow">Flood IO</a>, which is a tool that basically runs that program from servers across the United States, but runs it as many times per second, or per minute, or per hour, as we want. We were able to simulate 10,000 or 20,000 pretend users coming at our systems, and then observed how our systems reacted.</p> <p>We saw things like, ‘Here’s how long it takes a page to render on our site. When we’re sending no traffic through, it takes X seconds, and when we send 10,000 at once, it takes Y seconds.’</p> <p>We did those kinds of measurements and observed where the system was under stress. Then we gradually ramped up the number of users and said, ‘Ah, you know what, when we send this number of users through, our Health Survey starts to slow down, so let’s look at the Survey code as it’s running and see where it’s “hot.”’ And then we addressed that hot spot, rolled a new version of the software out, ran the test again, saw that it was OK now, and kind of pushed the bottleneck further down the pipe.</p> <p>Honestly, we’re pretty proud of how we did this. The team kicked off in late October, and in less than three weeks we were able to increase our capacity in that test environment from being able to handle around 700 simultaneous users to around 9,000, so we improved by more than a factor of 10. And once we were confident in what we were doing, we ran similar tests in production and increased capacity there as well.</p> <p>And when we actually gave access to the roughly 5.5 million new users on January 1, the process went almost exactly as our predictions told us they would. There were two major places where we found differences.</p> <p>As I mentioned, the estimation of load and traffic was based on usage models, and those usage models turned out to be a little more conservative than real life, so we had fewer actual users at any one time than the models indicated. Not by much, but we definitely had less traffic than the models indicated. So as it turned out, we were able to handle more traffic than we had experienced thus far. What this basically means is that people were able to get through the registration process more quickly than we had estimated, which is a good thing, of course.</p> <p>That said, we’re still in the midst of the busy part, and so we’re still likely to see higher loads in the next weeks, for example, than we did in the first weeks since January 1. So while it might have looked like the usage models were a little understated, we’re not at the point yet where we can say they definitely were understated.</p> <p>And there was another surprise. As I mentioned, we were using a little script to validate and verify what the site was actually doing, and we would run that same program, you know, 10,000 times or whatever the specific number was, to see what the traffic would be like. And there were places in the system that the script didn’t explore or test. Specifically, it didn’t test where users would go from Rally to outside servers.</p> <p>And sure enough, when we were in production and actually started sending real traffic to outside servers, their systems couldn’t keep up with the sudden increase in demand, and as a result our systems backed up, so that’s one thing we didn’t anticipate.</p> <p>So where the test had to interact for real with the outside world, instead of just staying within the test environment, that’s where we had scale issues. I think if there’s a lesson learned, it’s that we need to be more thoughtful about where those boundaries are, and maybe collaborate with our partners to make sure that they’re able to handle the test.</p> <p>One thing that stands out for me is that in order to do this testing, we had a couple of team members who started shifting their schedules so they could start their day as our real site traffic was ramping down in the evenings or late at night, so that they could go in and sort of “experiment on the patient” while it was still alive, you know? We realized that to be effective, a lot of this work would have to happen overnight. We had to give people permission to do that, make sure we were covering for the night owls during the day, and then have explicit handoffs where we transitioned from night to day.</p> <p>Of course, that’s not the kind of thing you want to make habitual, but we had people with expertise who cared enough to make this happen overnight, and most of them happened to have babies, so it’s not that big a deal to be up late at night anyway! That really helped us drive it through. And we were able to handle that in a way that was positive instead of negative.</p> <p>And it’s going to sound sort of corny, but even though our team on this was kind of small, you know, it was 11 people, I think it’s the first big project where we had representation on the team from every Rally office. We had DC, San Francisco, Chicago, Denver, Minneapolis. We’ve never had that much intra-office collaboration on something like this. We had the guy in DC describing how things are designed, the guy in Chicago actually applying fixes, the guy in Minneapolis making sure it’s correct, the coordination happening out of San Francisco. And I know we do a lot of cross-office work here at Rally, but this was the most cross-office collaboration that I have seen.</p> <p>It also shows why I love working at Rally. This company offers a great combination of “startup” mentality with stability. It’s an awesome feeling. We have the market momentum and capabilities of a big company, but we’re still hustling and staying hungry and are ready for anything. We’re scrappy, but stable. You know, I just can’t get enough of that.</p> <p><em>Originally published at</em> <a href="https://www.rallyhealth.com/building-a-bigger-airplane-while-youre-flying/" rel="nofollow"><em>www.rallyhealth.com</em></a> <em>on February 5, 2016.</em></p>]]></content:encoded>
		</item>
		<item>
			<title>Leaving New York</title>
			<link>https://ivan.dev/articles/leaving-new-york</link>
			<guid>https://ivan.dev/articles/leaving-new-york</guid>
			<pubDate>Thu, 31 Dec 2015 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Life</category>
			<description>One thing which probably helped the feeling of being stuck more so than secure in New York was the fact that I had to pay many months of rent in advance to get an apartment.</description>
			<content:encoded><![CDATA[<h4>This is the second story in the set: <a href="https://ivan.dev/articles/my-2015-the-year-of-transience">My 2015 — The Year Of Transience</a></h4> <p>One thing which probably helped the feeling of being stuck more so than secure in New York was the fact that I had to pay many months of rent in advance to get an apartment, because being a new resident alien I had no Credit History in America. There was also this clause in my lease near the end — after all the riders about bed bugs, rats, scratching walls, and multi-tenancy — which said that breaking the lease would not only render my deposit void but exclude any possibility of getting back the months of rent I’d paid in advance for which I had not yet used. But if I sublet to someone else, then that didn’t break any rules.</p> <p>So the plan was to find a sublet using Craigslist, because everyone in New York uses Craigslist to take out their dirty laundry, so to speak. And more than one colleague had said something like <em>“You’ll have no problem filling your apartment, you might even make a profit, it’s a very competitive market out here”.</em></p> <p>I listed my 7 month old, 600 square foot apartment on Craigslist with some nice photos and a pretty compelling pitch. After 3 weeks and countless re-posts with variations on the same tune, not a single person had committed even coming to look at it. I did get offers for everything from drugs, sex, and Ponzi schemes in the process. Apparently listing your place on the sublets list is somehow a free for all where classification is ignored, or maybe that’s all of Craigslist, I didn’t hang around long enough to find out.</p> <p>After some thinking I concluded I should list it on the same site I found it on, StreetEasy. It cost a few hundred bucks but it sure was worth it.</p> <p>Less than a day later, a Thursday evening if I recall, an actress from LA walked through the door with her film director boyfriend, didn’t say much except for some pointed questions and then asked if I could be out of there by Saturday. I said sure, if she can pay all the rent in advance.</p> <p>A few days later as I was moving my things out and she was loading her new place up with more boxes of belongings than I could have stored everything I’d owned in my life so far, she asked “What do you do for living?”, I responded with my usual terse acclaim “I build apps and stuff”.</p> <p><em>Cool, like a hacker?</em></p> <p><em>“Sure, if you’re not referring to the kind that find exploits in other people’s systems.”</em> She was actually referring to that type, but <a href="https://aeon.co/essays/how-yuppies-hacked-the-original-hacker-ethos" rel="nofollow">the term Hacker has become synonymous with both building things and breaking things</a> I suppose.</p> <p><em>“Wow so you like work with computers all day yeah?”</em></p> <p><em>“Yep, pretty much all the time”</em> I said, as I felt this conversation heading down the sort of cliché dark hole of a nerdy college flick from the 90s.</p> <p><em>“I’m actually an actress, I’m working on a show called</em> <a href="https://www.youtube.com/watch?v=Ug4fRXGyIak" rel="nofollow"><em>Mr Robot</em></a><em>, have you seen it?”</em></p> <p><em>“Nope, never heard of it”</em> I responded, thinking oh god this is going to as bad as CSI Cyber with a token white guy in a suit saying “zoom and enhance” over and over to reproduce the registration plate of a car seen in the reflection of a chrome surface through a window in some low resolution surveillance footage taken from a camera across the street. Which only somehow survives any credibility because the audience is too stupid to know that this is infact a plot hole.</p> <p>I also already knew she was an actress from pulling her name from our email exchange and finding her IMDB page, which was impressive both in that that it was the last result I expected, and that she’d been in some pretty big stuff on American TV, and had a nomination or two. But regardless I never follow pop culture closely enough to even be able to identify half the actresses men or women in America talk about wanting to fuck.</p> <p>Mr Robot however was not yet listed on her IMDB, so I hadn’t heard of it. But she did assure me it wasn’t as bad as CSI Cyber, and that the writer <a href="http://www.imdb.com/name/nm1322753/?ref_=tt_ov_wr" rel="nofollow">Sam Esmail</a> had done a lot of research to avoid said plot holes.</p> <p>A few weeks later I was flying to San Francisco and saw season 1 of Mr Robot on the inflight entertainment, and binge watched half of it. I can assure you it’s quite good, so much so that my friends who actually work in cyber security begrudgingly enjoy it, and I’m glad to see an American TV show including some themes which wouldn’t have been seen ten years ago.</p> <p>Carly ended up being the perfect person to sublet to because I think she was constantly expecting some asshole from New York to do wrong by her, so when I didn’t, things worked out well.</p> <p>In the end I didn’t get my deposit back due a few unrelated technicalities, which taught me a solid lesson about New York and stands as a testament to a constant reminder I was first told by a dear friend before moving there:</p> <blockquote><p>New York will eat you, if you let it. — Dee-Jane</p></blockquote> <p><img src="https://ivan.dev/_img/images/archive/leaving-new-york-1-1200.webp" alt="The same quote depicted on a poster on my walk to work, July, 2014. Artist: Ivan Orama" width="1600" height="2133" srcset="https://ivan.dev/_img/images/archive/leaving-new-york-1-400.webp 400w, https://ivan.dev/_img/images/archive/leaving-new-york-1-800.webp 800w, https://ivan.dev/_img/images/archive/leaving-new-york-1-1200.webp 1200w, https://ivan.dev/_img/images/archive/leaving-new-york-1-1600.webp 1600w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/></p> <p><em>The same quote depicted on a poster on my walk to work, July, 2014. Artist: <a href="https://www.instagram.com/ivanorama/" rel="nofollow">Ivan Orama</a></em></p> <p>I’ll publish the third story soon in a few days.</p>]]></content:encoded>
		</item>
		<item>
			<title>My 2015 — The Year Of Transience</title>
			<link>https://ivan.dev/articles/my-2015-the-year-of-transience</link>
			<guid>https://ivan.dev/articles/my-2015-the-year-of-transience</guid>
			<pubDate>Thu, 31 Dec 2015 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Life</category>
			<description>2015 has been the most impactful year of my life so far.</description>
			<content:encoded><![CDATA[<h4>2015 has been the most impactful year of my life so far. I took more photos than any previous year, I quit my job, met more interesting people than ever before, and discovered things about myself which I would have never considered had this year started any other way.</h4> <h4>Inspired by the recounts of <a href="https://medium.com/u/7ee29b787e9" rel="nofollow">Tobias van Schneider</a>, I’ve put together a few stories and philosophical rants to look back on. It’s by no means inclusive, but because I hate writing quick takeaway points I’m releasing these as individual posts.</h4> <h4>This is the start.</h4> <h3>New York City — Winter</h3> <p>Starting the year in Winter in my East Village, New York apartment was definitely something portrayed better in the movies. For better or worse, probably more worse, this set the year off to a rocky start with my then girlfriend Hannah Wolff, an aspiring actress from Chicago trying to make it in New York.</p> <p>While I was crazy about her and wouldn’t stop talking about her to friends, there was some pretty deep rooted problems from the start which I’ll gloss over. Although this was the early months of our relationship by any measure, she tried very hard to hold things together while I was longing to leave New York.</p> <p>Looking back on this now, I wasn’t running away from her or New York, rather I was running away from the job I had at DigitalOcean. Work and life had collided so much that I couldn’t see the forest from the trees.</p> <p>DigitalOcean sure had a lot of moments I could write about but now’s not the time or place. It was however an exciting time to be part of a fast growing tech company which more than doubled in size while I was there, and be at the center of all the problems this causes as founders and early employees fight to distill some sense of unified culture, process, and product direction in the fresh blood of new team members. But ultimately it left a sour taste in my mouth with constantly playing politics to get even the smallest product changes into production.</p> <p>I also developed a fond dislike of the American work culture, and how everyone seemed to be a slave to The Company, and taking time off and not working 12 hour days was disincentivized.</p> <p><img src="https://ivan.dev/_img/images/archive/my-2015-the-year-of-transience-2-1200.webp" alt="A food delivery guy bracing the cold during the first blizzard of the season. 1st Ave, New York City, Jan 2015." width="1600" height="901" srcset="https://ivan.dev/_img/images/archive/my-2015-the-year-of-transience-2-400.webp 400w, https://ivan.dev/_img/images/archive/my-2015-the-year-of-transience-2-800.webp 800w, https://ivan.dev/_img/images/archive/my-2015-the-year-of-transience-2-1200.webp 1200w, https://ivan.dev/_img/images/archive/my-2015-the-year-of-transience-2-1600.webp 1600w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/></p> <p><em>A food delivery guy bracing the cold during the first blizzard of the season. 1st Ave, New York City, Jan 2015.</em></p> <p>I think NYC is an amazing city, where you can have unlimited potential to be anyone, just so long as you pay rent first, don’t piss off your landlord, and don’t get arrested for buying drugs outside Williamsburg bar at 2am (that bit wasn’t me, but it did happen).</p> <p>Speaking of being a slave to The Company, I knew that if I quit, my Work Visa would expire 10 days later, so timing was tricky. But one day I’d just had enough and told my manager I was rolling out at the end of the month.</p> <p>We played the usual dance of promised promotions and more interesting projects. But staying for the money would have been selling out my future ambitions, and I had at least one of those I wanted to pursue more than ride this rollercoaster.</p> <p><img src="https://ivan.dev/_img/images/archive/my-2015-the-year-of-transience-3-1200.webp" alt="The view from the rooftop of the former DigitalOcean HQ in Soho, Manhattan. July 4th, 2014." width="1600" height="1067" srcset="https://ivan.dev/_img/images/archive/my-2015-the-year-of-transience-3-400.webp 400w, https://ivan.dev/_img/images/archive/my-2015-the-year-of-transience-3-800.webp 800w, https://ivan.dev/_img/images/archive/my-2015-the-year-of-transience-3-1200.webp 1200w, https://ivan.dev/_img/images/archive/my-2015-the-year-of-transience-3-1600.webp 1600w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/></p> <p><em>The view from the rooftop of the former DigitalOcean HQ in Soho, Manhattan. July 4th, 2014.</em></p> <p>I hope you enjoyed the first story. Read next story <a href="https://ivan.dev/articles/leaving-new-york">Leaving New York</a></p>]]></content:encoded>
		</item>
		<item>
			<title>Ember Best Practices: Component inverse templates</title>
			<link>https://ivan.dev/articles/ember-best-practices-component-inverse-templates</link>
			<guid>https://ivan.dev/articles/ember-best-practices-component-inverse-templates</guid>
			<pubDate>Tue, 08 Dec 2015 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Ember.js</category>
			<description>Over the past couple of weeks I’ve been working on a dropdown menu component for the new Flood IO Dashboard, and I’d like to share with you an undocumented but very useful feature of Ember Components we’ve been using.</description>
			<content:encoded><![CDATA[<p>Over the past couple of weeks I’ve been working on a dropdown menu component for the new Flood IO Dashboard, and I’d like to share with you an undocumented but very useful feature of Ember Components we’ve been using.</p> <p>When building a generalised dropdown component which has an easy to understand API, you quickly find yourself in need to being able to render two templates depending on the state of the dropdown. Typically one for the trigger and one for the dropdown container. Of course you could use a bunch of <em>if statements</em> to decide which template to render, but the API you end up exposing becomes pretty verbose.</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-comment)">&#123;&#123;!-- verbose-example.hbs --&#125;&#125;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-token-keyword)">#my-dropdown</span><span style="color:var(--code-foreground)"> as |isOpen|</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span>
<span class="line"><span style="color:var(--code-foreground)">  &#x3C;</span><span style="color:var(--code-token-string-expression)">button</span><span style="color:var(--code-token-function)"> onclick</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-foreground)">toggleOpen</span><span style="color:var(--code-token-constant)">&#125;&#125;</span><span style="color:var(--code-foreground)">>Menu&#x3C;/</span><span style="color:var(--code-token-string-expression)">button</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-token-constant)">  &#123;&#123;</span><span style="color:var(--code-token-keyword)">#if</span><span style="color:var(--code-foreground)"> isOpen</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span>
<span class="line"><span style="color:var(--code-foreground)">    &#x3C;</span><span style="color:var(--code-token-string-expression)">ol</span><span style="color:var(--code-token-function)"> class</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)">"menu-items"</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">      &#x3C;</span><span style="color:var(--code-token-string-expression)">li</span><span style="color:var(--code-foreground)">>Item 1&#x3C;/</span><span style="color:var(--code-token-string-expression)">li</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">      &#x3C;</span><span style="color:var(--code-token-string-expression)">li</span><span style="color:var(--code-foreground)">>Item 2&#x3C;/</span><span style="color:var(--code-token-string-expression)">li</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">    &#x3C;/</span><span style="color:var(--code-token-string-expression)">ol</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-token-constant)">  &#123;&#123;</span><span style="color:var(--code-token-keyword)">/if</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span>
<span class="line"><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-token-keyword)">/my-dropdown</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span></code></pre> <p>I don’t want the end user to have to specify an if statement every time they use my component, so to work around this we can specify a second template using the <em><code>{{else}}</code></em> statement. This becomes the <em>inverse-template</em>.</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-comment)">&#123;&#123;!-- verbose-example.hbs --&#125;&#125;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-token-keyword)">#my-dropdown</span><span style="color:var(--code-foreground)"> as |isOpen|</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span>
<span class="line"><span style="color:var(--code-foreground)">  &#x3C;</span><span style="color:var(--code-token-string-expression)">ol</span><span style="color:var(--code-token-function)"> class</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)">"menu-items"</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">    &#x3C;</span><span style="color:var(--code-token-string-expression)">li</span><span style="color:var(--code-foreground)">>Item 1&#x3C;/</span><span style="color:var(--code-token-string-expression)">li</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">    &#x3C;</span><span style="color:var(--code-token-string-expression)">li</span><span style="color:var(--code-foreground)">>Item 2&#x3C;/</span><span style="color:var(--code-token-string-expression)">li</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-foreground)">  &#x3C;/</span><span style="color:var(--code-token-string-expression)">ol</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-token-keyword)">else</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span>
<span class="line"><span style="color:var(--code-foreground)">  Menu</span></span>
<span class="line"><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-token-keyword)">/my-dropdown</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span></code></pre> <p>Then you can decide how you render each of these, but essentially in a dropdown use-case you will only <em>yield</em> one of them when <em>isOpen</em> is true.</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-comment)">&#123;&#123;!-- my-dropdown.hbs --&#125;&#125;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-foreground)">&#x3C;</span><span style="color:var(--code-token-string-expression)">div</span><span style="color:var(--code-token-function)"> class</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)">"trigger"</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-token-constant)">  &#123;&#123;</span><span style="color:var(--code-token-keyword)">#if</span><span style="color:var(--code-foreground)"> (hasBlock </span><span style="color:var(--code-token-string-expression)">"inverse"</span><span style="color:var(--code-foreground)">)</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span>
<span class="line"><span style="color:var(--code-foreground)">    &#x3C;</span><span style="color:var(--code-token-string-expression)">button</span><span style="color:var(--code-token-function)"> onclick</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-foreground)">toggleOpen</span><span style="color:var(--code-token-constant)">&#125;&#125;</span><span style="color:var(--code-foreground)">></span><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-foreground)">yield </span><span style="color:var(--code-token-function)">to=</span><span style="color:var(--code-token-string-expression)">"inverse"</span><span style="color:var(--code-token-constant)">&#125;&#125;</span><span style="color:var(--code-foreground)">&#x3C;/</span><span style="color:var(--code-token-string-expression)">button</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-token-constant)">  &#123;&#123;</span><span style="color:var(--code-token-keyword)">else</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span>
<span class="line"><span style="color:var(--code-foreground)">    &#x3C;</span><span style="color:var(--code-token-string-expression)">button</span><span style="color:var(--code-token-function)"> onclick</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-foreground)">toggleOpen</span><span style="color:var(--code-token-constant)">&#125;&#125;</span><span style="color:var(--code-foreground)">></span><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-foreground)">label</span><span style="color:var(--code-token-constant)">&#125;&#125;</span><span style="color:var(--code-foreground)">&#x3C;/</span><span style="color:var(--code-token-string-expression)">button</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-token-constant)">  &#123;&#123;</span><span style="color:var(--code-token-keyword)">/if</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span>
<span class="line"><span style="color:var(--code-foreground)">&#x3C;/</span><span style="color:var(--code-token-string-expression)">div</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-token-keyword)">#if</span><span style="color:var(--code-foreground)"> isOpen</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span>
<span class="line"><span style="color:var(--code-foreground)">  &#x3C;</span><span style="color:var(--code-token-string-expression)">div</span><span style="color:var(--code-token-function)"> class</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)">"dropdown-container"</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-token-constant)">    &#123;&#123;</span><span style="color:var(--code-foreground)">yield</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span>
<span class="line"><span style="color:var(--code-foreground)">  &#x3C;/</span><span style="color:var(--code-token-string-expression)">div</span><span style="color:var(--code-foreground)">></span></span>
<span class="line"><span style="color:var(--code-token-constant)">&#123;&#123;</span><span style="color:var(--code-token-keyword)">/if</span><span style="color:var(--code-token-constant)">&#125;&#125;</span></span></code></pre> <p>An added advantage is that we can make the inverse template optional, and fallback to the label property if we want, and abstract the trigger away to our component. This way we don’t leak any internal APIs to the end user.</p> <p>Here’s an <a href="https://ember-twiddle.com/7c4b286315aad9fb5289" rel="nofollow">Ember Twiddle</a> to explain this in practice.</p> <p>This feature was introduced in Ember 1.13, so you should be okay to use it today. Documentation is however missing, so I can’t guarantee this API won’t change in the future. It works in Ember 2.2 though.</p>]]></content:encoded>
		</item>
		<item>
			<title>Ember Computed Style</title>
			<link>https://ivan.dev/articles/ember-addon-computed-style</link>
			<guid>https://ivan.dev/articles/ember-addon-computed-style</guid>
			<pubDate>Tue, 08 Dec 2015 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Ember.js</category>
			<description>One feature I have missed from React is the ability to define styles on your components using Javascript.</description>
			<content:encoded><![CDATA[<p>For most of last year I was a React developer at DigitalOcean, and I still observe what’s happening in the React world. One feature I have missed from React is the ability to define styles on your components using Javascript.</p> <p>While of course you can do this in Ember by producing a string of styles and binding it to the <em>style</em> attribute, it can become complicated when you want to produce a style string from multiple computed properties, not to mention string interpolation just looks awful when skimming over code.</p> <p>To solve this problem I’ve released a new add-on called <em>ember-computed-style</em>, which allows you to define styles as objects and have them bound as a style string computed from the keys and values, which is then escaped for safety in Handlebars.</p> <h3>Example:</h3> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> computedStyle </span><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-token-string-expression)"> 'ember-computed-style'</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-keyword)">export</span><span style="color:var(--code-token-keyword)"> default</span><span style="color:var(--code-token-constant)"> Ember</span><span style="color:var(--code-token-function)">.</span><span style="color:var(--code-token-constant)">Component</span><span style="color:var(--code-token-function)">.extend</span><span style="color:var(--code-foreground)">(&#123;</span></span>
<span class="line"><span style="color:var(--code-foreground)">  style</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-function)"> computedStyle</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">'backgroundStyle'</span><span style="color:var(--code-foreground)">)</span><span style="color:var(--code-token-punctuation)">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-foreground)">  backgroundStyle</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-foreground)"> &#123;</span></span>
<span class="line"><span style="color:var(--code-foreground)">    backgroundColor</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-string-expression)"> "red"</span><span style="color:var(--code-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--code-foreground)">  &#125;</span><span style="color:var(--code-token-punctuation)">,</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-foreground)">  attributeBindings</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-foreground)"> [</span><span style="color:var(--code-token-string-expression)">'style'</span><span style="color:var(--code-foreground)">]</span><span style="color:var(--code-token-punctuation)">,</span></span>
<span class="line"><span style="color:var(--code-foreground)">&#125;);</span></span></code></pre> <p><em>Example component using computedStyle to bind the style attribute of this component</em></p> <p>I’ll let the above code do all the talking.</p> <p>When this component renders it will set the <em>style</em> attribute with the computed style string based on the <em>backgroundStyle</em> property<em>.</em></p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-foreground)">&#x3C;</span><span style="color:var(--code-token-string-expression)">div</span><span style="color:var(--code-token-function)"> style</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)">"background-color:red;"</span><span style="color:var(--code-token-function)"> class</span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)">"ember-view"</span><span style="color:var(--code-foreground)">>...</span></span></code></pre> <p>Of course the property names will be dasherized, and the values will be interpreted correctly as to whether they should be unit-less or not. So you can specify margins and positioning as regular numbers and have them rendered in <em>“px”</em> units.</p> <p>If you want to remove a property completely, just have it return <em>null or some empty value</em>. This is useful for <em>display: none;</em>toggles.</p> <h3>Get Started</h3> <p>Install the Ember addon the usual way:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">ember</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> ember-computed-style</span></span></code></pre> <p>Importing the library:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">import</span><span style="color:var(--code-foreground)"> computedStyle </span><span style="color:var(--code-token-keyword)">from</span><span style="color:var(--code-token-string-expression)"> "ember-computed-style"</span><span style="color:var(--code-foreground)">;</span></span></code></pre> <p>That’s pretty all there is to it. I welcome contributions, so please check out the GitHub repo <a href="https://github.com/ivanvanderbyl/ember-computed-style" rel="nofollow">ivanvanderbyl/ember-computed-style</a> and let me know if you find any issues.</p>]]></content:encoded>
		</item>
		<item>
			<title>Emoji based authentication</title>
			<link>https://ivan.dev/articles/emoji-based-authentication</link>
			<guid>https://ivan.dev/articles/emoji-based-authentication</guid>
			<pubDate>Fri, 02 Oct 2015 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Engineering</category>
			<description>Authentication can be described as a game of tradeoffs, and this post proposes a simple emoji based sign-in scheme for apps where ease of signup matters more than absolute certainty.</description>
			<content:encoded><![CDATA[<p>Authentication can be described as a game of tradeoffs, sometimes the level of authenticity of the user isn’t actually that critical and some times you need to provide multiple factors for authenticity. I’d like to propose an authentication scheme for the former.</p> <p>The problem comes about when you’re building a consumer facing app where you want to optimise for ease of use and efficiency of signups over being absolutely positively sure that the person using the app isn’t trying to defraud you. But even if they are, you can add that second level of authentication later.</p> <p>Currently, you might solve this by verifying an email after signup, or sending an SMS with a 6 digit verification code, while blocking access to the app until the user enters that code.</p> <p>The problem with these approaches is that you need to ask more information than you might need (in the case of email) and require more user interactions which increase friction and reduce conversions in the case of remembering and retyping a 6 digit code.</p> <h3>On-boarding flow</h3> <p>The idea here is that we will send an emoji to the user, then ask them which one they received. Simple.</p> <p>The obvious flow for this is:</p> <p><img src="https://ivan.dev/_img/images/archive/emoji-based-authentication-1-720.webp" alt="Get Started screen asking for a phone number, with a Verify Number button" width="720" height="1280" srcset="https://ivan.dev/_img/images/archive/emoji-based-authentication-1-400.webp 400w, https://ivan.dev/_img/images/archive/emoji-based-authentication-1-720.webp 720w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" fetchpriority="high" decoding="async"/></p> <p><img src="https://ivan.dev/_img/images/archive/emoji-based-authentication-2-720.webp" alt="Verify screen: a text message shows a heart-eyes emoji, and the app asks which of three emoji you received" width="720" height="1280" srcset="https://ivan.dev/_img/images/archive/emoji-based-authentication-2-400.webp 400w, https://ivan.dev/_img/images/archive/emoji-based-authentication-2-720.webp 720w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/></p> <p><img src="https://ivan.dev/_img/images/archive/emoji-based-authentication-3-720.webp" alt="Welcome screen with a white tick, shown after the correct emoji is chosen" width="720" height="1280" srcset="https://ivan.dev/_img/images/archive/emoji-based-authentication-3-400.webp 400w, https://ivan.dev/_img/images/archive/emoji-based-authentication-3-720.webp 720w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/></p> <p>Walking through these screens, firstly we ask for a phone number which we’ll tie to the account on the back-end.</p> <p>Secondly we’ll send an SMS to the that number containing a randomly selected emoji, and tell the app which emoji we sent. The purpose of this is to verify that the user who entered the number is also using that phone.</p> <p>Thirdly, when they select an emoji from the list, we’ll hash that emoji + their number and send that to the server to exchange for a bearer token, similar to how the <a href="https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2" rel="nofollow">OAuth 2 Resource Owner Grant Flow</a> works.</p> <p>That’s really all there is to it. It’s <strong>not the most secure flow possible</strong>, but it might solve a legitimate problem where <strong>you don’t really care because you’re not handling anything super secret or valuable</strong>. If you are doing something secret or valuable, maybe don’t do this.</p> <p>A not so obvious thing about this flow is that if you never collect any other identifying information, your users won’t be able to recover their account if they ever lose that number, so if you transact something, you might want to collect an email or something else unique when the time is right.</p> <h3>What about passwords?</h3> <p>The last point to make is that you don’t need to set a password, this is really a bug and feature sort of scenario. When a user returns to your app, instead of signing in with their username and password, or phone number and password, simply repeat the flow above. This also reduces the work you need to do in your app because you only need to build those 3 screens.</p> <h3>What about security?</h3> <p>I highly recommend that you read about security before building anything relating to authentication, authorisation, or crypto. If you don’t, you will eventually do something stupid and get owned. If in doubt, use something which has been tried and tested by others.</p> <p><em>Wait, so this whole idea is pointless?</em> No. It’s a solid and simple on-boarding flow which should work nicely. Just be sure you understand the tradeoffs.</p> <h3>Conclusion</h3> <p>On boarding is a tricky game of being efficient in asking for information, while reducing friction and maintaining the right level of usefulness of your app. You often don’t need more than one piece of identifying information to get someone started, and when you do, that is when you should ask for it.</p> <p>Emoji based authentication is simple, recognisable, and provides a low level of friction to the user at a level of tradeoff which can be accepted in many scenarios.</p> <p>If you end up building this, please let me know, I’d love to know how it works. Tweet at @ivanderbyl.</p>]]></content:encoded>
		</item>
		<item>
			<title>Debugging SourceMaps</title>
			<link>https://ivan.dev/articles/debugging-sourcemaps</link>
			<guid>https://ivan.dev/articles/debugging-sourcemaps</guid>
			<pubDate>Sat, 14 Mar 2015 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>JavaScript</category>
			<description>Or more precisely, debugging your debugging tools.</description>
			<content:encoded><![CDATA[<p>Or more precisely, debugging your debugging tools.</p> <p>I recently began fixing a number of errors on DigitalOcean’s public website which stemmed from years of technical debt and poorly understood code.<br/> The short of which was that the JS minifier we were using was producing invalid Javascript due to syntax errors, which for the most part were from code being pasted from StackOverflow posts.</p> <p>That aside, once I’d linted all the code and cleaned up the obvious errors, which saw a huge reduction of errors in production, we were still seeing quite a few errors.</p> <p>Now the problem with minified JS is that you get error reports which are one line long, and 9982 columns deep. Which basically makes them useless for debugging. To work around this there’s an awesome feature of modern browsers called <a href="https://sourcemaps.info/spec.html" rel="nofollow">SourceMaps</a>.</p> <p>SourceMaps, as the name suggests, map sources. So you can map each function in your minified JS to actual code, even transpiled ES6 -> ES5 code or Coffeescript. This makes debugging errors in production much easier, especially because error reporting services like <a href="https://bugsnag.com" rel="nofollow">Bugsnag</a> actually pull these in for you, seamlessly. So you get rich backtraces with information you can use locally.</p> <p>I’m not going to go in to detail about how to set up SourceMaps, you can read all about <a href="http://webpack.github.io/docs/configuration.html#output-sourcemapfilename" rel="nofollow">SourceMaps with WebPack</a>, the compiler we use. Instead I want to talk about a not so documented issue with the way browsers handle SourceMaps served separately to your source files.</p> <p>The first thing to know about SourceMaps is that they’re just JSON. But the file extension of <code>.map</code> often has no default mapping on most servers, so they get served with a MIME type of <code>application/javascript</code> or something else undetermined, which for Firefox and Chrome means they will parse it as Javascript or not at all, but you won’t know this because they silently fail on this and report no errors back to you. Safari parses them as JSON no matter what <code>Content-Type</code> you serve them as.</p> <p>This was infuriating because the Network Inspector in Chrome showed that my SourceMaps were being loaded successfully, but they weren’t working as I expected.</p> <p>Unfortunately there isn’t a way to really debug the internals of Chrome like you debug your own JS apps, however there is a way to do this with Firefox, it’s called Firefox Developer Edition, which includes a console for inspecting the live Browser called <a href="https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox" rel="nofollow">Browser Toolbox</a>.</p> <p>The first thing you notice here is that we’re debugging actual Javascript, which is running the browser, that’s right, the internals of Firefox responsible for loading and parsing resources are written in Javascript.</p> <h3>Invalid JSON in SourceMaps</h3> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>ThreadSources.prototype._fetchSourceMap threw an exception: SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 2146 column 1 of the JSON data</span></span>
<span class="line"><span>Stack: SourceMapConsumer@resource://gre/modules/devtools/SourceMap.jsm:67:19</span></span>
<span class="line"><span>ThreadSources.prototype._fetchSourceMap/fetching&#x3C;@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:5453:19</span></span>
<span class="line"><span>Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:867:23</span></span>
<span class="line"><span>...</span></span></code></pre> <p>Reloading our site in Firefox Developer Edition gave me exactly what I needed to start investigating this further. As you can see above, the SourceMap parser is crapping itself on an invalid token which it expects to be JSON. Well that’s weird, because surely Webpack is outputting valid SourceMaps right? To verify this I spun up a Node REPL and loaded my SourceMaps from disk:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-punctuation)">$</span><span style="color:var(--code-foreground)"> node</span></span>
<span class="line"><span style="color:var(--code-token-punctuation)">></span><span style="color:var(--code-foreground)"> JSON.parse(</span><span style="color:var(--code-token-function)">fs.readFileSync(</span><span style="color:var(--code-token-function)">'source/assets/js/application.bundle.js.map'</span><span style="color:var(--code-token-function)">,</span><span style="color:var(--code-token-string-expression)"> 'utf8'</span><span style="color:var(--code-foreground)">))</span></span>
<span class="line"><span style="color:var(--code-foreground)">&#123; version: 3,</span></span>
<span class="line"><span style="color:var(--code-foreground)">  sources: ...</span></span></code></pre> <p>Seems legit.</p> <p>So we’re in the right, but the browser is still failing. I added some breakpoints to Firefox’s SourceMap parser and drilled down to the <code>fetch</code> function which handles loading SourceMaps. After stepping through to the end I noticed that our <code>contentType</code> was set to <code>application/javascript</code>, which indicates that Middleman (our static site generator) was serving this file incorrectly.<br/> <img src="https://ivan.dev/_img/images/archive/debugging-sourcemaps-1-1200.webp" alt="Firefox Browser Debugger" width="1478" height="853" srcset="https://ivan.dev/_img/images/archive/debugging-sourcemaps-1-400.webp 400w, https://ivan.dev/_img/images/archive/debugging-sourcemaps-1-800.webp 800w, https://ivan.dev/_img/images/archive/debugging-sourcemaps-1-1200.webp 1200w, https://ivan.dev/_img/images/archive/debugging-sourcemaps-1-1478.webp 1478w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" loading="lazy" decoding="async"/></p> <h2>Fixing Middleman option #1</h2> <p>The first way to fix this is to make Middleman serve <code>.map</code> files as JSON, this is really easy. In our Middleman <code>config.rb</code> just add this to the top:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-constant)">Rack</span><span style="color:var(--code-token-punctuation)">::</span><span style="color:var(--code-token-constant)">Mime</span><span style="color:var(--code-token-punctuation)">::</span><span style="color:var(--code-token-constant)">MIME_TYPES</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">merge!</span><span style="color:var(--code-foreground)">(&#123;</span><span style="color:var(--code-token-string-expression)">".map"</span><span style="color:var(--code-token-keyword)"> =></span><span style="color:var(--code-token-string-expression)"> "application/json"</span><span style="color:var(--code-foreground)">&#125;)</span></span></code></pre> <p>Rinse and reload. Done.</p> <h2>Fixing everything else at once, option #2</h2> <p>Option #1 won’t fix our issue in production because we serve everything through Nginx, which would require me to reconfigure Nginx’s MIME config. Too hard right now, too much Chef involved.</p> <p>A simple fix, just change our SourceMap filename in Webpack:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">webpack</span><span style="color:var(--code-token-string)"> --config</span><span style="color:var(--code-token-string)"> webpack.config.js</span><span style="color:var(--code-token-string)"> -p</span><span style="color:var(--code-token-string)"> --devtool</span><span style="color:var(--code-token-string)"> sourcemap</span><span style="color:var(--code-token-string)"> --output-source-map-file</span><span style="color:var(--code-token-string-expression)"> "[file].map.json"</span></span></code></pre> <p>This will output our SourceMaps ending in <code>.map.json</code>, and update the references in each compiled file to match.</p> <p>Problem solved. Now Nginx and Middleman both serve as <code>application/json</code>.</p> <h2>Conclusion</h2> <p>Sometimes taking the long way around to debug something can give you some valuable insights in to how the tools you work with actually work.</p> <p>So long story short, serve your SourceMaps as <code>application/json</code> if you can’t get them to work for no obvious reason.</p>]]></content:encoded>
		</item>
		<item>
			<title>Why I joined a startup</title>
			<link>https://ivan.dev/articles/why-i-joined-a-startup</link>
			<guid>https://ivan.dev/articles/why-i-joined-a-startup</guid>
			<pubDate>Thu, 18 Apr 2013 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Startups</category>
			<description>I've spent the last 6 years since I finished high school working for companies of less than 20 people.</description>
			<content:encoded><![CDATA[<p><img src="https://ivan.dev/_img/images/archive/why-i-joined-a-startup-1-1200.webp" alt="The view from 500 Startups, Mountain View, CA" width="1600" height="1200" srcset="https://ivan.dev/_img/images/archive/why-i-joined-a-startup-1-400.webp 400w, https://ivan.dev/_img/images/archive/why-i-joined-a-startup-1-800.webp 800w, https://ivan.dev/_img/images/archive/why-i-joined-a-startup-1-1200.webp 1200w, https://ivan.dev/_img/images/archive/why-i-joined-a-startup-1-1600.webp 1600w" sizes="(min-width: 768px) 708px, calc(100vw - 48px)" fetchpriority="high" decoding="async"/></p> <p><em>The view from 500 Startups, Mountain View, CA</em></p> <p>I’ve spent the last 6 years since I finished high school working for companies of less than 20 people. Nearly always as a consultant trying to <a href="http://crashlog.io" rel="nofollow">bootstrap something</a> else on the side.</p> <p>This year, after spending a few months travelling, and generally not doing a very good job on other peoples projects as I would like, I decided to head over to Mountain View, California and visit some friends who had left Melbourne 6 months earlier to build a startup.</p> <p>I met these guys as part of the AngelCube venture accelerator in Melbourne around the start of 2012. And I was sitting across from Ed, one of the founders, when he got the call from <a href="http://twitter.com/davemcclure" rel="nofollow">Dave McClure</a> to join 500 Startups.</p> <hr/> <p>A few months later I started working for them a few hours a week to quickly implement things they weren’t completely fluent in, like Ember.js and building an API in Rails.</p> <p>I was pretty excited by what they were building, not just because of the technology stack behind it, but rather because they were doing something which hadn’t been done before.</p> <p>That might sound strange,but if you look closely at ±90% of all startups (arbitrarily large unscientific number) you’ll find they are simply iterating on or improving a well understood domain.</p> <p>Take <a href="http://stripe.com/" rel="nofollow">Stripe</a> for example — they are making it easier to accept card payments online. Something which is obviously not new, but it’s still orders of magnitude harder than it should be in just about every established market you can name.</p> <p>Something else that became immediately obvious was this teams insane calibre for getting shit done, and learning along the way.</p> <p>To illustrate the point, I had a two hour Skype call with <a href="http://twitter.com/chrisnolet" rel="nofollow">Chris</a> back in November to teach him the basics of Ember.js, to which he then goes and builds a large chunk of the <a href="http://kickfolio.com" rel="nofollow">Kickfolio</a> dashboard.And for those who aren’t aware, Ember is known for having an <a href="http://emberjs.com/blog/2013/03/21/making-ember-easier.html" rel="nofollow">extraordinarily steep and painful learning curve</a> for a Javascript framework. I thought this was impressive.</p> <p>For those who don’t know me from a bar of soap, and who haven’t heard of <a href="http://crashlog.io/" rel="nofollow">CrashLog</a> or <a href="http://testpilot.me/" rel="nofollow">TestPilot CI</a>. I had previously tried and failed to bootstrap the latter from Melbourne for over two years. And while I still work on CrashLog on my weekends, I am constantly reminded of what killed TestPilot: Not being able to find the right people to get it off the ground.</p> <p>I actually met one of the other founders; <a href="http://twitter.com/diesellaws" rel="nofollow">Diesel Laws</a>, when he was going through much the same battle with his other startup in 2011.</p> <p>After reading that he shut down <a href="http://barklesapp.tumblr.com/" rel="nofollow">Barkles</a> I began to suspect there might be some truth in what everyone had been telling me for years: Startups are fucking hard and you’re a moron for sticking it out on your own (paraphrased).</p> <p>So the decision to join the Kickfolio team really came out of the realisation that in order to build something amazing that the world will actually see, you must work with an awesome team.</p> <p>Otherwise you’ll probably build something amazing and never have the time to show anyone, or you build a half assed something and nobody will give a fuck.</p> <p>So above all, joining a killer team became more important than actually building something. But building something is an awesome side effect.</p> <hr/> <p>I didn’t realise it at the time, but the open invite to stay with them when I was in town should have been a direct give-away — they had been scheming ways to get me onboard as their first employee for quite some time. And when they finally asked me to join to team, it didn’t take much convincing. But I did have to turn down a job at an established tech company in San Francisco as a result (no names mentioned).</p> <p>Truth be told, I didn’t think I would ever join a company full-time,and I don’t think there is any other company I would consider joining, except maybe Github. Maybe.</p> <hr/> <p>It’s obviously not quite the same as being a founder, but I have roughly the same autonomy. And as a team we’re shipping more code, siging up more customers, and generally growing at orders of magnitude faster than I could have achieved on my own.</p> <p><strong>I think this is exciting.</strong></p>]]></content:encoded>
		</item>
		<item>
			<title>Launching CrashLog</title>
			<link>https://ivan.dev/articles/launching-crashlog</link>
			<guid>https://ivan.dev/articles/launching-crashlog</guid>
			<pubDate>Sat, 06 Oct 2012 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Product</category>
			<description>Today we are excited to announce the public launch of CrashLog.</description>
			<content:encoded><![CDATA[<p>Today we are excited to announce the public launch of CrashLog.</p> <p>As our name suggests we capture errors occurring in your web, mobile, server-side, and desktop applications, along with a detailed analysis to help you get to the cause as quickly as possible.</p> <h2>Never miss an exception</h2> <p>As a developer, one of your highest priorities once your product is in the hands of customers is reacting to issues before the customer even has the chance to ping you on Twitter. This goes hand in hand with delivering a good customer experience.</p> <p>So it goes without saying that if you don’t get notified, and you don’t spend your days tailing logs — then you’re probably going to miss something important.</p> <p>Which is where we come in.</p> <h2>Capture everything</h2> <p>CrashLog was designed to support a generic set of interfaces from common languages to allow you to send arbitrary events and have them automatically correlated with similar events, system components, and users.</p> <p>We’re still young, but our small team is adding great futures by the day. Some things we shipped this week:</p> <h3>Backtrace contexts</h3> <p>Backtrace contexts allow you to expand any backtrace line and see the code surrounding that line instantly, even from within supporting libraries.</p> <h3>User contexts</h3> <p>If the exception was triggered by an authenticated user you can send a few details to allow you to identify them and be proactive about making sure their experience did not lose you a sale, or worse.</p> <p>Very soon you will be able to filter exceptions by specific users.</p> <h3>Ruby/Rails and Java support delivered, more in development</h3> <p>Our open source plugins for common languages are in active development, with Java (Thanks <a href="http://twitter.com/wolfeidau" rel="nofollow">Mark Wolfe</a>) and Ruby support available now with seamless integration into Rails and Rack based applications.</p> <p>Our own stack consists of more than just Ruby on the backend and Javascript on the front-end, and we know yours probably does too which is why we have a roadmap for extending support to all common frameworks from web to mobile and desktop.</p> <p>If you want to see support for something we don’t already have a repository for, checkout our <a href="https://github.com/crashlog/api-documentation" rel="nofollow">API documentation</a>, it’s really quite straight forward.</p> <h2>A rich user experience</h2> <p>As a developer I often come across tools with a user experience very much designed to meet what interaction designers would call the ‘Implementation model’ — a button for every action. While the learning curve for interfaces like this is quite steep we’re usually happy to master them. However I want to see this landscape change, which is why as a key to the experience of CrashLog, and the simplicity of our service, we have spent considerable time refining the CrashLog UI.</p> <p>But we’re only just getting started, in the coming weeks we’ll not only be adding more languages and frameworks to our officially supported plugins, but we also have some very unique features in the pipeline which I am truly excited to release.</p> <p>I would like to thank everyone who has used CrashLog over the last couple of months while we prepared for an official release and the valuable feedback we received has helped shape this service to what it is today.</p> <p><a href="http://crashlog.io/register" rel="nofollow">Get started</a></p>]]></content:encoded>
		</item>
		<item>
			<title>Realtime Backbone.js views using Pusher</title>
			<link>https://ivan.dev/articles/realtime-backbone-js-views-using-pusher</link>
			<guid>https://ivan.dev/articles/realtime-backbone-js-views-using-pusher</guid>
			<pubDate>Fri, 25 Nov 2011 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>JavaScript</category>
			<description>I like feedback, I like to know that when I click a button that I will be presented with some — sometimes small — visual indication that my action succeeded.</description>
			<content:encoded><![CDATA[<p>I like feedback, I like to know that when I click a button that I will be presented with some — sometimes small — visual indication that my action succeeded. However with TestPilot we have a lot of things going on in the background, we use multiple background workers running in 3 different DCs, some have access to the database and others use a separate messaging layer to get messages back to the frontend.</p> <p>The end result is usually a record being updated or created, but the only way to present this change to the user is reloading the page. This is fine for CRUD actions which respond instantly, but background jobs can take seconds or minutes to respond, or respond multiple times which is the case of importing your Github repositories.</p> <p>You could ask the user to reload the page after a few seconds, but seriously I will not use your application beyond that point if you do this. I have my hand cautiously resting on ⌘ + W for such an event.</p> <h2>Make it realtime</h2> <p>Enter WebSockets, or more precisely <a href="http://pusher.com" rel="nofollow">Pusher</a> — cross browser WebSockets as a service.</p> <p>I won’t go into details about what or how WebSockets work, there are a lot of great articles around which can go into more detail than I could ever cover here. But in a nutshell Pusher allows you to “push” messages to the browser, instead of polling for changes. A message can contain any JSON serialisable data structure like a Hash (Hashes work well).</p> <h2>Putting it together</h2> <p>There is two components to making this work, firstly you need to be able to trigger an event, for the sake of this article we won’t talk about what is triggering the event we’ll just do it on the command line.</p> <p>If you haven’t done so, add ‘pusher’ to your <code>Gemfile</code></p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-foreground)">gem </span><span style="color:var(--code-token-string-expression)">'pusher'</span></span></code></pre> <p>And configure it with your Pusher credentials:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-constant)">Pusher</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">app_id</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-string-expression)"> 'YOUR APP ID'</span></span>
<span class="line"><span style="color:var(--code-token-constant)">Pusher</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">key</span><span style="color:var(--code-token-keyword)">    =</span><span style="color:var(--code-token-string-expression)"> 'YOUR API KEY'</span></span>
<span class="line"><span style="color:var(--code-token-constant)">Pusher</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">secret</span><span style="color:var(--code-token-keyword)"> =</span><span style="color:var(--code-token-string-expression)"> 'YOUR SECRETS'</span></span></code></pre> <p>I have this in an initializer: <code>config/initializers/pusher.rb</code></p> <p>You also need to grab the <a href="http://pusher.com/docs/client_libraries" rel="nofollow">Pusher JS library</a> and add it to your layout.</p> <h2>Triggering events</h2> <p>Triggering events is dead simple, try this in <code>rails console</code></p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-constant)">Pusher</span><span style="color:var(--code-foreground)">[</span><span style="color:var(--code-token-string-expression)">'SOME_CHANNEL_NAME'</span><span style="color:var(--code-foreground)">]</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">trigger</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">'some:event'</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> &#123;</span><span style="color:var(--code-token-constant)">body:</span><span style="color:var(--code-token-string-expression)"> "Hello World"</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)"> id:</span><span style="color:var(--code-token-constant)"> 1</span><span style="color:var(--code-foreground)">&#125;)</span></span></code></pre> <p>This will send an event containing the payload object <code>{body: "Hello World", id: 1}</code> - Simple.</p> <h2>Responding to events</h2> <p>To simplify the handling of Pusher events and channel subscriptions in the frontend I’ve written a quick <code>Backbone.view</code> extension which you can extend to automatically subscribe to events.</p> <p>I put this in <code>app/assets/javascripts/backbone/lib/realtime_view.js.coffee</code></p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">class</span><span style="color:var(--code-token-function)"> Backbone.RealtimeView</span><span style="color:var(--code-token-keyword)"> extends</span><span style="color:var(--code-token-function)"> Backbone.View</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-foreground)">  events</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-foreground)"> &#123;&#125;</span></span>
<span class="line"><span style="color:var(--code-foreground)">  channel</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-constant)"> null</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">  delegateEvents</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-parameter)">events</span><span style="color:var(--code-foreground)">) </span><span style="color:var(--code-token-keyword)">-></span></span>
<span class="line"><span style="color:var(--code-foreground)">    super events</span></span>
<span class="line"><span style="color:var(--code-token-function)">    @_setupPusher</span><span style="color:var(--code-token-punctuation)">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">  _setupPusher</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-keyword)"> -></span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    if</span><span style="color:var(--code-token-constant)"> _</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">isFunction</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-token-constant)">this</span><span style="color:var(--code-foreground)">[@channel]</span><span style="color:var(--code-token-punctuation)">)</span></span>
<span class="line"><span style="color:var(--code-foreground)">      channel </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> this</span><span style="color:var(--code-foreground)">[@channel]</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">apply</span><span style="color:var(--code-token-constant)"> this</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    else</span></span>
<span class="line"><span style="color:var(--code-foreground)">      channel </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)"> @channel</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-keyword)">    if</span><span style="color:var(--code-foreground)"> channel</span><span style="color:var(--code-token-keyword)">?</span><span style="color:var(--code-token-keyword)"> and</span><span style="color:var(--code-foreground)"> pusherToken</span><span style="color:var(--code-token-keyword)">?</span></span>
<span class="line"><span style="color:var(--code-foreground)">      @pusher </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-keyword)"> new</span><span style="color:var(--code-token-function)"> Pusher</span><span style="color:var(--code-foreground)">(pusherToken);</span></span>
<span class="line"><span style="color:var(--code-foreground)">      @pusherChannel </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)"> @pusher</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">subscribe</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-foreground)">channel</span><span style="color:var(--code-token-punctuation)">)</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-function)">      @_bindEvents</span><span style="color:var(--code-token-punctuation)">()</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">  event</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-parameter)">eventName</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-parameter)"> callback</span><span style="color:var(--code-foreground)">) </span><span style="color:var(--code-token-keyword)">-></span></span>
<span class="line"><span style="color:var(--code-foreground)">    self </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> this</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-foreground)">    @pusherChannel</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">bind</span><span style="color:var(--code-foreground)"> eventName</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-parameter)">params</span><span style="color:var(--code-foreground)">) </span><span style="color:var(--code-token-keyword)">=></span></span>
<span class="line"><span style="color:var(--code-token-constant)">      callback</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">apply</span><span style="color:var(--code-foreground)"> self</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> [params]</span></span>
<span class="line"><span style="color:var(--code-foreground)">      @trigger</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">apply</span><span style="color:var(--code-foreground)"> self</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> [ </span><span style="color:var(--code-token-string-expression)">"event:"</span><span style="color:var(--code-token-keyword)"> +</span><span style="color:var(--code-foreground)"> eventName ]</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">concat</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-foreground)">params</span><span style="color:var(--code-token-punctuation)">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">  _bindEvents</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-keyword)"> -></span></span>
<span class="line"><span style="color:var(--code-token-keyword)">     return</span><span style="color:var(--code-token-keyword)"> unless</span><span style="color:var(--code-foreground)"> @events</span><span style="color:var(--code-token-keyword)">?</span><span style="color:var(--code-token-keyword)"> and</span><span style="color:var(--code-foreground)"> @pusherChannel</span><span style="color:var(--code-token-keyword)">?</span></span>
<span class="line"><span style="color:var(--code-foreground)">     events </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-foreground)"> []</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">     for</span><span style="color:var(--code-foreground)"> event </span><span style="color:var(--code-token-keyword)">of</span><span style="color:var(--code-foreground)"> @events</span></span>
<span class="line"><span style="color:var(--code-token-constant)">       events</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">unshift</span><span style="color:var(--code-foreground)"> [ event</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> @events[event] ]</span></span>
<span class="line"><span style="color:var(--code-foreground)">     i </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> 0</span></span>
<span class="line"><span style="color:var(--code-foreground)">     l </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-constant)"> events</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-foreground)">length</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-keyword)">     while</span><span style="color:var(--code-foreground)"> i </span><span style="color:var(--code-token-keyword)">&#x3C;</span><span style="color:var(--code-foreground)"> l</span></span>
<span class="line"><span style="color:var(--code-token-function)">       @event events[i][</span><span style="color:var(--code-token-constant)">0</span><span style="color:var(--code-token-function)">]</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)"> this</span><span style="color:var(--code-token-function)">[events[i][</span><span style="color:var(--code-token-constant)">1</span><span style="color:var(--code-token-function)">]]</span></span>
<span class="line"><span style="color:var(--code-foreground)">       i</span><span style="color:var(--code-token-keyword)">++</span></span></code></pre> <p>In the head of your layout you will need to set the <code>pusherToken</code> variable or bad things will happen like this whole thing not working.</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-foreground)">:javascript</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">  var</span><span style="color:var(--code-foreground)"> pusherToken </span><span style="color:var(--code-token-keyword)">=</span><span style="color:var(--code-token-string-expression)"> "YOUR_PUSHER_KEY"</span><span style="color:var(--code-foreground)">;</span></span></code></pre> <p>This view extension is a lot simpler than it looks, all it does is handle the event bindings to Pusher and setup the channel. The channel attribute takes a string, if the string name matches a method name it will call that method for the result, or else use the string name.</p> <h3>The view</h3> <p>All you need to do is inherit from <code>Backbone.RealtimeView</code>, and everything else is a standard Backbone.View.</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">class</span><span style="color:var(--code-token-function)"> TestPilot.Views.DashboardView</span><span style="color:var(--code-token-keyword)"> extends</span><span style="color:var(--code-token-function)"> Backbone.RealtimeView</span></span>
<span class="line"><span style="color:var(--code-foreground)">  el</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-string-expression)"> 'div.panel'</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-foreground)">  events</span><span style="color:var(--code-token-keyword)">:</span></span>
<span class="line"><span style="color:var(--code-token-string-expression)">    'message:create'</span><span style="color:var(--code-token-keyword)"> :</span><span style="color:var(--code-token-string-expression)"> 'addMessage'</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-foreground)">  channel</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-string-expression)"> 'findChannel'</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">  addMessage</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-foreground)"> (</span><span style="color:var(--code-token-parameter)">payload</span><span style="color:var(--code-foreground)">) </span><span style="color:var(--code-token-keyword)">-></span></span>
<span class="line"><span style="color:var(--code-token-function)">    console</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">log</span><span style="color:var(--code-token-punctuation)">(</span><span style="color:var(--code-foreground)">payload</span><span style="color:var(--code-token-punctuation)">)</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">  findChannel</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-keyword)"> -></span></span>
<span class="line"><span style="color:var(--code-token-comment)">    # Some logic to return a channel name as a string</span></span>
<span class="line"><span style="color:var(--code-token-string-expression)">    'dashboard'</span></span></code></pre> <h3>Push it</h3> <p>Now if we send an event to the <code>dashboard</code> channel it should log the output to the console.</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-constant)">Pusher</span><span style="color:var(--code-foreground)">[</span><span style="color:var(--code-token-string-expression)">'dashboard'</span><span style="color:var(--code-foreground)">]</span><span style="color:var(--code-token-punctuation)">.</span><span style="color:var(--code-token-function)">trigger</span><span style="color:var(--code-foreground)">(</span><span style="color:var(--code-token-string-expression)">'message:create'</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-foreground)"> &#123;</span><span style="color:var(--code-token-constant)">body:</span><span style="color:var(--code-token-string-expression)"> "Hello World"</span><span style="color:var(--code-token-punctuation)">,</span><span style="color:var(--code-token-constant)"> id:</span><span style="color:var(--code-token-constant)"> 1</span><span style="color:var(--code-foreground)">&#125;)</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-constant)">Object</span></span>
<span class="line"><span style="color:var(--code-token-constant)">id:</span><span style="color:var(--code-token-constant)"> 1</span></span>
<span class="line"><span style="color:var(--code-token-constant)">body:</span><span style="color:var(--code-token-string-expression)"> "Hello World"</span></span>
<span class="line"><span style="color:var(--code-token-constant)">__proto__:</span><span style="color:var(--code-token-constant)"> Object</span></span></code></pre> <p>I usually setup my <code>render</code> method to be callable in such a way that I can render the state change simply by calling render from my event handling method.</p> <h2>Try it out</h2> <p>If you haven’t <a href="http://testpilot.me/subscribers/new" rel="nofollow">signed up</a> yet, do so now and you can see your repositories import in realtime — don’t worry we don’t actually copy any source code, just the name and details.</p> <p>Everyone uses Backbone in different ways from progressive enhancement to building entire applications, and as such your requirements might differ. I personally like the idea of building the entire frontend using JS and communicating with Ajax and WebSockets, but it requires a different way of thinking and can drastically increase the learning curve when new developers join the project, nonetheless you can expect to see a bit of that here in the future.</p>]]></content:encoded>
		</item>
		<item>
			<title>How to survive an incubator</title>
			<link>https://ivan.dev/articles/how-to-survive-an-incubator</link>
			<guid>https://ivan.dev/articles/how-to-survive-an-incubator</guid>
			<pubDate>Wed, 16 Nov 2011 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>Startups</category>
			<description>10 weeks ago we were accepted into the AngelCube business incubator, they gave us a cool $20K for some equity, provided us with mentoring, and introductions to investors.</description>
			<content:encoded><![CDATA[<p>10 weeks ago we were accepted into the AngelCube business incubator, they gave us a cool $20K for some equity, provided us with mentoring, and introductions to investors.</p> <p>Now that our time is nearing the end I thought it would be a good time to give aspiring entrepreneurs who are thinking of applying for the next round of AngelCube or any incubator from StartMate to Y-Combinator some insight into our experiences, and a quick rundown on how to survive (not give up and get a real job)</p> <p>You probably know by now — even if you’re ignoring it, but every day that you work on your startup people will give you very legitimate reasons to quit and get a real job, some of them might come in the form of $200K/year job offer, or your girlfriend leaving you, or your landlord kicking you out of your warehouse apartment in Fitzroy. All this has a higher probability of happening than your startup surviving. But you ignore all of this because your an entrepreneur, you’re probably from an engineering background and everything you do is about some experimental yet vague idea that somewhere down a distant timeline beyond you’re next 2-3 weekly iterations, you will be next Airbnb, Dropbox, or Google. And that is what you live for.</p> <p>And as long as you don’t quit, you still have the same chance as of success as you did yesterday. And with that here are 5 things to do to survive:</p> <h2>1. Focus.</h2> <p>So you’ve got this really big idea, you’re going to be the [<em>insert</em>] of [<em>insert</em>] for [<em>some niche</em>], you have a team, you have convinced at least one other person apart from your mum that what you are doing will be big one day, and you are convinced that your product solves a real problem for a real segment of a market, somewhere.</p> <p>The problem is that everyone else you tell says that your product is really nice, but they would only use it if it did X. Don’t listen to them.</p> <p>The point of focus is to not be everything to everyone, you have finite resources, even if you’re a shit hot programmer that spends every 2 hours taking a <a href="http://www.dustincurtis.com/sleep.html" rel="nofollow">brain hacked 30 minute power nap</a> so you can work around the clock, you cannot and will not beat Google at Search, they have literally thousands of engineers working to ship changes 40 times a day.</p> <p>Focussing on a small — unaddressed — segment of the market gives you room to grow, makes your product exclusive and beyond everything gives you a million more chances to succeed, if that segment doesn’t work, try another, you still have 99.5% of the market left to experiment on.</p> <p>The bottom line is: Every idea is simple, but simple execution is hard. As soon as you get started a million other things get in the way, you realise that you can’t launch without a payment gateway, a merchant account, support system, landing page, and you’re spending every second day talking to investors or working on your deck for a pitch at Aurelius in 2 weeks, and before you know it you have no time to do actual product <em>stuff</em>.</p> <h2>2. Listen.</h2> <p>My father once told me that it is one thing to listen, and another to hear.</p> <p>During this 3 months you’re going to have 2 or more mentoring sessions a week, they will cover varying subjects from Legals to Guerilla-style Marketing, you will be introduced to hundreds of people who want to help you, and people will try to give you what they think is a good idea during a 30 second elevator ride from probably never using your product.</p> <p>You need to remember that these people probably have little to no idea about the direction you plan to take your product in, they might be speaking from their own experiences which could be very applicable to your situation, or not at all.</p> <p>Unfortunately as humans our ability to filter good information from bad is only as strong as the amount if information we have at that point in time that counters or supports the information being consumed.</p> <p>So it is very important that when someone gives you advice on your startup that you do your research before acting on it, because at the end of the day the buck stops with you.</p> <p>It is also worth noting that you will be under crazy amounts of stress, the sort of stress that makes you wake up in a cold sweat at 3am, the sort of stress that makes illogical decisions seem completely logical. If you’re not used to this sort of environment you might make some of the biggest mistakes of your life, like giving away too much equity, or spending your $20K on SEO because a guy you met at Silicon Beach convinced you inbound marketing was king. Or worse, you could put it all on black :S</p> <h2>3. Collaborate.</h2> <p>Like any good investment you want to mitigate your risk and try not to keep all your eggs in the same basket, you can almost guarantee that none of the teams that get accepted into the incubator will be competitors, so you should from day one do everything you can to collaborate with them. Move your desks side by side, bounce design ideas around, ask them about the right hosting platform, tell them that friends don’t let friends code in .net, and most of all ask questions.</p> <p>We learnt a lot from collaborations, like sharing financial models with another team, and in exchange I designed their new logo on the back on some scrap paper when they were told it would cost $1,900 to get all 19 colours of their previous logo printed on a t-shirt.</p> <h2>4. Sleep.</h2> <p>Sleep is critical, anyone who says that working until 2am every night is productive isn’t worth listening to. The reality is if you’re a developer your best code will be written sometime between 9am and 9pm (when you are wide awake), outside that time productivity will decrease exponentially as you get further away from your body’s optimum operating time.</p> <p>But this doesn’t mean stop, this doesn’t mean live hour to hour and go play xbox when you’re not coding. You should be thinking about your startup every minute you’re awake, when you’re in the shower, on the train, walking to your local cafe, when trying to remember how to cook Greek Moussaka, and even when you sleep.</p> <p>Some people think of sleep as slacking off, but have you ever gone to bed after spending half a day trying to solve a really complicated problem only to wake up with the answer? It happens.</p> <p>This might all sound a bit mad, but hey, you’re an entrepreneur, you’re built differently, you live for risk, you live for some crazy idea, and ultimately you live for changing the world.</p> <h2>5. Start it.</h2> <p>It doesn’t matter if it’s a small UX issue that has been bugging you for weeks or actually starting a business, quitting your day job and selling your house to fund 12 months of development. No body but you will tell you to start, so just do it, see where it leads. Nobody ever succeeded by not starting.</p> <h2>Ship it.</h2> <p>Real entrepreneurs ship. But ultimately shipping leads to people using your product, simple as that. Even if those people are other teams, one of the early signs of success according to Paul Graham is having other teams use your product. [1]</p> <p>—</p> <p>[1] Someone told me this in a pub one night, it might not be exactly what he said.</p>]]></content:encoded>
		</item>
		<item>
			<title>Bootstrapping Chef in one command with Babushka</title>
			<link>https://ivan.dev/articles/bootstrapping-chef-with-babushka</link>
			<guid>https://ivan.dev/articles/bootstrapping-chef-with-babushka</guid>
			<pubDate>Sat, 28 May 2011 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>DevOps</category>
			<description>Install chef-server automatically with one command, using a collection of Babushka deps.</description>
			<content:encoded><![CDATA[<p><strong>TL;DR:</strong> Install chef-server automatically with one command.</p> <p>When it comes to sys-admin - I make a very good software developer, because quite frankly repetitive tasks are not my cup of tea.</p> <p>So when it came to setting up and managing a cluster of servers for my startup I immediately looked at Chef, and on paper it looked like
it would fit the bill perfectly - I can write all the components, store them on Github and it will take care of all the hard work on each server.</p> <p>Then I got slapped in the face by the monstrosity that is the Chef installation guide. What? No <code>gem install chef</code> and you’re done? this needed to be fixed, so I wrote
a Babushka dependency to take care of everything.</p> <h3>What is Babushka?</h3> <p><a href="http://babushka.me" rel="nofollow">Babushka</a> is a test-driven system administration tool written by <a href="http://benhoskin.gs/" rel="nofollow">Ben Hoskings</a>, it uses an omnipotent approach to configure your servers by running dependencies - “deps” - written in a familiar Ruby DSL.</p> <h3>What does it do?</h3> <p>If you’ve ever been in charge with installing chef-server by hand you will know it requires some work, and has the potential to break very easily.
If you have trouble installing one version you have to ditch your instance and start from scratch, or spend considerable time reversing changes.</p> <p>To solve this problem I wrote a collection of Babushka deps to do this job for us, and it even allows you to specify a version on the fly.</p> <p>It assumes you have a bare Ubuntu instance (Tested on 10.04) running somewhere with root access over ssh. While there is no real requirement for it to be bare, these deps will customise things considerably so it is advisable
to use a dedicated instance for this setup.</p> <h2>Getting started</h2> <p>So lets get into it, you’ll need to meet these minimum requirements if following on at home:</p> <ol><li>1024MB+ Ubuntu instance. We’re using an <a href="http://orionvm.com.au" rel="nofollow">OrionVM Cloud</a> instance running 10.04 Lucid Lynx, but most Amazon EC2 and Rackspace Ubuntu images will work fine after enabling <code>root</code> (Don’t worry we will disable it again later)</li> <li>Your ssh public key</li> <li>About 10 minutes spare time.</li></ol> <p>Once you have created an instance, login as <code>root</code> and run through these steps:</p> <p>Install <code>wget</code> if not already installed:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">apt-get</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> wget</span></span></code></pre> <p>Bootstrap Babushka using Babushka:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">bash</span><span style="color:var(--code-token-string)"> -c</span><span style="color:var(--code-token-string-expression)"> "&#96;</span><span style="color:var(--code-token-function)">wget</span><span style="color:var(--code-token-string)"> -O</span><span style="color:var(--code-token-string)"> -</span><span style="color:var(--code-token-string)"> babushka.me/up</span><span style="color:var(--code-token-string-expression)">&#96;"</span></span></code></pre> <p>Follow the default prompts and you should be good to go.</p> <p>Next we run my <code>'chef user'</code> dep:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">babushka</span><span style="color:var(--code-token-string)"> ivanvanderbyl:</span><span style="color:var(--code-token-string-expression)">'chef user'</span></span></code></pre> <p>Notice how we don’t have to tell Babushka where to get it from? By default Babushka looks for a Github repository called <code>&lt;GITHUB USERNAME>/babushka-deps.git</code> and clones it, then loads it into its internal list. <a href="http://github.com/ivanvanderbyl/babushka-deps" rel="nofollow">My babushka-deps repo</a> contains the dep <code>chef user</code></p> <p>This will run the list documented below, and towards the end create a new user account which you will use in the next step to install and manage chef from.
Make sure you don’t call the user <code>chef</code> because it will cause things to fail in the next step. I usually use <code>deploy</code></p> <p>Now logout from root and reconnect as the chef user you just created to complete the next step: actually installing chef-server.</p> <h3>Install Chef</h3> <p>This is where the magic happens, run this dep and you will have a complete Chef Server installation, optionally with <em>chef-server-webui</em></p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">babushka</span><span style="color:var(--code-token-string)"> ivanvanderbyl:</span><span style="color:var(--code-token-string-expression)">'bootstrapped chef'</span></span></code></pre> <p>This will verify that all services have started correctly and if so report success, otherwise it will output a log file so you can trace what happened and hopefully fix the problem. (Please report bugs with this process below)</p> <p>If all components are installed correctly it will register this <em>node</em> with <em>chef-server</em> by running <em>knife configure -i</em> automatically.</p> <h3>What did it really do?</h3> <p>You might think installing chef-server is a simple bootstrap command documented on the <a href="http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation" rel="nofollow">Chef Wiki</a>.
This is partially true, until you spend considerable time setting hostnames, creating users, uploading public keys, disabling root, installing default software and extensions, and not to mention installing Ruby and Rubygems
from source.</p> <p>So these deps take care of all of this. Here’s a run list:</p> <p><code>babushka ivanvanderbyl:'chef user'</code> - run this as <code>root</code>.</p> <ul><li>Sets a FQHN of your choosing</li> <li>Installs core software <ul><li>vim</li> <li>curl</li> <li>htop</li> <li>jnettop</li> <li>screen</li> <li>nmap</li> <li>tree</li></ul></li> <li>Creates an <code>admin</code> group and adds it to sudoers list</li> <li>Creates a user to install and manage chef-server <ul><li>Adds passwordless sudo</li> <li>Installs your public key in <code>~/.ssh/authorized_keys</code></li></ul></li> <li>Disables password logins</li> <li>Disables <code>root</code> login</li></ul> <p>After this you should logout from root and login as this user (<code>deploy</code> by default)</p> <p><code>babushka ivanvanderbyl:'bootstrapped chef'</code> - run this as the user created in the above step (<code>deploy</code> by default)</p> <ul><li>Ensures we have a FQHN</li> <li>Installs Ruby 1.8.7</li> <li>Installs chef dependencies <ul><li>irb</li> <li>build-essential</li> <li>wget</li> <li>ssl-cert</li></ul></li> <li>Compiles Rubygems 1.7.2 from source <ul><li>Disables gem docs (—no-ri —no-rdoc)</li></ul></li> <li>Installs <code>chef</code> gem with the version you specify</li> <li>Installs <code>ohai</code> gem</li> <li>Creates a chef-solo configuration</li> <li>Creates a chef bootstrap configuration</li> <li>Bootstraps Chef Server using Chef Solo</li> <li>Verifies that all chef components are running</li></ul> <h3>Next Steps</h3> <p>You could complete the chef setup as per the <a href="http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation" rel="nofollow">Rubygems Chef Bootstrap guide</a> or enlist the pro-skills of Babushka again, in which case; read on.</p> <p><em>From the Chef Wiki:</em> When working with chef, you will spend a lot of time editing recipes and other files, and you’ll find it much more convenient to edit them on your laptop/desktop, where you have your editor configured just to your liking.
To facilitate this mode of working, we recommend you create a knife client to use knife on your development machine.</p> <p>I’ve also created a dep for this, simply run (on the server):</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">babushka</span><span style="color:var(--code-token-string)"> ivanvanderbyl:</span><span style="color:var(--code-token-string-expression)">'external admin client.registered'</span></span></code></pre> <p>This will register a new client for you to use locally, which means you need to copy this new client’s private key to your laptop/desktop.
The command for this is: (on your laptop/desktop)</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">mkdir</span><span style="color:var(--code-token-string)"> ~/.chef</span></span>
<span class="line"><span style="color:var(--code-token-function)">scp</span><span style="color:var(--code-token-string)"> deploy@chef.example.com:/tmp/my-username.pem</span><span style="color:var(--code-token-string)"> ~/.chef/my-username.pem</span></span></code></pre> <p>Replacing <code>chef.example.com</code> with the FQHN of your chef server, and replacing <code>my-username</code> with the username you entered when running <code>external admin client.registered</code></p> <p><em>Note:</em> If you haven’t installed the chef gem locally please do so now <code>gem install chef</code></p> <p>Configure knife locally:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>your-laptop > knife configure</span></span>
<span class="line"><span>No knife configuration file found</span></span></code></pre> <p>Knife looks for its configuration in ~/.chef/knife.rb by default:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>Where should I put the config file? [~/.chef/knife.rb]</span></span>
<span class="line"><span>Please enter the chef server URL: [http://localhost:4000] http://chef.example.com:4000</span></span></code></pre> <p>Now, enter your client name, exactly as you did when running <code>'external admin client.registered'</code> above:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>Please enter an existing username or clientname for the API: [my-username] my-username</span></span></code></pre> <p>For these next settings, you can accept the defaults for now and update them later by editing your knife.rb file. The validation client name and key are used with knife’s cloud computing commands:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>Please enter the validation clientname: [chef-validator]</span></span>
<span class="line"><span>Please enter the location of the validation key: [/etc/chef/validation.pem]</span></span></code></pre> <h3>Verify your local installation</h3> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>your-laptop > knife client list</span></span>
<span class="line"><span>[</span></span>
<span class="line"><span>  "chef-webui",</span></span>
<span class="line"><span>  "my-username",</span></span>
<span class="line"><span>  "bob",</span></span>
<span class="line"><span>  "chef-validator"</span></span>
<span class="line"><span>]</span></span></code></pre> <h2>Bootstrapping a new server client</h2> <p>You will need to bootstrap each new server you add to your cluster, this is similar to the process above however it does not depend on running as root, however if you are starting with the same image
it is recommended that you run the <code>chef user</code> dep first and login as that user before bootstrapping as a client. This is a more secure approach.</p> <p>To bootstrap this server as a client, simply run:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">babushka</span><span style="color:var(--code-token-string)"> ivanvanderbyl:</span><span style="color:var(--code-token-string-expression)">'bootstrap chef client'</span></span></code></pre> <p>Alternatively you can do all these steps manually using the <a href="http://wiki.opscode.com/display/chef/Walk-through+-+Bringing+up+a+new+chef+client+%28using+rubygems%29" rel="nofollow">Chef Wiki guide on Bootstrapping a new client with Rubygems</a></p> <h3>Connect to server</h3> <p>Now we need to set up the client so it is authenticated to talk to the server. This is done by creating a certificate pair.</p> <p>To do this, you will need to copy the file <code>/etc/chef/validation.pem</code> from the chef server to your chef client into the same path. This might seem a little tricky given that we have disabled password login, so I would recommend a simple
⌘C +  ⌘V approach.</p> <p>Then, simply run <code>sudo chef-client</code> and it will register itself with your chef server. After it is done, <strong>be sure to delete the file /etc/chef/validation.pem on your client!</strong> (It is the key to the universe)</p> <h2>Where to next?</h2> <p>You now have a complete Chef server setup, it is now time to write some cookbooks and install software; for this I will hand you over to the <a href="http://wiki.opscode.com/display/chef/Guides" rel="nofollow">Chef Guides</a> until I write something on this at a later date.</p> <h2>Contributing</h2> <p>I encourage you to contribute to these deps, if you find a bug, or you want to add support for another linux distro please fork <a href="https://github.com/ivanvanderbyl/babushka-deps" rel="nofollow">my Babushka deps repo</a>.</p> <ol><li>Check out the latest <a href="https://github.com/ivanvanderbyl/babushka-deps" rel="nofollow">master</a> to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet</li> <li>Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it</li> <li>Fork the project</li> <li>Start a feature/bugfix branch e.g. git checkout -b <code>feature/my-awesome-idea</code> or <code>support/this-does-not-work</code></li> <li>Commit and push until you are happy with your contribution</li> <li>Issue a pull request</li></ol>]]></content:encoded>
		</item>
		<item>
			<title>My Rails, Nginx, REE, Passenger, Ubuntu stack</title>
			<link>https://ivan.dev/articles/rails-nginx-passenger-ubuntu</link>
			<guid>https://ivan.dev/articles/rails-nginx-passenger-ubuntu</guid>
			<pubDate>Fri, 14 Jan 2011 00:00:00 GMT</pubDate>
			<dc:creator>Ivan Vanderbyl</dc:creator>
			<category>DevOps</category>
			<description>My notes on setting up a simple production server with Ubuntu 10.04 LTS, NGINX, Passenger, Ruby Enterprise Edition 1.8.7 and Mysql for Rails 2.3.8/3.0.</description>
			<content:encoded><![CDATA[<p>My notes on setting up a simple production server with Ubuntu 10.04 LTS, NGINX, Passenger, Ruby Enterprise Edition 1.8.7 and Mysql for Rails 2.3.8/3.0</p> <p>This guide assumes you have installed Ubuntu 10.04 LTS (with no modules (optional)) on a server somewhere and you have root access via sudo.</p> <h2>Aliases</h2> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">echo</span><span style="color:var(--code-token-string-expression)"> "alias ll='ls -l'"</span><span style="color:var(--code-token-keyword)"> >></span><span style="color:var(--code-token-string)"> ~/.bash_aliases</span></span></code></pre> <p>edit .bashrc and uncomment the loading of .bash_aliases</p> <p>If you have trouble with PATH that changes when doing sudo, see <a href="http://stackoverflow.com/questions/257616/sudo-changes-path-why" rel="nofollow">http://stackoverflow.com/questions/257616/sudo-changes-path-why</a> then add the following line to the same file</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">echo</span><span style="color:var(--code-token-string-expression)"> "alias sudo='sudo env PATH=$PATH'"</span><span style="color:var(--code-token-keyword)"> >></span><span style="color:var(--code-token-string)"> ~/.bash_aliases</span></span></code></pre> <h2>Update and upgrade the system</h2> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> apt-get</span><span style="color:var(--code-token-string)"> update</span></span>
<span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> apt-get</span><span style="color:var(--code-token-string)"> upgrade</span></span></code></pre> <h2>Configure timezone (If you didn’t already when installing Ubuntu)</h2> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> dpkg-reconfigure</span><span style="color:var(--code-token-string)"> tzdata</span></span>
<span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> apt-get</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> ntp</span></span>
<span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> ntpdate</span><span style="color:var(--code-token-string)"> ntp.ubuntu.com</span><span style="color:var(--code-token-comment)"> # Update time</span></span></code></pre> <p>Verify that you have to correct date and time with</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">date</span></span></code></pre> <h2>Configure hostname</h2> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> hostname</span><span style="color:var(--code-token-string)"> your-hostname</span></span></code></pre> <p>Add 127.0.0.1 your-hostname</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> vim</span><span style="color:var(--code-token-string)"> /etc/hosts</span></span></code></pre> <p>Write your-hostname in</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> vim</span><span style="color:var(--code-token-string)"> /etc/hostname</span></span></code></pre> <p>Verify that hostname is set</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">hostname</span></span></code></pre> <h2>Gemrc</h2> <p>Add the following lines to ~/.gemrc, this will speed up gem installation and prevent rdoc and ri from being generated, this is not nessesary in the production environment.</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-foreground)">---</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">:sources</span><span style="color:var(--code-token-keyword)">:</span></span>
<span class="line"><span style="color:var(--code-foreground)">- </span><span style="color:var(--code-token-string-expression)">http://gems.rubyforge.org</span></span>
<span class="line"><span style="color:var(--code-foreground)">- </span><span style="color:var(--code-token-string-expression)">http://gems.github.com</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">gem</span><span style="color:var(--code-token-keyword)">:</span><span style="color:var(--code-token-string-expression)"> --no-ri --no-rdoc</span></span></code></pre> <h2>Install mysql</h2> <p>This should be installed before Ruby Enterprise Edition becouse that will install the mysql gem.</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> apt-get</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> mysql-server</span><span style="color:var(--code-token-string)"> libmysqlclient15-dev</span></span></code></pre> <h2>Ruby Enterprise Edition</h2> <p>Check for newer version at <a href="http://www.rubyenterpriseedition.com/download.html" rel="nofollow">http://www.rubyenterpriseedition.com/download.html</a></p> <p>Install package required by ruby enterprise, C compiler, Zlib development headers, OpenSSL development headers, GNU Readline development headers</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> apt-get</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> build-essential</span><span style="color:var(--code-token-string)"> zlib1g-dev</span><span style="color:var(--code-token-string)"> libssl-dev</span><span style="color:var(--code-token-string)"> libreadline5-dev</span></span></code></pre> <p>Download and install Ruby Enterprise Edition</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">wget</span><span style="color:var(--code-token-string)"> http://rubyforge.org/frs/download.php/71096/ruby-enterprise-1.8.7-2010.02.tar.gz</span></span>
<span class="line"><span style="color:var(--code-token-function)">tar</span><span style="color:var(--code-token-string)"> xvfz</span><span style="color:var(--code-token-string)"> ruby-enterprise-1.8.7-2010.02.tar.gz</span></span>
<span class="line"><span style="color:var(--code-token-function)">rm</span><span style="color:var(--code-token-string)"> ruby-enterprise-1.8.7-2010.02.tar.gz</span></span>
<span class="line"><span style="color:var(--code-token-function)">cd</span><span style="color:var(--code-token-string)"> ruby-enterprise-1.8.7-2010.02/</span></span>
<span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> ./installer</span></span></code></pre> <p>Change target folder to /opt/ruby for easier upgrade later on</p> <p>Add Ruby Enterprise bin to PATH</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">echo</span><span style="color:var(--code-token-string-expression)"> "export PATH=/opt/ruby/bin:$PATH"</span><span style="color:var(--code-token-keyword)"> >></span><span style="color:var(--code-token-string)"> ~/.profile</span><span style="color:var(--code-token-punctuation)"> &#x26;&#x26;</span><span style="color:var(--code-token-function)"> .</span><span style="color:var(--code-token-string)"> ~/.profile</span></span></code></pre> <p>Verify the ruby installation</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">ruby</span><span style="color:var(--code-token-string)"> -v</span></span>
<span class="line"><span style="color:var(--code-token-function)">ruby</span><span style="color:var(--code-token-constant)"> 1.8.7</span><span style="color:var(--code-foreground)"> (2010-04-19 </span><span style="color:var(--code-token-string)">patchlevel</span><span style="color:var(--code-token-constant)"> 253</span><span style="color:var(--code-foreground)">) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2010.02</span></span></code></pre> <h2>Update RubyGems</h2> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> gem</span><span style="color:var(--code-token-string)"> update</span><span style="color:var(--code-token-string)"> --system</span></span></code></pre> <h2>Installing git</h2> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> apt-get</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> git-core</span></span></code></pre> <h2>NGINX</h2> <p>Automatically install NGINX compiled with Passenger &amp; SSL into /opt/nginx/</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> /opt/ruby/bin/passenger-install-nginx-module</span><span style="color:var(--code-token-string)"> --auto</span><span style="color:var(--code-token-string)"> --prefix=/opt/nginx/</span><span style="color:var(--code-token-string)"> --auto-download</span><span style="color:var(--code-token-string)"> --extra-configure-flags=--with-http_ssl_module</span></span></code></pre> <h2>NGINX init script</h2> <p>More information on <a href="http://wiki.nginx.org/nginx-init-ubuntu" rel="nofollow">http://wiki.nginx.org/nginx-init-ubuntu</a></p> <p>This command will download the latest version of my init script, copy it to /etc/init.d/nginx and update permissions.</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> curl</span><span style="color:var(--code-token-string)"> http://github.com/ivanvanderbyl/rails-nginx-passenger-ubuntu/raw/master/nginx/nginx</span><span style="color:var(--code-token-string)"> -o</span><span style="color:var(--code-token-string)"> /etc/init.d/nginx</span><span style="color:var(--code-token-punctuation)"> &#x26;&#x26;</span><span style="color:var(--code-token-function)"> sudo</span><span style="color:var(--code-token-string)"> chmod</span><span style="color:var(--code-token-string)"> +x</span><span style="color:var(--code-token-string)"> /etc/init.d/nginx</span><span style="color:var(--code-token-punctuation)"> &#x26;&#x26;</span><span style="color:var(--code-token-function)"> sudo</span><span style="color:var(--code-token-string)"> chown</span><span style="color:var(--code-token-string)"> root:root</span><span style="color:var(--code-token-string)"> /etc/init.d/nginx</span></span></code></pre> <p>Verify that you can start and stop NGINX with init script</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> /etc/init.d/nginx</span><span style="color:var(--code-token-string)"> start</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">  *</span><span style="color:var(--code-token-string)"> Starting</span><span style="color:var(--code-token-string)"> nginx</span><span style="color:var(--code-token-string)"> Server...</span></span>
<span class="line"><span style="color:var(--code-token-function)">  ..</span><span style="color:var(--code-token-string)">.done.</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> /etc/init.d/nginx</span><span style="color:var(--code-token-string)"> status</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">  NGINX</span><span style="color:var(--code-token-string)"> found</span><span style="color:var(--code-token-string)"> running</span><span style="color:var(--code-token-string)"> with</span><span style="color:var(--code-token-string)"> processes:</span><span style="color:var(--code-token-constant)">  11511</span><span style="color:var(--code-token-constant)"> 11510</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> /etc/init.d/nginx</span><span style="color:var(--code-token-string)"> stop</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">  *</span><span style="color:var(--code-token-string)"> Stopping</span><span style="color:var(--code-token-string)"> nginx</span><span style="color:var(--code-token-string)"> Server...</span></span>
<span class="line"><span style="color:var(--code-token-function)">  ..</span><span style="color:var(--code-token-string)">.done.</span></span></code></pre> <p>Add it to the startup routine:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> /usr/sbin/update-rc.d</span><span style="color:var(--code-token-string)"> -f</span><span style="color:var(--code-token-string)"> nginx</span><span style="color:var(--code-token-string)"> defaults</span></span></code></pre> <p>If you want, reboot and see so the webserver is starting as it should.</p> <h2>Installning ImageMagick and RMagick (Optional)</h2> <p>If you want to install the latest version of ImageMagick. I used MiniMagick that shell-out to the mogrify command, worked really well for me.</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-comment)"># If you already installed imagemagick from apt-get</span></span>
<span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> apt-get</span><span style="color:var(--code-token-string)"> remove</span><span style="color:var(--code-token-string)"> imagemagick</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> apt-get</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> libperl-dev</span><span style="color:var(--code-token-string)"> gcc</span><span style="color:var(--code-token-string)"> libjpeg62-dev</span><span style="color:var(--code-token-string)"> libbz2-dev</span><span style="color:var(--code-token-string)"> libtiff4-dev</span><span style="color:var(--code-token-string)"> libwmf-dev</span><span style="color:var(--code-token-string)"> libz-dev</span><span style="color:var(--code-token-string)"> libpng12-dev</span><span style="color:var(--code-token-string)"> libx11-dev</span><span style="color:var(--code-token-string)"> libxt-dev</span><span style="color:var(--code-token-string)"> libxext-dev</span><span style="color:var(--code-token-string)"> libxml2-dev</span><span style="color:var(--code-token-string)"> libfreetype6-dev</span><span style="color:var(--code-token-string)"> liblcms1-dev</span><span style="color:var(--code-token-string)"> libexif-dev</span><span style="color:var(--code-token-string)"> perl</span><span style="color:var(--code-token-string)"> libjasper-dev</span><span style="color:var(--code-token-string)"> libltdl3-dev</span><span style="color:var(--code-token-string)"> graphviz</span><span style="color:var(--code-token-string)"> gs-gpl</span><span style="color:var(--code-token-string)"> pkg-config</span></span></code></pre> <p>Download the latest source:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">wget</span><span style="color:var(--code-token-string)"> ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz</span></span></code></pre> <p>Once the source is downloaded, uncompress it:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">tar</span><span style="color:var(--code-token-string)"> xvfz</span><span style="color:var(--code-token-string)"> ImageMagick.tar.gz</span></span></code></pre> <p>Now configure and make:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">cd</span><span style="color:var(--code-token-string)"> ImageMagick-6.6.3-4</span></span>
<span class="line"><span style="color:var(--code-token-function)">./configure</span></span>
<span class="line"><span style="color:var(--code-token-function)">make</span></span>
<span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> make</span><span style="color:var(--code-token-string)"> install</span></span></code></pre> <p>To avoid an error such as:</p> <p>convert: error while loading shared libraries: libMagickCore.so.2: cannot open shared object file: No such file or directory</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> ldconfig</span></span></code></pre> <p>Install RMagick</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> /opt/ruby/bin/ruby</span><span style="color:var(--code-token-string)"> /opt/ruby/bin/gem</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> rmagick</span></span></code></pre> <h2>Install Bundler (Optional)</h2> <p>Bundler is arguably the best ruby gem manager ever written. Install it!</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> gem</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> bundler</span></span></code></pre> <h2>Install Nokogiri (Optional)</h2> <p>Nokogiri dependencies</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> apt-get</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> libxslt-dev</span><span style="color:var(--code-token-string)"> libxml2-dev</span></span></code></pre> <p>Install Nokogiri gem</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> gem</span><span style="color:var(--code-token-string)"> install</span><span style="color:var(--code-token-string)"> nokogiri</span></span></code></pre> <h2>Capistrano environment fixes</h2> <p>If your deploying with Capistrano, you must modify a few things to get it to use Ruby Enterprise and load the local users environment.</p> <p>Edit /etc/ssh/sshd_config and add the following to the bottom of the file:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>PermitUserEnvironment yes</span></span></code></pre> <p>Then reboot sshd by running:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> /etc/init.d/ssh</span><span style="color:var(--code-token-string)"> reload</span></span></code></pre> <p>Configuring the PATH</p> <p>Edit ~/.ssh/environment, and put something like this inside:</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span>PATH=/opt/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</span></span></code></pre> <p><strong>OR if it doesn’t exist you can do this to add it with one command:</strong></p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">echo</span><span style="color:var(--code-token-string-expression)"> "PATH=/opt/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"</span><span style="color:var(--code-token-keyword)"> ></span><span style="color:var(--code-token-string)"> ~/.ssh/environment</span></span></code></pre> <h2>Test a rails application with NGINX</h2> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">rails</span><span style="color:var(--code-token-string)"> -d</span><span style="color:var(--code-token-string)"> mysql</span><span style="color:var(--code-token-string)"> testapp</span></span>
<span class="line"><span style="color:var(--code-token-function)">cd</span><span style="color:var(--code-token-string)"> testapp</span></span></code></pre> <p>Enter your mysql password</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">vim</span><span style="color:var(--code-token-string)"> database.yml</span></span>
<span class="line"><span style="color:var(--code-token-function)">rake</span><span style="color:var(--code-token-string)"> db:create:all</span></span>
<span class="line"><span style="color:var(--code-token-function)">ruby</span><span style="color:var(--code-token-string)"> script/generate</span><span style="color:var(--code-token-string)"> scaffold</span><span style="color:var(--code-token-string)"> post</span><span style="color:var(--code-token-string)"> title:string</span><span style="color:var(--code-token-string)"> body:text</span></span>
<span class="line"><span style="color:var(--code-token-function)">rake</span><span style="color:var(--code-token-string)"> db:migrate</span><span style="color:var(--code-token-string)"> RAILS_ENV=production</span></span></code></pre> <p>Check so the rails app start as normal</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">ruby</span><span style="color:var(--code-token-string)"> script/server</span></span>
<span class="line"></span>
<span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> vim</span><span style="color:var(--code-token-string)"> /opt/nginx/conf/nginx.conf</span></span></code></pre> <p>Add a new virtual host</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-keyword)">server</span><span style="color:var(--code-foreground)"> &#123;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    listen </span><span style="color:var(--code-token-constant)">80</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-token-comment)">    # server_name www.mycook.com;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    root </span><span style="color:var(--code-foreground)">/home/deploy/testapp/public;</span></span>
<span class="line"><span style="color:var(--code-token-keyword)">    passenger_enabled</span><span style="color:var(--code-token-constant)"> on</span><span style="color:var(--code-foreground)">;</span></span>
<span class="line"><span style="color:var(--code-foreground)">&#125;</span></span></code></pre> <p>Restart NGINX</p> <pre class="shiki ink" style="background-color:var(--code-background);color:var(--code-foreground)" tabindex="0"><code><span class="line"><span style="color:var(--code-token-function)">sudo</span><span style="color:var(--code-token-string)"> /etc/init.d/nginx</span><span style="color:var(--code-token-string)"> restart</span></span></code></pre> <p>Check your ip address and see if you can access the rails application</p>]]></content:encoded>
		</item>
	</channel>
</rss>
