Space shuttle style coding | Stefan Judis Web Development
- Published at
- Updated at
- Reading time
- 1min
I learned about a new coding style today: the space shuttle.
It’s described in the kubernetes source code:
This controller is intentionally written in a very verbose style. You will notice:
- Every ‘if’ statement has a matching ‘else’ (exception: simple error checks for a client API call)
- Things that may seem obvious are commented explicitly
We call this style ‘space shuttle style’. Space shuttle style is meant to ensure that every branch and condition is considered and accounted for – the same way code is written at NASA for applications like the space shuttle.
I love it! Usually I’m not working on projects bringing people to space, but treating critical code with the same care seems like a good idea. 😅
Was this post helpful?
Yes? Cool! You might want to check out Web Weekly for more WebDev shenanigans. The last edition went out 24 days ago.
Yes? Cool! You might want to check out Web Weekly for more WebDev shenanigans. The last edition went out 24 days ago.