3 ms·
oooh oooh oooh, what an interesting example! I recall an interesting comment on NH a while ago where the dev was describing their refactoring of some law code.
by willvarfar 7y ago
oooh oooh oooh, what an interesting example! I recall an interesting comment on NH a while ago where the dev was describing their refactoring of some law code. The original code was if-then-else, and had the same 'shape' as the horrid law it was interpreting. Our intrepid dev redesigned it to use some kind of truth table instead, and was terribly proud. And then the next week the law was amended and a new clause added deep down in one subclause or something. It turned out that the clever algorithmic approach wasn't actually the most maintainable... So, using a sales tax calculator as an example, its possible for two different devs to take to completely different approaches, and for the betterness of one or the other to be in the eye of the beholder until the code has been maintained in production for a long time, by which time doubtless whichever approach was adopted is deemed to be the worse one as the other has no production experience so might be better ;)
- thom 7y agoI learned a few years ago that there are laws in the UK, parts of which are written in a naturalish language dialect of some complicated proprietary Oracle product. There’s a productivity gain for you (if you’re an Oracle salesperson at least).
- ulucs 7y agoHonestly, adding legislature into code is a losing game. Let the developer just deliver a flowchart engine so that even unpaid interns can get to modify the logic. In my opinion, a whole part of being a productive developer is about empowering people without the technical chops. If someone getting paid 10% of your salary can complete your previous responsibilities, you're technically a 10x developer.
- wikibob 7y agoI remember this comment. I believe he discussed using a bloom filter.
- saltminer 7y agoFor anyone wanting to see the original comment: https://news.ycombinator.com/item?id=18996147 https://news.ycombinator.com/item?id=18996147