avatarBennett Garner

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

814

Abstract

cation, some “smart” engineer tried to optimize things by removing any fluff. You’re not buying bread, you’re buying <code>b</code>. Inconsistent with the rest of the store, the prices aren’t listed in decimals. They’re multiplied by 100 to avoid floating point math. Calling the <code>choose_loaf</code> function has all kinds of side effects.</p><p id="1f59">Vegetables are a total crap shoot. Each vegetable works differently when they should really all share the same interface. There are no tests for the various interfaces, so sometimes you get a bad zucchini, truncated carrot, or the wrong quantity of tomatoes.</p><h1 id="24d4">Don’t like shopping here?</h1><p id="05d3">Neither do your users or fellow engineers.</p><p id="3a72">Software should be consistent, predictable, tested, and documented.</p><p i

Options

d="e19f">When engineers stray outside those bounds (as they too often do), things become unpleasant.</p><p id="b4ff">Do everyone a favor — think of the grocery store when you’re writing code.</p><h1 id="0b5f">More resources</h1><p id="f582"><a href="https://www.developerpurpose.com/">DeveloperPurpose.com </a>— Building a software career with meaning & purpose</p><p id="bf18"><a href="https://bennettgarner.medium.com/what-your-messy-code-is-costing-you-3317e419df3a">What Your Messy Code Is Costing You</a> — It’s natural that code gets messy, but cleaning it up is everyone’s responsibility</p><p id="d17c"><a href="https://javascript.plainenglish.io/how-to-refactor-existing-code-70e9e5af4ce3">Refactoring: 5 Steps to Improve Existing Code </a>—A checklist to make existing code better</p></article></body>

Software Development Groceries

If everyone acted like coders

Imagine you’re shopping for groceries at Software Co.

You want to buy a dozen eggs, but the EggChooserService is too complicated. The one function you can get to work returns duck eggs in batches of 5.

You’d like to buy some milk, but there’s no documentation. It takes you hours searching through the store (ahem, source code) before you find the PregnantCowPasteurizedDairyService.

Buying bread is even worse. Since bread is so fundamental to the grocery store application, some “smart” engineer tried to optimize things by removing any fluff. You’re not buying bread, you’re buying b. Inconsistent with the rest of the store, the prices aren’t listed in decimals. They’re multiplied by 100 to avoid floating point math. Calling the choose_loaf function has all kinds of side effects.

Vegetables are a total crap shoot. Each vegetable works differently when they should really all share the same interface. There are no tests for the various interfaces, so sometimes you get a bad zucchini, truncated carrot, or the wrong quantity of tomatoes.

Don’t like shopping here?

Neither do your users or fellow engineers.

Software should be consistent, predictable, tested, and documented.

When engineers stray outside those bounds (as they too often do), things become unpleasant.

Do everyone a favor — think of the grocery store when you’re writing code.

More resources

DeveloperPurpose.com — Building a software career with meaning & purpose

What Your Messy Code Is Costing You — It’s natural that code gets messy, but cleaning it up is everyone’s responsibility

Refactoring: 5 Steps to Improve Existing Code —A checklist to make existing code better

Programming
Technology
Data Science
JavaScript
Software Development
Recommended from ReadMedium