3 ms·
What's wrong with conventions? It seems to me that code conventions would make code more maintainable.
by hekker 10y ago
What's wrong with conventions? It seems to me that code conventions would make code more maintainable.
- bobbytherobot 10y agonewsat13 wasn't complaining about using conventions. newsat13 was complaining about how Rails uses black magic with conventions. I can't speak to Rails, but I've worked in other codebases that used reflection to dynamically attach different pieces of code together. It was hard to trace code because I couldn't do a search for the value being generated nor could I use the static analysis to find the value. I had to manually trace through the whole stack to find the bit of reflection that was generating a value.
- rhizome 10y agoI've never worked in a codebase like that, but in all my years of helping people with Ruby and Rails I've concluded that reflection is a code smell. It's one of those things that is taught in CS and winds up appearing where conventions might not have been immediately apparent, a fallback to training.