Live data from Hacker News

Ask HN: RubyOnRails or Django/Pylons?

news.ycombinator.com

31–40 of 52 posts

Re: Ask HN: RubyOnRails or Django/Pylons?

#31
post #5

Python will be more useful if you decide to do something with the language other than ruby on rails . People do all sorts of very powerful math with it as well (SPSS, SciPy, NumPy and various other things). ROR is NOT for those who are willing to just get it done. You have to be the type who's willing to find the right way, or risk things blowing all to hell on you (Off the rails, as they call it). I'd also say, the…

    Python will be more useful if you decide to do
    something with the language other than ruby on rails
If by "ruby on rails" you mean "anything to do with web development, deployment and server config management," then you'd have a point. Of course, when the context is a discussion about web development, then whether you can easly write OpenGL apps is irrelevant. Good developers also don't just learn one language and try to use it for everything.

    with it as well (SPSS, SciPy, NumPy and various other
    things)
That has effectively nothing to do with which web framework to work with. The OP has already worked with Java, C# and Objective-C. Assuming he comes across a project that requires something like SciPy or NumPy and assuming he doesn't use something from one of the languages he already knows, I'm guessing that he, like most hackers, wouldn't have a problem learning Python or another language no matter what web framework or language he had been using recently for web development.

Re: Ask HN: RubyOnRails or Django/Pylons?

#32
post #20

Earlier quoted context omitted.

ROR is NOT for those who are willing to just get it done . What does that even mean? I work full time as a Rails developer, and I'd love to give a counterpoint to your obvious distate for Rails, but I have no idea what you're even trying to say....

Okay, let me give you the real live example. I build integrated products (mobile app which talks to a few web apps and maybe a desktop app in there too). I'm not a web developer sitting there making a site a human uses a great deal of the time. You're 9.5 weeks into a 10 week project. Some changes need to be made to a view cause a race condition was found in a load in the client application that talks to your framewo…

[deleted]

Re: Ask HN: RubyOnRails or Django/Pylons?

#33
post #22

Earlier quoted context omitted.

The differences between python and ruby aren't the important thing in this question. The languages are different (ruby: better syntax, python: better libraries). The important thing is "Are you the type of person who will excel with very strong strictures on your work" (Do rails) or "Are you a person who sometimes disregards the rules to do work more expeditiously" (Do python)

You have that completely backwards. If you are coding your Python like that, you are doing it wrong and almost certainly drawing the ire of the people you work with.

I mean, they get really pissed off when we hack a view 2 days before a deadline instead of just not delivering it. I mean people LOVE when you don't deliver.

Hacks are not good. Hacks should not be done all the time. But sometimes, shipping is more important than beauty and elegance. Hacks you put up while you get the real, good code in place is next to godliness when working in multicomponent systems under tight deadlines. Rails just isn't as good when you need to do that sort of thing. It doesn't have that flexibility, by design!

When I write the hacked up glue code first so they can do their stuff while I write mine, they f-ing love that. It lets them do their job!

I do things "the right way" 99% of the time. That buys me incredible flexibility to use utter crap code that's otherwise functional that other 1% of the time when required by the job.

Re: Ask HN: RubyOnRails or Django/Pylons?

#34
post #21

Earlier quoted context omitted.

They're opinionated, not biased. Bias would imply there was something impartial asked for. Know what else is opinionated? Ruby on Rails. (This is quoted widely on the web, by Rails devs!)[ http://www.google.com/search?sourceid=chrome&ie=UTF-8&#3... ] I'm not criticizing ruby, I don't have any issue with it (I'd still go python over ruby, cause I'll take libraries over pretty close but slightly better syntax any day).…

How is Django not dramatically more opinionated? It is, we all know it and we know that it's a virtue in that it produces consistent, readable code code. Why are you trying to pretend otherwise? With Django, there's a whole philosophy behind the right way to do templates. There's a whole explicitly written philosophy behind the specific coding conventions. Whole sections of the framework still assume you are using SQ…

What happens when you do a django template "your way" or "they way we can do it in 2 hours instead of 12"? What happens with the same thing in a Rails project?

