|
|
|
|
|
by rartichoke
4434 days ago
|
|
He never said don't learn patterns. He said it's not worth spending all your time trying to memorize them before you even write a line of code. Memorizing about 20 patterns for 3 months before you really write any code is way worse than just hacking together something and improving it because after enough time you know what's wrong. The "you just know" thing is really powerful. I'm not a professional artist but I just know that if you had a yellow background and you drew something in the foreground with the same yellow code it wouldn't work because you couldn't see it. When writing shitty code I just know it's bad because I find myself having to copy/paste something 8 times or maybe it's close enough to a copy/paste that it still feels wrong so then I fix it. |
|
To take your example, yellow-on-yellow isn't an aesthetic assessment, its a functional one. You recognize that functional anti-pattern because you've experienced, at some point in your life, what happens with a lack of contrast. If you aren't colorblind, you probably don't (intuitively) recognize that red on green is also a functional anti-pattern. When you extrapolate to the world of software development, without having previously learned these patterns or something resembling them, you don't recognize the antipatterns when they occur.
I'm not saying "Don't write software until you know all the patterns, ever." I'm saying that DHH has a traditional antipathy for any pattern he hasn't deigned fit to include in Rails canon, and that when you're coding solutions that need to scale in both performance and complexity, you probably don't want to take advice from someone who thinks a formalization of the AR pattern is the height of domain modeling.