Skip to content

Comment on Magic sucks, Django Rocks

Comments

Whether I'm driving a Ferrari or an Aston Martin, I still have no idea what goes on under the hood. If you have to understand every aspect of every library you use to code you will never get anything done. Instead, learn enough to attack your core competencies and trust that the rest of it works as expected, since someone else has chosen that as their core competency.

Libraries and frameworks are all about not knowing how they work behind the scenes. That's kind of the point.

But with Django, I can fake it.

I can look at most of the code in a Django project and imagine a basic implementation sitting behind it. And I can work off of those generalizations. I can't do that for Rails.

That's the point about DSLs and Magic -- you have no idea what could be going on behind the scenes, and it's harder to make a guess about why it might be going wrong.

At the risk of sounding harsh, it sounds like maybe you and the OP are just not interested in bucking down and learning more about the language. I tried to learn "Rails" by itself, but decided that learning Ruby (and I mean all of it, not just learning how to write an if statement) is the only way to really be able to use Rails. I can now (a) understand what's going on and (b) !!bonus!! I can write better code in Rails because I can bend Ruby to my will.

And it's not really bias; I come from a generalist perspective. I worked in Python for about two years, and it's the same way as Ruby. Any library or language is going to require a lot of learning to really master. I floundered in Python until I broke down and basically read through the API reference front to back. And with regards to what's going on behind the scenes, I found Django no different than Rails. Perhaps a little more obfuscated with the way templates and the auto-admin work, but I didn't have as much interest in investigating it at the time.

But, whatever. YMMV, obviously. :)

I feel the exact same with the aforementioned frameworks. I too am learning Python and decided to learn it whilst hacking away with web.py. When I found myself building yet another MVC framework with web.py as its core. I moved on to Pylons as it presents a nice middle ground between web.py and Django. Its a framework with a bit more bent on web.py's spartanism. So far its been a nice journey and loving the language more and more.

> Whether I'm driving a Ferrari or an Aston Martin, I still have no idea what goes on under the hood

Maybe if you're just a casual driver that's fine. What if you happen to be a race driver? What if you need to drive in snow, on ice, on sand, at high altitude? It's suddenly a good idea if you have some idea how the car actually works. What if your boss says to you, "We need you to drive 15% faster with 10% less gas", and you open the hood and there's just a big box there labelled "magic" that can't be opened?

What parts of Rails are analogous to a big box labelled magic that can't be opened?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.