People may dislike that you did it, but you still CAN. That's the difference. With Ruby on Rails, you can't necessarily due it without the wheels coming off.

>I'd still go python over ruby, cause I'll take libraries

This is a comment about the non-web components of the language.

>how is Django not dramatically more opinionated?

The Django community is perhaps more opinionated. The actual software isn't. That's the issue with Rails. The actual software has strong opinions (aka, intentional inflexibility) baked into it. I honestly wouldn't pick Django either (preferring even less strict frameworks), but the OP asked a question X or Y, and I told him of those two I feel is better.

Re: Ask HN: RubyOnRails or Django/Pylons?

#35
post #33

Earlier quoted context omitted.

You have that completely backwards. If you are coding your Python like that, you are doing it wrong and almost certainly drawing the ire of the people you work with.

I mean, they get really pissed off when we hack a view 2 days before a deadline instead of just not delivering it. I mean people LOVE when you don't deliver. Hacks are not good. Hacks should not be done all the time. But sometimes, shipping is more important than beauty and elegance. Hacks you put up while you get the real, good code in place is next to godliness when working in multicomponent systems under tight dea…

I don't presume to know your work environment, but personally I work on my own projects and do contract work and, in my experience, taking on debt is usually a sign that there's a problem with the requirements and estimates, so I usually change those before making the code less maintainable (which, IMO, is usually a case of treating the symptom).

Regardless, I'm weary of claims that controller-level (django view level) code is a major pain point in Rails. In some ways it's actually easier since you can make fewer decisions by making them resource centric, but even deviating from that is as simple as map "/path", :to => "controller#action".

Rails/Django controllers/view and routing/urls aren't as elegant as micro-frameworks like Flask and Sinatra or not-so-micro-frameworks like Padrino, but they aren't anything close to serious stumbling blocks (though maybe routing to a very small degree in resource-centric Rails 2). Every blocking issue I've had with either framework has been on a deeper level. In Rails pre-3, it was usually configuration-related when trying to do something too unconventional. In Django, it's when trying to deviate from the overall Django philosophy and use something other than the included batteries.

Re: Ask HN: RubyOnRails or Django/Pylons?

#36
post #28
post #23

Earlier quoted context omitted.

I thought the same thing after living with Rails in a shipping product for 2 years or so. We embraced Sinatra, which does away with all of your Rails concerns. Sinatra is still very popular; probably the most popular framework after Rails. However, for my last several projects, I've been back in Rails and happy to be there. Once you understand why things work the way they do in Rails and stop trying to bend it to you…

I looked into Sinatra, entirely at Thomas' suggestion. My experience after coding up a toy web application was that, if I wanted to build a non-toy application, I'd end up building a half-complete, undocumented, poorly tested version of Rails 1.0 prior to actually being able to work on the stuff people pay me money for. It is a wonderful microframework if you want to either a) build a web framework because you want e…

Have you looked at Padrino? I recently experimented with it and was surprised that it was an extremely awesome middle ground, to the point where I'll probably use it for my next project. It's very fast, close to Rack and easy to use with Rack middleware, has Rails-style view helpers, has sinatra-style controllers, very simple and elegant mountable apps, a focus on DB agnosticism, among many other things

Re: Ask HN: RubyOnRails or Django/Pylons?

#37
post #34

Earlier quoted context omitted.

How is Django not dramatically more opinionated? It is, we all know it and we know that it's a virtue in that it produces consistent, readable code code. Why are you trying to pretend otherwise? With Django, there's a whole philosophy behind the right way to do templates. There's a whole explicitly written philosophy behind the specific coding conventions. Whole sections of the framework still assume you are using SQ…

What happens when you do a django template "your way" or "they way we can do it in 2 hours instead of 12"? What happens with the same thing in a Rails project? People may dislike that you did it, but you still CAN . That's the difference. With Ruby on Rails, you can't necessarily due it without the wheels coming off. >I'd still go python over ruby, cause I'll take libraries This is a comment about the non-web compone…

    What happens when you do a django template "your way" 
    or "they way we can do it in 2 hours instead of 12"?
