<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Always Be Coding - Medium]]></title>
        <description><![CDATA[All things coding and technology. - Medium]]></description>
        <link>https://medium.com/always-be-coding?source=rss----33b23526bf1d---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Always Be Coding - Medium</title>
            <link>https://medium.com/always-be-coding?source=rss----33b23526bf1d---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:50:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/always-be-coding" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[“No Code” is not a new thing]]></title>
            <link>https://medium.com/always-be-coding/no-code-is-not-a-new-thing-92cda0109c57?source=rss----33b23526bf1d---4</link>
            <guid isPermaLink="false">https://medium.com/p/92cda0109c57</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[no-code]]></category>
            <dc:creator><![CDATA[David Byttow]]></dc:creator>
            <pubDate>Sat, 26 Oct 2019 18:44:30 GMT</pubDate>
            <atom:updated>2019-10-26T22:31:39.148Z</atom:updated>
            <content:encoded><![CDATA[<p>While “no code” seems to be rising in popularity, I’d argue that it’s far from a new or original concept — and I certainly wouldn’t call it a “movement.”</p><p>I recently tweeted the following:</p><h3>David Byttow on Twitter</h3><p>Ugh. Now I feel like I have to write 10,000 words on why &quot;no code&quot; isn&#39;t actually a thing</p><p>And it was met with a fairly terse rebuttal from the Webflow CEO.</p><h3>Vlad Magdalin on Twitter</h3><p>Don&#39;t waste your time, David. https://t.co/5ewmu8JX0V</p><p>I can understand why he might take issue with my tweet, but I think assumptions were made. And to be fair, I should have been more specific and said “not a <strong>new </strong>thing,” rather than “not a thing,” alas Twitter is firmly a “no edit” platform.</p><p>So, rather than wasting my time by writing 10,000 words (<em>read: it’s never a waste of time to be creative and/or practice a skill</em>), I think the opening paragraph of <a href="https://medium.com/@rrhoover/the-rise-of-no-code-e733d7c0944d">Ryan Hoover’s post</a> implicitly summarizes my underlying point quite well:</p><blockquote>I built my first website with Dreamweaver, a WYSIWYG site builder that became popular during my teenage years. I was so proud of my creation. It was ugly, but I made it. Although my silly website didn’t take off as I had dreamed, it was a gateway drug to creating things on the internet.</blockquote><blockquote>Dreamweaver and similar tools (FrontPage, Flash, etc.) dramatically reduced the barrier to creation especially for someone like myself at the time, a 15-year-old in high school with very basic understanding of HTML and CSS. Their impact on today’s tech ecosystem is understated and today we’re seeing a new wave of tools that are making creation more accessible and reinventing the way things are built for the internet.</blockquote><p>100%.</p><p>So, let’s pair that with Wikipedia’s definition of “no code” platforms:</p><blockquote>No-code development platform (NCDPs) allows programmers and non-programmers to create application software through graphical user interfaces and configuration instead of traditional computer programming.</blockquote><p>In short,“no code” platforms have been with us for a long time. Is it gaining in popularity? Perhaps, yes. But so is coding, and in a much bigger way.</p><p>I may be biased. I mean, I’m a life-long software engineer and started coding in QBasic around the time many of us were introduced to the Web via AOL, Prodigy and CompuServe and still code today (almost every day). Hell, I even recently started playing around with a <a href="https://www.youtube.com/user/guitardave24">YouTube channel</a> called “Always Be Coding.” So, yeah, probably biased.</p><p>But, my only point here is let’s not get ahead of ourselves in calling “no code” a new movement. And even more importantly, companies should not wittingly over-promise on what people should expect from these platforms. I’ve recently even heard some smart people posit that this could soon replace the need for learning to code. I think that’s harmful, because what if it discourages people who are otherwise curious, from exploring the abundant world of programming?<strong> That’s a step in the wrong direction.</strong></p><p>To be clear, I think products like Airtable, Squarespace, Webflow, are great, useful and valuable. At the very least, they unlock a lot of value for people in less-technical roles and can even accelerate development in a technical organization.</p><p>In fact, many no code tools are effective on-ramps to learning to code when you need to escape the sandbox and build something that’s just outside of the bounds of a given platform.</p><p>I strongly believe there’s a huge untapped market of people who will become creators due to these sorts of tools, especially as the barrier-to-entry continues to drop. And companies I mentioned above are advancing that idea, but in the foreseeable future and in a world of “no code”, learning to code is only going to become more accessible and common, not less.</p><p>FWIW, I’m very bullish on the “write less code” and “delete more code” movements.</p><p>ABC: Always Be (no)Coding</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92cda0109c57" width="1" height="1" alt=""><hr><p><a href="https://medium.com/always-be-coding/no-code-is-not-a-new-thing-92cda0109c57">“No Code” is not a new thing</a> was originally published in <a href="https://medium.com/always-be-coding">Always Be Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Java + React + SASS = ❤]]></title>
            <link>https://medium.com/always-be-coding/java-react-sass-78dbcc1fbcaa?source=rss----33b23526bf1d---4</link>
            <guid isPermaLink="false">https://medium.com/p/78dbcc1fbcaa</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[David Byttow]]></dc:creator>
            <pubDate>Mon, 02 May 2016 16:14:04 GMT</pubDate>
            <atom:updated>2015-11-19T21:22:07.868Z</atom:updated>
            <content:encoded><![CDATA[<p><em>TL;DR: I’m using the following languages, frameworks, and libraries to make my dev cycle fast and (hopefully) future-proof as the project expands: Java8, ES6, React.js, jQuery, Closure Templates, SASS, Dropwizard (Jersey, Jackson, Jetty), Guice, and Gulp.</em></p><p>Wanted to write this up because I’ve been having a number of conversations lately about what I would build a new webapp in.</p><p>I recently started a new project, <a href="http://bold.io/">Bold</a>. And if all goes to plan, the product will be a large, complex web application; so I was pretty keen on using a stack that could start small and simple, but grow in complexity without later shooting myself in the foot.</p><p>From the start, I had several of my own requirements:</p><ul><li>The front-end should support both server and client-side rendering (which meant the template engine should run on both)</li><li>The web server should be highly-concurrent (e.g., 300+ QPS)</li><li>Development should be <em>fast (</em>Instant modify code and refresh cycle)</li><li>Javascript and CSS should be well-structured and componentized and minified in production.</li></ul><p><strong>Server-side rendering</strong></p><p>For server-side, I am intimately familiar running large-scale web services in Java, Go, C++, Node. The choice came down to Java and Go, because I’ve seen first-hand the problems arise from highly-trafficked Node servers, especially when requests are even a little computationally expensive (read: serialization), thus blocking all other requests.</p><p>I built my last project on top of Go, which was a lot of fun and scaled very well, but the lack of generics was a difficult pill to swallow on a weekly basis. Also, I figured I would land on using React, which is possible with Go and some open-sourced Javascript engines or some other local bridge voodoo. With the recent hardening of Java’s native Javascript engine (Nashorn) and all of the great features of Java 8, I believed <strong>Java</strong> would be the best choice.</p><p>As for the webapp framework, I chose <strong>Dropwizard</strong> with support for <strong>Guice</strong> (using a Guice-HK2 bridge).</p><p>To make this work, I built a simple React bridge and view template renderer for server-side rendering. (Source code incoming)</p><p><strong>Fast development</strong></p><p>For code running in the browser, I experimented a bit more. I needed to figure out three parts: how to structure the client code, how to render CSS, and how to render HTML on the client and the server.</p><p>I chose to write my client-side code in <strong>ES6</strong>. I selected <strong>React</strong> (with jQuery for support) and <strong>SASS</strong> for the view layer.</p><p>This has been wonderful thanks to the constructs of ES6 and componentization of React and SASS. The only trick was to make development fast, because ES6 and SASS require a build step.</p><p>For this, I use gulp with watchify to listen to any file changes, which then rebuilds on the fly with babel and SASS compiler (very quickly) and creates a minified (or not) bundle available for the server to serve locally.</p><p>Here’s an example of my gulpfile: <a href="https://gist.github.com/guitardave24/7ca20b36559366b13b32">https://gist.github.com/guitardave24/7ca20b36559366b13b32</a></p><p>So far, this has worked out quite well!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78dbcc1fbcaa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/always-be-coding/java-react-sass-78dbcc1fbcaa">Java + React + SASS = ❤</a> was originally published in <a href="https://medium.com/always-be-coding">Always Be Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ABC: Always Be Coding]]></title>
            <link>https://medium.com/always-be-coding/abc-always-be-coding-d5f8051afce2?source=rss----33b23526bf1d---4</link>
            <guid isPermaLink="false">https://medium.com/p/d5f8051afce2</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[David Byttow]]></dc:creator>
            <pubDate>Mon, 02 May 2016 16:13:53 GMT</pubDate>
            <atom:updated>2021-01-13T17:41:35.980Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iwPLQjyFYRTVeQ2cb4S9rA.png" /></figure><h4>How to Land an Engineering Job.</h4><p>Be honest. Are you a good engineering candidate? How are you measuring yourself? How many companies have you interviewed at? What is your onsite-interview to offer ratio? Try the following formula (that I’ve totally made up in a vacuum and ultimately means nothing):</p><pre># x = number of companies interviewed with onsite<br># y = number of offers received<br>value = 100 * ln(x) * y / x</pre><p>If your value is &lt; 90, you should read this. If it’s &gt; 120, then you probably don’t need this, but should read it anyway.</p><h3>Who am I?</h3><p>I don’t have a college degree. I started programming professionally at the age of 19 after leaving Chicago for Southern California. Everything I owned fit in my car; I had $400 in my pocket and a job offer as a junior programmer for a cool $40,000 a year. That was 12 years ago. But that’s <a href="https://medium.com/this-happened-to-me/8f381aa6bd5e">another story</a>.</p><p>Since then I’ve worked at <a href="http://www.doublehelixgames.com/">Double Helix</a>, <a href="http://www.namcobandaigames.com/">Namco Bandai</a>, <a href="http://www.google.com/">Google</a>, <a href="https://medium.com/obvious">Obvious</a> and <a href="http://www.squareup.com/">Square</a>.* I’ve also received offers from companies such as <a href="http://www.naughtydog.com/">Naughty Dog</a>, <a href="http://www.activision.com/">Activision</a>, <a href="http://www.riotgames.com/">Riot Games</a>, <a href="http://www.blizzard.com/">Blizzard</a>, <a href="http://www.pinterest.com/">Pinterest</a>, <a href="http://www.goldmansachs.com/">Goldman Sachs</a>, and more. For what it’s worth, my score from the above formula is 132.</p><p>I’ve interviewed at least 500 engineering candidates. Roughly 10% were given offers. Less than 3% I considered “rockstar” candidates, and I remember all of them.</p><p>I will tell you that there is absolutely no sure-fire way to getting hired. There are too many variables, especially at a company like Google where you are placed with 5-7 random software engineers and it’s up to them to come up with an appropriate set of questions to ask, usually involving whiteboard coding. Some engineers are terrible interviewers, they ask unfair questions and create snap judgments. But that’s OK, it happens to the best of us. You’re generally allowed to flub a single interview in a panel.</p><p>The best I can do is tell you how you can be adequately prepared. So without further ado, here are the tips I can give you.</p><h3><strong>Technical Tips</strong></h3><ol><li><strong>ABC (Always Be Coding).</strong> The more you code, the better you’ll get — it’s that simple. By coding, you’re practicing. But the best practice is <em>focused practice</em>. Have goals in mind, explore new areas, and challenge yourself. Over time, you should develop a portfolio of both unfinished and finished projects. GitHub is a great place to put this portfolio on display, but just having an eclectic body of work is huge.</li><li><strong>Master at least one multi-paradigm language. </strong>Mastering a language gives you a great sense of perspective. To do this, you must write a lot of code, read a lot more, and learn the gotchas and best practices. Ideally the language has a vibrant community, runs a lot of production code and is reasonably en vogue. Some good candidates are C#, C++, Java, PHP, Python, and Ruby.<br>There’s a famous leading question that C++ interviewers like to ask other C++ programming candidates, <em>“On a scale of 1-10, 10 being the highest, how would you rank your knowledge of C++?” </em>I hate this question. And god help anyone who answers a 9-10, because Bjarne Stroustrap once said he would rate himself an 8. The language is simply too complex, too rich, and has evolved too much over time. I digress.</li><li><strong>Know thy complexities.</strong> <a href="http://bigocheatsheet.com/">Read this cheat sheet.</a> Then make certain you understand how they work. Then implement common computational algorithms such as Dijkstra’s, Floyd-Warshall, Traveling Salesman, A*, bloom filter, breadth-first iterative search, binary search, k-way merge, bubble/selection/insertion sort, in-place quick sort, bucket/radix sort, closest pair and so on. Again, ABC. <a href="http://discrete.gr/complexity/">This article</a> is also a good, thorough primer.</li><li><strong>Re-invent the wheel. </strong>You should implement the most common data structures in your language of choice. Do not rely on common libraries. Implement the following and write tests for them: vector (dynamic array), linked list, stack, queue, circular queue, hash map, set, priority queue, binary search tree, etc. You should be able to implement them quickly.</li><li><strong>Solve word problems. </strong>Forget queries <a href="https://www.google.com/search?q=google+programming+interview+questions">like this</a>. It all comes down to fundamental programming concepts. Spend at least 40 hours coding solutions to different types of problems. One of the best resources is TopCoder. <a href="https://www.topcoder.com/community/data-science/data-science-tutorials/">Read this</a>. Then try solving problems. Pick those that test your ability to implement recursive, pattern-matching, greedy, dynamic programming, and graph problems. Just go through a bunch of <a href="http://community.topcoder.com/tc?module=MatchList">archived problems</a>.<br>This is probably the number one reason I was hired at Google. I spent literally two weeks obsessed with TopCoder. After that, I could code Dijkstra’s algorithm with my eyes closed and one arm tied behind my back. I could solve almost any kind of graph-problem under the sun. It was all problem-solving repetition. And as Eric Schmidt says, “Repetition doesn’t spoil the prayer.”</li><li><strong>Make coding easy.</strong> At least, make it look easy. Over time, I’ve learned that programming is the most straightforward and simple part of being an engineer. I often use the phrase “a simple matter of programming” because I believe the harder parts of being an engineer is before and after most of the coding takes place. For example, designing what you’re about to code and ensuring what you’ve already coded is shippable and production ready. Make your interviewer understand that you know that programming is just a means to an end.<br>Note, coding in front of others can be daunting. Find a way to practice both white-boarding and pair-programming. Google is basically all about coding at a whiteboard, whereas Square is effectively all pair-programming at a real machine with your language and IDE of choice. <a href="https://medium.com/tech-talk/4df873dbba2e">Read this</a> article from my friend and former colleague Dan.</li></ol><h3>General Tips</h3><p>I can’t claim to be an expert here. In fact, some would say that I’m not even very good with people. But I should probably speak to some non-technical tips, many of which are probably quite obvious.</p><ol><li><strong>Know why you’re there.</strong> If you’re interviewing at a company and you don’t fully understand why they exist, who they are, or what they do; then don’t do it. Engineers who care about the hires they make will smell it a mile away. You may be able to get away with this at bigger corporations, but it won’t fly at smaller ones.</li><li><strong>Be passionate.</strong> If you don’t care, then nobody else will. Be passionate about something. It might be programming, but what about it? Do you enjoy building compilers in your spare time? Do you build and fly RC helicopters? It doesn’t really matter because if you’re passionate about it, then you can make it interesting.</li><li><strong>Don’t make assumptions.</strong> Ask questions if you’re not sure. If you’re asked a question and you aren’t 100% certain what the problem is, then ask. There are a number of times where I’ve seen a candidate go down some path, never ask a question and ultimately waste time solving the wrong problem.</li><li><strong>Smile.</strong> Be excited, happy and positive. But don’t overdo it. As I mentioned before, people will make snap judgments. Make sure your first impression is a good one. Smiles are infectious, I’ve often walked into an interview in a bad mood or feeling overwhelmed with other priorities, but a well-placed smile from a candidate quickly snapped me out of it.</li></ol><p>As I said before, there’s no silver bullet to getting hired. But, as an engineer, the best thing you can do is to <strong>ABC: Always Be Coding</strong>.</p><p>Agree or disagree with this article? Let me know @<a href="http://twitter.com/davidbyttow">davidbyttow</a></p><p>Want to see more?</p><p>Subscribe to my new blog here: <a href="https://www.alwaysbecoding.com/#/portal/signup/free">https://www.alwaysbecoding.com/#/portal/signup/free</a></p><p>Subscribe to my channel on YouTube for updates and tips: <a href="https://www.youtube.com/user/guitardave24?sub_confirmation=1">https://www.youtube.com/user/guitardave24?sub_confirmation=1</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*pIwcJI-Zed4Ltft_lGbvbA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5f8051afce2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/always-be-coding/abc-always-be-coding-d5f8051afce2">ABC: Always Be Coding</a> was originally published in <a href="https://medium.com/always-be-coding">Always Be Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling Secret: Real-time Chat]]></title>
            <link>https://medium.com/always-be-coding/scaling-secret-real-time-chat-d8589f8f0c9b?source=rss----33b23526bf1d---4</link>
            <guid isPermaLink="false">https://medium.com/p/d8589f8f0c9b</guid>
            <dc:creator><![CDATA[David Byttow]]></dc:creator>
            <pubDate>Mon, 02 May 2016 16:13:46 GMT</pubDate>
            <atom:updated>2021-07-21T12:19:39.150Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*CdNoZpEvDknBNwnfzG5mHA.png" /></figure><p><em>(This is the first of a series of technical posts I intend to write, and my goal is to help other engineers learn from the experience of building and scaling Secret.)</em></p><p>So many consumer apps offer chat features (especially social networking and dating apps). Almost all are unique in their own ways and nearly all of them are broken in one way or another, usually they’re either too slow (not real-time) or too unreliable (messages fail to send or are duped), which is surprising given that chat has been around since the early days of the Internet.</p><p>I believe chat should be one of the <em>best</em> experiences in an app in order to facilitate a real-time conversation between people. At the very least:</p><ul><li>The experience should be fast, reliable and simple</li><li>The user shouldn’t need to “pull-to-refresh” to get new messages</li></ul><p>Then, there are application-specific questions to answer:</p><ul><li>How many users can chat together?</li><li>Can the user send photos or videos?</li><li>Are the chats permanent or ephemeral?</li><li>Should the user know when the recipient has read the message (read receipts)?</li><li>Should the user know when the other person is typing a message?</li><li>Should the user know when the other person is currently viewing the chat (presence)?</li></ul><h4>Requirements</h4><p>In Secret, real-time chat was a long-time discussion and something we had talked about since day one. We refrained from implementing it for various reasons:</p><ol><li>We felt the core experience needed to be strong and we didn’t want to add too much too fast</li><li>We didn’t want private conversations to cannibalize public discussions</li><li>We didn’t have a strong case for how it should work or why it was important to the overall product</li></ol><p>When our redesign came around late December 2014, and we added the ability for communities and strangers to connect, it made a lot more sense.</p><p>The requirements for Secret’s chat were:</p><ul><li>Both users should be completely anonymous</li><li>Any user can chat with either the author of a post, or any other commenter</li><li>The chat should be fast, reliable and clean (much to our designers’ chagrin, I was against ‘chat bubbles’ and wanted a much more linear, simple chat similar to Snapchat, IRC, Slack)</li><li>Chat should be ephemeral. We didn’t want people feeling like their private discussions lasted forever (they lasted 24 hours since the last exchange)</li><li>Users should be able to send (ephemeral) photos</li><li>It should feel like a conversation and mimic the real-world as much as possible. Indicate the person is present (someone looking at you when you talk), indicate the person has read your message (acknowledgment or nodding along), indicate the person is typing (someone is talking and you should pay attention)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*rUX4PYmgb5pyZxHX9yNnIw.png" /></figure><p>We knew chat would be a hot feature in the product. And quick back-of-the-envelope math concluded, assuming 5% of our simultaneous actives were chatting, that we needed to be ready to support up to 50,000 users chatting at once (50,000 persistent connections) from day one.</p><p>Note: We also held a global per-user private connection per session for in-app notifications (push notifications aren’t reliable or fast). We also required over 1,000,000 connections for that.</p><p>All of this was a tall order for not only a complete product redesign, but an entirely new chat feature in the product.</p><p>We challenged ourselves to build and ship chat in less than three weeks on both iOS and Android. And we pulled it off with thanks to our client team (Amol Jain, Jason Byttow, Safeer Jiwan, and Sara Haider) and our design team (Ben Lee, Cecile Parker, Chrys Bader). Here’s how we built it (engineering-wise):</p><h4>Architecture</h4><p>When we talked about implementing chat, we usually talked about three options:</p><ol><li>Use a 3rd-party chat service (e.g., <a href="https://layer.com/">Layer</a>)</li><li>Use a 3rd-party websocket implementation (e.g., <a href="https://pusher.com/">Pusher</a>)</li><li>Roll our own websocket-based protocol backed by our servers running on AWS or GCE (we were almost entirely hosted in App Engine at the time)</li></ol><p>Chat needs to be fast and it’s not good enough to do polling (kill your servers with requests and your users with slowness), so we needed persistent connections (e.g., <a href="http://en.wikipedia.org/wiki/WebSocket">websocket</a>).</p><p>We quickly discarded #1 as an option (Layer), because we wanted to control our own user data and we wanted full control over the stack and the experience (admittedly, we didn’t dive much into Layer’s entire offering, but we felt that rolling our own would be the fastest path).</p><p>While some felt #3 was the best option, I believed #2 might actually work out best. I threw together a web-based, internal-only prototype over a weekend based on Pusher.</p><p>The architecture was simple. Here’s a (crude) image of a simple request flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LVlDbUvLeVyf75fqqe8gjg.png" /><figcaption>Wow, I have bad handwriting.</figcaption></figure><p>When a user entered a chat room a <a href="https://pusher.com/docs/client_api_guide/client_presence_channels">private, presence channel</a> was created and connection established with pusher. This lets the user receive notifications from Pusher for the duration of being in the chat room. It was destroyed when the user left or backgrounded the app. Luckily, there were 3rd party Pusher protocol libraries (albeit we had to modify them) available for iOS and Android, which sped up development.</p><p>In this image, there are two users (A and B) present in the same chat room.</p><ol><li>User A presses send on a message and a POST request is made to the Secret frontend with the chat id</li><li>Server retrieves the chat session data, adds the message, and writes it back</li><li>Server makes a POST request to Pusher with a payload intended for the client</li><li>Pusher routes the message to User B via the websocket connection</li></ol><p>Typing notifications and delivery receipts were very similar.</p><p>In this model, although not perfect from a latency perspective, it was good enough and simple because requests only flowed in one direction: Client -&gt; Server -&gt; Pusher -&gt; Client</p><p>It’s also important to note that Pusher was only there for real-time notifications, not for canonical data. If at any time the user came back to the chat room, it would refresh the most recent state from the server and accept any new notifications from there. Analogous to rendering a single-page application and delivering changes to the client via AJAX or websocket.</p><h4>Code and Model</h4><p>The stored data model in the backend is simple. Secret’s canonical datastore was Google App Engine’s High-Replication Datastore (more on that in other blog posts). Essentially, it’s a schema-less, NoSQL datastore built on top of BigTable and Megastore. Entities are document structure and stored in rows by a given key. There are no JOINs and query semantics are very limited, but it allows for very high read-throughput and wide scaling you’d expect from a NoSQL offering.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BTzkP0kzQYJzTXylZl6CCw.png" /></figure><p>When the user enters a chat room, an idempotent ID is created on the server that is effectively “&lt;user1_id&gt;:&lt;user2_id&gt;:&lt;secret_id&gt;”, also known as the chat session id. Important note: user ids in this key were always sorted (partial-ordering), guaranteeing idempotency. That way, given a pair of users and a secret, we can always generate the single ID for that secret.</p><p>Chat sessions are keyed by simple ids and contain the data above in a single row. Each time a chat is mutated, the server performs a transactional read-modify-write on the row. The transaction is fine so long as write throughput is kept to &lt;= 1 write/sec per entity.</p><p>For example, when a user left a chat, we wanted to alert the recipient that they had done so. The server-side code looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*48ZaRW6LFADOftTt2m2zIQ.png" /></figure><p>Pretty simple.</p><p>For fast queries for things like showing the user all of their ongoing or previous chats, we created indexes on the participant and created time properties, allowing fast answers for things like “Fetch chats user X is a participant in sorted time in descending order” and locally sorted by last update time. Because chats only lasted 24 hours since the last message exchange, we knew the number of chats would be a reasonably small number to fetch and sort locally on the server (e.g., &lt; 100 in almost every case). If they exceeded that, chances are the user was a bad actor and we could drop some on the floor. That code was simple:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RTObyxGygknNNI-h-991jA.png" /></figure><p>Here’s a small library I just open-sourced for talking directly to Pusher via Go (in App Engine environment). You can easily tweak this, the only tricky part of the entire process was authenticating the requests for private and presence channels. <a href="https://github.com/guitardave24/pusher-go-appengine/blob/master/pusher.go">https://github.com/guitardave24/pusher-go-appengine/blob/master/pusher.go</a></p><h4>Launch</h4><p>When we launched the redesign, chat was an instant hit. It grew week-over-week to well over 1,000,000 concurrent connections (chat + notifications). Luckily, Pusher worked well and was fairly inexpensive and our scaled linearly to a point where, assuming Pusher was able to meet our demand, we would have no issues for the foreseeable future.</p><p>The key takeaways and reinforcements for me in this experience were:</p><ul><li>Start small and be ready to build a throw-away prototype to help force a decision</li><li>It’s often unwise to roll your own implementation, no matter how fun it might be (obviously, but we all keep doing it!)</li></ul><p>If I were to implement real-time chat in an app again, I’d strongly consider using a simple model like this again. The downside of the above architecture is that it’s not as fast as it could be (notably, because messages are routed through the Secret frontend to Pusher), but the end result was just fast, reliable and simple enough.</p><p>Hopefully you found this interesting and/or useful, if you have any questions, please don’t hesitate to email me at <a href="/service/mailto:d@secret.ly">d@secret.ly</a> or follow me on Twitter <a href="http://twitter.com/davidbyttow">@davidbyttow</a></p><p>David Byttow</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8589f8f0c9b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/always-be-coding/scaling-secret-real-time-chat-d8589f8f0c9b">Scaling Secret: Real-time Chat</a> was originally published in <a href="https://medium.com/always-be-coding">Always Be Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Four Steps to Google, Without a Degree]]></title>
            <link>https://medium.com/always-be-coding/four-steps-to-google-without-a-degree-8f381aa6bd5e?source=rss----33b23526bf1d---4</link>
            <guid isPermaLink="false">https://medium.com/p/8f381aa6bd5e</guid>
            <dc:creator><![CDATA[David Byttow]]></dc:creator>
            <pubDate>Mon, 02 May 2016 16:13:37 GMT</pubDate>
            <atom:updated>2021-01-13T17:42:38.539Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/999/0*Mi7Wk9gJFkhNnwjc.jpeg" /></figure><p>Since publishing <a href="https://medium.com/tech-talk/d5f8051afce2">ABC: Always Be Coding - How to Land an Engineering Job</a>, many have asked how I got an engineering job at Google without a college degree. Here’s my story, your mileage may vary.</p><p>I had every intention of going to college. My college of choice was UCLA. Unfortunately, I had an embarrassingly low high school GPA (2.45) and so didn’t exactly have my pick of the university litter. Instead, I took computer science classes at Purdue Calumet, a satellite of Purdue University, with the intention of eventually transferring, or finding another way out. Nearly two semesters in, the latter happened in the form of an offer I couldn’t refuse.</p><p><strong>Step #1: Fake it ‘til you make it. </strong>While in college, I worked for a <a href="http://www.austgen.com/">small company</a> in Griffith, Indiana building websites for local businesses at $12/hour. The job wasn’t exactly what I had in mind when I imagined my future career, but it could have been worse.</p><p>I kept my head down, under-promised and over-delivered on several projects. This built a lot of credit. And the company made a hefty margin off of my hourly rate. Meanwhile, I was trying to create a game in my spare time, which I didn’t have much of. So, I went for a hail mary and asked management to give me three months to build my game on their dime and sell it online. I drew up fancy spreadsheets and colorful graphs showing them how the <a href="https://en.wikipedia.org/wiki/Shareware">shareware model</a> worked and how they were sure to turn a profit. I had little idea what I was doing yet somehow they bought into it, perhaps it was the pretty colors.</p><p>Two months into development, I released a demo online. A fledgling startup in California called CodeFire took notice as they were essentially making the same damn game, a top-down space shooter, similar to <a href="http://en.wikipedia.org/wiki/SubSpace_(video_game)">SubSpace</a> except in 3D. Unfortunately, they communicated this to me in the form of a cease-and-desist letter. There was only one response I could give, <em>“Sure, I’ll stop — if you hire me to work on yours instead.”</em> They replied with an offer. And so I picked up and went.</p><p><em>Note: The company retained the rights to the original game. I gave three weeks notice and parted on good terms.</em></p><p><strong>Step #2: Befriend a master.</strong> This is the probably one of the most important things you can do. Find someone that is a master at your craft, make them your mentor, and never stop learning. While working at <a href="http://www.doublehelixgames.com/">Double Helix</a> that master was <a href="https://plus.google.com/102803452537820952735/posts">Nathan Hunt</a>, one of the smartest and most humble guys I had ever met. And he was extremely patient with all of my questions no matter how elementary. I must have walked into his office thousands of times to ask random questions like, <em>“how can I smoothly interpolate from one rotation matrix to another?”</em> or <em>“how should I implement moving capsule-to-cylinder collision detection?”</em> Years later, he would join Google one month after me.</p><p>Each of my mentors changed something about the way I approached problems or viewed the world. And there are only a small handful.</p><p><strong>Step #3: Fill in the gaps.</strong> Because I didn’t have a formal CS degree, I knew I lacked a lot of fundamental knowledge. For example, I implemented a physics engine but never solved a dynamic programming problem. To fill these gaps, I implemented nearly all of the most common data structures and algorithms that I heard or read about. The information you need is out there in spades, but there’s a chasm between knowing how something works by observing it, and knowing <strong>why</strong> something works by building it.</p><p>Over time, do the following:</p><ol><li>Master at least one of C, C++, Objective-C, Java, PHP, Python or Ruby. Become fluent in at least one of the other languages and become familiar with Scala, Haskell or Lisp.</li><li>Learn your <a href="http://en.wikipedia.org/wiki/List_of_data_structures">data structures</a>. Implement most of them. Understand their <a href="http://bigocheatsheet.com/">time complexities</a>.</li><li>Solve programming problems. <a href="http://community.topcoder.com/tc?module=Static&amp;d1=tutorials&amp;d2=alg_index">Read this</a> and <a href="http://community.topcoder.com/tc?module=MatchList">solve many of these</a>.</li><li>Build your portfolio of (un)finished projects (e.g., programming frameworks, mobile or web apps, small games, and so on).</li></ol><p><strong>Step #4: Find confidence.</strong> Six years after leaving Indiana, I had shipped about six games across multiple platforms. I was getting bored and needed a new challenge. I applied to Google and felt that if I were hired, I’d be a “real engineer,” something I struggled with since I didn’t have that coveted piece of paper. But, I never heard back and I wasn’t surprised.</p><p>One year later, I resubmitted my resume. Except this time I took the “Education” section out of it altogether. Ironically, a recruiter called me and scheduled a technical phone-screen interview. I asked if we could schedule it for two weeks later and she agreed. I needed that time. I used it to cram as many algorithms and data structures into my head as humanly possible. I coded 12-14 hours a day and solved hundreds of problems. I was literally obsessed and wouldn’t stop until my fear of the Google interview turned into confidence and excitement.</p><p>I remember every single one of my interviews at Google and had a blast with all of them. The interviewers were fun to talk to, and I believe they could see that I was excited to be there and welcomed their problems.</p><p>Some of the problems given to me were:</p><p><strong>1) Given a set of 2-dimensional points, compute a skyline.</strong> This was easy. I drew upon a common data structure known as a max heap. There are several solutions, here is a <a href="http://www.algorithmist.com/index.php/UVa_105">good one</a>.</p><p><strong>2) Design Microsoft Paint.</strong> This was by far the most fun problem. I started by drawing up interfaces and a class diagram. I made mention of a Paint Bucket and the interviewer asked me to implement it. Luckily, I knew how to implement an iterative, breadth-first traversal with my eyes closed thanks to TopCoder.</p><p><strong>3) Describe your software virtues.</strong> This was an “open-ended” discussion interview. I talked about the types of testing and when they are valuable (e.g., unit, integration, acceptance). I talked about consistent style for maintainability of code. And so on. Things you would find in books like <a href="http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670">Code Complete</a> or <a href="http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683">Effective Java</a>.</p><p>I was genuinely enjoying each round of interviews and solving the problems thrown at me. Had I not prepared the way I did, I am certain things would be very different. After the interviews, I had a very good feeling. But, I had heard even if the hiring committees agreed to move forward with an offer, that Larry himself would have to sign off on it. I feared that as soon as he saw my lack of education, I was toast.</p><p>But that didn’t happen, and one day while I was eating sushi for lunch in Santa Clara, I got the call and enthusiastically accepted the offer. On that day, I knew for certain that I wasn’t ever going back to school.</p><blockquote>Victorious warriors win first and then go to war, while defeated warriors go to war first and then seek to win.</blockquote><p>After an amazing five years of learning and growing as an engineer, I no longer work at Google.</p><p>Love or hate this article? Let me know <a href="https://twitter.com/davidbyttow">@davidbyttow</a>.</p><p>Want to see more?</p><p>Subscribe to my new blog here: <a href="https://www.alwaysbecoding.com/#/portal/signup/free">https://www.alwaysbecoding.com/#/portal/signup/free</a></p><p>Subscribe to my channel on YouTube for updates and tips: <a href="https://www.youtube.com/user/guitardave24?sub_confirmation=1">https://www.youtube.com/user/guitardave24?sub_confirmation=1</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*pIwcJI-Zed4Ltft_lGbvbA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f381aa6bd5e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/always-be-coding/four-steps-to-google-without-a-degree-8f381aa6bd5e">Four Steps to Google, Without a Degree</a> was originally published in <a href="https://medium.com/always-be-coding">Always Be Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Distributed Programming is Hard.]]></title>
            <link>https://medium.com/always-be-coding/distributed-programming-is-hard-9140c358976c?source=rss----33b23526bf1d---4</link>
            <guid isPermaLink="false">https://medium.com/p/9140c358976c</guid>
            <dc:creator><![CDATA[David Byttow]]></dc:creator>
            <pubDate>Mon, 02 May 2016 16:13:10 GMT</pubDate>
            <atom:updated>2014-12-23T05:20:32.089Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*Ba_KMZoml5bk7b7p.jpeg" /></figure><p>… but there are many things I hold to be true that make it less so.</p><p>The lessons never stop in the world of distributed programming. As a system scales and evolves, the number of possible failure modes and scenarios grow proportionally.</p><p>There are many lessons that I have learned over the years of navigating the torrent waters of large-scale, service-oriented architectures. Much of the advice I offer and decisions I make on a daily basis are gut instincts based on such experiences. But the reasons are often not obvious, and can often seem counter-intuitive or limiting.</p><p>First, read Jeff Hodges’ article on distributed programming: <a href="http://bryanpendleton.blogspot.mx/2013/01/jeff-hodges-on-distributed-systems.html">http://bryanpendleton.blogspot.mx/2013/01/jeff-hodges-on-distributed-systems.html</a></p><p>Any advice below assumes a distributed system that:</p><ul><li>Is service-oriented</li><li>Is spread across multiple regions</li><li>Strives for 99.9%+ reliability</li><li>Hosts user data</li><li>Has at least linear organic growth</li></ul><p><strong>Design for partial failure everywhere.</strong> In the world of computing, anything can and everything will fail at least once. If your iPhone has given you zero problems and your Mac has been solid since the day you opened it, then consider yourself lucky. Yet, there’s a very good reason the Genius Bar is almost always packed, those devices fail all the time. And your commodity hardware will too.</p><p>Servers, load-balancers, firewalls, NICs, disks, memory, racks, cabling, power that run your applications, you name it, are not infallible.</p><p><strong>Make everything idempotent. </strong>Idempotence is essentially a mathematical property that means applying the same operation multiple times will not change the result. When making a request, it’s often the case that the caller does not know if a failed request simply was lost but still succeeded (perhaps partially) or failed altogether. Without idempotence, retrying would be impossible. Imagine the case where a machine in a cluster completely fails while processing a request, the client would be left with a disconnect yet still want a result, so it retries to another machine.</p><p><strong>Maintain a Test Universe. </strong>This is critical. You want a silo’d universe that completely mimicks your production world. Developers must be able to work in a sandbox that does not touch production-critical data all while having the confidence that their code will work in production. Developing against production data is a great way to corrupt or lose user data, which is the worst possible thing you could do. Do this early, and make sure that every feature, service and application you build works in the developer sandbox, and ideally, on the same hardware that runs your application in production. That way, an application that is deployed into test can then be promoted to production much more easily and safely.</p><p><strong>Capacity planning is hard. Do it anyway. </strong>And err on the side of gross overestimation. Ideally, we would all build for 10x and design for 100x. This effectively means, you’ve load-tested your system to 10x its expected peak capacity and you know that it can scale horizontally to 100x by simply adding more physical hardware.</p><p>At Square, this was very important when we built out the infrastructure for supporting all of Starbucks card-processing. We tested our primary datacenters up to 10x</p><p><strong>If it can be stateless, it should be.</strong> This typically applies to frontends or middle-tier layer services. State here refers to storing some data in a data storage layer. Jeff Hodges’ mentions this too Frontends can apply to either services that render web pages or serve data requests. You always want to minimize the number of places that store state, because when it scales it will be much harder to maintain consistency of state across those instances.</p><p>Imagine you’re happily running instances of PostgreSQL on the West Coast, but are scaling into Europe and need trans-Atlantic redundancy so your users don’t need to suffer 200+ ms to scale to East Coast… Nope. Think again. Synchronous replication is just as slow. Asynchronous replication will work, but introduces eventual consistency. There are solutions, but no silver bullets. Reducing where state is stored is the easiest way to manage this complexity so you don’t need to solve it too many times.</p><p><strong>Reconsider that expensive flash storage.</strong> Expensive and powerful flash storage (such as Fusion-io) can be amazingly addictive. It’s a silver bullet for not-easily-partitionable data storage services. But, there’s a ceiling, and approaching it can turn into a crisis for your organization. This is essentially “vertical scaling.” If your application is successful, you will approach the ceiling and be left with “code red” projects to find clever ways to increase your runway all while re-architecting critical systems to horizontally scale.</p><p><strong>Deploy early and often. </strong>Don’t wait a week for a deploy. In active development environments, a single application may not change, but the frameworks and code around it sure will. A service owner cannot know when their service may stop working as a result of an indirect change outside of their application. Deploying often is the only way to combat adverse side effects, because each deploy reduces the problem space for debugging any new problem.</p><p><strong>Don’t copy user data.</strong> At least not user data that you intend to be served back. By “user data” i mean “data created on behalf of the user taking some action,” such as filling out a form or paying for a cup of coffee. A good rule of thumb is to think about how easy it is for the user to completely delete their data, should they choose to, accurately and comprehensively. When you copy it around, this becomes very difficult. Imagine that they own this data, so it’s important to treat it with the respect it deserves. It’s best to keep a canonical source for serving, all other sources can and should be treated as semantical caches or replicas for analysis or non-visible purposes.</p><p>Above is just a few lessons I’ve learned over the years.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9140c358976c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/always-be-coding/distributed-programming-is-hard-9140c358976c">Distributed Programming is Hard.</a> was originally published in <a href="https://medium.com/always-be-coding">Always Be Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developers: Stop Uploading Address Books.]]></title>
            <link>https://medium.com/always-be-coding/developers-stop-uploading-address-books-4791cf1fcf0e?source=rss----33b23526bf1d---4</link>
            <guid isPermaLink="false">https://medium.com/p/4791cf1fcf0e</guid>
            <dc:creator><![CDATA[David Byttow]]></dc:creator>
            <pubDate>Mon, 02 May 2016 16:12:59 GMT</pubDate>
            <atom:updated>2013-12-19T20:44:05.855Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3u5DgT87kgIiFCbC9wgcwg.png" /></figure><h4>Users: Don’t be so trusting.</h4><p><em>“SomeNewApp would like to access your contacts.”</em></p><p>If you’re like most people, you’ll press “OK” without even blinking an eye. If you’re a developer, then you’re probably a bit more cautious.</p><p>Because, after you click “OK”, what happens? Well, that depends.</p><p><strong>These days, anyone can throw an app together and publish it to the AppStore.</strong> And while Apple has a fairly stringent review process, they can only review what happens on the device, not what happens with the data that leaves the device.</p><p>Most of us remember the <a href="http://mclov.in/2012/02/08/path-uploads-your-entire-address-book-to-their-servers.html">Path incident</a>. Though, this was a bit more devious in that it never asked for your permission (Apple since fixed this bug).</p><blockquote>We upload the address book to our servers in order to help the user find and connect to their friends and family on Path quickly and effeciently as well as to notify them when friends and family join Path. Nothing more. —Dave Morin</blockquote><p>Morin’s response is technically accurate, they upload the contact book to connect the user with their friends. Do they store the data? Probably, as they have to in order to match new friends that join the service long after you’ve uploaded your address book. But, even if a service doesn’t store them in a database, there are all sorts of other places it can go, such as into the logs that nearly all services keep for debug and analytical purposes. The data is there and it’s discoverable.</p><p><strong>That approach is wrong.</strong> You don’t need to upload phone numbers and email addresses, just a representation of them. Most developers believe that sending email addresses and phone numbers over SSL and storing them securely on the server is good enough. It’s not.</p><p>The number of services that have contact data for millions of people (journalists, celebrities, politicians, etc) is probably quite staggering. <strong>Don’t be that service.</strong></p><p>You should only collect email address and phone number if users willingly give it to you. If you need to match them with their friends that sign up later, only collect and store contact details in a way that is matchable, but irrecoverable.</p><p><strong>Here’s the right way.</strong> Simply one-way obfuscate (e.g., hash, SHA1) any piece of personally identifiable information (email, phone number, etc) for each contact and store that. Use a little salt too. Then, when it comes time to match, do it on the obfuscated keys. At this point, you don’t even need to care if it’s an email address, phone number because it’s just an opaque blob. <em>Disclaimer:</em> This is not meant to prevent against hacking attacks, as hashing (especially phone numbers) is easily defeated.</p><p>A fine solution is to do this on the server, but the <em>best</em> solution is to do it on the client before sending up the data. That way, you can make the guarantee to your users that their contact data never leaves their phone.</p><p>Also, just because you send data over SSL doesn’t mean you’re in the clear. Savvy people will inspect your traffic with a simple MITM proxy and check out what you’re doing. So instead of seeing this:</p><pre>“Contacts”: [{<br>  “Emails”: [“davidbyttow@example.com”], <br>  “PhoneNumbers”: [“+15550001234”]<br>}]</pre><p>They only see this:</p><pre>“Contacts”: [{<br>  “Emails”: [“sTYVRpsNfoluk5nQzoTnhu2AyW0=”], <br>  “PhoneNumbers”: [“ga7tSDlB0s45nUKnmn9XERVTBqE=”]<br>}]</pre><p>Unfortunately, now you can’t get Kanye West’s phone number because one of his bodyguards signed up for your service. Sorry! :-(</p><p>Follow me <a href="http://twitter.com/davidbyttow">@davidbyttow</a>.</p><p>Special thanks to <a href="http://twitter.com/dpup">Dan Pupius</a> for making me realize the importance of this practice.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4791cf1fcf0e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/always-be-coding/developers-stop-uploading-address-books-4791cf1fcf0e">Developers: Stop Uploading Address Books.</a> was originally published in <a href="https://medium.com/always-be-coding">Always Be Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Effective Technical Leadership]]></title>
            <link>https://medium.com/always-be-coding/effective-technical-leadership-b193a544e771?source=rss----33b23526bf1d---4</link>
            <guid isPermaLink="false">https://medium.com/p/b193a544e771</guid>
            <dc:creator><![CDATA[David Byttow]]></dc:creator>
            <pubDate>Mon, 02 May 2016 16:12:49 GMT</pubDate>
            <atom:updated>2017-07-15T23:54:37.726Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*dlgyRow5AHsFU0Sg.jpeg" /></figure><p>Most successful projects have a single engineer responsible for driving the project forward while ensuring that strong technical decisions are made with confidence. Typically, that person is referred to as a <strong>Tech Lead</strong>. They often don’t manage people, but instead coach them to do their best work.</p><p>Every company is different, but there are some common threads among the best tech leads that I’ve worked with. Hat tips to <a href="https://plus.google.com/+BrianStoler">Brian Stoler</a>, <a href="https://plus.google.com/102803452537820952735">Nathan Hunt</a>, <a href="https://plus.google.com/103612775462167038471">Evan Gilbert</a>, and <a href="https://plus.google.com/116465153085296292090">Rich Burdon</a> for leading by example.</p><p>In this article, I lay out what makes for a badass TL, broken down into 3 A’s: attributes, activities and actions. And many of these concepts apply to being badass at life in general. Your mileage may vary.</p><h3>Attributes</h3><p>Over time, you should always be increasing three attributes: Knowledge, Speed, and Awareness.</p><p><strong>1. Knowledge<br></strong>Technical knowledge gives you insight and credibility in making good, defensible decisions. A strong tech lead’s knowledge is broad and deep. If a team member asks how a particular component or system works, you should be able to explain it at a useful level of detail or point to someone who can.</p><p>To remain knowledgable, I do three things in this order:</p><ol><li>Review code</li><li>Read design documents</li><li>Write code (see <a href="https://medium.com/tech-talk/d5f8051afce2">ABC: Always Be Coding</a>)</li></ol><p>Order is important, notably for the first two. If work is completed, but waiting to be reviewed, then you should almost always drop your own work and help move it forward. When not assisting others, writing code keeps you fresh on the code base.</p><p>A tech lead should be a master of several technologies. For example: Java, JavaScript, C++, distributed storage systems, and client-side web development may make for a solid web application tech lead.</p><p><strong>2. Speed<br></strong>You should strive to be ultra-responsive and capable of making instant decisions, always kicking the ball forward. Engineers should come to you with questions expecting a swift response.</p><p>I personally pride myself on my ability to respond quickly. The goal is to seem omnipresent to my team. And my secret weapon is my inbox, so I prefer to use tools with tight email integration.</p><p>For example, it doesn’t matter which issue tracking, code review, or production alert software you use, but team members should get email notifications and be able to comment on the issue via email. Allowing anyone on the team to react quickly to new or updated issues and stay on top of all state changes, even from a mobile device.</p><p><strong>3. Awareness<br></strong>You should be able to keep the current state of the entire project in your head at all times. Otherwise, you cannot be aware of potentially imminent blockers. If there is an internal or external force that threatens slowing the project down, then you should know about it.</p><p>Again, email integration is key here. Ideally, all state changes or updates should flow through email in some form, even for offline meetings. For example, someone should always send meeting notes to the entire team, especially when important decisions were made.</p><p>You should always be improving the three attributes above, as you can always be faster, more knowledgable, and more aware.</p><h3>Activities</h3><p>There are five core activities that I found myself constantly doing at any given time as a tech lead. Almost every action comes down to one of these.</p><p>What I’ve learned over the years is that the two most important things that a TL can do also happen to be exact polar opposites: <strong>block </strong>and <strong>unblock.</strong></p><p><strong>1. Know when to block<br></strong>Blocking requires a high level of awareness and scales from strategic decision-making to tactical engineering tasks. The tech lead needs to be alert and aware to what is going on in the project, always ready to jump in and block bad decisions before they are made, typically armed with a better solution.</p><p>For example, if an engineer sends out some code to be reviewed to another engineer on the project, which might seem innocuous to the reviewer but in fact introduces new bugs, and you are able to step in and alert the author before it is submitted or released to production is extremely useful to the author, the reviewer and the overall project.</p><p>Blocking should not stop progress, it course corrects so things can keep moving. Think harness, not safety net.</p><p><strong>2. Unblock early and often <br></strong>Converse to blocking, unblocking is equally important. The road to hell is paved with idle engineers. If someone has a question, you should be able to either give an answer or bring in the right person to field it.</p><p>Something that helped me develop this skill was hosting interns. The best interns have lots and lots of questions. And if they don’t get answers, they can often get stuck, or worse, frustrated. I had to learn how to provide the right answers or connect them with people that could guide them forward.</p><p><strong>3. Redirect quickly<br></strong>No matter how good you are, you don’t know it all. And you can’t answer every question. And even if you technically could, practically all of your time would be spent answering them. To fill in these gaps (and help you get your own work done), you should mentally build an expert index so you always know where to find an answer. An extremely useful tactic to employ early and often is the redirect. A tech lead is often a “human <a href="http://en.wikipedia.org/wiki/HTTP_302">302</a>&quot; (or a human redirect) and connects individuals together. If an engineer on your team is unsure of something or has a question that you don’t know the exact answer to, knowing who to send them to is extremely valuable and saves a lot of time.</p><p>In addition to redirecting questions, proactively adding the right individuals to any thread or code review can help increase the overall quality of the work. For example, if an engineer is adding code to a critical component that was not originally authored by them, adding an expert to the code review will help ensure that the feature is being implemented correctly.</p><p><strong>4. Be a decider<br></strong>Part of your duty is to make decisions, and your team will rely on you. The faster you can reach a decision, the quicker others can act on it. Often, there is no clear path forward and simply going with your gut is the right thing to do.</p><p>When you do listen to your instincts, make sure that you’re making a robust decision that can stand the test of time. Your project will likely continue to go on after you’ve moved on, you don’t want your successors cursing your name when they inherit it. This often happens on projects that have accumulated a lot of technical debt.</p><p>When faced with making a decision against a set of options, I naturally go through the following process:</p><ol><li>Reduce the number of options to 2. The complexity of any problem increases exponentially with each option.</li><li>Quickly determine if there is a clearly “best choice” based on data available. But, don’t be afraid to trust your gut!</li><li>If the answer is non-obvious, can it be redirected to someone who is better suited to make the decision?</li><li>If all else fails, then there may not be enough data or the wrong question is being asked. In this case, I make a gut decision and go with the one that is the most safe to try and doesn’t move you backward.</li></ol><blockquote>The quality of decision is like the well-timed swoop of a falcon, which enables it to strike and destroy its victim. -Sun Tzu</blockquote><p><strong>5. Show your work<br></strong>One of the most important aspects of a technical leader is that they are able to demonstrate it by example. We’ve all heard the phrase “lead by example,” but I prefer, <em>show, don’t tell</em>. By design, a tech lead is often not a manager because they focus their energy on code, not people. So, it’s important to have the respect and trust of your team, which is best accomplished by demonstrating that you know your stuff.</p><p>Most leaders may find it hard to make time to write code, but it’s extremely important that you try to find time. I call it inventing time. Even if I can spend a little bit of time doing “grunge work” fixing annoying bugs or adding little helpful pieces of code here and there as needed, I will; it is more valuable to you than the code itself.</p><h3>Actions</h3><p>Below is a list of things that a tech lead often does to help move a project forward. It is far from exhaustive.</p><ul><li>Create and maintain launch, testing, and release plans.</li><li>Host effective engineering team meetings.</li><li>Make sure meetings are useful and brief as necessary.</li><li>Help create and stack rank project priorities.</li><li>Say “no” often to new or unnecessary features.</li><li>Define best practices for issue tracking.</li><li>Setup team fix-its, hackathons, or bug scrubs.</li><li>Maintain cross-functional relationships.</li><li>Create target milestone dates.</li><li>Stay updated on useful tools.</li><li>Coach other engineers.</li><li>Recruit engineers from other teams.</li><li>Host interns, make them successful.</li><li>Review code in detail and give useful feedback.</li><li>Read, write, and give feedback on design documents.</li><li>Write the right code at the right times.</li><li>Shield engineers from management as needed.</li><li>Work with other engineering teams, especially dependencies.</li><li>Identify technical debt.</li><li>Explain why decisions are made.</li><li>Fight for the right design decisions.</li><li>Make time for addressing technical debt.</li><li>Load-balance work among the team.</li><li>Onboard new engineers and help identify other engineers as coaches.</li><li>Course correct and refine target dates as needed.</li><li>Maintain the definition of the project’s MVP.</li><li>Evaluate architectural decisions and their implications.</li><li>Ensure tests are being written for core functionality.</li><li>Maintain on-call and onduty processes.</li><li>Escalate blocking issues as necessary.</li><li>Vet the product’s privacy and security concerns.</li><li>Generate new ideas and elegant solutions often.</li><li>Debug difficult production issues.</li><li>… and so on.</li></ul><p>There is no prescription to being a successful tech lead. The best are prolific coders with a ton of real-world experience shipping products. But think back to the best leads you’ve worked with and how much of what you’ve read above applies to them.</p><p>Be confident, keep moving, and always improve.</p><p>Love or hate this article? Let me know <a href="https://twitter.com/davidbyttow">@davidbyttow</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b193a544e771" width="1" height="1" alt=""><hr><p><a href="https://medium.com/always-be-coding/effective-technical-leadership-b193a544e771">Effective Technical Leadership</a> was originally published in <a href="https://medium.com/always-be-coding">Always Be Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Support Only the Minimum]]></title>
            <link>https://medium.com/always-be-coding/support-only-the-minimum-3ab49958fb4b?source=rss----33b23526bf1d---4</link>
            <guid isPermaLink="false">https://medium.com/p/3ab49958fb4b</guid>
            <dc:creator><![CDATA[David Byttow]]></dc:creator>
            <pubDate>Mon, 02 May 2016 16:12:40 GMT</pubDate>
            <atom:updated>2013-05-21T02:56:47.716Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>TL;DR:</strong> Keep your APIs as minimal as possible.</p><p>API design is hard. But this is arguably the best tip I can give. Don’t add bells and whistles, let the clients do that themselves.</p><p>This is a programming language agnostic concept, but I’ll be using Java to demonstrate my point.</p><h3>Interfaces</h3><p>In my experience, interface creation often leads to the most existential debates I have with myself.</p><p>For example:</p><pre>public interface Collection&lt;T&gt; {<br> boolean isEmpty();<br> int getSize();<br>}</pre><p>One of these methods is redundant. Is an <strong>isEmpty </strong>method really necessary here when one can write:</p><pre>if (collection.getSize() == 0)</pre><p>instead of:</p><pre>if (collection.isEmpty())</pre><p>There are two valid reasons to add keep the isEmpty method:</p><ol><li>You’re just being extra nice to your clients by helping them keep the code simple to read and write.</li><li>You want to make some distinct guarantees about the semantics or complexity of each method.</li></ol><p>I’ll just say that #1 is invalid. First, forget about making the code simple to write, it will probably be read far more often than it’s written. Second, making it simple to read without adding extra burden to those that are implementing your interface is silly. You can simply offer a static utility class that will never change:</p><pre>public final class Collections {<br> public static &lt;T&gt; boolean isEmpty(Collection&lt;T&gt; c) {<br> return c.getSize() != 0;<br> }<br>}</pre><p>Now the code is as simple as:</p><pre>if (Collections.isEmpty(collection))</pre><p>#2, on the other hand, is rather valid if your interface wants to make some guarantees. For example, perhaps <strong>isEmpty()</strong> is guaranteed to be a constant operation while <strong>getSize()</strong> may not be. This is valid, but must be documented and explained to your users, potentially increasing complexity.</p><p>Such a debate raged long ago regarding the size() and empty() methods of C++’s Standard Template Library (STL). For what it’s worth, most standard containers support both.</p><h3>Accessibility</h3><p>Whenever you find yourself exposing a method or field that is not private (including package-private), you are essentially stating that you plan to support the functionality for the foreseeable future. That will only make refactoring harder, leaving you with a clunky API.</p><p>When you work on versioned software that is statically shipped to your clients (e.g., an SDK of some form) you learn some very hard lessons very quickly. Every single change to a public API that you make is a burden to your clients to upgrading.</p><p>If you ever find yourself in an existential debate where you are attempting to predict the future on how a client will use a particular API, step back and ask yourself if it’s really necessary. Do not simply implement what you <em>think</em> they <em>might</em> need. Only add what you <em>know</em> they <em>will</em> need.</p><p>Deprecating or obsoleting functionality is at least an order of magnitude harder than creating it in the first place when you know it’s needed. Especially when you cannot be certain how your clients are using the code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ab49958fb4b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/always-be-coding/support-only-the-minimum-3ab49958fb4b">Support Only the Minimum</a> was originally published in <a href="https://medium.com/always-be-coding">Always Be Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Facebook’s draft.js is the browser-based editor we’ve been waiting for]]></title>
            <link>https://medium.com/always-be-coding/facebook-just-moved-the-world-of-browser-based-editing-forward-2cc541c83974?source=rss----33b23526bf1d---4</link>
            <guid isPermaLink="false">https://medium.com/p/2cc541c83974</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[facebook]]></category>
            <dc:creator><![CDATA[David Byttow]]></dc:creator>
            <pubDate>Mon, 02 May 2016 16:11:15 GMT</pubDate>
            <atom:updated>2016-04-30T16:02:44.027Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gagWBnFEc55jt6VQqAzQTQ.jpeg" /></figure><p>It’s 2016. You’re an engineer tasked with building a fully-featured, rich text “WYSIWIG” editor for Acme Corp. in a month. WTF do you do? Until recently, either you argue the requirements down to something provided by an off-the-shelf editor, convince your company to use Markdown, or look for a new job.</p><p>Since the dawn of HTML, it’s been incredibly difficult and time-consuming to build a word processor in the browser. It’s ironic too because browser’s have had native technology to allow people to input rich text into a “content editable” element for a just as long. Alas, its behavior has been wildly inconsistent across platforms, making it difficult to write a consistent experience.</p><p><a href="https://facebook.github.io/draft-js/">Draft.js</a> is Facebook’s answer to this problem. And most importantly, it’s open-source, the community is actively growing, and it’s built one of the fastest growing open-sourced projects ever: <a href="https://facebook.github.io/react/">React.js</a>.</p><p>Since then, there weren’t any great out-of-the-box solutions to the complexity of building a great editor in the browser. There have been several open-sourced projects[1] to address this. And even Google <a href="https://google.github.io/closure-library/source/closure/goog/demos/">open-sourced their field editor</a> years back as part of their <a href="https://developers.google.com/closure/">Closure</a> project, internally referred to as TrogEdit. In fact, Medium’s world-class editor is built on top of this technology partially by ex-Google engineers.</p><p>I’m excited that today there’s a new hotness in town. And having ditched my own hand-rolled editor and now working with Draft.js since version 0.1.0, I believe that it will accelerate the world of browser editing forward and continue to build momentum over the next couple of years.</p><p>[1] <a href="http://jakiestfu.github.io/Medium.js/docs/">http://jakiestfu.github.io/Medium.js/docs/</a>, <a href="http://quilljs.com/">http://quilljs.com/</a></p><p>Follow me on <a href="http://twitter.com/davidbyttow">Twitter</a> or here on Medium to follow my future stories.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cc541c83974" width="1" height="1" alt=""><hr><p><a href="https://medium.com/always-be-coding/facebook-just-moved-the-world-of-browser-based-editing-forward-2cc541c83974">Facebook’s draft.js is the browser-based editor we’ve been waiting for</a> was originally published in <a href="https://medium.com/always-be-coding">Always Be Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>