How We Dey Work

Theme: Light

← All articles

Di laws wey nobody write down for engineering for Stedi

Dis document show di main pillars of Stedi engineering culture. If we follow dis framework, e fit happen sometimes say product development go stop sharp-sharp. Di work itself fit tire person and vex person. Progress fit take many times pass di time e for take if we use another method.

Dis impact na short-term, e small, and for di end e no matter. Di framework dey match our long-term ambition; nothing pass to keep high standard for all dis areas.

Na dat one be di difference between principles and preferences: principles na wetin you dey do no matter di cost – everything else na just preference.

Key tenets

  • Reduce long-term operational toil.

  • Remove waste.

Practices

Dis practices na di minimum wetin we dey expect from all teams:

  • Security na job zero.

    • Nothing pass to secure our systems.
  • Give on-call priority.

    • Set up thorough and sensible alerting and alarming.

    • Di baseline for alerts and alarms suppose be zero.

    • Give work wey go reduce di causes of pages priority pass everything else, except security.

  • Define all infrastructure as code.

    • Define all production infrastructure as code, from build and deployment pipelines reach operational dashboards.

    • Automate dependency updates and deployments to production.

    • Keep all dependencies up to date for all repositories wey dem no archive.

    • You fit update dependencies one by one or in batches, real-time or with small delay (for security or for convenience), but di process must dey automated.

  • Investigate service metrics, build times, and infrastructure costs.

    • Review service metrics, build times, and infrastructure costs (both per-request and total spend).

    • Di goal no be to reduce dis metrics to di barest minimum by putting unlimited investment wey go give less and less return, but to find di faults for configuration or implementation wey dey cause waste wey no need to dey.

  • Pull pain forward.

    • When di future of a service don sure (dat na, when e don reach GA or e go reach soon), pull forward technical problems wey dey hard pass as time dey go (for example, changes wey no dey work with old version; big architectural shortcomings).

Practices for practices

‘Best effort’ no dey work – if ‘best effort’ na all e take, everything for don dey place already!

Instead, put mechanisms for continuous improvement – generally: preventative controls and/or detective controls anywhere e possible, with root cause analysis process for any exceptions.

Component selection

For di fight against entropy, we dey use dis prioritization framework for component types:

  • Managed, ‘serverless’ primitives.

    • Use managed, serverless (wey mean ‘usage-based pricing with little or no capacity planning’) primitives anywhere e possible, even if e go cost us some functionality.

    • Among dis managed service options, use di highest-order primitive wey fit di use case.

  • Open source libraries and open standards.

    • If you no fit find suitable managed service, use open source libraries and adopt open standards anywhere e possible.
  • Our own code and formats.

    • When all other options don finish, we go build am ourselves.

Selection framework for component sources

  • Aim for set of components wey join well together instead of to pick di best-in-breed options, even when better or more popular alternatives dey.

  • When you dey choose set of components, invest for ecosystems wey dey grow continuously, wey organizations wey dey move fast build, and wey dey think di same way as Stedi. Di current ecosystems na AWS (infrastructure) and GitHub (source control, build, and deployment).

  • Bring in new ecosystems for clear boundary (for example, GitHub for source control, build, and deployment of code; AWS to run di code), no be for middle of one system. For example, we no go use database wey dem host for PlanetScale inside backend wey be all-AWS.

Refactors

Many times we dey find better way to build something (dat na, better according to di framework wey dey up) after we don start, or after we don finish. For example, we fit start by writing our own code, then later we come see say wetin we write resemble one open source library.

When di refactor:

  • go easy as time dey go, we go wait till e easy.

  • go hard as time dey go, we go do am without delay.

Generally, di framework when you dey think about refactor na to ask: if we dey start again today with everything wey we know now, we go build am di new way wey we dey think about? If yes, e go easy or e go hard as time dey go? If you go build am di new way and e go hard as time dey go, do am now.

Even so, big lateral migrations (lifting-and-shifting wey give customer di same experience) dey cost too much. We dey try avoid dem when we fit.

Communication

Discussing tradeoffs

Like all ways of building software, Stedi way get many tradeoffs – including, but no be only:

  • Managed services, open source libraries, and open standards often get steep learning curve and poor documentation; dem often no dey flexible and dem dey lack functionality.

  • Managed services dey hard to test, dem dey slow to iterate against, and dem dey hard to diagnose; dem dey expensive and dem get roadmap wey nobody fit predict.

  • To maintain infrastructure as code dey tedious and painful.

  • Automated dependency updates dey distract person and dem dey carry error.

