News for hackers. Stuff that matters.
Re:Coffee Is Hard by pugworthy on Saturday October 19, 2019 @01:29AM (#21296935)
Not sure why this isn't handled in some kind of data-driven way, rather than a bunch of one off code.

The truth is, the author is coding an irrational and illogical system, and what this is basically is a big old set of special cases.

But then keep in mind the whole piece is satire.

Re:Coffee Is Hard by erikpukinskis on Saturday October 19, 2019 @12:05PM (#21299144)
I can’t speak for the author, but one reason not to use data for logic is that you’ll end up building a (difficult to use, buggy) programming language in your schema. And if you’re going to do that, why not just use a programming language, which is a lovely way to encode logic?

I would turn the question around on you: why would you put this in data? If you have too much boilerplate, just refactor your code.