Sherman On Software Latest

  • Incremental ETL Patterns For SaaS Developers

    Incremental ETL Patterns For SaaS Developers

    An ETL is a programmer’s way of saying “I’m moving data from one system to the other, and I have to do a bunch of things to make the data fit in the other system.”  ETLs tend to get written by database administrators, business intelligence developers, and backoffice programmers.  Developers that work with long lived processes that take 8-12 hours, often run overnight, and usually need to be finished first thing in the morning have different habits than SaaS developers.

    SaaS developers live in the web development world – massive numbers of short lived processes.  User latency is measured in milliseconds and some amount of failure is inevitable and acceptable.

    Because SaaS developers are unlikely to be woken up at 3am to restart a ten hour process that needs to be finished by 9am, they aren’t aware of how incremental ETLs are structured.

    1. The code is procedural; a series of specific steps, executed in a specific order.
    2. Every step begins by loading state and ends by writing state to a file.
    3. Every step is idempotent and deterministic, state is immutable.
    4. Every step can be run manually so long as the previous step has completed successfully.

    The Code Is Procedural

    This isn’t about the code, it is about the system running the ETL.  The code might be written in an object oriented language like python and java or a procedural language like sql.  The system running the ETL, on the other hand, is designed to execute a series of steps, with retry logic and built in alerting.

    Or, it can be as simple as a shell script.  No retries, no alerting.  Just a series of commands and echo statements that you will look at when you remember, or when someone tells you things are broken.

    What an ETL is not, is a highly stateful piece of software that runs a complicated process.  Procedural steps allow the process to resume close to where it failed.  ETL runtimes are measured in hours, best case starting over will only cost you a day.

    Every Step Begins By Loading State From Persistence And Ends By Writing State To Persistence

    Persistence is a file, database, or any other durable system that will let you load or write the data over and over again.

    Each task stands alone because each task can fail.  The output from the last task is the input for the next.  When something goes wrong, you can examine the inputs and outputs.  When a simple transformation process that reads from FileA and writes to FileB stops on line 35, you can be pretty sure that there is something unexpected in line 36 of FileA.

    Fix the input, fix the code, and resume.  When the input is easily accessible you can often fix it manually, get the process moving, and then come back and fix the code.  Remember, you are often doing it at 3am and racing the clock.

    Every step is idempotent and deterministic, state is immutable

    Every step needs to be tried and retried as many times as it takes to succeed.  This means it can’t change or overwrite the original input, and it needs to produce the same output each time.  The step ends by writing the results to persistence.  So long as the step is run in isolation, with no process manager turning the outputs into inputs, it is idempotent.

    You don’t need it to be perfect to rerun the job.  You can fix one issue and run it again to see if it blows up again.  Yes, in production because it is 3am and you can’t drag the data to a staging environment.  But with immutable state, deterministic runs, and idempotentancy, even testing in production at 3am is safe.

    Every Step Can Be Run Manually

    The ETL is a series of steps, and those steps can be run over and over again until they are correct.  Each step runs in isolation.  Job running software is helpful, but when there is a problem, you can run it yourself.

    Everything is laid out for you.  You can examine how far the process went and where it died.  There is no global state to worry about, no disabling parts of the process to get to where it failed.  

    How ETL Thinking Helps SaaS Developers

    Outside of the database and business intelligence teams, SaaS developers rarely build ETLs.  Which is a shame because ETL thinking makes it much easier to assemble complex workflows.  Work incrementally, work idempotently, and your work will be powerful and easy to debug.

  • The Never Rewrite Podcast, Episode One Hundred Thirty: The Pains Caused by Differing Abstractions Pt. 2 – Real World Examples

    The Never Rewrite Podcast, Episode One Hundred Thirty: The Pains Caused by Differing Abstractions Pt. 2 – Real World Examples

    Developers are always complaining about things like time zones and case sensitivity, but how does that play out in real life? In this episode Isaac, Dustin, and I share real disaster stories from our past.

    If you’ve ever wondered why timezones are hard and how much trouble they can cause, this is the episode for you!

    Watch on YouTube or listen to it at Spotify, Apple Podcasts, or your favorite podcast app, 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 One Hundred Twenty-Nine: Credit Where Credit Is Due

    The Never Rewrite Podcast, Episode One Hundred Twenty-Nine: Credit Where Credit Is Due

    Whether you are working as an individual contributor, team lead, manager, or consultant, who gets credit for what is a recurring problem. In this epsiode, Isaac, Dustin, and I discuss the theory and reality behind what should happen, what does happen, and what you should do about the difference.

    If you’ve ever had someone else take credit for your ideas, this is the episode for you!

    Watch on YouTube or listen to it at Spotify, Apple Podcasts, or your favorite podcast app, 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 One Hundred Twenty-Eight: The Pains Caused by Differing Abstractions

    The Never Rewrite Podcast, Episode One Hundred Twenty-Eight: The Pains Caused by Differing Abstractions

    How do past disasters look with the benefit of experience? Once upon a time I worked with a software company that made a strategic decision to extend the Objective-C compiler, ultimately leading to its downfall. In this episode, Isaac and I discuss the situation and the potential avenues I would persue if I encountered the situation today.

    If you’ve ever reminisced about past disasters, this is the episode for you!

    Watch on YouTube or listen to it at Spotify, Apple Podcasts, or your favorite podcast app, 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 One Hundred Twenty-Seven: The Pains Caused by Differing Abstractions

    The Never Rewrite Podcast, Episode One Hundred Twenty-Seven: The Pains Caused by Differing Abstractions

    Philosophical questions like “what is time” are different for developers. For developers, it is a critical engineering question around time zones and representation. A question with many right answers! A question that can cause unlimited pain if you have multiple right answers in your system.

    What is time? What is money? If you’ve ever wondered how expensive these questions can be to answer, this is the episode for you!

    Watch on YouTube or listen to it at Spotify, Apple Podcasts, or your favorite podcast app, 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 One Hundred Twenty-Six: Does Iterative Replacement Trap You In Legacy Frameworks?

    The Never Rewrite Podcast, Episode One Hundred Twenty-Six: Does Iterative Replacement Trap You In Legacy Frameworks?

    Isaac and I argue that Rewrites aren’t an alternative because they almost never succeed. But if you follow our advice on Iterative Replacement, will you be trapped in legacy frameworks? Will you be stuck facing the future with one hand tied behind your back?

    If you’ve ever wanted to do a rewrite so that you can leapfrog technology, this is the episode for you!

    Watch on YouTube or listen to it at Spotify, Apple Podcasts, or your favorite podcast app, 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!

  • Pumping A Leaky Balloon – The Reality of SaaS Business Models

    Pumping A Leaky Balloon – The Reality of SaaS Business Models

    The SaaS Business Model can be confusing to anyone not intimately familiar with how it works.  For developers, this makes it hard to understand priorities, see the levers, and understand their impact.  This post is going to try a simple metaphor.

    The SaaS Business Model is like pumping air into a balloon with a leak.

    The pump represents new customers, the leaks are churn, and customers are the air in the balloon – the life breath of the SaaS.

    You want to pump as hard as possible to get as many customers as possible.  But the more customers you acquire, the more the balloon fills, the more pressure there will be pushing against the leaks.

    SaaS Always Needs New Customers

    A SaaS company can never stop acquiring new customers, because it can never stop losing customers.  Through no fault of their own, the SaaS customers’ needs will change and some will go out of business.  Without a steady stream of new customers, the balloon will deflate and the SaaS will go out of business

    The Pump And The Leaks Are Tradeoffs

    The Pump is the force that brings in new customers.  There are many ways to acquire new customers – marketing, sales, and referrals are some of the major ones.

    The Leaks are the things that cause customers to churn.  Some are outside of your control; customers go out of business.  Most are things you can control like price, easy of use, and buggyness.

    The pump has a huge impact on the leaks.  A SaaS that brings in customers via Enterprise Sales is much more immune to issues with performance, ease of use, and bugs than a SaaS that brings in new customers through referrals.

    Features And Quality Can Be Tradeoffs

    A common confounding example is when a SaaS brings in new customers through a steady stream of new features.  This sets up a model where Features and Feature Quality have become tradeoffs.  For developers, this manifests as strange and confounding choices – create lots of features very quickly, and then occasionally go back and fix bugs.

    Features bring in new customers, they optimize the pump.  Quality reduces churn, it helps patch the leaks.  Depending on the pressure in the balloon it may make sense to pump harder, or it may make sense to slow the leaks.  Churn is a laggy indicator, problems take a while to drive customers away, and fixing the problem doesn’t immediately reduce churn.  Developers also aren’t usually privy to the data so the switch from features to quality can appear with little warning.

    Referrals Make Quality Additive

    Alternatively, when the pump is driven by referrals, that can drive developers to prioritize Quality and make Price the tradeoff.  Software can be made easier, faster, prettier, and more reliable by throwing money at the problem.  Referrals come from happy and satisfied customers, great service at a great price.

    Conclusion – The SaaS Model Requires Tradeoffs

    The SaaS Business Model can be confusing because the drivers can be obscure.  Business tradeoffs aren’t static, they change based on the source of new customers and sources of churn.  This can be especially confusing for developers because churn is a lagging indicator and the switch from working on acquiring new customers to reducing churn can be sudden.

    Above all else, churn is inevitable and you must always be working to acquire new customers!

  • The Never Rewrite Podcast, Episode One Hundred Twenty-Five: Navigating Risky Software Setups

    The Never Rewrite Podcast, Episode One Hundred Twenty-Five: Navigating Risky Software Setups

    As a consultant, how do you handle a potential client’s risky software setup? In this episode we detangle red flags from opportunities; and work through the legal and ethical need to do more than just do what the client asks. We cover the questions and discussions consultants need to protect themselves, their business, and their customers.

    If you’ve ever wondered if you can, or should, help a client with a risky setup, this is the episode for you!

    Watch on YouTube or listen to it at Spotify, Apple Podcasts, or your favorite podcast app, 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 Software Engineer And The Mechanical Engineer: A Parable

    The Software Engineer And The Mechanical Engineer: A Parable

    Once upon a time a Software Engineer and a Mechanical Engineer needed to lift the leg of a table and slide a carpet underneath.  The Software Engineer, being younger, offered to lift the table with his hands.  This would create enough room for the Mechanical Engineer to slide the carpet under.  They would repeat the process for each leg.

    The Software Engineer lifted with all of his might, but could not raise the table.  “The worker is not powerful enough”, he declared.  “I will call in some more people.  By scaling out the number of workers, we will reduce the amount of power each worker needs.  When we have sufficient parallel workers, the table leg will rise.”

    The Mechanical Engineer replied, “Get me a 2×4 and a brick.”

    And so the edge of the table was lifted.  “I estimate that the lever gives me about 20:1 leverage,” the Mechanical Engineer said, holding the table up with one hand.

  • The Never Rewrite Podcast, Episode One Hundred Twenty-Four: Treating Communication Gaps Like Tech Debt ft. Austen Tucker

    The Never Rewrite Podcast, Episode One Hundred Twenty-Four: Treating Communication Gaps Like Tech Debt ft. Austen Tucker

    Are communication gaps tech debt? Do they cause tech debt? Can they be worse than tech debt? Austen Tucker joins us this week to ponder communication’s role in building software.

    If you’ve ever wasted weeks writing great code that never got used, this is the episode for you!

    Watch on YouTube or listen to it at Spotify, Apple Podcasts, or your favorite podcast app, 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!