<?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[Stories by John S on Medium]]></title>
        <description><![CDATA[Stories by John S on Medium]]></description>
        <link>https://medium.com/@johnsinco?source=rss-7b4e99cbec5a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*30TNeEZb8_a6SJmOMWt_vQ.jpeg</url>
            <title>Stories by John S on Medium</title>
            <link>https://medium.com/@johnsinco?source=rss-7b4e99cbec5a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 11:44:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@johnsinco/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Don’t Do Code Reviews]]></title>
            <link>https://medium.com/@johnsinco/dont-do-code-reviews-109f7d3952de?source=rss-7b4e99cbec5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/109f7d3952de</guid>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[engineering-culture]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[John S]]></dc:creator>
            <pubDate>Fri, 24 Feb 2017 21:30:18 GMT</pubDate>
            <atom:updated>2017-02-24T21:30:18.677Z</atom:updated>
            <content:encoded><![CDATA[<p>In a lot of software shops there’s a general opinion that formal “code reviews” are a good practice. This is something that has become more mainstream in software development over the last decade, popularized in part by big companies such as Google who have used it as part of their <a href="http://goodmath.scientopia.org/2011/07/06/things-everyone-should-do-code-review/">formal internal software development processes</a>.</p><p>I’ve done code reviews at several jobs over the years, and it’s never been a positive experience. There are fundamental problems with code reviews as a formal part of development, but at a basic level code reviews are <em>not a good use of resources</em>. The time and energy spent by developers doing code reviews is time better spent on other development work.</p><h3>The Human Element</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*ElpAQnmq9_DADipwpB5bYA.jpeg" /></figure><p>People, as in most elements of life, are the biggest problem with code reviews. Developers are hired to program machines to perform automated tasks using logic and mathematics. Although most are great people they aren’t renown for deft social skills. Many many times I’ve seen both the authors and reviewers of code walk away with hurt feelings and the team’s morale and effectiveness permanently damaged.</p><p>Any company that is serious about code reviews no doubt has a set of “guidelines” for effective reviews, and one of these is usually “don’t hurt anybody’s feelings”. That sort of glib instruction is generally not effective.</p><p>The bottom line is this. People are assholes. Software engineers are no exception. Unless you are blessed with saintly developers who all have tight personal bonds and no fear of judgement, think twice about subjecting them to reviews.</p><h3>The Money Element</h3><p>This one is really obvious, but it seems almost taboo to talk about it. When you perform regular or mandatory code reviews you are spending far more money on a feature or change than the money already spent developing and testing it. You’re spending money both on the submitter and reviewer(s) time to do the code review, as well as the lost opportunity-cost of what those engineers could be doing instead. <em>Worse still</em> is if the reviewer(s) of the code request changes or even wholesale rewrites. Now what could be a simple bug-fix or enhancement has become <em>exponentially</em> more expensive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*Xr_JajCjU_f8DDC8v19mKg.jpeg" /></figure><p>The money and time spent on code reviews could be more effectively spent on developing <a href="https://www.thoughtworks.com/insights/blog/acceptance-test-automation">automated acceptance or integration</a> tests for the code, or even simply educating and socializing the code informally.</p><h3>What Should You Do?</h3><p>The common use of code reviews is really a missed opportunity to improve both your software and y0ur team dynamics. So here are my recommendations for <em>better</em> engineering practices in lieu of code reviews:</p><h4>Pairing</h4><p>Pairing is the best and most expedient way to ensure that one person doesn&#39;t have all the knowledge of a feature or piece of code. If you really want the benefit of code reviews this is the one best way to get them and boost team cohesiveness and effectiveness at the same time. Ideally development pairs should change relatively often, so that team members can build better interpersonal relationships as well as get exposure to all parts of a software system.</p><h4>Shared Values</h4><p>Discussing or worse arguing about the merits or deficiencies of code in a review is time better spent talking about the code <em>before its written. </em>A shared, agreed, socialized set of standards for code, such as test coverage expectations, etc. is a better way to ensure quality code <strong>up front</strong>. Teams that use agile development processes should ensure that stories have very clear definitions of what constitutes quality in the produced code.</p><h4>Acceptance Tests / Automated Tools</h4><p>Automated acceptance tests, preferably written by someone other than the feature developers, are a great way to ensure the written code is bug-free and meets the requirements, and is much more objective than human-led reviews.</p><p>Automated code review tools can be used if the team wants to ensure a consistent style in the codebase and to ensure some preset level of test coverage, although these tools often lead to <a href="https://signalvnoise.com/posts/3159-testing-like-the-tsa">testing theater</a>.</p><h3>Do You Work for Google?</h3><p>In ideal circumstances, with a tightly knit team of engineers who have good personal relationships and great people skills, as well as a product manager with an abundance of time and money, code reviews can make sense. I have never personally worked in such an organization, but if you do please hire me.</p><p>If your organization doesn’t quite meet up to the above statement, leave code reviews to the software gods and focus on building quality into your software from the start.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=109f7d3952de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Micro-Services and Macro-Problems]]></title>
            <link>https://medium.com/@johnsinco/micro-services-and-macro-problems-5d4643738d22?source=rss-7b4e99cbec5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d4643738d22</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[John S]]></dc:creator>
            <pubDate>Wed, 07 Dec 2016 00:29:18 GMT</pubDate>
            <atom:updated>2016-12-07T19:03:28.528Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7MhE47Q99N7ha6Hib-yuEg.png" /><figcaption>Basic Microservices Architecture</figcaption></figure><p>Software development technology and trends move quickly, and right now not many trends are hotter in the startup and corporate IT space than <a href="https://medium.com/flow-ci/a-simple-introduction-to-microservices-a69446d2c211#.6oz4p3svt">microservices</a>. Like most of these ‘trendy’ development terms there’s some debate as to what exactly <a href="http://www.martinfowler.com/articles/microservices.html">constitutes microservices</a>, and especially whether and how microservices differ from SOA and REST based services.</p><p>In my day-job I’ve spent a lot of time in the last two years developing, deploying, and debugging code that was originally referred to as “services” and then mysteriously morphed into “micro”-services. Our organization operates in the digital-health space, and although some try to claim we’re a “startup”, in reality we’re a marginally-autonomous tentacle of a massive health insurance conglomerate. Crucially, all of our back-end data is in fact not our own, and our dependencies on the ‘mothership’ are deep, twisted, and inescapable.</p><p>So maybe our organization isn&#39;t the best fit for “small, independently deployable, autonomous services”. But hey what engineering team ever let such concerns dissuade them from being on the cutting edge! So as the title implies, here in no particular order is a list of reasons why you and your team might want to think long and hard before you go down the microservices road.</p><h3>Network Latency</h3><p>This might seem obvious, but discussions around the issue of network overhead were thin on the ground when we were considering adopting microservices. In reality, the amount of time spent serializing to/from the network interfaces of 2o-plus services and aggregating and collecting the data necessary to render a particular user-view is significant. In the traditional “monolithic” server application you only needed to worry about latency between the client-browser or app and your servers, and maybe a little between server and database. Now multiply that by ten. At least. HTTP is not a particularly efficient protocol, so now instead of going to/from HTTP once per client request/response cycle, you’re doing it twenty times?</p><p>Now maybe you’ll say “hey, shouldn’t all your microservices be independent? Why are you making these long chains of service calls to generate a client response?” Thats a valid point, but if you want to deliver an experience that is more complex than a to-do app, you’re going to end up composing that view from a bunch of different microservices.”</p><h3>Debugging</h3><p>This is another one that should probably be obvious, but debugging problems across twenty-plus runtime services is much, much harder than debugging a single server-side application. A mix of languages and technologies in your microservices “stack” makes this problem worse. If your team makes use of Visual type development tools or debuggers, throw those away because tracing thru that many layers and interactions using tools is nigh impossible. I hope you kept all your grizzled “printf” debugging experts because you’ll need them.</p><h3>Infrastructure as Code</h3><p>This is touted as one of the “benefits” of microservices. That your system infrastructure is explicit and understandable, and system complexity is moved from the “unknowable” source-code into “configured” service-interactions. That sounds great in theory, in reality it means the reliability and “knowability” of your system is entirely in the hands of your dev-ops or sys-admin teams. Whereas in a single-service app if you run into trouble with bugs in production your can simply “roll-back” the server code to a known stable-state, in microservices land the state of your server system is a complex amalgamation of different codebases that in a new system is constantly churning and changing independently. Also, you know how <a href="http://www.cloudcomputing-news.net/news/2016/jun/16/devops-engineer-hardest-job-to-fill/">easy it is to hire and keep top-notch devops guys</a>!? I mean I can’t turn around without tripping over one!!</p><h3>Testing and CI</h3><p>Unlike integration testing a single-service app, testing the entire flow across a suite of microservices requires more complex tools and processes. Continuous integration means not just ensuring that changes to a particular service wont break its tests and contracts, but that it works with <em>all the things everywhere</em>. The interaction between related microservices can be subtle and a change to one service can break something three or four codebases removed from the source. Again, I’m sure you wont have any trouble hiring and keeping a team of top-flight QA engineers who also can program those sort of tests and maintain all the infrastructure necessary to run that sort of regression testing.</p><h3>Knowability of the System</h3><p>This is a big one. Most likely you could take a whiteboard and draw a decent diagram of the data flows within your traditional server system. You might even have visual tools that will draw interaction diagrams of all the classes in your OO system. In a microservices system that kind of knowledge is <em>distributed </em>across both the <strong>infrastructure<em> </em></strong>and all the services code. Keeping yourself and your team up-to-date on changes to the system means staying on top of way more moving parts.</p><h3>So What Should I Do?</h3><p>Proponents of microservices tout a <a href="http://blogs.wsj.com/cio/2016/02/24/big-changes-in-goldmans-software-emerge-from-small-containers/">laundry list</a> of purported benefits to breaking up your application stack into tiny independent moving parts. Supposedly it makes it easier to make changes to the individual pieces without changing the rest. It’s “easier to understand” the small services vs a large monolithic app. Individual services can be scaled up and down independently. All these things sound wonderful, but they <a href="http://martinfowler.com/bliki/MonolithFirst.html">all come with costs</a>.</p><p>The problems microservices supposedly solve are also problems with well-established, proven solutions within object-oriented programming and cloud services development. Adding more instances to your AWS cluster is significantly cheaper than hiring extra teams of programmers and devops to manage 100 micro-services. Code-complexity is as old as programming itself and putting an HTTP interface between your classes doesn&#39;t strike me as the most efficient solution.</p><p>In reality microservices is just a different way of expressing good object-oriented design principles. Being excited that you have a service written in Go and three in Elixir and six in Ruby is just dumb. Unless you are writing code for fun adding that sort of complexity to the system is adding costs without value. Pick a language and use it. If you interview somebody and they say “oh I only code in Piet”, wish them a nice day and show them the door.</p><p>Sometimes particular parts of your system might make sense to factor out into a separate “service”. These sort of decisions should be made use-case by use-case and as a response to pressures within the production system, not up-front because it’s trendy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d4643738d22" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>