Ask HN: What are the stupid things Rails developers do?
26 points| geekfactor | 14 years ago | reply
I'm primarily working in Rails nowadays if that makes a difference in the way you answer the question.
[1] http://jinfiesto.posterous.com/how-to-seem-good-at-everything-stop-doing-stu
[2] http://news.ycombinator.com/item?id=2848041
[+] [-] davidst|14 years ago|reply
Related to humility: Never forget the fundamentals. I'm talking about things like basic sorting, searching, and big O estimating. Know what your data structures and algorithms cost in terms of memory and performance. I'm continually surprised by how many senior developers unknowingly drift away from the fundamentals.
[+] [-] prodigal_erik|14 years ago|reply
[+] [-] cubicle67|14 years ago|reply
fwiw, you can add indexes and foreign key constraints using migrations. I don't see this done much, but I think it's good practice (adding indexes and fks)
[+] [-] cicatriz|14 years ago|reply
[+] [-] geekfactor|14 years ago|reply
[+] [-] unknown|14 years ago|reply
[deleted]
[+] [-] techiferous|14 years ago|reply
[+] [-] trebor|14 years ago|reply
[+] [-] jdeseno|14 years ago|reply
- Long finder methods instead of using named scopes.
- Not using restful routes.
- Too much code in their views.
- After saves that should be validations or other confusing AR lifecycle mistakes/abuses.
[+] [-] chsonnu|14 years ago|reply
[+] [-] latch|14 years ago|reply
[+] [-] jamesbritt|14 years ago|reply
[+] [-] yxhuvud|14 years ago|reply
[+] [-] amorphid|14 years ago|reply
[+] [-] trebor|14 years ago|reply
And another thing that amazes me is the frequent lack of indices. You want slow searches for specific values? Okay, you got it!
I know that it's tempting to avoid SQL and leave it 100% to the code generator—but the few edge cases you have with poor(er) performance could really get a boost with even minor understanding of SQL.
[+] [-] techiferous|14 years ago|reply
[+] [-] damoncali|14 years ago|reply
[+] [-] danneu|14 years ago|reply
[+] [-] eric-hu|14 years ago|reply