I've worked on a lot of projects and can't imagine the situation where you'd have this kind of a variation in time to create two remotely similar versions of a template. If you are talking about a fully designed template + CSS + JS, then you could possibly get up to 12 hours, but there would be no way to shorten that to 2 hours without doing something completely different.

    This is a comment about the non-web components of the 
    language.
And this entire discussion is about web development. The OP, who already knows multiple non-web-centric languages, asked specifically about web frameworks.

    The Django community is perhaps more opinionated. The 
    actual software isn't.
Depends on what you mean by the software. The framework overall is very opinionated, even if you can use parts of it in a modular way.

    The actual software has strong opinions (aka, 
    intentional inflexibility)
Let me take the opportunity to give you a heads up that Rails 3 has been out for months now and is widely used in production. One of the most significant design goals of Rails 3 was intentional flexibility.

Re: Ask HN: RubyOnRails or Django/Pylons?

#38
post #33

Earlier quoted context omitted.

I mean, they get really pissed off when we hack a view 2 days before a deadline instead of just not delivering it. I mean people LOVE when you don't deliver. Hacks are not good. Hacks should not be done all the time. But sometimes, shipping is more important than beauty and elegance. Hacks you put up while you get the real, good code in place is next to godliness when working in multicomponent systems under tight dea…

I don't presume to know your work environment, but personally I work on my own projects and do contract work and, in my experience, taking on debt is usually a sign that there's a problem with the requirements and estimates, so I usually change those before making the code less maintainable (which, IMO, is usually a case of treating the symptom). Regardless, I'm weary of claims that controller-level (django view leve…

I'm not arguing for systemic mortgages worth of debt. I'm arguing for using your credit card occasionally cause its easier than constantly going to the cash machine.

Use case:

iPhone dev "can you do this"

Ruby dev "Sure, takes a sec to rejigger things to allow that"

A few minutes/hours later "Done, and its perfect"

Alternative

iPhone dev "can you do this slightly differently"

Django dev "Like that?" [Just mocked up the entire thing in pure text, django happily returns it]

iPhone dev "thanks"

Django dev "I'll go make that work right now now that you can integrate your code

I have a real problem with the inability to provide a good enough version now when its more valuable than a very good version later, especially when there is room in the schedule to deliver both.

I work in an integration based environment, where the turnaround on the backend development is the maximum schedule issue, not the overall development scheme. I don't want my software development effort to look like the execution of a python program in a GIL bound multiprocessor environment. I want the thing done asap, if that means I'm paying the backend guy to redo his code 3 times cause the prototype is valuable and speeds up final time, I want the flexibility to do that.

I'm Excited that rails 3 promises to help part of this (as you correctly surmised, it is mostly rails 2 code and coders and turnaround issues I've dealt with), but I haven't yet seen it very much yet at all.

Schedules, requirements and all that are great, but if you can put a little hustle in at the end when there is something big on the line and get paid for that, you have very happy customers and very fat wallets. Non software people like delivery and there is a modicum of debt that sometimes requires.

Re: Ask HN: RubyOnRails or Django/Pylons?

#40
(Opinion warning, as in "this works for me", not an absolute truth)

I like Rails better because:

* I like Ruby more than Python (no "self" in methods, Ruby's list.map(func) vs Python's map(list, func), usable as a template language (ERB), open classes -> easy hacking)

* Rails `Books#has_one :publisher` vs Django `models.ForeignKey(Publisher)`

* Rails migrations + db reflection vs Django attr declarations `models.CharField(max_length=300)` (Yes I know about south, you still declare the attrs tough)

* Rails has Bundler http://gembundler.com/ , dunno about Py ...

* Django router http://docs.djangoproject.com/en/1.2/topics/http/urls/ vs Rails router http://guides.rubyonrails.org/routing.html (ie. declarative regexps vs executable well tought semantics)

* rails erb (haml etc) views vs django's-template-language because python can't do templates because of the indenting

* the list goes on but I'm bored

Ruby is beter at web stuff than Python.

Python has more science stuff (NumPy etc).

So I vote Ruby on Rails

Post reply on HN