3 ms·
> If you have 20 mixins each containing one or two methods split all over the file system it's difficult to maintain, but even harder to understand. This is a
by stcredzero 14y ago
> If you have 20 mixins each containing one or two methods split all over the file system it's difficult to maintain, but even harder to understand.
This is a consequence of the source code persistence mechanism being also used as a browsing and organization system. It's an impedance mismatch problem only Smalltalk tried to tackle in the past. Code Bubbles and Light Table have mentioned it more recently.
What if one could tag code and easily browse it by tag?
- pelle 14y agoThat is true, but it is still the reality of how we code Ruby today. (also most editors are pretty good at navigating this) One of the original beauties of Rails was it's pragmatic approach. It took a couple of key patterns and bent it into a less pure yet easy to use way of writing maintainable code. I'd argue that the directory structure and conventions behind it was DHH's main innovation here. Of course Rails own code base was quite ugly out of necessity before the 3.0 rewrite to handle this. I think the current trend to use patterns blindly comes from the fact that there are so many large Rails legacy apps now. We need better ways of organizing the code. Yet we shouldn't break what made Rails good in the first place or we end up with the Ruby equivalent of EJB's.
- stcredzero 14y agoSo, we should just stick with files, or else we get EJBs? Sorry, it doesn't follow.
- pelle 14y agoThats not what I'm saying. If we are in the business of writing Rails apps and not innovative new IDE's we need to write code in a way that works with our existing tool belt. If we start blindly following patterns without being pragmatic about our current tool belt we may very well see the ruby equivalent of EJB's.
- stcredzero 14y agoIf that were the only proper strategy, then why wouldn't we be looking at even more optimal codes to fit on punch cards?