Hacker News new | ask | show | jobs
by ativzzz 818 days ago
> Senior knows better.

Sometimes, the cost of keeping really talented senior engineers who have solved a very difficult part of your tech stack is to give them the freedom to over engineer solutions that are probably a bit overcomplicated (maybe like OP). The alternative is they get bored and leave and take a wealth of technical knowledge with them

1 comments

yes, of course. As I said, it's an urge. I wrote quite a few examples of such stuff myself, ruby is amazing for inventing new control structures and trying things. But then I think about my peers and future self who'll have to change and debug my code later, and spend additional time making stuff simpler. This is actually harder to do.

Programming is about managing complexity. Making stack trace twice as long, hiding control flow in data, most cases of metaprogramming do not reduce complexity, they increase it. Unless your app is all about usage of some specific pattern (a lot of procedural scenarios with sideffects, shortcircuiting on error and no return value) then "railway framework" is not worth it in ruby. Use exceptions (really!). Use throw, maybe.