Skip to content

Instantly share code, notes, and snippets.

@jojomi
Created September 24, 2015 06:59
Show Gist options
  • Save jojomi/8812a376a641a2bee83b to your computer and use it in GitHub Desktop.
Save jojomi/8812a376a641a2bee83b to your computer and use it in GitHub Desktop.
The Five Year Pledge

Software Needs Love

I promise to design my software so that

  • if nobody would touch anything, it would still run after five years.

This pledge requires to take care of restarting failed services automatically. If there is some kind of daemon process, it may not leak any memory because memory would eventually exhaust.

  • if someone needs to port the system after five years, it would not be impossible.

This pledge requires thourough documentation, not only on code level, but on a meta level too. Documentation must include the ideas and original requirements of the development process. Also any changes to the requirements and the code must be tracked, possibly with version control systems.

  • if someone wants to know what the system processed five years ago, he must be able to tell.

Logs about any important system action must be kept. They may not be in temporary places making your loose them on restart.

  • ressources may never be exhausted because of runtime.

Even if the system runs for five years continuously, measures need to be taken, so that exhaustion of ressources is prevented. If there is no limit on ressource usage in the long run, monitoring and notification need to be implemented and tested thouroughyl. The system must never fail due to ressource overuse without prior notification.

  • no implicit runtime limit is introduced by code.

Withstand the urge to write code that would definitely fail at point X in time, no matter how far to the future X may seem. Exceptions are only allowed if the base system is as limited as your software (think of 32-bit epoch date values). Withstand the thoughts that tell you the possibility of defining/using/executing X of these should be enough forever. If there is a limit, specify it with your customer, otherwise support unlimited usage. Implement a flexible solution even if it is more effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment