Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's wrong with conventions? It seems to me that code conventions would make code more maintainable.


newsat13 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.


I'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.




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

Search: