jspahrsummers / enemy-of-the-state

My talk explaining what state is and why it's so harmful

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Novel example of global state

landonf opened this issue · comments

Not sure if this dovetails nicely into your presentation, but I just ran into a project's build system with an amusing expression of the global state problem:

  • The build system installs its products in a global location on the file system.
  • The build system has access to the globally installed products during the build.
  • The build system grew dependencies on products globally installed by previous iterations of the build system.
  • All of the developers have been regularly building and installing, thus updating their global state, so nobody noticed.
  • A cyclic dependency now exists, and the project can no longer be built from a clean checkout without access to the previously built+installed global state.
  • A new developer comes along ...

This is not unlike the webs of inter/cyclic-dependence in code that emerge entirely by accident due to the existence of largely unbounded global state interdependence.

This is horrifying... I've run into something like this before too. No bueno!

On Mar 22, 2014, at 9:33 AM, Landon Fuller notifications@github.com wrote:

Not sure if this dovetails nicely into your presentation, but I just ran into a project's build system with an amusing expression of the global state problem:

The build system installs its products in a global location on the file system.
The build system has access to the globally installed products during the build.
The build system grew dependencies on products globally installed by previous iterations of the build system.
All of the developers have been regularly building and installing, thus updating their global state, so nobody noticed.
A cyclic dependency now exists, and the project can no longer be built from a clean checkout without access to the previously built+installed global state.
A new developer comes along ...
This is not unlike the webs of inter/cyclic-dependence in code that emerge entirely by accident due to the existence of largely unbounded global state interdependence.


Reply to this email directly or view it on GitHub.

Man, this is such a good example, but I'm having a really hard time finding a good place to bring it up. I've already kinda broken “the rule of 3” when it comes to making points, so I don't think I can add any more to the big list of problems with state, but this would otherwise be so good to mention.

IMO, this is outside the scope of the presentation. Disk state is a whole other can of worms, even if this example is analogous.