[Home] [Blog] [Contact] - [Talks] [Bio] [Customers]
twitter linkedin youtube github rss

Patrick Debois

In depth research and trends analyzed from 50+ different concepts as code

We all know “infrastructure as code”. It is expanding to bigger constructs , devsecops, workflow , data , documentation, and slowly getting into the business domain. I analyzed the trends from over 50+ concepts “as code”. Do tell me what I’m missing.

Here’s the TL;DR of the trends:

  • Constructs are getting bigger: we are combining multiple parts in to bigger concepts
  • DevSecOps as code explosion: security is working it’s way into the code constructs
  • Capturing process workflow: not just the infrastructure but also how we act/react to situations
  • Shift “regular” code to declarative code: some aspects can better be defined instead of being coded
  • Data as code: with the advent of MLOps, DataOps, the lines between code and data are blurring
  • Capturing knowledge as code: documentation, architecture and other aspect are becoming part of coding
  • Closer to the business: service levels, business experiments are increasingly getting defined as code

Overview of the trends of 50+ concepts of a code

As you can see, expansion is still strong. The concept is now so embedded in our thinking that it feels the natural thing to do. It’s interesting that at the same time as we are expanding “as code” , the term NoCode is resurfacing in our industry. I guess it’s more about “less code”, or more bang for the buck per line of code. Though the concepts of “NoCode” and “NoOps” are just a pipe dream, it makes things more accessible and easier to work with , I’m all for it!

Please read on for a more detailed listing of all the concepts I found. I was surprised with new new findings and I’ve been monitoring the space for a long time.

Is “as Code” the new Model ?

This blogpost started while researching how we think about models in IT. In the old days we would have UML diagrams representing how things work. Maybe it was the Agile manifesto that urged people “Working software over comprehensive documentation”. So code is the new model these days ? As a exploration to see what models , ahum , code are available these days in the IT industry, I sent out the following tweet:

What concepts exist as code

Semantics are getting fluid

I was surprised at the creativity of people’s responses and ideas so I thought it’d be valuable to summarize the feedback:

  • “software defined” is considered an alternative name to “as code”
  • the term “as code” is sometimes perceived as developer centric , yet aren’t we all developer now
  • it is interrelated to DSL (Domain Specific Languages)

People these days seem to take a relaxed view on things being “as code”. It doesn’t matter if it’s YAML or a program language. And even for that matter just data: Infrastructure as code (IaC) and Infrastructure as data (IaD) are often used interchangeably. Reminds me of Lisp where the lines between code and data were also fluid.

Anyways , what people seem to care about:

  • version controlled : able to refer to a specific version
  • repeatable (automated) process : a version can be consistently reproduced
  • easily review changes : most prefer text yet given the right viewer it means human comprehensible change
  • favor declarative over imperative: we prefer to define the future state, not the whole execution in between. Though I personally think sometimes that you want to capture just that.

See how Gartner sees the declarative market or Dan North explaining declarative in the context of a DSL

”Code” is short for “encoded knowledge” IMHO. A config file is distilled source code. Yes. A yaml is IaC - @danbjson

Another way of viewing it how Juan Flores puts it :

For me it’s runtime config. If it’s code, you should be able to test it. Can you test yaml configuration?.

This does raise the question if tests as a concept are required in the concept of Declarative . It’s another one of this outstanding debates whether you test things you define ; I’ve seen the f.i. thje need to test combinations of multiple roles applied to the same node. It would not test the code that puts it into that state, but I’d have to test the combination (Business logic?) I create myself.

Intermezzo : the fun section

Before we dive into the long list of thing I’ve found , I thought we needed a little break ; here’s some gems I found that did not make the serious list:

  • No Code aka No Programmer as code
  • Bugs as code aka Developer as code
  • Code as code aka Bots writing code
  • Chaos as code aka Another day in the office as code
  • ASCII code aka Characters I see

Shout out to @Sam Aaron who promotes “Music as Code”: Related to the concept of Algorave , SonicPI is a great way to make music in realtime while writing beats as code.

And why stop at code? Have a look at The Folders programming language - No code, just folders. More languages like this can be found at https://esoteric.codes/ : Languages, platforms, and systems that break from the norms of computing.

Now we got the fun out of the way on to the real meat of the post: Everything else as code. Note that I tried to link to an article mentioning the flavor of “As code” , google to find more products in that space.


Infrastructure as code and friends

While tests as code (although I never saw that term), were arguably the first as code, it was the concept of Infrastructure as code that popularized the notion. Ruby as a programming language making DSLs easy to create played a big part in this.

Starting with CFengine, Puppet , Chef, Ansible, Salt , Terraforma and now Pulumi this evolved into this popular notion of as code. Technically they all had a mixture of config, code and data that allowed them to spin up infrastructures in a repeatable way (often related to the concept of idempotent code.

Many different specific aspects (storage, network…) spun off and created their own language. .

As code flavor Description
Infrastructure as code managing and provisioning computer data centers through machine-readable definition files
Storage as code / Software Defined Storage defining the allocation of storage in a programmatic way
Network as code / Software Defined Network setup of network components by defining the state
Software Defined Hardware (SDH) runtime-reconfigurable hardware and software that enables near ASIC performance
Configuration as Code (Gitops) Everything that is a configuration change moves through the CI/CD process
Yaml as code (Kubernetes) Standardized way to define cross-cloud cloud-native components

Bigger and Higher level Constructs as code

As code is still expanding beyond the traditional cloud production infrastructure to other parts such as the CI and test environments ; now even defining test infrastructure in code and developer laptops environments.

At the same time there is movement towards combining other concepts as code into a bigger construct such as Platform as code, Environment as code and Application as code.

As code flavor Description
Pipeline as code A practice of defining deployment pipelines through source code
Platform as code Allows the developers to define their own platform
Environments as code Abstraction over Infrastructure as Code and calls various Infrastructure as Code Components in the right order
Application as code Deploy the app, the infra and all the management tools around it
Dev environment as code Define a developer laptop setup as code
Test Infra as code Define the test infrastructure required as part of your test code

Workflow and Supporting services as code

Now that we got the infrastructure part under control , more and more we can define the supporting infrastructure to support the process of running the infrastructure. In addition we start codifying our workflow and our knowledge of intervention in case of issues or migrations.

As code flavor Description
Dashboards as code Automate the addition of metrics dashboard/changes along with your infrastructure.
Monitoring as code Automate the entire observability lifecycle, including automated diagnosis, alerting and incident management, and even automated remediation.
DNS as code Managing your DNS configuration as code
Jobs as code Standardizing and automating job scheduling by embedding code using a simple notation that makes API calls to a scheduling engine
Workflow as code Orchestrate the processing of those tasks on different servers — in a way both reliable, scalable, and easy to manage
Operations as code Codifying operational processes into a system capable of executing them on their own.

Security as code

With DevSecOps increasingly becoming an additional driver in DevOps pipelines, it’s only natural that they have their own “as code” explosion. Parts of it are extensions of infrastructure as code theme, but we are learning that other security aspects can be expressed as code.

As code flavor Description
Security as code Building security into DevOps tools and practices
IAM as code Express the roles and identity creation in code
Policy as code Writing code in a high-level language to manage and automate policies
Detection as code Systematic and comprehensive approach to software-driven threat detection, i.e. machine-readable definition files and descriptive models
Privacy as code Make automated privacy checks part of your CI pipeline
Threatmodel as code Any time someone wants to conduct a threat model, she would open a PR with her changes to a repository

Parts of the code are also being declared

Sometimes we would forget that parts of our code can just be configured/declared, instead of writing code. This is often a result of abstraction or externalization of logic to external services.

As code flavor Description
Project as code Speedup the creation and maintenance of software projects with code
API as code (OpenAPI) Define the API endpoints so we can both connect our code to it and use it verify what should be allowed in and out
UI as code Instead of pixel positioning each component in code, it’s a lot easier to define these layout compare to coding
Comments as code aka Github Co-pilot Compiled from various and random github projects turning comments into code suggestions

Data being declared

Data schema changes, data quality control, data publishing. All these (past) manual changes are now increasingly done by coding them, making them repeatable and reviewable.

As code flavor Description
Database as code Managing database schema changes as part of code instead of manually changing them
Data as code The ability to process, manage, consume, and share data in the same way we do for code during software development
Data bias as code / Equity as code Removing bias in data through an approach and methodological tools to impose equity controls on AI algorithm

Documentation and Architecture as code

Many have tried to generate diagrams from their “as code”. This automation always resulted in a bit of “meh”, so now we are extending documentation: just as we are doing “Test Driven” , we can also do “Documentation Driven” , documentation resulting in better capturing of knowledge: architecture, diagrams and even business directions. This complemented with Architectural Decision Records (ADR), make it seem documentation is making a comeback but now in a way that it is integrated in our workflow.

As code flavor Description
Documentation as code Philosophy that you should be writing documentation with the same tools as code
Diagrams as code Code as an executable architecture description language … use of these tools in order to generate diagrams and documentation during your build process.
Presentation as code No more locked down in presentation, creating presentations is now part of writing code
Architecture as code
(Wardley) mapping as code It takes map code written in the editor and renders it as a Wardley Map

Moving closer to the business - Pipelines are everywhere

Pipelines are everywhere , not just in IT. We have pipelines in Marketing , Sales, Hiring , Legal … No wonder the “as code” paradigm is finding its way in there as well. It is a good sign we’re getting closer to the business ! Also …. a lot scarier as it involves contracts and money :)

As code flavor Description
Service Level Agreements (SLA) as code Using smart contracts to do payout in case a service is working well
Service Level Objectives (SLO) as code Declaratively defines reliability and performance targets using a simple YAML specification
Law as code When translating law to code, we are turning something liminal into 1s and 0s. Sometimes great ambiguity is hidden in a comma or a word like “reasonable.”
Analytics as code Process of managing and provisioning user behavior event tracking through machine-readable definition files, rather than requirements documents
Contracts as code Automating the process of creating contracts and extracting document data
Management as code Ok … imagine that .. if you find it, let me know

Other industries

I Didn’t really research beyond traditional IT, but found this one interesting to mention

As code flavor Description
CAD as code Alternative way of creating 3d models in code instead of using a UI composer

AMAZING … YOU … MADE … IT … TILL THE END

Hehe, thanks for reading. Want to support future posts like this?

Subscribe to my musings on one of the socials listed at the top.

Did you find other concepts as code? Please leave a comment and I’ll add it to the list. Happy as code day !

References to tweets