5 ms·
> No, you shouldn't be thinking about these things. Because you'll get them wrong. "Magic" is good for beginners, because there's just too much they don't know
by code_sloth 10y ago
> No, you shouldn't be thinking about these things. Because you'll get them wrong.
"Magic" is good for beginners, because there's just too much they don't know.
Not thinking about all these things because the community of thousands should have done it better I did, is just lazy.
This is the kind of thinking that leads to unnecessary layers of abstraction and bloat.
- dkrich 10y agoSo do you roll your own OS? Payment processing system? Web server on your own hardware? Just because you aren't hand-coding it doesn't make it "magic" or "lazy," it makes it efficient. I'm perfectly happy to use Bootstrap for my web application's styling because they've handled most of the exact same styling problems I will have to, and quite well. I am quite confident I could replicate a lot of that functionality every time I needed to build a web app, but why would I do that when it's already been done and I can focus on other problems? As an aside I'm curious why you think that "magic" is good for beginners. When you don't have a clue what is going on at all, you really should spend some time learning what happens when you create a user via ActiveRecord, which can easily be done if you study the log files for a bit and read the Rails documentation. Once you are comfortable with what's going on, then you can use the framework to auto-generate code for you.
- jimbokun 10y agoThe point is not about "hand-coding" at all. It's about reading the code, and having a good mental model of what is happening. This is the point Rich Hickey tried to drive home with his talk "Simple Made Easy". https://www.infoq.com/presentations/Simple-Made-Easy https://www.infoq.com/presentations/Simple-Made-Easy If you are a developer and haven't watched this yet, you really, really should. Very important distinction to keep in mind any time you are writing software. Haven't read the Active Record source code, but would be interesting to find out where it falls on the "Simple vs. Easy" continuum.
- spacemanmatt 10y agoSimple Made Easy is a really great talk.
- code_sloth 10y ago> As an aside I'm curious why you think that "magic" is good for beginners. I was referring to absolute beginners with little prior background. To them, technical documentation is a bunch of gobbly gook. For these people it's usually better to be somewhat opinionated and just tell them "there are other ways, but this is the tried and tested way and it works". A nice side effect is that they don't suffer analysis paralysis and panic attacks. They don't know what they don't know, so it's sometimes useful to just tell them "this is the syntax to do X" (aka "magic") and gloss over the finer details. I've found that the time to unveil the magic is when they poke around under the hood, read up, and start asking questions about how things work.