Results 1 to 9 of 9

Thread: Ruby or Python?

  1. #1
    Join Date
    Aug 2013
    Beans
    4

    Ruby or Python?

    Hey guys,

    I'm thinking of learning a new programming language, and I've decided on either python or ruby. I want to learn a language that is extremely simple to get from thought to product, has a large set of libraries, frameworks, etc. to play with (everything from Web Development to hardware hacking to Pen testing), and that is going to exist in the mainstream for a while. I was almost totally set on Python, until I recently took a look around and found many of my friends and big websites using ruby to power them. This is by no means a fair sample set to base predictions on, but I feel like perhaps python may be surpassed and over-shadowed by ruby in the near future. I don't want to learn a language that becomes irrelevant.

    What do you guys think?

    If it helps, here's some of the projects I am currently working on:

    - Robotics with an Arduino
    - Teach myself Pen testing/exploit development (white hat)
    - Teach myself Web Development
    - iOS app development (most likely irrelevant to this discussion but you never know)

    Thanks in advanced!

  2. #2
    Join Date
    Apr 2012
    Location
    Scotland, UK
    Beans
    150
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: Ruby or Python?

    Before i go any futher, i havent looked at ruby for around about two years, but.

    For what your doing, python, hands down.

    Python is a much more versitile and useful langauge to you on your projects. I know for a fact its been used in universitys in robotics programming, its used widely in app development on say android(don't know about iOS) and its has much more functionality than ruby.

    Ruby is advertised as 'the programmers best friend', its very useful for running snipts of code as its very small light and effective, a to the point langauge if you will.

    Ruby is however easy to learn, its one of its main reasons for being favourited, even if you do choose to learn python id advise learning a bit of ruby as its always can be useful for cross platform or client-side programming.

    Hope this helps.
    Last edited by Boab1993; August 11th, 2013 at 10:09 PM.
    Boab1993

  3. #3
    Join Date
    Feb 2009
    Beans
    1,469

    Re: Ruby or Python?

    Just pick one. They do compete in many of the same areas and some of their strengths overlap, but Ruby and Python have coexisted for many years now both with solid market positions; besides, it's not like you're getting married -- you can always change languages later. And you probably will, several times, because you'll inherit someone else's Ruby code or get a new job working on an Erlang project. Which specific languages you know is less important than the kinds of projects you've worked on, especially when comparing two languages as similar as Python and Ruby.

  4. #4
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Ruby or Python?

    To develop iOS applications you cant use either.

    iOS apps are written in Objective-C with the Cocoa Touch framework. These can only be installed on Apple computers.
    Cheesemill

  5. #5
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,499
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Ruby or Python?

    Python won't become irrelevant any time soon. It's a part of the Linux Standard Base, big chunk of linux userspace uses it which can't be said about ruby.
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  6. #6
    Join Date
    Aug 2013
    Beans
    9

    Re: Ruby or Python?

    It boils down to which one fits the way you program best. For me, I feel a lot more comfortable using Python; it has wonderful documentation, the standard libraries can do pretty much everything, it seems like I find a "zone" and the program gets written on autopilot whereas Ruby never seemed to "click" even though I bought a book and tried to use it for a few programs.

    Personally, I thought Ruby was similar to Perl in that there was at least five different ways of doing anything. You could use parentheses with functions or not, but you had to use them in these special cases, etc. etc. Lots of little details to remember. Also, the gem idea confused me. Was I supposed to use gems? How did it relate to the ruby packages in apt? I've never grokked it. It certainly has never been my "best friend".

  7. #7
    Join Date
    Aug 2006
    Location
    60°27'48"N 24°48'18"E
    Beans
    3,458

    Re: Ruby or Python?

    While I am a bit partial to Python as far as languages go -- I just find it to be more cleanly designed -- Ruby has Rails, which is actually quite a handy way to do light websites...
    LambdaGrok. | #ubuntu-programming on FreeNode

  8. #8
    Join Date
    May 2007
    Location
    Europe
    Beans
    295
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Ruby or Python?

    Considering your requirement list, it is easy to point towards Python. The only reserve I have is with iOS, of which I know nothing about.

    One of the present strengths of Python is its fast adoption by Academia. On the one side, being a minimal language, makes things easier for newbies; beyond that it seems to facilitate the teaching of OO methods. Personally I'd trade Python for Java or C++ any day, but colleagues teaching programming are really happy with it. In non CS disciplines Python is becoming popular too, again due to its minimalism, but also due to the host of scientific libraries available.

    The big downside of Python: performance. It is a slows as code can be, but the difference to Ruby isn't much.

  9. #9
    Join Date
    Feb 2009
    Beans
    1,469

    Re: Ruby or Python?

    I don't think "minimal" is the right word for Python. Lua and C are minimal; Python is large, complex, utilitarian. If Perl is the scripting language equivalent of C++, Python is the scripting version of Java. (The main difference being that I don't hate Python.)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •