Live data from Hacker News

Fake it until you automate it

understandlegacycode.com

51–52 of 52 posts

Re: Fake it until you automate it

#51
post #37

I was doing this a year ago. Now I'm redoing it. In my case, what I missed is that if the app is complex enough you should treat the deployer like a separate product. Different teams might want to use it for different things, deploy different versions with it, etc. So it should be in a separate repo with its own tests and its own version string. Otherwise iterating on it is hell because you're doing so in a space tha…

> So it should be in a separate repo If it's in the same repo, that means all of the features of the deployer can match the deployed code automatically - the deployer is made for and tested for that version. With different repos, you add complexity. Now you have to support deploying multiple versions so there are more code paths and there's version checking etc. And more complexity also means you need more tests.

Having everything together in the same repo is great if

- you don't care about tests that span multiple versions of the app (e.g. patterns of usage around database upgrades)

- you don't care about git bisect sessions that evaluate a new test against old versions of the app

- you never want to try the new app on the old infra or the old app on the new infra

- you're not worried about tests written by people not on your team whose failures indicate scenarios that don't require action on your part (but might require action on theirs).

Re: Fake it until you automate it

#52
post #41

The thing about automation is that it is really hard to automate workflows completely while getting everything right. One approach I like is the "Pareto automation"[0]. Normally, you can automate the most fragile or tedious parts of a workflow with little effort and keep doing everything else manually. Also, sometimes you don't even need automation, you just need a checklist. [0]: https://ricardoanderegg.com/posts/mu…

Checklists may sound dumb and boring, but they are actually great! They make it easy to just do the job and not think much about its structure, somehow reducing overall tediousness. Checklists together with snippets in some sort of a knowledge base (I simply use OBTF.txt with folds) help with processes that are too hard to automate timely and/or completely. This also enables gradual automation and knowledge collectio…

I also love the idea of having the hard to automate stuff be encoded in checklists (or creating checklists as a first step in formalizing a process). My biggest issue was that every time I looked there weren't tools around that would support this. If there was a web based, multi user tool (ideally open source) that allows you to define checklists and then have multiple "instantiations" of them to produce some form of paper trail of the execution that would be great!
Post reply on HN