<?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 Dave on Medium]]></title>
        <description><![CDATA[Stories by Dave on Medium]]></description>
        <link>https://medium.com/@shekelator?source=rss-592e00ef6f8b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*QseiFJxia1A1DL6V.jpg</url>
            <title>Stories by Dave on Medium</title>
            <link>https://medium.com/@shekelator?source=rss-592e00ef6f8b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 07:19:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shekelator/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[Deploying a .NET Lambda function — the real-world guide]]></title>
            <link>https://shekelator.medium.com/deploying-a-net-lambda-function-the-real-world-guide-27d20d873898?source=rss-592e00ef6f8b------2</link>
            <guid isPermaLink="false">https://medium.com/p/27d20d873898</guid>
            <dc:creator><![CDATA[Dave]]></dc:creator>
            <pubDate>Mon, 03 May 2021 15:19:34 GMT</pubDate>
            <atom:updated>2021-05-03T15:19:34.508Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deploying a .NET Lambda function — the real-world guide</h3><p>I’m mostly writing this for my future self, and all those people who, like my present self, are looking for this one, niche answer.</p><p>If you’re looking to deploy a trivial, “Hello world” Lambda function from scratch using the <a href="https://docs.aws.amazon.com/lambda/latest/dg/csharp-package-cli.html">.NET Core CLI</a>, don’t stop here, just Google it. There are about 50,000 results for you. But if you have an existing codebase with multiple functions and you use Terraform and Azure Pipelines to deploy it, then you’re in the right place.</p><h3>Install the tools</h3><p>First you need the tools. Assuming you’ve already got the <a href="https://dotnet.microsoft.com/download">.NET Core installed</a>, the following three commands should set you up (I’m using Powershell, but should be basically the same in bash, etc.):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1544a6c96483173f7e819c186e3a8b38/href">https://medium.com/media/1544a6c96483173f7e819c186e3a8b38/href</a></iframe><p>Next you just build/package it using the CLI with the lambda tools. The following snippet includes that, along with deploying the code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/337f47967b1e45d429f6850e6a679ddc/href">https://medium.com/media/337f47967b1e45d429f6850e6a679ddc/href</a></iframe><p>Since this lambda is in a real dev environment with actual users testing against it, I’m not making it visible to them. They access it via API Gateway, which sends requests to a certain label (`stable`). When the code is deployed, that creates a new version of the function, but that doesn’t point the integration with API Gateway to that new version. I have to do that separately.</p><p>This is great, because I don’t really want other people testing my local code; they should be running against what is merged to the trunk and deployed by a CD pipeline. Instead I use our canary label. We have a second API Gateway integration pointing to that…but I don’t even need to use that! I can explicitly invoke the new version I created. In this case I am repointing the canary label because I do want to run some automated tests against my code through API Gateway.</p><p>Just to show that I don’t need API Gateway however, the last few lines of the script invokes the function directly through the AWS CLI, sending a basic request (JSON data) that lives in a file. It returns the log stream from the request and writes the output to a file.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27d20d873898" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My favorite patterns: Limiting Configuration]]></title>
            <link>https://shekelator.medium.com/my-favorite-patterns-limiting-configuration-2322ea2cd88b?source=rss-592e00ef6f8b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2322ea2cd88b</guid>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[config]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <dc:creator><![CDATA[Dave]]></dc:creator>
            <pubDate>Tue, 05 Feb 2019 15:52:31 GMT</pubDate>
            <atom:updated>2019-02-05T15:52:31.096Z</atom:updated>
            <content:encoded><![CDATA[<p>Or: Why <em>“less is more”</em> when it comes to configuration.</p><p>This continues my series on my favorite application/design patterns, where I describe underrated patterns that have worked for me in the past, and that make me happy.</p><p>You could argue that this isn’t a pattern <em>per se</em>. The short version is something like “don’t put everything in configuration, just hard-code it.”</p><p>So, what is <em>configuration</em>? Many apps have some JSON like this in a config file, or <a href="https://12factor.net/config">environment variables</a> that determine the behavior of the system, and stores some <em>data</em> that’s required for the system to run properly.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7046f8814ff1c3700bd443c935b109e1/href">https://medium.com/media/7046f8814ff1c3700bd443c935b109e1/href</a></iframe><p>In the listing above you’ll see a setting for logging, a connection string, and API key and URL for some integrated service. You’ll also see a name for the service, a feature toggle (`enableSweetNewFeature`) and a value that’s probably used in an abstract factory to determine which algorithm to use at runtime (`vendorSelectionImplementation`).</p><p>Hopefully you’re looking at that and nodding, like you’ve seen all this before.</p><h3>Just because you can doesn’t mean you should</h3><p>Why do we do this? I believe there are three reasons we historically put code in configuration:</p><ol><li>When certain parameters to the running application differ <em>per environment</em></li><li>When certain data is sensitive in nature and thus should not be committed with the source code</li><li>When config data needs to be updated at runtime (without redeploying the application).</li></ol><p>I believe that the first two reasons are valid reasons to store data in configuration, but the third is not.</p><p>Human-readable configuration was born in a time when deploying an application was time-consuming and rare. Releases were scheduled, and the whole team was “on-deck.” Often they were on weekends so users wouldn’t be disrupted.</p><p>But that was then, and this is now. This is the age of <a href="https://www.amazon.com/DevOps-Handbook-World-Class-Reliability-Organizations-ebook">DevOps</a> and <a href="https://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/0321601912">continuous delivery</a>. Changing running software, in today’s world, should be trivial.</p><blockquote>But that was then, and this is now. This is the age of <a href="https://www.amazon.com/DevOps-Handbook-World-Class-Reliability-Organizations-ebook/dp/B01M9ASFQ3">DevOps</a> and <a href="https://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley-ebook/dp/B003YMNVC0/">continuous delivery</a>. Changing running software should be trivial.</blockquote><p>If we look at our configuration settings above through this lens, some seem appropriate, while others don’t.</p><ul><li>Connection strings: probably change per environment and should be secured, so should not be compiled into the code 👍</li><li>API keys and base URLs for integrated services: also probably change per environment and should be secured 👍</li><li>Feature toggles: while this is reasonable, I’d argue it’s best to use a specific library or service for this like <a href="https://launchdarkly.com/">LaunchDarkly</a>. But we’ll give it a begrudging 👍</li><li>Application-specific data: you’ll see that the application name is here. It’s really useful to have that for logging/monitoring. Perhaps even some framework-level code expects that setting. But this should be hard-coded 10 out of 10 times 👎</li><li>Settings for how the object runs: sometimes you want to choose a different algorithm for a key business process, or something similar. Honestly, just hard-code this. How often are you really updating this at run-time? 👎</li></ul><p>There are two issues at play here. Not only should changing and re-deploying the code be just as easy as pushing a commit, but if your app is deployed across multiple servers or in some serverless PaaS, <em>it’s actually harder to update the config file than it is to push new code</em>.</p><p>Configuration is state. In my experience the stateful aspect of applications is the hardest thing about running them in multiple environments. Your code is in one state, your config files are in another, and your database schema is in another. Hope they match! Applications don’t like not being able to find their config values, or running against a DB schema they’re not expecting. This means that your code is tightly coupled with your config/schema, and you need to make sure they are updated in lockstep. This means more sophisticated patterns (blue/green deployments, backward-compatible code) are required.</p><p>You know where all this is going: it means it’s probably best to minimize the number of independent pieces of <em>statefulness</em> in your system.</p><blockquote>You want to minimize the independent loci of state in your system.</blockquote><h3>In conclusion</h3><p>Configuration files are, to some extent, a relic of on-premise, server-based computing. In a modern web-based application, their use should be constrained as much as possible. The files are deployed with the code, and the data should be immediately <a href="https://medium.com/@shekelator/my-favorite-patterns-injected-configuration-5c0d94eb572b">converted to strongly-typed data</a> anyway, so why not just do it in the code?</p><h3>Further reading</h3><ul><li><a href="https://12factor.net/">The Twelve-Factor App</a></li><li><a href="https://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley">Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation</a></li><li><a href="https://www.amazon.com/DevOps-Handbook-World-Class-Reliability-Organizations-ebook">The DevOps Handbook:: How to Create World-Class Agility, Reliability, and Security in Technology Organizations</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2322ea2cd88b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My favorite patterns: Injected Configuration]]></title>
            <link>https://shekelator.medium.com/my-favorite-patterns-injected-configuration-5c0d94eb572b?source=rss-592e00ef6f8b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c0d94eb572b</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[dependency-injection]]></category>
            <dc:creator><![CDATA[Dave]]></dc:creator>
            <pubDate>Wed, 28 Nov 2018 03:13:40 GMT</pubDate>
            <atom:updated>2019-04-23T14:45:49.981Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*06TXljC2m5cAoc3D" /><figcaption>Photo by <a href="https://unsplash.com/@mpho_mojapelo?utm_source=medium&amp;utm_medium=referral">Mpho Mojapelo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When a developer gains experience, they will often gain a “sixth sense” about code. However, intuition is an inexact thing. As we’re getting feedback from our experience, it’s important to properly contextualize it so we are learning the proper lessons.</p><p>Because <em>“the repository pattern sucks”</em> actually means something different than <em>“I had a bad experience with the repository pattern because its constraints were a bad fit for what I was doing at the time.”</em></p><p>So I’m hoping to write a few quick pieces on some of the patterns I like (and maybe some on patterns I hate or have found limits to). First is one that I really like for server-based services.</p><h3>The problem</h3><p>So I made up the pattern name, “Injected Configuration.” Why has nobody mentioned it before? Probably because those who write pattern books consider it too obvious or something. But I think they should reconsider, because the vast majority of the software I’ve seen does a lot of this, even deep, deep down the dependency tree :</p><pre>// pseudocode alert!<br>var connectionString = ConfigurationManager.GetConfig(&quot;connString&quot;);<br>client.Connect(connectionString);</pre><p>Any .NET developer should be familiar with this kind of thing. This is all well and good, and works like a charm, but there are a few issues:</p><ol><li>It’s not very testable. Your unit tests either need to have a config file with a value in there, or a way to override that static class.</li><li>The dependency is hidden. Unless you see that line of code, you don’t realize that the class or module depends on some file being on disk.</li><li>What if it’s misconfigured, or missing from the config file? You won’t know until you hit this line of code and see failure.</li></ol><h3>The pattern</h3><p>So what do we do? The solution is dependent on another pattern, <a href="https://en.wikipedia.org/wiki/Inversion_of_control">inversion of control</a>. Ideally your web application or service, if it has more than one class dependency, uses something like constructor injection, perhaps along with a DI container, so <em>each class that has dependencies has them passed into it upon creation</em>.</p><blockquote><strong><em>The key idea of this pattern is to </em>treat configuration as a dependency<em>.</em></strong></blockquote><p>Just to be clear, <a href="https://www.hackerearth.com/practice/notes/samarthbhargav/a-design-pattern-for-configuration-management-in-python/">I didn’t invent this idea</a>. In fact, ASP.NET Core encodes some aspect of this idea <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-2.1">in its APIs</a>, calling it the Options Pattern. It really follows naturally from the principles that animate practices like IoC and TDD.</p><p>Let’s look at some code. Imagine the following class and method:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/687e268c40458906bf9e2088e31e264b/href">https://medium.com/media/687e268c40458906bf9e2088e31e264b/href</a></iframe><p>Now, you passed in your email provider, so that’s something that you can test. The dependency is visible, as it’s right there in the constructor. Very nice. <em>But what about that ConfigManager call? </em>Well, one obvious improvement is to pass in the ConfigManager as an interface. But let’s take this to the next level. Why not just pass in the configuration itself?</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/76a5e9f88909c73dbc1b53e3a6b79536/href">https://medium.com/media/76a5e9f88909c73dbc1b53e3a6b79536/href</a></iframe><p>You’ll notice a couple nice things. First, of course, the dependency on the configuration is explicit. Second, it’s strongly typed, which makes it easier to consume and prevents a whole class of errors. For example, fromAddress is a string, and the tooling will make that clear.</p><p>The object itself is simple, and might look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/300d3b1ea13a5b41950634c7d104291f/href">https://medium.com/media/300d3b1ea13a5b41950634c7d104291f/href</a></iframe><p>Of course, the real benefits come in when we want to make sure the configuration is valid. So we probably want something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/188a69c9a155481dfaee1744e4835f2a/href">https://medium.com/media/188a69c9a155481dfaee1744e4835f2a/href</a></iframe><p>How many times have you had your app running in a development environment just fine, but then it blows up in production because a config value is missing? Or worse, it doesn’t blow up, <em>it just doesn’t work properly and nobody notices until 600 customers haven’t gotten their emails???</em> I, for one, have been there, and would much prefer to know sooner than later.</p><p>In the spirit of <a href="https://en.wikipedia.org/wiki/Fail-fast">failing fast</a> (see the excellent <a href="https://www.amazon.com/Release-Design-Deploy-Production-Ready-Software/dp/1680502395/"><em>Release It!</em></a> by <a href="https://twitter.com/mtnygard">Mike Nygard</a> on this point), you probably don’t even want your application process to start successfully if the configuration is invalid in the target environment. Ideally this means your deployment/release fails gracefully and the users don’t even notice.</p><p>The key point here is that your application depends on a set of valid configuration data to behave properly. If our DTOs to hold data coming out of the database are strongly-typed and unit tested, why shouldn’t our configuration classes be?</p><p>And yes, I have written unit tests against configuration classes before.</p><blockquote>If our DTOs to hold data coming out of the database are strongly-typed and unit tested, why shouldn’t our configuration classes be?</blockquote><p>You probably have a set of key/value string pairs, either in an XML config file, or a JSON file, or stored securely by your cloud provider, and you need a simple function: keyValuePairs -&gt; ApplicationConfig where some values need to be checked for valid values (e.g. valid address, can be parsed into a boolean, etc.), and some combinations of missing values is fine, but others are not.</p><p>If you’re using a DI container, that’s certainly a nice way to make sure it gets into all the classes that need it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fcffe9f6d855bf5d85deb131ef6dcc7d/href">https://medium.com/media/fcffe9f6d855bf5d85deb131ef6dcc7d/href</a></iframe><p>So that’s it. Treat configuration as a dependency, make it strongly typed, unit-test the code that transforms it from its state at rest, and inject it where it’s needed. Your code is more testable and less likely to be missing necessary configuration at runtime.</p><p>Some recommendations for further reading:</p><ul><li><a href="https://www.manning.com/books/dependency-injection-principles-practices-patterns">Dependency Injection in .NET: Principles, Practices, Patterns</a> (Steven van Deursen and Mark Seemann)</li><li><a href="https://www.amazon.com/Release-Design-Deploy-Production-Ready-Software-ebook/dp/B079YWMY2V">Release It!: Design and Deploy Production-Ready Software</a> (Mike Nygard)</li></ul><h4><em>Update (2019–04–23)</em></h4><p>A reader was kind enough to point out an unfortunate omission in my description of this pattern. If you have an app is big enough to be non-trivial, you likely <strong><em>don’t want to have a single class for all the configuration in the application</em></strong>.</p><p>Instead, use multiple classes to get the appropriate separation of concerns between various parts of your system. Above I linked to Microsoft’s .NET Core&#39;s use of what they call the <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-2.2">Options Pattern</a> to support configuration, which enshrines this idea, which is just a special case of separation of concerns, or the <a href="https://hackernoon.com/interface-segregation-principle-bdf3f94f1d11">Interface Segregation Principle</a>.</p><p>Suffice it to say, it’s always a good idea to avoid coupling different parts of your system together if they won’t change together, or are not part of intersecting use cases.</p><p>So thanks to that reader for the correction! And no, <em>don’t use a single application-wide class for all configuration</em>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c0d94eb572b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transforming a software ecosystem]]></title>
            <link>https://shekelator.medium.com/transforming-a-software-ecosystem-6ff69d4961cb?source=rss-592e00ef6f8b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ff69d4961cb</guid>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Dave]]></dc:creator>
            <pubDate>Wed, 29 Aug 2018 14:44:18 GMT</pubDate>
            <atom:updated>2018-08-29T14:44:18.084Z</atom:updated>
            <content:encoded><![CDATA[<p>I was working for a company once that was aggressively working toward a <em>transformation</em>. There was a big capital expense budget for this transformation. Most of the company’s engineering and product resources were dedicated to this transformation (including myself).</p><p>Actually, I joined when it was already underway. Exciting, no? We were going to <em>modernize</em> our systems and <em>transform</em> the way we did business. There was tons of excitement around all things we could do with the data our <em>new systems</em> were going to give us access to. This is data we kind of already had, but it was locked in legacy systems, and apparently we couldn’t get it out.</p><p>These legacy systems were the core of the problem statement that engendered the transformation. They were brittle, difficult to change, we didn’t really know how they worked anymore, and there was tons of duplication.</p><p>So, obviously, we needed <em>transformation! </em>So millions of dollars were set aside for this. For future reference, let’s call it <strong>Operation Powerade</strong>.</p><h3>But, what is it?</h3><p>I’ve been around the block. Being a software engineer, I understand deeply the frustration of working with old systems, and the temptation to believe you can just start from scratch and be better off. <a href="https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/">Joel Spolsky</a> was the first that I know of to reckon with the problems of “the big rewrite.” But it <a href="https://signalvnoise.com/posts/3856-the-big-rewrite-revisited">can be done well</a>, provided you <a href="https://timross.wordpress.com/2010/03/15/if-you-must-rewrite/">approach it the right way</a>.</p><p>So, assuming that we were correct in thinking that replacing our systems was both <em>necessary</em> and <em>feasible </em>(let’s assume both for now), one question still remains for me: <strong><em>why won’t we be doing this again in ten years</em></strong><em>?</em> Are these millions of dollars still worth it if we don’t get more than a few years of use from these new systems?</p><p>Or, put another way, are we just rebuilding the same inflexible systems?</p><h3>The rewrite cycle</h3><p>Though most experienced developers probably get this, I first heard it from <a href="http://udidahan.com/?blog=true">Udi Dahan</a> how common this cycle is. It goes like this:</p><ul><li>An organization builds a software system</li><li>Over time the system becoming unmaintainable — to the point that the organizations believe a rewrite is not only desirable but necessary</li><li>The system is rewritten</li><li>In the best case, project actually succeeds, and the old system is retired; though often the old system lives in parallel with the newer systems, more-or-less in perpetuity</li><li>Before long, the <em>new</em> system becomes treated as a “legacy” system; its tech stack goes out of date; institutional knowledge about how to maintain it dissipates; budget and will to keep it updated disappears</li><li>The cycle repeats…we need to rewrite this and build a new system!</li></ul><p>Ok. So we rewrite every 10 years. Is that so bad? Well, I’m pretty sure our executives weren’t planning to lay out this kind of money that often. Though, maybe they don’t care. But I care!</p><p>But the real reason to avoid this cycle is because <strong><em>rewrites are risky and expensive compared to iterative development</em></strong>. I won’t go ahead and rehash Agile, Lean, Continuous Delivery, and TDD, but they all are based on this principle: <em>iterative development where customers are continually seeing value and changes are being integrated is cheaper and carries far less risk</em>.</p><p>Or, as Jez Humble <a href="https://continuousdelivery.com/principles/">puts it</a>, “work in small batches.” If the new, magical, System to Fix All Systems(tm) is able to integrate small, iterative changes, <strong><em>we might not need that future v3 rewrite in 10 years</em></strong>. Or if we do, it will carry much less risk and provide more value.</p><p>With me so far?</p><h3>What’s different this time?</h3><p>So, we are doing a rewrite. Fine. But can we make this rewrite that last time we have to do this? <strong><em>What makes this transformation different from the last time?</em></strong> Why is Operation Powerade going to result in anything more than tomorrow’s legacy systems that need rewrites?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/0*wmEKEh88BAym-BLN.jpg" /></figure><p>Let’s consider some possibilities.</p><h3>The tech stack is newer</h3><p>No. Bullshit. Poppycock. The technology is always changing, and this “new” tech stack will be considered new for two years <em>at the most</em>. This one isn’t even worth discussing. If your new platform doesn’t consider plugging in completely different technologies in the future, so that future components/services can interop and evolve alongside the existing ones, you will be screwed.</p><p>As a side note, it’s worth pointing out that a benefit of building a message-driven microservice architecture is that you can <em>evolve individual services independently</em>, introducing new technology where it makes sense, instead of being forced to update your whole ecosystem in lock-step (credit to <a href="http://blog.jessitron.com/">Jessica Kerr</a> for this idea).</p><p>This is very powerful, because if you need to update you entire software ecosystem, you are spending just as much money on the stable, low-value parts as on the volatile, high-value parts that need the love. <em>Independent evolvability</em> (which is a characteristic of a microservices implementation done right) means that you can apply your transformation selectively, to the parts of the business that <em>need it</em> (independent evolvability can also be called <a href="http://www.ntcoding.co.uk/speaking/talks/strategic-domain-driven-design">investment flexibility</a>).</p><p>Ok, so if the tech stack isn’t what makes <em>this</em> transformation different from previous ones, what is it? Let’s look at other options.</p><h3>We will build it better this time</h3><p>At first glance, this one smacks of hubris and self-deception. It’s begging for an eye-roll. Sure, we think we are more sophisticated than the previous set of engineers who built the system. Maybe even some of them are still around and think so to.</p><p>But let’s not dismiss it too quickly. Maybe I’m a wide-eyed optimist at heart (<em>spoiler alert: I’m not</em>), but I do think it is possible that systems can be built to last. Of course, for Operation Powerade, which employs scores of people across many teams, it won’t work if only a couple teams build better software. The key practices and architectural decisions that make it “better” have to be consistently applied. Note that this doesn’t mean the architecture needs to be monolithic, or that consistency needs to be applied everywhere, but <strong><em>there should be buy-in and enforcement of the patterns and practices that make the system flexible and evolvable</em></strong>.</p><p>So what are these patterns and practices? Well, I have some opinions on this! First, here’s what doesn’t matter:</p><ul><li>Certain design patterns, like n-tier architecture, that may be appropriate for some services more than others</li><li>The work-tracking system (e.g. Jira, or post-it notes, etc.)</li><li>How individual teams are working, e.g. scrum vs. kanban</li><li>Almost anything tech-related: the data store the team is using (relational vs. graph vs. document), whether it’s in the cloud or on-premise, the tech stack</li></ul><p>So what is the <strong><em>differentiator</em></strong> for Operation Powerade? What specific things might make this transformation stick?</p><h3>Here’s what I think matters</h3><p>While there’s no silver bullet, here are three things I think can make a decisive difference, allowing a transformation to survive for the long term:</p><ul><li>Software teams aligned with business capabilities</li><li>Team independence → service/component independence (i.e. don’t be obsessed with reuse)</li><li>Well-understood contracts between services</li></ul><p>There are so many things that an organization should do well that are <em>not </em>included here: TDD, observability, everything Janelle Klein talks about in her talk on <a href="https://www.youtube.com/watch?v=Pg-rMohhOfI">How to Break the Software Rewrite Cycle</a> (<a href="https://www.slideshare.net/JanelleKlein1/how-to-break-the-software-rewrite-cycle">slides</a>), the (excellent) <a href="https://continuousdelivery.com/principles/">principles of Continuous Delivery</a>. So how can we leave these things out? Because while they may make or break a team or service, with proper boundaries in place the organization as a whole can survive the failure of one team.</p><p>As <a href="https://twitter.com/imjacobclark/status/610784232030490624">has been stated</a> by many others, microservices should be built <strong>for replacement, not reuse</strong> (this hearkens back to the aforementioned benefits of independent evolvability).</p><p>The main objection to this is that we’re leaving money on the table for any components we can reuse. Developers in particular are conditioned to love reuse. Executives think that reuse will save future $$. But it depends on what we want for our system, reuse (i.e. the minimizing of wasted effort) or flexibility (i.e. support future change)? As Jessica Kerr <a href="http://blog.jessitron.com/2017/02/reuse.html">writes</a>, “<em>Reuse is the enemy of change.</em>”</p><p>It’s important to recognize that when you optimize for one thing, you necessarily de-optimize for something else. <strong><em>You can’t simultaneously optimize for flexibility and reuse</em></strong>.</p><p>Each of these “differentiators” probably deserve their own blog post, so I won’t belabor them all here. <strong><em>Suffice it to say that they won’t have any effect unless you can really bake them in to the culture of the organization.</em></strong></p><p>So make sure that a few of these things are well-understood by the tech leadership and effectively communicated to team members (across disciplines). That’s really hard to do! This is why you only want a few of these core values. Add in shared agreement on TDD, DDD, code standards, approved tools, shared services, and you will dilute focus on communicating the big picture of how teams and services should interact.</p><p>Next I’ll post on the first bullet point above, and think a bit on aligning software teams with business teams and capabilities.</p><h3>Links</h3><ul><li>Janelle Klein on <a href="https://www.youtube.com/watch?v=Pg-rMohhOfI">How to Break the Software Rewrite Cycle</a> (<a href="https://www.slideshare.net/JanelleKlein1/how-to-break-the-software-rewrite-cycle">slides</a>)</li><li><a href="https://www.slideshare.net/JanelleKlein1/how-to-break-the-software-rewrite-cycle/15">“A description of the goal is not a strategy”</a>- Richard P. Rumelt</li><li><a href="http://blog.jessitron.com/2017/02/reuse.html">Why to be careful with reuse</a> (Jessica Kerr)</li><li><a href="https://plus.google.com/+RipRowan/posts/eVeouesvaVX">Steve Yegge on Jeff Bezos’ edict and building platforms</a></li><li>Fagner Brack on <a href="https://hackernoon.com/how-to-prevent-falling-in-the-trap-of-the-next-big-project-618fe7cc4ce9">How To Prevent Falling In the Trap Of The “Next Big Project”</a></li><li><a href="http://www.ntcoding.co.uk/">Nick Tune’s site</a> (with various good links)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ff69d4961cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to influence people and (maybe) make friends]]></title>
            <link>https://shekelator.medium.com/how-to-influence-people-and-maybe-make-friends-c4b39e7bb805?source=rss-592e00ef6f8b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4b39e7bb805</guid>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[mussar]]></category>
            <dc:creator><![CDATA[Dave]]></dc:creator>
            <pubDate>Thu, 22 Mar 2018 20:03:08 GMT</pubDate>
            <atom:updated>2020-11-15T21:33:30.529Z</atom:updated>
            <content:encoded><![CDATA[<h4>(hint: listen)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*916pRvcWfHWIos-N" /><figcaption>Photo by <a href="https://unsplash.com/@iamchang?utm_source=medium&amp;utm_medium=referral">Chang Duong</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>So I love <a href="https://medium.com/@skamille/stop-answering-your-own-questions-52d39fe7d3e6">this post</a>, “Stop Answering Your Own Questions: An episode of bad management habits,” by <a href="https://medium.com/@skamille">Camille Fournier</a> (and <a href="https://twitter.com/skamille">on Twitter</a>). In it, she catches herself stating an opinion thinly veiled as a question for clarification.</p><blockquote>This is one of my bad management habits. I jump to conclusions. I pretend to ask a question but then make it clear that only one answer can be right.</blockquote><p>As a Highly-Opinionated Engineer™ myself, this is a trap I am familiar with. I have a paradigm and a language for describing it, a set of patterns that I think are great, as well as a set of “anti-patterns” that are — in my maybe-not-so-humble-opinion — deeply problematic (i.e. lead to the pit of hell). With these opinions in hand, I’m constantly on the lookout for challengers, those who would undermine my quest to lead the organization to future glory through maintainable, robust, elegant code-oriented solutions and perfectly-optimized team structures.</p><p>Except.</p><p>Except that when I detect somebody who’s “doing it wrong”…there are a few problems with going ahead and just telling them so right off the bat. It turns out sometimes people don’t always react well to the “let me fix your stupidity” vibe. Oh, and the fact that <strong><em>you haven’t taken the time to ensure you understand what they’re really saying, or the context around it</em></strong><em>.</em></p><p>But there’s a deeper reason to avoid doing this. I can’t say it better than Fournier does:</p><blockquote>By stating my preference up-front I cut off discussion. What’s worse, I make the receiver unlikely to honestly answer my question; unless, that is, they feel up to the task of debating me.</blockquote><p>For better or worse, I’m pretty good at debating, and I don’t mind doing it. <em>Apparently</em> some people (read: almost everyone?) don’t like it and avoid confrontation. Also, in the context of a conversation, they may not be able to marshal all the pertinent points. So by jumping in early I’m short-circuiting discussion and increasing the likelihood that we will make a bad decision in this case,<em> even though in most circumstances my initial instinct may be correct</em>.</p><p>Well that’s bad. Thus,</p><blockquote>If you are (or were) a highly opinionated engineer, practicing making space for information rather than quickly jumping in and sharing your conclusions is a must for leadership growth.</blockquote><h3>Listening</h3><p>So learn how to listen. Ok, that’s helpful. I can do that. As it turns out, I have been reading Jordan Peterson’s <a href="https://w.amazon.com/12-Rules-Life-Antidote-Chaos/dp/0345816021"><em>12 Rules For Life: An Antidote to Chaos</em></a>. He has a chapter on listening in which he quotes the psychotherapist <a href="https://en.wikipedia.org/wiki/Carl_Rogers">Carl Rogers</a>:</p><blockquote>The great majority of us cannot listen; we find ourselves compelled to evaluate, because listening is too dangerous. The first requirement is courage, and we do not always have it.</blockquote><p>Peterson argues that most “listening” is an exercise in fitting the other person’s words into your own mental model, or even <em>actively looking</em> for conclusions to jump to. Or we prematurely guess what they are saying and spend the rest of the time formulating our response, instead of really listening. Rogers recommends a simple trick:</p><blockquote>Stop the discussion or a moment, and institute this rule: “Each person can speak up for himself only after he has restated the ideas and feelings of the previous speaker accurately, and to that speaker’s satisfaction.</blockquote><p>Peterson describes listening as an active attempt to <em>shift your own paradigm</em> to match your that of the person you’re listening to. From this perspective, listening is an amazing feat of mental gymnastics, <em>an act of imagination</em>. You step outside yourself, into the alternate universe of the other’s reality, and try to understand it deeply.</p><p>Then, feel free to talk.</p><p>As Fournier points out,</p><blockquote>Making good decisions requires you to get as much information as possible, to understand the nuances of the scenario from all angles.</blockquote><p>Put that way, it seems so obvious, right?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4b39e7bb805" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>