Sherman On Software Latest

  • The Never Rewrite Podcast, Episode Thirty-Two, Getting Started with Brownfield Testing (Part 2)

    The Never Rewrite Podcast, Episode Thirty-Two, Getting Started with Brownfield Testing (Part 2)

    Isaac and Jeffrey continue discussions around testing brownfield code, delving deeper into next steps and refactoring.

    Our ‘FlowSheet’ guide to help you with your testing and refactoring decisions:

    Watch on YouTube or listen to it at NeverRewrite, Spotify, Apple Podcasts, or Amazon Music, and let us know if you have ever been involved in a rewrite. We would love to have you on the show to discuss your experience!

  • The Rewrite Release Fear

    The Rewrite Release Fear

    Release Fear is a common killer of rewrite projects.  

    As a rewrite comes closer to release, higher ups will start taking an interest in the project.  These leaders won’t have context on the myriad discussions and compromises that went into the rewrite.  Instead, they focus exclusively on lost features.  Value creation gets ignored and the release gets blocked in the name of existing functionality.

    Is the missing functionality important?  Do the features outweigh the value that the rewrite brings to customers?  The team doing the work decided that these were good tradeoffs.  Loss Aversion ensures that leaders only see what was left out.

    Adding the missing functionality comes at the cost of time and the value of the rewrite.  As costs go up, each revision makes the fear worse.  I have seen multiple projects, years of programmer time, fail because they could not be released to production until they could prove that the release would be perfect.

    The alternative is to TheeSeeShip.  When you have 2 versions of the code you can have a discussion about which one should be in production.  When there is only one version, there’s nothing to discuss.

    TheeSeeShip to keep the stakes low and Release Fear won’t be a problem.

  • Separating The Work Of Today From The Work of Tomorrow

    Separating The Work Of Today From The Work of Tomorrow

    Scaling software has tension between the needs of today and tomorrow.  How do you resolve the tension?  Where does the work of today end?  What makes the next step part of the work of tomorrow?

    Consider this simple rule:

    For any piece of software in your system, you should scale it when it is the primary constraint, and stop when a different part becomes the new primary constraint.

    Easy to say, and easy to do…if you can measure the performance of your system in part and as a whole.

    If you don’t know which piece of your software is failing to scale, if you’re guessing about the work of today, don’t be surprised when your scaling efforts don’t impact the system as a whole.  Sometimes the scaling work of today isn’t scaling, it’s observability.

  • The Never Rewrite Podcast, Episode Thirty-One, Getting Started with Brownfield Testing (Part 1)

    The Never Rewrite Podcast, Episode Thirty-One, Getting Started with Brownfield Testing (Part 1)

    Brownfield code is existing code (rather than new code) that you might need to add tests for. Join us for a two-part episode on how to get started testing and refactoring existing applications.

    Watch on YouTube or listen to it at NeverRewrite, Spotify, Apple Podcasts, or Amazon Music, and let us know if you have ever been involved in a rewrite. We would love to have you on the show to discuss your experience!

  • The Never Rewrite Podcast, Episode Thirty, Investing in Yourself Beyond Education

    The Never Rewrite Podcast, Episode Thirty, Investing in Yourself Beyond Education

    Isaac and Jeffrey discuss ways to improve yourself outside of traditional means like college, courses, or reading.

    Watch on YouTube or listen to it at NeverRewrite, Spotify, Apple Podcasts, or Amazon Music, and let us know if you have ever been involved in a rewrite. We would love to have you on the show to discuss your experience!

  • Do The Hard Part First

    Do The Hard Part First

    Seth Godin Posted:

    The hard part first

    If you’re trying to reduce risk, do the hard part first. That way, if it fails, you’ll have minimized your time and effort.

    On the other hand, if you’re looking for buy-in and commitment so you can get through the hard part, do it last. People are terrible at ignoring sunk costs, and the early wins and identity shifts that come from the easy successes at the beginning will give you momentum as you go.

    The hardest part of scaling a system is getting pieces of the current system to work with the new scaled out versions. Design and implementation are usually much more work, and take much more time.

    Design and implementation don’t involve working with the imperfections of past design and implementation. They don’t have political agendas, and they aren’t too busy to make the changes you need.

    From my experience, the hardest part of any project built in isolation, is bringing the system from isolation to production. Whether you are bringing in a scaling framework, doing a rewrite, or building a new product; you and your team can write the software. You can shape it how you want or need because it is in isolation. Getting out of isolation requires changing your software to match production, and changing production is very hard.

    Save yourself and your team, get your software into production from the beginning. Otherwise you may find yourself throwing away a year’s worth of work because getting into production is the hard part.

  • A Garbage Collector in 2 Shell Scripts

    A Garbage Collector in 2 Shell Scripts

    My previous post about a creating lightweight garbage collector for settings was a little obtuse.  This post is an example implementation for companies using LaunchDarkly and Gitlab.

    Context, You’ve Got a Mess of Distributed Settings

    Remember, this is a technique for getting a handle on your settings AFTER you’ve created or inherited a distributed mess.  Not making a mess in the first place is always a better idea.

    This technique is to help you get started cleaning up a mess.  A mess is an ambiguous problem, it doesn’t have a central mass.  There’s no “worst” and no particularly good or bad place to start.

    A Garbage Collector will help you get started by showing you the easiest things to clean up!

    Step 1 – Extract Your Settings From LaunchDarkly

    Create a shell script, extractSettings.sh

    Calling ./extractSettings.sh <your api key> will give you a list of setting names, one per line.

    These are the unique strings that you need to search for in gitlab.

    Step 2 – Search Gitlab for Setting Strings

    Create the second shell script, settingsToProjects.sh

    Calling “./settingsToProjects.sh <your api key>” will give you a directory full of files.
    Note: You need an admin level API key so that the script can see all projects.  Otherwise you might miss some references in projects you can’t see.

    Each file will be “settingName.txt” and contain results like this:

    “project_id”: 1
    “project_id”: 15
    “project_id”: 243

    Find the Unused Settings

    This doesn’t even need a script, run:

    This will give you a list of every setting and the number of projects it is used in, sorted highest to lowest.  Anything with 0 lines is used in your codebase, 1 line means that it is referenced by one project, etc.

    Take Out The Garbage

    Start with the zeros.  Any file with 0 lines is either brand new, or no longer used.  That’s an easy check in LaunchDarkly.

    Next, check for the single project use cases.  Some of those will be unused strings in constants files.  Clean up the constants files, and clean up the settings that fell to zero.

    Because your garbage collector is tracking references, you can stop at any time.  You’ve automated the massive data gathering element, which makes cleanup cheap and manageable.

  • Fight Settings Cruft With A Lightweight Garbage Collector

    Fight Settings Cruft With A Lightweight Garbage Collector

    In service oriented architectures adding new application settings like environment variables, constants, and feature flags costs almost nothing.  Cleaning them up, however, is expensive.  

    Ideally developers would keep track of settings and remove them when they are no longer needed.  More often feature flags get set to 100%, everyone moves on, and the old code path lingers for months.  I have personally spent hours updating code, only to realize that it is effectively unreachable and needs to be deleted instead.

    Talk about wasting time and money!

    The High Cost of Doing Nothing

    Doing nothing seems like a cheap solution.  The code gets a little bloated, the services use a little more memory, and API calls send a few extra kilobytes.  No single unused feature flag or environment variable has any impact.

    Eventually you end up with hundreds of unused settings, on thousands of servers, distributed to hundreds of thousands of customers.  

    The cost of those crufty settings add up in terms of performance, development time, and outages.

    Cutting Cruft Is Expensive Too

    A key disadvantage of Service Oriented Architecture is that settings get passed from one service to the next.  It’s rarely safe to remove unused settings because they may be gathered into a collection and passed along to a service that does use them.

    Figuring out what is used where across multiple services is a slow process.  When you’ve got hundreds of settings to investigate, it’s daunting and demoralizing.

    A Very Basic Garbage Collector

    A Garbage Collector keeps track of references to objects, and when there are no more references, cleans them up.

    You can make a very basic collector by scripting out a few API calls to your git repository.

    The three basic steps are:

    1. Download and parse the constants file(s) from the parent app and extract a list of settings names
    2. Make API requests against your git vendor searching for the strings
    3. For each setting name make a file which lists which repo the string appears in

    That’s it!  You now have a rudimentary system that tracks references to settings across your repos.  Any setting file with only one entry isn’t used anywhere else and can be deleted once the parent app is done with it.

    Conclusion

    A garbage collector is overkill if you’re curious about a handful of settings, just use regular search.  But when you’re facing hundreds of settings and you need to figure out which can be targeted for cleanup, a garbage collector might be just what you need.

  • The Never Rewrite Podcast, Episode Twenty-Nine, (F*ck-Up Friday Series) The Saleswoman Who Faked Cancer

    The Never Rewrite Podcast, Episode Twenty-Nine, (F*ck-Up Friday Series) The Saleswoman Who Faked Cancer

    A non technical story of deception, good deeds with terrible consequences, and weak HR.

    Watch on YouTube or listen to it at NeverRewrite, Spotify, Apple Podcasts, or Amazon Music, and let us know if you have ever been involved in a rewrite. We would love to have you on the show to discuss your experience!

  • The Never Rewrite Podcast, Episode Twenty-Eight, Making Non-Compatible Changes During Long-Running Upgrades

    The Never Rewrite Podcast, Episode Twenty-Eight, Making Non-Compatible Changes During Long-Running Upgrades

    Sometimes an upgrade to a new version of a framework takes weeks or even months. What do you do when you need to make changes to areas that are being affected by the upgrade?

    Watch on YouTube or listen to it at NeverRewrite, Spotify, Apple Podcasts, or Amazon Music, and let us know if you have ever been involved in a rewrite. We would love to have you on the show to discuss your experience!