Hacker News new | past | comments | ask | show | jobs | submit login

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.




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.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: