<?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 Troy Leland Shields on Medium]]></title>
        <description><![CDATA[Stories by Troy Leland Shields on Medium]]></description>
        <link>https://medium.com/@troylelandshields?source=rss-8a75a6b24473------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*vpOGVllCLLonWVFs.jpg</url>
            <title>Stories by Troy Leland Shields on Medium</title>
            <link>https://medium.com/@troylelandshields?source=rss-8a75a6b24473------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 19:46:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@troylelandshields/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[Republicans, take this Strategic Loss and Vote for Biden]]></title>
            <link>https://medium.com/@troylelandshields/republicans-take-this-strategic-loss-and-vote-for-biden-99664d7c0a93?source=rss-8a75a6b24473------2</link>
            <guid isPermaLink="false">https://medium.com/p/99664d7c0a93</guid>
            <category><![CDATA[united-states]]></category>
            <category><![CDATA[trump]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[elections]]></category>
            <dc:creator><![CDATA[Troy Leland Shields]]></dc:creator>
            <pubDate>Wed, 21 Oct 2020 00:07:50 GMT</pubDate>
            <atom:updated>2020-10-21T00:07:50.632Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*XwaE5krcKRCqm-VN.jpeg" /></figure><p>Recently, a family discussion about the presidential election led to the comment that “everyone can vote for whomever they feel right about; the reality is anyone who votes for Trump is voting for the agenda, not the man, and anyone voting for Biden is voting for that agenda, not the man.”</p><p>It is a completely earnest perspective to have: individual politicians are fungible and voters use their voice to support the platform that speaks to them. A Republican who may not love Donald Trump’s “quirks” need not fret or fray over his idiosyncrasies since their vote is in support of the broader agenda, which is much bigger than any one man. <em>They should cast their vote in a way that furthers the party’s platform in spite of any individual politician that may be the current voice.</em></p><p>Assuming this to be true, how should the Republican vote in this year’s election?</p><p>It is my argument that four more years of Donald Trump will do far more harm to the Republican Party and the conservative agenda than a Biden presidency over the same time period.</p><p>It is a fact that at some point in the future the Republican Party is going to lose an election for the presidency. It might not happen this year, and perhaps not in another 4 years, but history has shown this pendulum will swing back at some point towards the Democratic Party. If a political party <em>has</em> to lose elections at some point then its voters should aim to have <em>strategic</em> losses when they can.</p><p>It is also a fact that public policy is mercurial. Any short-term wins in laws that might happen during the candidate’s incumbency are (nearly) completely meaningless, as when the pendulum swings back the other party may decide to dispel those victories entirely. However, if the ideology behind the public policy gains enough supporters, over a long enough time period, then real change can actually be effected on a permanent timeframe.</p><p>Finally, it is a fact that Donald Trump is a <a href="https://www.cbsnews.com/pictures/us-presidents-most-divisive-polarizing/41/">divisive</a> and polarizing politician. President Trump, almost incredibly, <a href="https://projects.fivethirtyeight.com/trump-approval-ratings/"><em>started </em>his presidency with an approval rating below 50%</a>. The number of undecided opinions on Trump’s approval started and has remained very low when compared to past presidents, as seen in the <a href="https://en.wikipedia.org/wiki/United_States_presidential_approval_rating">chart below</a>. It seems most Americans decided before he even became president whether or not Trump is a hero or a villain, and those opinions have been remarkably stable throughout his tenure. Bottom line, Trump has not successfully used his time to win over more hearts and minds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*93HejtQBAYfRsG4J.png" /><figcaption>Green approves of Trump; Red disapproves; Yellow can’t decide. (despite being democratically elected, <a href="https://news.gallup.com/poll/203198/presidential-approval-ratings-donald-trump.aspx">Trump has never had an approval rating higher than 49%)</a></figcaption></figure><p>Given these three truths, if one truly believes that conservative ideology as advocated for by the Republican Party is the best path forward in America then there is only one candidate worth voting for in this presidential election: Joe Biden, the Democrat.</p><p>If one is voting for “the platform” in spite of the actual politician that is running, then that voter needs to optimize their vote for what will do the most good (and least damage) to their platform’s future in the public discourse. In other words, which candidate is going to be a better ambassador for their cause to the future voters of our country?</p><p>Will future voters smile kindly on Donald Trump and those that were associated with him? Is the Republican brand helped more than it is hindered by four more years of Trump?</p><p>While the average Trump supporter may feel that the “mainstream media” is unjustly vilifying the man, a huge population of Americans are experiencing his presidency through this lens (as will history). Whether it be fair or unfair — true or untrue — there is widespread <em>perception</em> that Trump is a <a href="https://en.wikipedia.org/wiki/Donald_Trump_sexual_misconduct_allegations">philandering</a>, <a href="http://President Trump has made more than 20000 false or misleadingwww.washingtonpost.com › politics › 2020/07/13 › pre...">lying</a>, <a href="https://www.reddit.com/r/TrumpCriticizesTrump/">hypocritical</a>, <a href="https://www.nytimes.com/interactive/2020/09/27/us/donald-trump-taxes.html">tax-evading “billionaire”</a> <a href="https://www.youtube.com/watch?v=qIHhB1ZMV_o">white supremacist</a> who <a href="https://www.vox.com/2020/2/5/21125118/mitt-romney-impeachment-vote-history">cheated in the election</a>, <a href="https://www.theatlantic.com/politics/archive/2020/09/trump-americans-who-died-at-war-are-losers-and-suckers/615997/">disparaged US service members</a>, <a href="https://www.bbc.com/news/election-us-2020-54248080">botched the pandemic response</a>, and <a href="https://trumpgolfcount.com/">golfs more than Obama (always at his own resorts)</a>. That <em>perception</em> is a reality that Trump and his supporters have to deal with in today’s political climate, regardless of its “fairness.”</p><p><a href="https://www.pewresearch.org/politics/2018/03/20/1-trends-in-party-affiliation-among-demographic-groups/">Pew Research Center states</a> that “Republicans hold wide advantages in party identification among several groups of voters, including white men without a college degree, people living in rural communities in the South and those who frequently attend religious services.” Given that more and more people <a href="https://educationdata.org/number-of-college-graduates#:~:text=Among%20both%204-year%20private,bachelor&#39;s%20degrees%20in%20the%20US.">graduate from college</a>, <a href="https://www.pewsocialtrends.org/2018/05/22/demographic-and-economic-trends-in-urban-suburban-and-rural-communities/">move to suburban and urban areas</a>, and <a href="https://news.gallup.com/poll/248837/church-membership-down-sharply-past-two-decades.aspx">are dropping their church memberships</a> every year, these demographics aren’t exactly a bastion of hope for the Republican Party’s future. It appears that the GOP is currently most attractive to groups of people that are shrinking.</p><p>While Trump may have broad support from Republicans like those in the demographics above, he has a perception problem with other Americans that make him extremely distasteful as a candidate. As Trump’s brand has become intertwined with the Republican party it seems reasonable that some of that distaste will transfer to the party’s platform, especially in areas that seem so historically inconsistent with Trumpism (<a href="https://www.theatlantic.com/ideas/archive/2020/01/there-no-christian-case-trump/605785/">looking at you “Christian values</a>”).</p><p>It is my opinion that many moderate voters were turned off by Donald Trump almost immediately, and have been further turned off by the Republican acceptance of Donald Trump, to the point that they may never take another Republican presidential candidate seriously again. If this marriage of Republicanism and Trumpism happens for another 4 years, it will only serve to cement this effect even more. Trump does <em>nothing</em> to broaden a shrinking base; but he’s extremely effective at alienating party outsiders.</p><p>While it’s a nice idea for a voter to be able to claim they are voting for an agenda rather than the candidate, Trump comes with a lot more baggage than just the Republican party’s policy platform. A vote for Trump is an endorsement for his brand of politics and morality, which many people find off-putting. However, if it helps him win an election then it further validates that Trump exhibits behavior that Americans find acceptable, even attractive.</p><p>Senator Romney recognized this recently when he criticized Trump by saying “<a href="https://www.theguardian.com/us-news/2020/oct/13/mitt-romney-abject-horror-us-politics-trump-biden">the world is watching with abject horror</a>.” We already see it in the way politicians respond to Trump by matching his tone, <a href="https://www.reuters.com/article/us-usa-election-debate-insults/this-clown-nothing-smart-about-you-un-presidential-insults-fly-in-first-trump-biden-debate-idUSKBN26L0R8">such as when Biden called him a clown in debate</a>. If he wins again, Trumpian politics and behavior may define our country for years to come, precisely because we supported that part of his agenda.</p><p>Republicans, take the strategic loss and say no to Trump and his antics. I truly believe that history will show that a Biden presidency will do more good for your party in the long run. (Besides, Biden is of an age where a re-election campaign in 4 years seems like a stretch. Hopefully, we’ll all get some fresh candidates by then).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99664d7c0a93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking up with a Monolith]]></title>
            <link>https://medium.com/weave-lab/breaking-up-with-a-monolith-4762622880c9?source=rss-8a75a6b24473------2</link>
            <guid isPermaLink="false">https://medium.com/p/4762622880c9</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Troy Leland Shields]]></dc:creator>
            <pubDate>Fri, 08 Mar 2019 16:36:29 GMT</pubDate>
            <atom:updated>2019-03-08T16:36:29.301Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*KrrOcR48bsOghYl5JFKDEg.jpeg" /></figure><h3>Lesson 0: When is it time to call it quits?</h3><p>Microservices are all the rage. It’s easy to get swept up in the excitement and decide that some state-of-the-art, industry “best” practice is right for your company simply because there are so many blog posts about how it worked for Netflix or Weave or whatever. This alone turns out <em>not </em>to be a good reason to do something.</p><p>If you are neither rapidly scaling your customer base nor rapidly scaling your engineering team, then you should think twice before rapidly scaling the complexity of your system by chopping it up into more services.</p><p>That being said, there <em>are many </em>good reasons to refactor a monolith into microservices. Taking periodic inventory of your existing services to make sure you are prepared to meet your company’s needs is well-advised.</p><p>Just because your company uses Kubernetes or has many backend projects (each with nice short descriptions in their <em>README.md) </em>does <em>not </em>mean you are free from any hidden monoliths waiting to cause issues for your development efforts. And what might be micro-enough today might need a chisel and hammer tomorrow as you experience growth and product changes.</p><p>So how do you know when you have a monolith that needs to be divided asunder?</p><p>It might be time for some rearchitecting if one of your services has some of the following qualities:</p><ol><li>No clear owner; or many teams care about it and touch it</li><li>A myriad of external dependencies or a plethora of upstream dependents</li><li>Cannot run multiple instances of it (because it is stateful, etc.)</li><li>Difficult to test certain aspects of it</li><li>Deployment makes you ask coworkers to pray for you (even for small changes)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hM7LpZWQW9qlbKBmMnqZWw.png" /><figcaption>Bold move to deploy at 4:54 PM.</figcaption></figure><h3>Breaking up at Weave</h3><p>Sometime in 2017 our fearless CTO, Clint Berry, admonished each development team to make sure that their products and services would be able to scale to 4x Weave’s customer base by 2019, with no service interruptions.</p><p>I took stock of the projects for which we were responsible and found one crucial service that would likely not survive Weave’s growth in 2018.</p><p>Weave is an integrated-communications platform for small businesses (such as dentists), and one of our main selling points is automated messaging (e.g., appointment reminders). The service I was worried about was in charge of scheduling and sending all automated communications, including everything from texts for appointments to emails for birthdays.</p><p>At first glance, this service would not necessarily seem to be monolithic in nature. For one, it had a nice, succinct job description: “schedule and send automated messages.” It didn’t even actually <em>deliver </em>any text messages or emails, it passed them off to other micro-services to do that.</p><p>However, there were several red-flags with this service. It executed several batch jobs which meant it was not horizontally scalable. Testing even small changes to the service was difficult and complex. It “knew too much” by having a lot of external dependencies. And finally, deploying this service absolutely made me nervous — sometimes requiring a developer to wake up at 3:00 AM just to verify that everything was working alright.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*5D-VPP2cdtujPHPDOPOFTw.png" /></figure><p>The service had worked wonderfully up until now, but it was time to break it apart or suffer many stressful days in the coming year.</p><h3><strong>Lesson 1: Someone needs to own the migration</strong></h3><p>Migrating from a monolith to microservices is likely to be a non-trivial task that gets underestimated by everyone involved. There needs to be one designated person to fight for the work to be prioritized against user stories that more obviously drive value for the business.</p><p>It would have been a mistake to assume that our monolith would organically spawn into well-designed microservices through the magic of good intentions.</p><p>In reality we were committing to complete several smaller migrations. These migrations took many months (and in some cases are literally still happening today, more than a year later). We created a plan and moved pieces out one at a time, as it made sense.</p><p>It doesn’t need to become everyone’s top priority to get this migration done immediately; but it does need to be <em>someone’s</em> <em>priority</em> to ensure that forward progress is always being maintained and balanced against other business needs.</p><h3>Lesson 2: Make it easy</h3><h4>Provisioning, Deployment, &amp; Databases</h4><p>As of a few years ago, all of Weave’s backend services were running on VMs. Creating a new microservice would require some back and forth between dev and Ops to provision a new VM with the necessary dependencies. Deploying services was a bit of a pain — rolling back even more so. As a result, Weave had maybe a dozen services.</p><p>I wouldn’t recommend getting too serious about migrating to a microservices architecture until developers can easily provision their own compute resources for a service, can deploy safely without complication, and can store their own data somewhere safe and replicated.</p><p>Kubernetes solves most of those issues for Weave and makes life really easy when we need to create a new service as part of a migration.</p><h4>Isolate, Separate, Refactor, Rewrite</h4><p>As we were breaking up with our monolith we were tempted to take the opportunity to do a complete rewrite of all business logic from the ground up.</p><p>While there are bound to be cases where this is the right course of action, we generally opted to hold off any major changes until after we had instituted new microservices and migrated all traffic to them. There were enough changes with the migration itself that we didn’t want to complicate matters more than we had to.</p><p>Our migration process was to first logically isolate pieces of the monolith that should be moved into their own service. This sometimes meant doing a little refactoring in the monolith as a preparation to the actual migration.</p><p>From there, we physically separated that functionality into its own service (often just copying and pasting the code). Then we slowly migrated customers to use the new microservice.</p><p>Once we were confident the microservice was functioning as intended, we were free to refactor or rewrite as necessary. The migration really was not complete until we had gone back and done this step, but we waited until we were comfortable that the migration was going smoothly before making any big changes to business logic.</p><h4>Tracing</h4><p>As the number of our services grows at Weave, the difficulty to debug issues grows as well. Pinpointing a failure is difficult when a request might depend on a handful of services for a response. Which service screwed up?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g5osKcWWboAzL5sn4uTKNg.png" /><figcaption>Science.</figcaption></figure><p>Request-tracing (using a tool like <a href="https://www.jaegertracing.io/">Jaeger</a>) <em>drastically</em> improves our ability to investigate and test our microservices. We can see a request in its entirety rather than just in a local context. Jaeger is one of the single greatest tools that Weave has for its developers. Traditional logs pale in comparison.</p><p>I would hate to work in a microservices architecture without some type of tracing available to help deal with the complexity of a distributed system. <em>I know that tracing is true.</em></p><h3>Lesson 3: Know when you succeed</h3><p>A migration from a monolith to microservices might seem simple, but it can be fraught with issues.</p><p>Think about it: you are expecting your current developers to completely rearchitect all the legacy work that your past developers created. There’s a level of intimate knowledge required that may have left your company years ago.</p><p>Sure, in many cases the migration might be as simple as copying and pasting from here to there, but surprises will most definitely come up. Because of these unknowns, it is important to know when your migration is succeeding and can move forward, and when it is failing and needs to move backward.</p><p>This means that your migration towards a microservices architecture for any given monolith needs to start long before you create clean and sparkly microservice repos.</p><h4>Tests &amp; Test Plans</h4><p>Since we decided not to do any major refactoring we were able to port all of our unit tests into the new services we created, giving us confidence that we hadn’t made any major blunders. This, of course, required that we had tests in-place to start with. Unit tests are a boon to safe deploys, so if a particularly hairy piece of code was missing tests then we would often write them into the monolith before starting a migration.</p><p>Integration tests depend less on implementation and will verify more of the behavior of the refactored system, so those would have been even better. Unfortunately integration tests are a lot like unicorns: completely fictional.</p><p>Without automated integration tests we had to resort to manually testing as we migrated code to microservices. This was unfortunate and difficult, but still helped us track towards success.</p><h4>Metrics</h4><p>Another critical tool for tracking success was our ability to collect metrics using <a href="https://prometheus.io/">Prometheus</a> and <a href="https://graphiteapp.org/">Graphite</a>. As we migrated customers we relied on our metrics to know that nothing major or unexpected had changed. Just as a unit test will verify that some actual result matches an expected outcome for a single function, metrics can accomplish the same for your entire system.</p><p>In order for this to be effective, we had to (1) have metrics in the first place and (2) be cognizant that our new metrics would be comparable in a useful way to our existing metrics. Note that in this case having <em>correct </em>metrics is actually less important than having <em>comparable </em>metrics.</p><p>Unfortunately, this is a trailing indicator of any problems that might be occurring, but we still derived confidence from our metrics as we rolled changes out to more and more customers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*npXVJV6muIWxY05-SYqmiw.png" /></figure><h3>Lesson 4: Take appropriate risks and always have a rollback plan</h3><p>Deploying is inherently risky — even for a small, seemingly obvious change — even when the code has great test coverage.</p><p>Refactoring a monolith into microservices is especially risky because there are large swaths of changes happening at one time, often involving legacy code that current developers may not fully understand.</p><p>The good news is that it is generally possible to leave the original monolith largely untouched and in-place until you are ready to swing some traffic to the shiny new microservices. Your monolith can continue doing its job while you work behind the scenes to cut its legs out from under it.</p><p>Eventually, after you’ve written, tested, and deployed your new microservices you are going to have to take the plunge and do the risky thing: put live traffic on it.</p><p>Assess the level of risk you’re willing to take to determine the best strategy forward, and balance that against how feasible each of those strategies is to implement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wf2XIzCElYr6liKYc97IjQ.png" /></figure><p>Part of assessing each of these strategies requires considering the roll-back process should something go wrong. As discussed previously, it’s extremely important to know when you’ve succeeded, and it is just as important to be able to reverse course when you’ve realized something has failed. If ever you find your team suggesting to “<a href="https://en.wikipedia.org/wiki/Hern%C3%A1n_Cort%C3%A9s#Destroying_the_Ships">burn the ships</a>” in reference to a migration then I’d recommend finding a less risky approach.</p><p>As our team worked to refactor the automated-messages monolith we considered all of the following strategies in some form or another.</p><h4>Move all traffic</h4><p>For our particular problem, moving all of the traffic through the new microservices would have been easy, but came with a lot of risk. If something went wrong and we sent the incorrect appointment reminders there would be a permanent record in the form of SMSs that proved how bad we had screwed up. (For example, if thousands of the appointment reminders got sent at 4:30 AM then that would be less than ideal — good thing that never happened 😬 🤦‍♂️).</p><p>Had we been dealing with a simple CRUD application we may have just deployed it one evening for a few minutes to see if it worked out. The rollback strategy in that case is simple: if it doesn’t work then swing traffic back to the monolith.</p><h4>Load-balance a fraction of the traffic</h4><p>This approach may have worked, but there were two issues with it. For one, Weave didn’t necessarily have a framework for accomplishing this easily between our services. (We communicate using gRPC, and load-balancing has been a bit of an after thought). Furthermore, we needed more control over which requests would use the new services so that we could track success on a per-customer basis rather than leaving it to random chance for each request.</p><h4>Feature Flags</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*eJjcTfX0fhHooQAGEBKquQ.png" /></figure><p>Our team leveraged <a href="https://martinfowler.com/articles/feature-toggles.html">feature flags (or toggles)</a> very easily because Weave already had a framework in-place for beta testing. We were able to turn on a feature flag that routed a specific customer’s traffic through the new services, giving us confidence that we could move forward safely with more and more customers, but still rollback easily if there were any negative results.</p><h4>Shadow Reads</h4><p>The last strategy we considered is to implement <a href="https://medium.com/netflix-techblog/netflix-queue-data-migration-for-a-high-volume-web-application-76cb64272198">shadow reads</a> for data. The idea is to use both the trusted, legacy monolith and the rearchitected microservices to service a request, then to compare the results to make sure the new services are working correctly. If there is anything unexpected, we log the error and use the legacy’s “calculation” as the truth instead.</p><p>The rollback strategy is baked right into the code. We can test our entire customer base at once (instead of the slow-roll required by feature flags). The downside is that is that implementing this is more work and therefore comes with more inherent risk.</p><p>We used this strategy effectively a few times, but generally opted to maintain more control by using feature flags.</p><h3>Lesson 5: Avoid overcorrecting</h3><p>I mentioned that Weave used to deploy services on VMs, but we made life easier by switching to Kubernetes. This has made spinning up a new service so easy that Weave’s devs will do it on a whim — hence why we now have hundreds of services to monitor and maintain. We may have made it a little <em>too easy.</em></p><p>While I would largely defend where Weave is settling with its microservice architecture, there is always a risk of over-correcting from your monolith and ending up with more services than is prudent. If you’re not careful, a simple change like adding a field to some data model might require 6–10 pull requests to various projects. Plus, each new service adds complexity for all new developers who come to your company.</p><p>I think this is a lesson Weave is still learning, and we will see how it plays out. It’s probably important to realize, however, that it’s OK if you break apart a monolith and end up with 3 smaller, more well-defined monoliths; that just might be a better approach for your company than 25 truly nano-services.</p><h3>Lesson 6: Clean up after yourself</h3><p>The last lesson is an important one: the migration is not complete until you clean up after yourself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*YflwM2k7VUVdNqfGFQA-mA.png" /></figure><p>I mentioned that our migration for the automated messaging service at Weave took place over the course of many months. So, as the number of microservices grew, the codebase of the original monolith (supposedly) shrank.</p><p>Unfortunately, I wasn’t always as diligent at cleaning up after myself as I should have been, which often lead to confusion. Other team members or myself sometimes found it difficult to debug an issue when the same or similar code seems to exist in two places.</p><p>In at least one situation, a new developer on my team did a couple of days worth of work on code that had been dead for about a month. I had to confess that I had never gotten around to deleting the old code and therefore caused the confusion.</p><p>We learned some lessons the hard way, but overall we had a good experience smashing some monoliths at Weave into more maintainable microservices.</p><p><a href="https://www.youtube.com/watch?v=DdCYMvaUcrA">Please clap.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4762622880c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weave-lab/breaking-up-with-a-monolith-4762622880c9">Breaking up with a Monolith</a> was originally published in <a href="https://medium.com/weave-lab">Weave Lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Twilio Studio for Dummies (Like Me)]]></title>
            <link>https://medium.com/weave-lab/twilio-studio-for-dummies-like-me-f4105d446a27?source=rss-8a75a6b24473------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4105d446a27</guid>
            <category><![CDATA[messaging]]></category>
            <category><![CDATA[twilio]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Troy Leland Shields]]></dc:creator>
            <pubDate>Fri, 15 Feb 2019 19:41:05 GMT</pubDate>
            <atom:updated>2019-02-15T19:52:36.591Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nPn0hFwTcKOT4A5i4ApIRg.png" /></figure><p>We love Twilio here at Weave. We build tools that enable small businesses to communicate with their customers, and Twilio plays a fairly critical role in helping us do that. We especially love their well-documented APIs, comprehensive logs, and innovative product catalog.</p><p>Earlier this year I happened to bump into a new product with which I was not familiar: Twilio Studio. One of Twilio Studio’s main examples was “Appointment Reminders”, which really caught my eye because this is one of my team’s main responsibilities at Weave. To be quite honest, my knee-jerk reaction was that Twilio was trying to put me out of a job, and I did not appreciate that.</p><p>Rather than fear change, however, I decided to embrace it and find out if Twilio Studio was all that it was cracked up to be. I had a simple project in mind and built it one weekend using Twilio Studio.</p><h3>The Project</h3><blockquote><a href="https://todayi.page/">Today, I</a> is a journal service that texts subscribers on a daily basis prompting them to respond with a few thoughts about their day. Subscribers should also be able to submit a journal entry at-will without requiring a prompt first.</blockquote><p>While I am sure countless such services already exist, I’ve contracted the terribly contagious <a href="https://en.wikipedia.org/wiki/Not_invented_here">not-invented-here</a> syndrome while working at Weave and therefore decided to reinvent the wheel. (Plus, signing up for an existing service turns out to be an ineffective way to learn a new technology).</p><p>The good news is that this project, as we’ll find out, is the perfect use-case for Twilio Studio.</p><h3>The Implementation</h3><h4>Intro to Twilio Studio</h4><p>Microsoft Word has Documents, Excel has Workbooks, Twilio Studio has Flows. The browser-based Twilio Studio editor allows you to view, edit, test, and save these flows. It is visual and intuitive, which makes it very accessible for a non-technical audience and a delight-to-use for everyone. Each flow is composed of drag-and-drop widgets that are connected to each other to program the behavior of your application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*yRBJurR5ghtZOMfTor4y4A.png" /></figure><p>All flows start with the same widget called “Trigger”, which acts as the entry point for your application. There are actually three possible ways to get into the “Trigger” widget: an incoming text message, an incoming phone call, and an incoming HTTP request. Each of these triggers can have their own branch in the flow, or they can share a branch, or they can just lead to a dead-end.</p><h4>The Journal Flow</h4><p>Since I want to receive a daily reminder to write in my journal then our flow needs to support triggering when we make an HTTP request to flow’s REST API. I wrote some code to iterate through all subscribers and execute a request for each one; this runs nightly using <a href="https://devcenter.heroku.com/articles/scheduler">Heroku Scheduler</a>.</p><p>We also want subscribers to be able to initiate an ad hoc journal entry whenever they get the urge, so we’ll support this behavior by triggering off of an incoming SMS message that is sent by a subscriber to the flow’s phone number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*w7-kCDTdxmKGaCOM2LVpQg.png" /><figcaption>Phone calls are dead</figcaption></figure><p>So Incoming Messages and the REST API both flow into a widget that allows us to send a text message and wait for a response. We ask the subscriber to tell us what they did today and give them 1 hour to respond. If they don’t respond then we flow into another “Send &amp; Wait for Reply” widget to message them again and try to shame them into responding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*ORLH3Vj8Qc7KwLmZn2d5Pw.png" /><figcaption>Must have been a pretty boring day</figcaption></figure><p>Assuming our subscribers <em>do </em>care about remembering their lives and they respond then we need a way to get their journal entry back out of the Twilio Studio Flow and into our journal database. For that, we use a widget that allows us to make an HTTP request to an external service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fmmj3XnzieaqtNflRfPahA.png" /></figure><p>We build the request body using data we’ve collected from other widgets upstream in the flow (such as the subscriber’s phone number and their SMS response). The request is sent to a service running on Heroku that stores the journal entry in a database. Based on whether or not the request was successful we’ll send another message to the subscriber to let them know we’ve added their journal entry, and that they should feel good about themselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*mfCEKgfm1PKSyX7hHT_kbQ.png" /><figcaption>Positive reinforcement</figcaption></figure><p>And that’s pretty much it for the journal service. I did have to write some code for the nightly invitations as well as an API for creating journal entries, but neither of those tasks were too onerous.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wpJluMshjZtEo09NJVTyEA.png" /><figcaption>For a long time there were a few features missing, like a front-end that lets you read your journal.</figcaption></figure><h3>The Conclusions</h3><p>Twilio Studio is powerful, flexible, and easy-to-use, but is it going to put me out of a job at Weave?</p><h4>Did it even make my life easier?</h4><p>First of all, did Twilio Studio help me move faster on this project than if I had just used Twilio’s Programmable SMS instead? I still had to write code, so presumably it allowed me to <em>at the very least</em> write less code, but what specifically was easier?</p><p>If you think about the pain I would have suffered trying to implement <em>just </em>the logic to send a follow-up message to each user that doesn’t respond to their first journal prompt then I think it becomes very evident how much heavy lifting Twilio Studio did. I would have had to track each outbound and inbound SMS message, and suddenly my one-weekend project just turned into a three-weekend project (meaning it will never be completed).</p><p>Instead, the only information I have to track is Users and their Journal Entries — SMS messages are not even in the lexicon of my application code. Think about that for a minute; texting is a critical component of my journal service yet shows up nowhere in the code I had to write.</p><p>Additionally, using Twilio Studio makes it extremely easy to tweak the way my application interacts with users. For example, the first version of my journal flow would make a phone call to users and use text-to-speech to collect a journal entry if they didn’t respond to the first text. This turned out to be ineffective, obnoxious, and expensive, so I switched it quickly and easily to a second SMS prompt instead.</p><h4>So I should always use it?</h4><p>I mentioned that the <a href="https://todayi.page/">daily journal</a> ended up being the perfect project for Twilio Studio, whereas other projects might gain very little benefit from it. In my opinion, there are two main factors to consider when evaluating whether or not to use Twilio Studio for a project: (1) you only care about the <em>result</em> of a customer interaction and (2) the set of possible interactions is small and well-defined.</p><p>My journal app has a very small set of interactions (you responded or you didn’t) and doesn’t care at all what happened between the first message in a conversation and the final message that contains the user’s journal entry. Ultimately, <em>I was not building a communications tool;</em> I was trying to use communication technology as a front-end that allows users to add data to my service.</p><p>If you are building something, however, that requires a lot of open ended responses or requires you to track a comprehensive chat history then this product is probably not going to be as useful to you.</p><p>While Twilio might tout Chatbot or Appointment Reminders as viable use-cases for Twilio Studio, I think these are useful as only tutorials more than anything else.</p><h4>But am I fired?</h4><p>Not today. Twilio Studio’s Appointment Reminder example can be described as “cute” but it’s still no match for Weave’s Schedule Team. (The hard part about appointment reminders is actually not sending the reminder, and it’s not even handling the response; the hard part is knowing <em>when </em>to send the reminder. Twilio Studio is no help in answering that question).</p><p>Just because I am not fired, however, does not mean that Twilio Studio is useless. It is a powerful product that can help developers build innovative software that sparks joy for users.</p><p>I appreciated how easy flows are to test and iterate on; there were some moments that I felt documentation or examples could have been a little more fleshed out, but overall I found the product to be extremely easy to use. 4.5/5 stars.</p><p><a href="https://www.youtube.com/watch?v=DdCYMvaUcrA">Please clap.</a></p><p>You can sign up to have your own daily journal reminder at <a href="https://todayi.page/">https://todayi.page</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4105d446a27" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weave-lab/twilio-studio-for-dummies-like-me-f4105d446a27">Twilio Studio for Dummies (Like Me)</a> was originally published in <a href="https://medium.com/weave-lab">Weave Lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning how to code was hard, you just forgot]]></title>
            <link>https://medium.com/weave-lab/learning-how-to-code-was-hard-you-just-forgot-1e0381c45ca5?source=rss-8a75a6b24473------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e0381c45ca5</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[bootcamp]]></category>
            <dc:creator><![CDATA[Troy Leland Shields]]></dc:creator>
            <pubDate>Fri, 21 Dec 2018 20:45:13 GMT</pubDate>
            <atom:updated>2018-12-21T22:20:36.228Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*YpEgP3tHFdu2glALhCsW0g.png" /></figure><p>I am pretty sure that on one single day everything just clicked into place for me, never to be unclicked. I had had so much frustration with compiler errors and unhelpful TAs and segmentation faults; in one magical moment it all dissolved away: the heavens cleared, the seas parted, and I walked leisurely towards a six-figure salary as a software developer.</p><p>This might be a bit of an exaggeration, but something rings true here for many developers, I think. In the beginning, we are doing one type of learning that is slow and arduous, then after some magical inflection point our learning changes to become fast and exciting.</p><p>We remember feeling utter confusion but we can no longer understand why. We forgot what it was like to <em>not know</em>, and we are therefore pretty bad at helping others who want <em>to know</em>. We’ve convinced ourselves that most software concepts are intuitively understood, and that everything else is easy to Google.</p><p>While many people <em>do</em> successfully teach themselves to become programmers (Weave has several), it is undeniable that there are some conceptual blockers that new developers will bump into early on in their studies. These blockers will turn many people away from software development before they even get a real chance to fall in love with it. Many of us have forgotten ever having to struggle over these hurdles, so we lack empathy when we just expect new students to Google it and figure it out.</p><p>My wife and I started <a href="https://medium.com/weave-lab/why-we-started-a-dev-boot-camp-for-women-in-utah-afcbcd3f2af3">a part-time dev bootcamp for women called Parallel Learning</a> that meets in the evenings at Weave. Our goal is not to teach web-dev front-to-back so that students can go get high-paying jobs, our goal is build ramps over those hurdles that stop people from progressing on their own.</p><p>We could list a dozen hurdles and talk about ways in which we succeeded and failed to build ramps over them. Instead, however, we’ll dissect four examples we came across and how Parallel Learning tried to help our students overcome them.</p><p>The goal is to help communicate that even the most basic programming concepts have <em>become</em> easy because we learned it so long ago, not because they are inherently intuitive. This will hopefully help you have some empathy as you mentor others who are just starting out.</p><h3>Variable Assignment</h3><p>Below is a problem that we’re going to use to discuss the issues behind variable assignment. See if you can answer it.</p><pre>int a = 10;<br>int b = 20;<br>a = b;</pre><pre>What is the value of a and b?</pre><p>Honestly, at first it might be hard for you to imagine any possible way in which this is <em>not</em> intuitive. The answer is <em>literally</em> right in front of your eyes.</p><p>Perhaps you’ll feel the same way as this Reddit comment from a thread about the history of the assignment operator:</p><blockquote>If you don’t understand that, you are not a functional human being. Your problem isn’t with a programming practice; it’s with your complete lack of intelligence.</blockquote><blockquote><a href="https://www.reddit.com/r/coding/comments/8bf246/why_does_mean_assignment/dx8llxn">— u/ConciselyVerbose, April 12th, 2018, 0 karma</a></blockquote><p>The code above, while very simple, actually comes from <a href="https://web.archive.org/web/20090220014704/http://www.cs.mdx.ac.uk:80/research/PhDArea/saeed/S_Dehnadi_ppij-2006__2.pdf">a study</a> that was trying to determine if there was a simple test that you could give to “laypeople” to determine if they would be successful programmers or not. The study had a dozen or so questions just like the one above. It claims that three groups of people emerge from this test:</p><ol><li>The group that gets it right.</li><li>The group that gets it wrong, but gets it wrong consistently. They developed their own rules for the statements and followed those rules instead of the “correct” rules.</li><li>The group that “just can’t” and gives up. They turn in empty sheets. Apparently this group constituted like 33% of the total test takers.</li></ol><p>When I read that there was a group of people that couldn’t even guess an answer to these questions, I was flabbergasted. It’s so intuitive! a is 10; b is 20; a is 20. How can you just not answer that? At least take a guess!</p><p>I promptly printed the test out and gave it to whomever I happened to be with at the time. Sure enough, my brother-in-law, James, stared at the page for a few minutes, ultimately sighed about the question not making any sense, and handed me back an empty sheet.</p><p>Now, I can tell you for a fact that he does not have a “complete lack of intelligence” as <em>u/ConciselyVerbose</em> would suggest, so what’s going on here?</p><p>For one, there’s not a huge reason to have expected James to inherently know that these lines would be executing one after the other in descending order. He may have just assumed they are all true at the same time.</p><p>Second, he understood this as a <em>math</em> problem and therefore used the <em>equality</em> operator, <em>not</em> the assignment operator.</p><blockquote>a equals 10; b equals 20; 10 equals 20</blockquote><blockquote>Wait, no it doesn’t.</blockquote><p><em>Even</em> if he had figured out that a variable could be reassigned with the = symbol, <em>there is still nothing intuitive about assigning the right-hand side of the equation to the left-hand. </em>That is <em>completely </em>and <em>utterly</em> arbitrary.</p><h4>Teaching Variable Assignment</h4><p>We believe that it is extremely important to teach about variables correctly because they are the first and simplest form of an abstraction. We teach this from the very beginning. A variable is an <em>abstraction</em> for a value.</p><p>Every student has to complete 10 pre-work assignments on their own before the first day of class. One of the very first of these assignments explicitly teaches about the difference between the <em>equality </em>and <em>assignment </em>operators by having them work through some simple math equations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eaLyI1qi79wnmGtnzJhfnw.png" /><figcaption>An excerpt from the variables pre-work assignment</figcaption></figure><p>Students are taught to read the “=” symbol as “is” or “gets” instead of “equals”. This helps break the notion that equality has anything to do with “=” in programming. That’s an entirely different operator: == .</p><p>Unfortunately, this is only the very beginning about what’s hard regarding variables. Variable declaration vs. assignment, data types, scope, etc. have just as many arbitrary rules that we think of as intuitive.</p><h3>Control Flow</h3><p>The flow of execution in a program does not come naturally to all students. We think that reading code is as simple as reading a book; top-to-bottom, left-to-right. Except sometimes you jump to this paragraph back in chapter 1 and sometimes you reread a paragraph 200 times and sometimes you skip three paragraphs entirely. At times you need to go open an Encyclopedia from the library and read that. Also this book starts at page 153.</p><p>A beginning student doesn’t yet have a concept of <em>what</em> a program looks like at the atomic level; the fact that a program is lines of text that are executed sequentially and represent specific instructions <em>might </em>be a brand new concept.</p><p>Why does it have to execute one line at a time? Why not write a bunch of instructions that all execute at the same time (more like CSS)? These are all fair questions for a new programmer, and it’s wrong for us to assume that it just makes sense.</p><h4>Teaching Control Flow</h4><p>At Parallel Learning we teach our students that they must learn to execute their program the same way a computer would, and in order to do that they must understand control flow.</p><p>We emphasize that a program can do one and only one thing at a time. We represent this by imagining a sing-along’s bouncing ball that bounces through a program, executing one line of code at a time. We teach them that the first step to reading code is to find out where the sing-along ball starts bouncing, and to follow it methodically from there.</p><p>It helps tremendously to have a very demonstrable example to illustrate control flow, such as this imaginary program for making a sandwich.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*mnME6EB2ZIQo3Yt7fUvxSw.png" /></figure><p>Once we’ve established this foundational knowledge that (1) order matters and (2) only one step executes at a time, and we’ve also provided a concrete way to talk about control flow (our sing-along ball), then teaching control-flow structures like if-statements, loops and even concurrency becomes a lot less daunting.</p><h3>Functions</h3><p>Oh boy functions. Go ask a recent boot camp graduate to call a function and pass parameters to it. There’s a pretty darn good chance they do this incorrectly. This isn’t because they are dumb, it’s because it’s not as intuitive as we think it is, and so it isn’t taught well!</p><p>Defining a new function is one new concept to grok. Calling a function is something else entirely. Calling a function with parameters is even separate from that. Returning values from a function is yet another layer of conceptual drama to work through. Don’t forget about the introduction of scope. And this is all before they <em>really</em> grasp what a variable is.</p><p>Even after learning the basic concepts, students still don’t understand the <em>reason</em> for writing a function until much later. It makes no sense at first. Why would they write part of their program in one place and then jump to a completely new place to write some other piece of it. No thanks, I’ll keep it all in one place where I can see it all in the correct order.</p><p>It’s hard to argue with that logic, especially for a toy app like the ones they are starting out with.</p><p>You’ll see some extremely creative syntax from new developers when they are trying to call a function. The fact that variables seem to jump around and get renamed really causes some confusion. (Parameters, for some reason, really throw new developers for a loop). While teaching our students, I saw many examples just like <a href="https://www.reddit.com/r/programminghorror/comments/9ule8j/from_my_first_year_online_textbook/">this one from u/Bitt-r</a> on reddit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dnDr_KS0xXLBlRjW3b-Ueg.jpeg" /><figcaption>The top comment: “Yeah that’s not even gonna come close to compiling.” — /u/grimmxsleeper</figcaption></figure><h4>Teaching Functions</h4><p>As part of students’ pre-work, we introduce the concept of “functions” into the fantasy PB&amp;J program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*PdBuhrUdXWfJkWU_8jCbOw.png" /></figure><p>The steps to make a sandwich have not changed at all, we’ve just organized our code in a way that is more abstract and reduces duplication; it is therefore easier to read and maintain.</p><p>We teach that the sing-along ball “bounces into” a function when it is called and takes the input parameters with it as it goes. It bounces down the function as normal, and then “bounces back out”, bringing any return values with it.</p><p>We previously explained that a variable is an abstraction for a value, so now we introduce the concept that a function is an abstraction for some <em>behavior</em>. This is the second example of an abstraction our students come across before they have even installed Go on their machines.</p><p>Later on, in class, we build upon the concepts of functions by using the Turtle graphics mode on <a href="http://goplay.space/">goplay.space</a>. Students first draw a line with the Gopher, and then create a drawLine function. Then they use drawLine four times to create a rectangle; then they create a drawRectangle function. Eventually they get to a point where they have a drawHouse function and they use it to draw a neighborhood in main.</p><p>Each function tells a nice story, as if we’re reading a book.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*usZno4YVhviS1rmK4DLhBw.png" /></figure><p>The main function tells the story of a neighborhood: it’s a place with several houses. The drawHouse function tells the story about a house: it’s something made up of two rectangles and a triangle. The drawTriangle function tells the story of a triangle: it’s something with three lines.</p><p>At this point, we compare the code they’ve written to code that completes the same task but <em>without </em>helper functions. It becomes immediately clear that the main function <em>tells a compelling story when using well-defined functions</em>, whereas it’s an incomprehensible mess without them.</p><p>Furthermore, we have a very visual example of how parameters work. You can call drawRectangle with different colors and size params to draw the door and to draw the frame of the house.</p><h3>Google-fu</h3><p>Ah Google, the skeleton key that unlocks all knowledge for a programmer. What does it mean to be a programmer more than just Googling some stuff and copying and pasting whatever you find into a text editor?</p><p>Unfortunately, the thing we point to as the answer to all the hurdles that new programmers will face is often a hurdle unto itself, and I’d be remiss if we didn’t discuss it at least a little bit.</p><p>Let’s start with the simplest possible time a new programmer might need to Google something: they’ve just executed their program and it spit an error out at them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*ExzfpJBjizGsTQJNiQq12w.jpeg" /></figure><p>While it might seem extremely obvious<em> to you</em> to immediately copy and paste that error into Google, a new programmer has no clue that this error exists outside the context of their laptop. They have no notion that thousands of other programmers, within the last week, have come across that same issue and solved it and shared their findings for free on the world-wide web. So they will sit there and stare at it instead.</p><p>That’s the easy case. The case where the answer to the question <em>What should I Google?</em> is presented on a silver platter. The far harder situation is when they aren’t sure what to Google at all. They aren’t even sure what they need to ask a human, let alone a computer.</p><p>Let’s say they do figure out what to Google though, sifting through the results is far less intuitive than we think it is. On more than one occasion I have been working with a student and decided to show them how easy it is to Google the answer for the issue they were having rather than just tell them, because I’m a rockstar teacher obviously.</p><p>It goes something like this:</p><blockquote>I type in a well-crafted, specific yet succinct phrase into the search box. Within fractions of a second tens of thousands of results appear.</blockquote><blockquote>The next 20 seconds are a blur of mouse movements and hmming and hawing.</blockquote><blockquote>I quickly parse the top three results.</blockquote><blockquote>The first one is a tutorial blog post that I recognize might have the answer I’m looking for, but much deeper than I want to look; we can probably find it more directly. I open the second one, but the background color of the webpage <em>for some reason </em>tells me I’m not likely to find a relevant answer here, so I go back to Google. The third one is from StackOverflow so I probably should have just started here anyways.</blockquote><blockquote>I scroll past the question entirely and the accepted answer appears. I notice the one below it has far more upvotes though, so I keep scrolling to look at that one instead. Ah yes, we’ve found it. Within seconds I’ve copied the answer, pasted into their text editor, and their code magically works.</blockquote><blockquote>“Now, see how easy it is to Google your question?” I ask. The student has a befuddled look but says “thanks” and I’m back circling the room to do God’s work for someone else.</blockquote><p>All I proved was how easy it was <em>for me</em> to Google the answer for their problem. Sifting through Google results is literally like explaining how a neural network makes a certain decision: it just does. They have no clue why I Googled what I did, or how I decided which results were relevant and which were not.</p><p>Once they <em>do </em>find the right web page from Google, however, then they are set, right? Wrong again, unfortunately. Whatever blog post or tutorial or Stack Overflow they happen to be reading is likely to be fraught with terminology they have never heard. They have no shelf on which to add new information. We are trying to help them build a shelf, but it’s not going to happen instantaneously.</p><p>We could tell them the age-old answer, “If you see something you don’t understand, just Google it.” And now they are in an endless loop of Googling things they don’t understand.</p><h4>Teaching Google</h4><p>Unfortunately, if we failed at anything in our first iteration of Parallel Learning’s dev school I would say it was going out of our way to give practical experience with Google.</p><p>I did learn a neat trick from a coworker of mine. We were mentoring a new developer who Slacked both of us a paragraph long question about something. My coworker responded and asked him to shorten the question.</p><p>The new developer responded with a couple of sentences, and my coworker asked him to make it even shorter. Eventually, he asked his question in 4–5 words, and my coworker responded, “Great, now put that into Google.” I thought it was hilarious, but entirely effective.</p><p>Outside of being intentionally unhelpful like a computer-science TA, we’ll need to find some more proactive ways to help students get practice with Google. A fellow developer at Weave suggested that teaching “the vocabulary of code” can help immensely here. This makes sense to me, as it helps them start with a small shelf of knowledge upon which they can build more.</p><p>We could go on and on about how using a CLI, learning Git, importing libraries, making network requests, etc. are all hurdles that turn people away before they get a real chance to fall in love with programming, but hopefully these few examples have proven my point.</p><p>Yes, it is an option to throw people into the deep-end with the attitude that if they can’t do it on their own then they aren’t worth having as developers anyways; or, we can do our part to give them their best opportunity to teach themselves. We can recognize that some of these concepts were probably difficult even for us at one point, and that it would have been easier if someone empathetic was guiding us.</p><p><a href="https://www.youtube.com/watch?v=DdCYMvaUcrA">Please clap.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e0381c45ca5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weave-lab/learning-how-to-code-was-hard-you-just-forgot-1e0381c45ca5">Learning how to code was hard, you just forgot</a> was originally published in <a href="https://medium.com/weave-lab">Weave Lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why we started a dev boot camp for women in Utah]]></title>
            <link>https://medium.com/weave-lab/why-we-started-a-dev-boot-camp-for-women-in-utah-afcbcd3f2af3?source=rss-8a75a6b24473------2</link>
            <guid isPermaLink="false">https://medium.com/p/afcbcd3f2af3</guid>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Troy Leland Shields]]></dc:creator>
            <pubDate>Wed, 28 Nov 2018 17:31:32 GMT</pubDate>
            <atom:updated>2018-11-28T18:22:05.628Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*EkwNAg38Ip3tGJntCPqj1Q.png" /></figure><p>For a long time I daydreamed about teaching software development as a side project, so when my wife expressed an interest in enrolling in a code bootcamp we decided to start our own instead: Parallel Learning, a software development bootcamp for women in Utah.</p><p>I had had some experience teaching at a bootcamp before, but we wanted to try something new. Specifically, we wanted a very small class size, and we wanted to use Go to teach programming instead of focusing mostly on front-end web development.</p><p>Weave, fortunately, was extremely supportive of this side-project from the very beginning and even offered to let us use the office for class space.</p><p>I spent a few months preparing lesson material in my spare time. We then convinced three of our friends to give up their weeknights to be guinea pigs in our first class. Andrea the school teacher, Holly the graphic designer, Buffy the recent college grad.</p><p>Our pilot program spanned the entire Summer; we met three nights per week and I did my best to teach four women with little-to-no background in software how to be developers. It was a smashing success, probably!</p><p>Our philosophy at Parallel Learning is that successful developers are self-taught anyways, even if they have a four-year CS degree. Technology is changing so fast and so often that someone who can learn only in a classroom will unfortunately be pretty helpless in the real-world of software development.</p><p>So the goal is not necessarily to create developers, it’s to get them to a point where they can teach themselves to be developers if they really want to. Whether or not we are successful at that remains to be seen, but in the meantime we can answer a few questions that we often get about Parallel Learning.</p><h3>Why Women?</h3><p>A surprising number of people ask us this question when we talk about Parallel Learning. They seem to think we’ve <em>cracked the code</em> on how to help women learn to code, but that the method is unfortunately ineffective on men.</p><p>The real reasons are far simpler than that. We started Parallel Learning for women because we believe the following things:</p><ol><li>There is a distinct lack of diversity in tech (especially in Utah), and there is value in changing that</li><li>Being a software developer often comes with a lot of flexibility, making it an attractive career choice for women who also want to raise a family or have raised a family</li><li>Many women will simply feel more comfortable and open in a group of exclusively women</li><li>A larger proportion of women than men self-selected out of a technical degree back when they were in school</li></ol><p>That fourth point is important.</p><p>Many bootcamps cast a wide net to help teach as many graduates as they can; we feel this has the unfortunate side-effect of giving a bad reputation to the dev bootcamp model in general. We wanted our approach to be a bit different: small class sizes, allowing us to look for a very specific type of student.</p><p>Our student is someone that <em>should have</em> chosen to get a 4-year technical degree when they were in college, but did not because they either (1) didn’t know it was an option or (2) they looked at the field and recognized they didn’t fit the typical mold. While this certainly describes some men, it’s likely that a higher proportion of women got cheated out of their opportunity to become software developers simply because of demographics.</p><p>If you doubt the efficacy of that then I will point to my own experience in college as a white male. I nearly chose not to pursue software for this exact reason. I had incorrectly assumed that to be a developer you had to start learning how to code when you were an early teen, so I figured it wasn’t for me. If even I can feel some tinge of being an outsider, imagine how much worse it could feel for someone going into tech in Utah who is not a white male.</p><h3>Why Not Frontend?</h3><p>The prevailing wisdom from most dev bootcamps is to teach web-dev, starting with the front-end. This means tackling HTML and CSS before any “real” programming is taught.</p><p>There are at least two big benefits here: (1) students get visual feedback while they are learning—which will be important when they start learning JavaScript — and (2) students can deploy these static assets to the Web via Github Pages. This means they now need to learn HTML, CSS, <em>and</em> Git before they even hear the word “variable.”</p><p>This, in our opinion, is a lot of time that could be spent more valuably. Students expend a lot of effort working through the frustration and nuances of web design. That frustration is very real and deserved, but it is <strong>not</strong> a blocker for people to self-teach programming; meaning, most new developers can use online resources to successfully teach themselves HTML and CSS, in our opinion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*gdK__S0SyCdasscIs_1Slw.gif" /></figure><p>Our philosophy at Parallel Learning is that if it’s not a blocker to self-learning then it’s not worth spending energy on in our short time together. That means HTML and CSS are out — at least in the beginning. Instead, we teach our students Go.</p><p>It’s hard to argue, however, that there is value in having visual feedback when first programming. For that reason, we lean heavily on <a href="http://goplay.space/">goplay.space</a>; a browser-based playground for executing Go.</p><p>This fantastic tool comes complete with a Turtle Graphics mode where an adorable gopher executes your program to <a href="https://goplay.space/#S6FsspIE6d">draw a picture</a>. Students get to play with variables, functions, loops and if-statements, all before installing Git or Go on their laptops.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*059_udB62m53xu2yB4eO7Q.png" /><figcaption>True art</figcaption></figure><p>We later transition to writing CLI programs that will draw an image in-memory using <a href="https://github.com/troylelandshields/drawing">this drawing library</a> and save it to a file on disk instead. The students first got to <em>watch</em> the program play out in real-time, but now that we’ve gone offline they have to <em>think mentally</em> about how the program executes. They still get to see the result visually, though. Eventually we remove the visual component entirely to build more and more complex applications.</p><h3>Why Go?</h3><p>Weave is a huge believer in Go and the value it brings as our backend language. There are many great reasons to choose Go for your company, and while there is some overlap, those are not the reasons we chose to teach Go at Parallel Learning.</p><p>There’s actually at least one big reason <em>not</em> to choose Go for students: compared to JavaScript or Python, there really are not a lot of great, <em>beginner-friendly </em>resources online. Most Go tutorials that I’ve seen assume you are coming from another language, which is<em> completely useless</em> to a brand new student.</p><p>While that’s too bad, there are still enough good reasons that make it worth using Go as a student’s first language, even if they never pick it up after leaving our bootcamp. Again, the goal is not to create Go developers, it’s to enable self-learning.</p><h4>Go values simplicity</h4><blockquote>Clear is better than clever.</blockquote><blockquote>— <a href="https://go-proverbs.github.io/">Go Proverb</a></blockquote><p>Go strives for simplicity in all things. The language is small and lacks many sexy, useful, or just convenient features that other languages have — all in the name of keeping the language simple. What’s even better is that Go developers have really adopted this philosophy as well. Just ask the redditor who made this comment when debating the idea of adding map/reduce functionality to Go:</p><blockquote>Go code is simple, that’s what we love about Go, it is one of Go’s major selling points. —<a href="https://www.reddit.com/r/golang/comments/6our0k/should_go_20_support_generics/dkkipta"> /u/Paradiesstaub</a></blockquote><p>While I personally would <em>love</em> to have the ability to map each value in an array in Go, there is a ton of value in knowing that our students aren’t going to come across some syntactic sugar that obscures the way a program works before they are ready.</p><p>The language is imperative to a fault (if you don’t believe me, look at error handling in Go). This is <em>exactly what you want </em>when teaching new students, because there is <em>no magic </em>and there is usually one, <em>idiomatic </em>way to do something.</p><h4>Go values stability</h4><blockquote>It is intended that programs written to the Go 1 specification will continue to compile and run correctly, unchanged, over the lifetime of that specification</blockquote><blockquote>— <a href="https://golang.org/doc/go1compat#expectations">Go docs</a></blockquote><p>I went to a JavaScript meetup recently after having been away from the JS world for some time. After listening to the presentation I had the distinct feeling, “Wow, I thought I at least kind of knew JavaScript but apparently I was wrong.”</p><p>There were so many new features and tools shown that it just didn’t look or feel like the language that I had used before. While it’s nice that JavaScript developers can constantly enjoy new and interesting features, it’s not great that students might feel completely lost between code written last night and code written two years ago.</p><p>That is guaranteed not to happen with Go, because the language designers are extremely hesitant to change anything. Developers can go look at code from the standard library that has been around since Go 1.0, and it is going to look and feel just like code written today for Go 1.11.</p><h4>Go comes with tooling</h4><p>I promise this is my final criticism of JavaScript, but holy cow the story about tooling is a nightmare. There are so many tools that do the same or close to the same thing and they are constantly trying to replace each other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*K3ak1P1TuUheR4dyp5ZLuA.png" /><figcaption>:face_palm:</figcaption></figure><p>Furthermore, there are plenty of opinions about how to lint and format your code, but many text editors are not configured to handle this for you by default. So, students end up writing code that never gets automatically formatted and it’s a huge mess. Then they ask me for help on an issue and I have to deal with the anxiety of looking at code like the example below while trying to answer their question.</p><pre>function doSomething(param1,param2 ) {  var x= 5;  <br>    <br>    if (!param1) <br>{<br>param1 = &quot;w/e&quot;<br>}</pre><pre>          return param1 +param2</pre><pre>}</pre><p>When you install Go, you also install the go CLI tool, which comes complete with things like go fmt (<em>the one true formatter), </em>go build, go test, and more. There is no confusion caused from installing four or five third-party tools and there is no tedious configuration needed to get your environment in a state where you can build some project, <em>hopefully</em>.</p><h4>Go is statically typed</h4><p>We believe that learning a statically typed language first helps students think correctly about data types. The Go compiler will force students to avoid bad habits and help keep them from making many simple mistakes.</p><p>Later, moving to a dynamically-typed language will be much easier than trying to make the opposite migration.</p><p>Any effort our students spend during their first few weeks <em>not</em> practicing programming is a huge waste of valuable time in our opinion. Go minimizes the amount of set up and maximizes the time spent writing code. We can get students started with code before even the first day by using web-based tools like <a href="http://goplay.space/">goplay.space</a>.</p><h3>What’s next?</h3><p>Well, with our pilot program being such a smashing success, we need to go back and iterate on our curriculum and then find another group of students that are willing to give up their weeknights to come learn software development at Weave. Soon, we will need to figure out how we can offer classes at affordable prices while keeping our efforts sustainable. We’re excited about what the future might hold and we hope we can continue working on this project.</p><p><a href="https://www.youtube.com/watch?v=DdCYMvaUcrA">Please clap.</a></p><blockquote>If you know any women trying to learn software development, please direct them to us. We are actively looking for new students that are willing to go on this journey with us!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afcbcd3f2af3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/weave-lab/why-we-started-a-dev-boot-camp-for-women-in-utah-afcbcd3f2af3">Why we started a dev boot camp for women in Utah</a> was originally published in <a href="https://medium.com/weave-lab">Weave Lab</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[firebase-alphaqueuejs]]></title>
            <link>https://medium.com/@troylelandshields/firebase-alphaqueuejs-a6dcaa510e9e?source=rss-8a75a6b24473------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6dcaa510e9e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[Troy Leland Shields]]></dc:creator>
            <pubDate>Tue, 30 Aug 2016 00:12:12 GMT</pubDate>
            <atom:updated>2016-08-30T00:12:12.080Z</atom:updated>
            <content:encoded><![CDATA[<h3>Firebase is awesome.</h3><p>I think it’s safe to say that almost all of my sideprojects from now on will utilize Firebase in some form or another. It is too simple and too powerful to ignore when trying to prototype or build something quickly; there really is no substitute. You have instant access to a fast, scalable, real-time database from basically any client that needs to store or retrieve data. You spend exactly zero minutes configuring Apache servers or firewall rules or any of that other stuff you pretend to know about at work. In short, it’s dope AF.</p><h3>Firebase, however, is not perfect.</h3><p>My first real foray into Firebase was to store data about the infinite grid of 64px by 64px boxes on <a href="http://shldz.us/murinal">Murinal</a>. Even on a small project like <em>Murinal</em>, the interaction with Firebase got messy very quickly. If you’ve used Firebase a couple of times I think you know what I’m talking about. (If you’ve used it more than a couple of times, maybe you’ve learned how to avoid the messiness and I implore you to share with the rest of us).</p><p>Why does Firebase get or feel messy? Well, it turns out that the accessibility that Firebase offers is also one of its biggest problems: <em>ALL of the clients have access to ALL of the data ALL of the time</em>. There is no domain-level abstraction to protect your data. After three weeks of moonlighting on your project you will open it one day and suddenly realize you have no idea which functions are accessing what data in your application.</p><p>This problem is compounded by the fact that proper use of Firebase requires a surprising amount of data duplication. I won’t get into it too deeply, but most relationships between your data models have to exist in both directions. For example, when setting the <em>eats</em> field of <em>cheetah</em> to <em>gazelle</em> you musn’t forget to set <em>eatenBy</em> field of <em>gazelle</em> to <em>cheetah</em>. Suddenly updating one simple field requires touching two entirely different pieces of data in your database. Abstracting this to a higher-level API can understandably become messy.</p><p>The problem is <em>even further compounded</em> by the fact that you would have to duplicate this logic in your web, iOS, and Android apps as well!! We have to break one of the cardinal rules of the <a href="https://www.amazon.com/Pragmatic-Programmer-Journeyman-Master/dp/020161622X">Pragmatic Programmer</a> <em>two whole times </em>just to update a single relationship.</p><p>The naive usage of Firebase unfortunately requires that you duplicate data throughout your database and duplicate logic throughout your clients. It ends up being very important to get your data structure correct in the beginning of your prototyping because making even small changes later becomes a huge PITA.</p><h3>Firebase Queue to the rescue.</h3><p>I was recently introduced to <a href="https://github.com/firebase/firebase-queue">Firebase Queue</a> by my good friend Doug Leonard. This library utilizes your Firebase database to define a pipeline of tasks. You can push data onto a task where it will wait for a worker process you’ve programmed to pick it up and carry it through the task lifecycle, updating the state as it goes. The <a href="https://github.com/firebase/firebase-queue/blob/master/docs/guide.md#purpose-of-a-queue">Firebase Queue Guide</a> lists a myriad of reasons for why and how you could utilize it, but I want to focus on one in-particular: “fanning data out to multiple locations in your Firebase database.” I have already mentioned the less-than-ideal duplication of logic and data, but Firebase Queue gives us the capability to funnel process of <em>data duplication</em> through a single area of code, thereby eliminating the need to <em>duplicate logic</em>.</p><p>So what does this look like? You start by defining a task for updating the <em>eats</em> field of an animal. Every animal <em>eats</em> something, and every animal can have an <em>eatenBy</em> field as well. You create an <em>updateEatsWorker</em> that will wait for an <em>updateEatsTask</em> to be created. Instead of setting the <em>eats</em> and <em>eatenBy</em> data directly in your database, you push the change as a task to the <em>updateEatsTask</em> queue and allow your worker to create the relationship between predator and prey and vice-versa.</p><p>With this approach, all of your clients (Android, iOS, web, Windows 95, etc.) can execute the exact same single interaction with Firebase without having to worry about the business logic of how to associate predator animals with prey animals. If the structure of the relationship between these two entities ever changes, you simply need update one area of code (your worker) instead of 3 or infinite. Using Firebase Queue to fan out data in this way simplifies the amount of business logic required in each client, which is a huge win. The only complication is that at least 1 worker process has to be running on a machine somewhere ready to process <em>updateEatsTasks</em>. Admittedly, we are moving back towards a `server-client` configuration, but it is still technically a “serverless” architecture.</p><p>You can see how creating an <em>updateEatsWorker</em> that executes some process when an <em>updateEatsTasks</em> is created is very similar to passing data to a server through an API. It allows a single point of entry to your data and helps you protect your database from being touched by every part of the application(s).</p><h3>Alpha Queue ups the ante.</h3><p>Doug pretty much blew my mind with Firebase Queue. I think it is absolutely awesome. In fact, it is so awesome that I think they were much too conservative with their list of recommended uses. Firebase Queue should be the <strong><em>only</em></strong> way you access or update data from your any of your clients. It is my new belief that you should never directly touch any data in your Firebase Database from your client, opting instead to push tasks to the queue.</p><p>Clients push various tasks into your queue; worker does work on tasks; clients wait for results from the worker. Your clients only touch <em>a single child</em> in your Firebase database: tasks. They push specific tasks to do specific work, and all of the business logic is handled by your queue worker(s). What once was a huge mess becomes highly organized. The available tasks you can create act as a domain-level abstraction or API that protects your Firebase data from yourself-3-weeks-ago, mitigating one of Firebase’s huge weakness.</p><p>To make this even easier to practice for myself I built a JavaScript library that allows interacting with Firebase Queue as if it were an API for a web service. <a href="https://github.com/troylelandshields/firebase-alphaqueuejs">Firebase-AlphaQueue</a> is meant to be used by your clients to push tasks to your Firebase Queue and then wait to receive results whenever those tasks are completed by workers. You simply tell AlphaQueue the names of the tasks (or jobs) you want to be able to access and it makes an API available for you to interact with your data.</p><p><strong>Here is an example:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a650f45fff93b16814cc2539889b539f/href">https://medium.com/media/a650f45fff93b16814cc2539889b539f/href</a></iframe><p>The <em>animalSvc</em> now has methods called <em>createAnimal</em>, <em>feedAnimal</em>, <em>petAnimal, </em>and <em>findAnimal</em> and is ready to start being used.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0dc29a0fb61ae009f60bf6a063437a19/href">https://medium.com/media/0dc29a0fb61ae009f60bf6a063437a19/href</a></iframe><p>When you call these methods you are actually pushing a task onto your Firebase Queue and AlphaQueue is listening to tell you via a promise when it is either finished or errored out so that you can use the results of that task.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d8aea57f8c2eba8967ffd3e8130f56f5/href">https://medium.com/media/d8aea57f8c2eba8967ffd3e8130f56f5/href</a></iframe><p>Neat, right!? This client doesn’t have to know or care <em>at all</em> where dog or cat or cow are stored; it doesn’t have to know how the relationship between them is defined. You now don’t have to worry about getting your database structure exactly correct from the beginning of your project because you can easily change it later without affecting 10 different pieces of code in your client(s). You could even utilize versioned tasks to emulate a versioned API.</p><p>If you are using Firebase you should absolutely be protecting your data from yourself, but you don’t need to go back to the old way of creating a heavy-handed web API service. Utilize Firebase Queue and AlphaQueueJS to keep your clients <strong>dumb</strong> about how you store your data without sacrificing any of the simplicity of Firebase.</p><p>I am sure there are other ways to achieve the same goal, but I intend to use AlphaQueue throughout the building of our latest <a href="https://github.com/troylelandshields/call-distributor">side project</a> to see how it helps reduce the “messiness” that I have always experienced with Firebase. We’ll see how it goes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6dcaa510e9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[submarine — open source service that takes an email and returns a key]]></title>
            <link>https://medium.com/@troylelandshields/submarine-open-source-service-that-takes-an-email-and-returns-a-key-454cd379a01e?source=rss-8a75a6b24473------2</link>
            <guid isPermaLink="false">https://medium.com/p/454cd379a01e</guid>
            <category><![CDATA[data-security]]></category>
            <category><![CDATA[saas]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Troy Leland Shields]]></dc:creator>
            <pubDate>Mon, 09 Nov 2015 09:04:16 GMT</pubDate>
            <atom:updated>2015-11-09T15:15:30.444Z</atom:updated>
            <content:encoded><![CDATA[<p>Cloud-based services require that you give up all of the private details of your life in order to gain access to your favorite software. It’s basically an accepted fact that once you start using an online service you may as well post the data you provided to them on your front door, because it’s out there now and it’s never coming back.</p><p>For the most part, I think your average person is fine with quietly ignoring this. Afterall, the benefit of using Snapchat far outweighs the cost of Snapchat’s employees, the NSA, and any potential hackers knowing who you sext on a regular basis.</p><p>There are strong-minded people, however, that are wary of the SaaS model because they don’t want to give up their precious data. <a href="http://www.youneedabudget.com/">YNAB</a>, one of my favorite companies, is finally modernizing its software by taking it into the proverbial cloud. I was stunned to see how many of YNAB’s current users were disgusted by this decision, begging that desktop-only versions continue to be supported. I suspect these sentiments will get more and more common as high-profile data breaches occur more often.</p><p>This, along with some conversations with friends about <a href="http://bettrnet.com/">bettrnet</a><a href="http://bettrnet.com)'s/">&#39;s</a> data, sparked me to rethink the SaaS data-storage model.</p><p>Let’s use YNAB’s new cloud service as an example. It’s a relatively simple budgeting software that requires a few key inputs (e.g., your income, your budget allocations, your expenditures, etc.). YNAB The Software needs your data to do its job, but YNAB The Company does not need your data to do <em>its</em> job. If it were up to The Company, they might wish with all their hearts that they did not have to take, store, and protect your data so that you could use The Software that they build and you love. It’s a hassle to them, and more than that, a liability.</p><p>(Note: I am well-aware that most companies see your data as an asset that they can learn from or sell — my hypothesis is that as we go into the future many companies will see the risk of having your data, and the cost customers incur by being forced to give up data, as an expense as much as an asset).</p><p>The Company really would like to make the users’ of The Software feel in control of their own data. Sure it wants to use the data, but it also wants as many customers as possible, including the ones that would prefer a desktop application. In an ideal world, users might provide YNAB with access to a personal database server; The Software would connect to each individual users’ database server to store that user’s data. If ever the user decides they no longer trust The Company then all they have to do is revoke access to their personal database.</p><p>This idea isn’t entirely practical, however. So, instead, we are working on a web service to give that same power to users without requiring SaaS companies to completely alter the way they store your data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*_D4PMakEivBkIQb86oB-6A.jpeg" /><figcaption>submarine fights for the user</figcaption></figure><p><a href="https://github.com/kurtinlane/submarine"><em>submarine</em></a> is an open-source project that does one simple job: take a user, return a random key. When you sign up for YNAB The Software, YNAB The Software makes a request to <em>submarine</em> for a unique key on your behalf. <em>submarine</em> creates a unique key and stores it in its own database, completely separate from your YNAB data. <em>submarine</em> also notifies you via email about this key, and gives you access to manage it.</p><p>YNAB The Software uses the key that it has been given to encrypt your data before storing it in its database. Whenever you log back in to YNAB The Software to look at your budget, YNAB The Software asks <em>submarine</em> for your key. It uses the key to decrypt your data and do its YNAB magic, thus making you a happy customer.</p><p>Six months later, let’s say you no longer trust YNAB The Company with your data. You go to <em>submarine</em> and remove the key that was created for your YNAB data — that data is now as good as deleted.</p><p>Any prying eyes from employees at YNAB The Company, or any analysts at the NSA, or any anonymous folks at Anonymous, who sneak a peek on YNAB The Software’s data will forever see something like this: `�/���L��в” ���sZ�\r��:t��Ob*���Y@`. YNAB locked up your data and you threw away the key — it will never be unlocked again.</p><p>Now, there are some obvious hurdles to this plan. For one, YNAB The Company has to be extremely committed to making <em>submarine</em> work in its infrastructure. Certainly we don’t envision that <em>submarine</em> will be used to encrypt <em>all</em> of users’ data — but perhaps a company could use it as an extra layer of security for some particularly sensitive aspects of its data — maybe another company can use <em>submarine</em> to assure its users that their data is stored in an anonymized way.</p><p>It’s my belief that companies selling software services should (and will) give more power and responsibility of data back to the users’ to which it belongs. <em>submarine</em>’s goal is to offer a service to help service builders make that decision. Checkout <em>submarine</em> on <a href="https://github.com/kurtinlane/submarine">github</a> to contribute and try out one of the sample applications that uses <em>submarine</em> to protect its users’ data.</p><p><a href="http://troy.shldz.us/blog/2015/11/08/submarine-open-source-service-that-takes-an-email-and-returns-a-key/">source</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=454cd379a01e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>