Dis same tradeoffs go show again and again; to list dem for every juncture dey distract and dey discourage. Instead, focus di discussion on how to reduce dem. For example:

  • “As dis managed service go hard to unit test, make we come up with plan for how we fit ship with confidence.”

  • “Because cloud deployment feedback loop slow pass local development, we suppose invest for tooling to speed am up.”

  • “Di documentation for dis AWS library thin and e don old, so make we make sure say we contribute back early and often before we forget di context.”

  • “Dis AWS service no support dis feature wey we go need later, so make we schedule meeting with di AWS PM to see if e dey for their roadmap before we build am ourselves.”

Discussing roadblocks

Technology dey change fast. All di features and functionality wey we dey use today no dey before at one point; features and functionality wey no dey today fit dey tomorrow. Di most important thing be say features and functionality wey you think say no dey today fit don dey already.

When you meet roadblock or wetin look like dead end – for example, when e look like say one managed service or library no fit do something – separate di time wey you don definitely confirm say something no dey supported, from di time wey you don finish di ideas wey you get but you never definitely prove say e no possible.

For other words: ‘Absence of evidence’ no be ‘evidence of absence.’ To wrongly decide say something no possible dey cost us too much, especially because di wrong decision for one corner of Stedi go spread reach all of Stedi.

Something na definitive when you fit give link to source documentation wey confirm say e no possible.

  • Acceptable: “Lambda no fit run pass 15 minutes – see documentation: Function timeout – 900 seconds (15 minutes).”

  • Unacceptable: “X-ray no support cross-account traces [no citation].”

When you don try plenty things but you no fit make am work, dat one no be definitive.

  • Acceptable: “I no fit lock down dis AWS resource with tenant-scoped role. Dis na wetin I don try…”

  • Unacceptable: “Tenant scoped IAM access no go work for dis.”

If you don try plenty things and you no fit make something work, post am for somewhere: “I no fit make dis work, and I dey run out of ideas/time. Dis na wetin I don try…” Di fastest way to lose credibility for here na to falsely and with authority declare say something no possible without di work wey go support am.

For di other side, if you see something wey dem declare say e no possible without supporting documentation, ask for di documentation. If you see dis thing dey happen and you no ask for di work wey go support am, you don lower our bar for technical rigor.

Written communication

Our standard of “Write important things down” no mean “record actions wey don happen already.”

Di most important function of writing na as tool for thinking. E follow say writing suppose almost always come before action, especially for software development.

Paul Graham explain am well for one essay, and I don pull some passages from am below:

“Writing about something, even something wey you know well, usually show you say you no know am as well as you think. To put ideas into words na severe test.

Once you publish something, di convention na say wetin you write na wetin you dey think before you write am. Dem na your ideas, and now you don express dem. But you know say dis no be true.

No be only say you must commit your ideas to specific words dey make writing so exacting. Di real test na to read wetin you write. You must pretend to be neutral reader wey no know anything wey dey your head, only wetin you write.

People fit dey wey their thoughts perfectly formed so tey dem just flow straight into words. But I never know anybody wey fit do dis, and if I meet person wey talk say e fit, e go look like evidence of their limitations instead of their ability. Indeed, dis na trope for movies: di guy wey claim say e get plan to do some difficult thing, and wen dem ask am more, e go tap im head and talk say “E all dey up here.” Everybody wey dey watch di movie know wetin dat one mean. At best di plan vague and e no complete. Very likely some undiscovered flaw dey wey go spoil am completely.

For domains wey dem define precisely, e possible to form complete ideas for your head. People fit play chess for their head, for example. And mathematicians fit do some math for their head, though dem no seem to feel sure of proof wey pass certain length till dem write am down. But dis one seem possible only with ideas wey you fit express for formal language.

Di reason wey I spend so long to establish dis obvious point na say e lead to another one wey many people go find shocking. If to write down your ideas always make dem more precise and more complete, then nobody wey never write about topic get fully formed ideas about am. And person wey never write at all no get fully formed ideas about anything wey no be small matter.

E feel to dem like say dem get, especially if dem no dey habit of to critically examine their own thinking. Ideas fit feel complete. Na only when you try to put dem into words you go discover say dem no complete. So if you never subject your ideas to dat test, you no go ever get fully formed ideas, and you no go ever realize am too.

To put ideas into words no guarantee say dem go correct. E far from am. But though e no be sufficient condition, e be necessary one.”

To write doc no be perfunctory gesture, and to ask person for doc on something no be punishment or way to control person. To write doc na way to:

  • bring out requirements and assumptions, and

  • drive clarity of reasoning wey come from dose requirements and assumptions.

Without dis step, our software no get much hope to deliver di results wey we want for long term.

Note say doc no need to be prose – for some cases, di right format for doc fit be proposed API spec with bullet point lists of constraints, principles, or requirements. Di goal of doc na to put your thinking into concrete form and to share am with others.

As final thought, no be everybody must write docs for here. Some people just want to execute, and plenty room dey for dat one too – but if you just want to execute, you go dey execute on di plan, architecture, or implementation wey another person describe for their doc. Our domain too complex, and our ambition too big to build software anyhow.