Live data from Hacker News

Magic sucks, Django Rocks

christopherroach.com

11–20 of 40 posts

Re: Magic sucks, Django Rocks

#11
post #6

"it never takes long before I reach a point where I feel like I’m no longer programming in Ruby." This echoes perfectly my feelings about Rails. I have tried, several times, to do something with it, but I always hit some magical wall or mythical creature that demands something from me I really don't know what it is. If I have to define the main difference between Rails and Django is that Rails is a DSL for building w…

Rails is a DSL for building websites on RDBMSs. Django is a web framework for building web sites with RDBMSs.

Interesting. I would consider this an argument in favor of Rails.

Re: Magic sucks, Django Rocks

#12
post #8
post #2

"I can’t seem to get anything done in Rails because before I can work with it I have to understand it." That's about how I feel now. I'm a relative newbie to Ruby and really like the language, even while aware of its warts and headaches as recent posts here illustrate. I'm trying out Rails so that I understand it better from my own experience, rather than relying on other opinions. It is really quick to get from poin…

My 4th year anniversary of using Rails is coming up. I have to say I remember those days of hitting the wall with Rails, where the learning curve goes vertical as you dig deep into the source to debug some extremely esoteric name collision or some other bug that should have had a warning . In retrospect, it was a wall worth scaling. I have no fear of Rails meta-programming bugs, and I've developed strategies for deal…

Thanks for the comments. One of the things that I find a pain about Rails but also an opportunity is that the framework is such a fast moving target that documentation grows stale quickly, presenting an opportunity to write newer fresher instructional material.

Re: Magic sucks, Django Rocks

#13
Merb solves this problem nicely. You can easily trace every request from Request to HTML easily, and understand the entire framework at any point by popping open the component. Extremely clean, and obvious code.

Rails is a bad example of a Ruby project. It'll get much much better once Merb core is merged in and replaces the existing Rails 2 internals.

Re: Magic sucks, Django Rocks

#14
post #5

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 knowin…

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.

Re: Magic sucks, Django Rocks

#15
post #11
post #6

"it never takes long before I reach a point where I feel like I’m no longer programming in Ruby." This echoes perfectly my feelings about Rails. I have tried, several times, to do something with it, but I always hit some magical wall or mythical creature that demands something from me I really don't know what it is. If I have to define the main difference between Rails and Django is that Rails is a DSL for building w…

Rails is a DSL for building websites on RDBMSs. Django is a web framework for building web sites with RDBMSs. Interesting. I would consider this an argument in favor of Rails.

It's only being suggested that Rails ties your website structure to your internal database model more than Django does, and that might be less ideal for your users.

Re: Magic sucks, Django Rocks

#16
post #5

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 knowin…

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. :)

Re: Magic sucks, Django Rocks

#18
post #9

How did this completely content-free post get so many votes so quickly? Really, the world could do with a few thousand fewer blog posts and comments about how someone decided to learn web development and chose a python framework (usually django) over "Rails" (apparently unaware of the other awesome ruby web frameworks, or even frameworks in other languages) for reasons they can't articulate.

Because this gives people that have dismissed rails outright a reason to feel good about themselves.

Re: Magic sucks, Django Rocks

#19
post #17
post #3

my strategy would have to been to highlight the rows in excel and then do "insert bar chart"

too magical

You could program something in VBA to do it for you.. I don't think I've heard anyone on HN refer to VBA as "magical".

(It does definately have a deficiency of ponies)

Re: Magic sucks, Django Rocks

#20
post #6

"it never takes long before I reach a point where I feel like I’m no longer programming in Ruby." This echoes perfectly my feelings about Rails. I have tried, several times, to do something with it, but I always hit some magical wall or mythical creature that demands something from me I really don't know what it is. If I have to define the main difference between Rails and Django is that Rails is a DSL for building w…

> Rails stuff is almost, but not quite, entirely unlike Ruby.

I really like Python and have the exact opposite opinion as you. That is, to me, Rails is very like Ruby and Django is unlike anything else done in Python. Django has hindered me every time I've tried to use it. By comparison, Cherrypy, storm-orm, SQLAlchemey, Mako, etc are all pretty straight forward. Django is out in left field for me.

Post reply on HN