1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Which is the best Ruby On Rails or Python

Discussion in 'Ruby' started by RapidPlanet, Aug 5, 2010.

  1. #1
    I need some help, I'm PHP web developer and , I'm planning to learn Ruby On Rails or Python , I need to know which is the best , What are the advantages and disadvantages of these 2 languages, please help me to select one from these 2?
    SEMrush
     
    RapidPlanet, Aug 5, 2010 IP
    SEMrush
  2. matessim

    matessim Active Member

    Messages:
    514
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    70
    #2
    I prefer python, but its just my personal opinion, each language has its pros and cons, depends on your need, python is like a swiss army knife, though.
     
    matessim, Aug 6, 2010 IP
  3. belltower

    belltower Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I prefer Ruby, but just like with matessim, it's a personal preference. I don't think you'd go wrong either way.
     
    belltower, Aug 6, 2010 IP
  4. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #4
    I think Ruby on Rails is better because it handles objects beautifully. Beware with Python though, one thing I don't like about it is that it's whitespace sensitive. For example, in order to make a block of loop, you don't enclose it in curly braces or whatever, you have to make sure that all in that block of loop are in the same whitespace like this:
    
    for i in range(10):
       print i
       print i+1
    print i                        // this is NOT inside the loop!
    
    Code (markup):
    Which I personally don't like because it makes it less readable for me.
     
    Rainulf, Aug 6, 2010 IP
  5. creativeD

    creativeD Member

    Messages:
    37
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #5
    How does indentation by whitespace make it less readable to you? the same can be said of using curly braces which have no enforced structure ( bit lazy to give an example ). Don't criticize it till you try it, python is very readable (and fun).

    That being said, i am a python programmer, it is an excellent language. But the OP needs to really identify what he/she needs to accomplish work wise, i had a similar debate a while back so if performance/flexibility then go for python, if you're after speed(deployment time)/ease of use, then ruby is good. If you have to time, the why not pick up both ( i'm going to pick up ruby soon ).

    Lastly, i don't know how true this is now but being a ruby programmer was a pretty nice buzz word to have on your resume (if only for that), i would pick up ruby if only for that :p.

    Good luck
     
    creativeD, Aug 8, 2010 IP
  6. AntelopeSalad

    AntelopeSalad Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Just go with the best of both worlds, Django. It's a framework designed around Python. You get all the goodies of Python and quite possibly the best development times you can ask for without it dragging down your performance or feeling too restrictive.

    Here's a 3 hour long presentation of Django vs RoR. Be warned that it's from about 5 years ago so a lot has changed. It's pretty much the main guys behind Django and RoR sitting at a desk side by side going over what their frameworks offer and a Q/A session.
    http://video.google.com/videoplay?docid=2939556954580527226#

    A lot of the negatives of Django have been rectified since then (multiple database support, etc.).
     
    AntelopeSalad, Aug 8, 2010 IP
  7. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #7
    It depends on the programmer's taste, but what OP has to understand with Python is that it's whitespace sensitive.
    I know Python. I have experience with it.. I know it more than Ruby actually. That's why I know where to criticize it. =/

    Then again, Python teaches the programmer discipline in whitespaces. Really, each has its ups and down.
     
    Last edited: Aug 8, 2010
    Rainulf, Aug 8, 2010 IP
  8. RapidPlanet

    RapidPlanet Peon

    Messages:
    34
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    thanks all now i have some idea about these two languages , thanks all .. stile i'm noet started at both , Slill thinking and reading your comments ,
     
    RapidPlanet, Aug 8, 2010 IP
  9. AntelopeSalad

    AntelopeSalad Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You see whitespace as a potential problem/annoyance but really it's not. Part of the reason why Python is so nice to use is that it's extremely good at doing things one way. Instead of having the option to do one thing a million ways and then worrying about if it's good or bad, Python is just modeled after doing it "the" way.

    This is just from a logic point of view, not ways to code a certain series of logic (ie. an application).

    Basically I'm saying the forced whitespace is just a way to consistently format your code. In PHP (never used rails but maybe rails too?) and other C-like languages you can sometimes omit the curly brackets, or you can format them in a different way (below a piece of a logic, right next to it, right next to it but 1 space, etc.).

    You can look at the code from 5 different people and the code could look different in every example. With Python it will look the same. It goes well beyond brackets vs whitespace too.
     
    AntelopeSalad, Aug 8, 2010 IP
  10. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #10
    Well said. :) You definitely bring up good point. Ruby borrowed some syntax from C, so you can format them in a different way too.
     
    Rainulf, Aug 8, 2010 IP
  11. AntelopeSalad

    AntelopeSalad Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #11
    It doesn't mean Ruby or RoR is bad. Personally I have about 5 years of experience in PHP and I've recently started to learn Python/Django and this was after spending a week of watching various conferences on Python, Django, and RoR. Python/Django just seemed like the better choice for me. I couldn't find a single reason to learn Ruby or RoR instead of Python/Django.
     
    AntelopeSalad, Aug 9, 2010 IP
  12. jitu.icfai

    jitu.icfai Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    python is good one ...
     
    jitu.icfai, Aug 21, 2010 IP
  13. aprillove83

    aprillove83 Peon

    Messages:
    93
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    I prefer python, it's amazing.
     
    aprillove83, Aug 24, 2010 IP
  14. moor2k9

    moor2k9 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Well.. I certainly think ruby is better.Its the next generation technology and has already diverted minds of "loyal java clients".
    I have learnt it online from India. U get the best at an affordable price. For more info u can contact
     
    moor2k9, Sep 21, 2010 IP
  15. Marc Schlesinger

    Marc Schlesinger Peon

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Ruby is defo the best of those two.
    Here you can read something about it: http: //rrn.d k/ta gs/rub y
     
    Marc Schlesinger, Sep 22, 2010 IP
  16. ivan.kristianto

    ivan.kristianto Peon

    Messages:
    136
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Both are good. I'm not an expert on python or Ruby. But i know both language and did use it.
    But i would go for python, since it's been a while and more than ruby.
    and the python community more solid. IMHO.
    Anyway it is just my personal opinion. Whatever you choose, make sure your concentrate and keep learning.
     
    ivan.kristianto, Sep 24, 2010 IP