You are not logged in.

#1 2012-04-17 10:39:05

skwo
Member
Registered: 2008-11-13
Posts: 133

Ruby or Python. Can you go wrong there?

Hi!
I know comparisons like "A vs B" are stupid, irrelevant, and bound to personal preferences, but still.

I am a very experienced PHP developer. I have about 7 years of experience in PHP and MVC frameworks for it (Zend, Kohana, CI), different tools around (Twig, Smarty, Doctrine). I enjoy programming in it and my work is related to PHP. In general I like web programming.
But I think I'm getting sick of PHP. I want to try something new, more mature and organized, more cleaner and beautiful. And as well Id like to increase my level as a programmer by adding another language to my repository.

So Im trying to pick a language for me next project. The project is going to be developed in my free time, unrelated to my work. Its going to be a web project with possibly future extension to mobile.

I'm having hard time deciding between Ruby (and especially Ruby on Rails) and Python (and especially Django).

I'd like to hear your personal experience. Please try to avoid cons/pros like "Easier to find job as Ruby developer because its hyped now".
Its a pure decision between languages and their philosophies, not the ability to create a team and/or find job.


ArchLinux x86_64 on Dell Latitude E5410

Offline

#2 2012-04-17 12:18:09

lunar
Member
Registered: 2010-10-04
Posts: 95

Re: Ruby or Python. Can you go wrong there?

@skwo: Just choose one or the either. It doesn't matter which one, flip a coin or so, but choose one and go ahead.  You'll not regret the choice, for either language (and framework respectively) has its pros and cons, but is suitable to implement any web project, and both languages are equally hard (or easy) to learn for a PHP programmer, you'll save a lot of time you'd otherwise waste on reading this thread, and you'll gain your own personal experience right away.

If you've enough time to spare, implement the project, or at least parts of it, in both languages and both frameworks. This way you'll gain even more personal experience, and the ability to evaluate both frameworks with regards to your specific needs and preferences. You won't loose much time, too, because it's easy to transfer knowledge between Ruby and Python, since both languages have much in common.

Whatever you do, you can't go wrong, you can't loose.  You'll learn a new language, gain experience, and have a lot of fun. What do you need more? smile

Last edited by lunar (2012-04-17 12:18:29)

Offline

#3 2012-04-17 12:51:23

skwo
Member
Registered: 2008-11-13
Posts: 133

Re: Ruby or Python. Can you go wrong there?

lunar wrote:

What do you need more? smile

Well I guess I just needed your comment! wink
Thanks a lot, you really helped me and gave me motivation!

And I think Ill start with Rails.


ArchLinux x86_64 on Dell Latitude E5410

Offline

#4 2012-04-17 12:52:21

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Ruby or Python. Can you go wrong there?

A wise random-Internet-person once told me that, even though Python and Ruby and very similar in their capabilities, one just tends to "click" with a person more than the other. I tried them both and one clicked with me. (it only took, like 30 minutes of trying them out) Which one clicks with you may be different from the one I chose.

Disclaimer: I have no experience with web development, but you did ask a pretty generic programming language question... wink

(Also LUNAR! is a very wise piggy in regards to all things programming)

Last edited by drcouzelis (2012-04-17 13:24:38)

Offline

#5 2012-04-17 13:05:45

skwo
Member
Registered: 2008-11-13
Posts: 133

Re: Ruby or Python. Can you go wrong there?

@drcouzelis
Out of curiosity: what clicked with you? smile


ArchLinux x86_64 on Dell Latitude E5410

Offline

#6 2012-04-17 13:16:16

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,928
Website

Re: Ruby or Python. Can you go wrong there?

skwo wrote:

@drcouzelis
Out of curiosity: what clicked with you? smile

He won't tell you, I'm sure tongue
Just look at his blog, and you'll know big_smile

Last edited by SanskritFritz (2012-04-17 13:17:42)


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#7 2012-04-17 13:21:42

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Ruby or Python. Can you go wrong there?

skwo wrote:

Out of curiosity: what clicked with you?

I use Python, usually Python 3.

I like the use of whitespace and not seeing unnecessary formatting characters. I like how the developers are not afraid to use object oriented programming when it makes sense and procedural programming when it makes sense. I like the Zen of Python or whatever it's called.

I suppose those are pretty simple reasons. tongue

@SanskritFritz: What?? And miss the chance to up my post-count? wink

Last edited by drcouzelis (2012-04-17 13:23:05)

Offline

#8 2012-04-17 13:32:41

skwo
Member
Registered: 2008-11-13
Posts: 133

Re: Ruby or Python. Can you go wrong there?

@drcouzelis
Thanks!
I guess this is the reason I go for Rails, since Django (and no other mature web framework for python) supports python 3
But Ill definitely learn python some day in the near future wink


ArchLinux x86_64 on Dell Latitude E5410

Offline

#9 2012-04-17 22:43:38

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: Ruby or Python. Can you go wrong there?

Pyramid and cherrypy is ported to py3 too. (not that there really is anything wrong with using py2 either, specially if you write your apps in py3 style when it comes to handeling strings vs bytes etc.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2012-04-18 01:40:40

scjudd
Member
Registered: 2010-08-18
Posts: 14

Re: Ruby or Python. Can you go wrong there?

Mr.Elendig wrote:

(not that there really is anything wrong with using py2 either, specially if you write your apps in py3 style when it comes to handeling strings vs bytes etc.

I agree.. python2 isn't going away any time soon. I work almost exclusively with it. smile

Last edited by scjudd (2012-04-18 01:42:08)

Offline

#11 2012-04-18 06:02:21

Nisstyre56
Member
From: Canada
Registered: 2010-03-25
Posts: 85

Re: Ruby or Python. Can you go wrong there?


In Zen they say: If something is boring after two minutes, try it for four. If still boring, try it for eight, sixteen, thirty-two, and so on. Eventually one discovers that it's not boring at all but very interesting.
~ John Cage

Offline

#12 2012-04-18 06:05:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,334

Re: Ruby or Python. Can you go wrong there?

Nisstyre56 wrote:

A cursory glance -- it looks like Lisp to me hmm


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#13 2012-04-18 09:12:28

skwo
Member
Registered: 2008-11-13
Posts: 133

Re: Ruby or Python. Can you go wrong there?

Thanks for the replies!

I actually think to stay with PHP (want to try some popular MVC framework that I never tried), and instead learn python aside (since I always wanted to learn python).


ArchLinux x86_64 on Dell Latitude E5410

Offline

#14 2012-04-18 10:09:13

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: Ruby or Python. Can you go wrong there?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#15 2012-04-18 10:10:47

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Ruby or Python. Can you go wrong there?

ewaller wrote:
Nisstyre56 wrote:

A cursory glance -- it looks like Lisp to me hmm

It looks like Navaho to me :-D

Offline

#16 2012-04-18 10:27:27

skwo
Member
Registered: 2008-11-13
Posts: 133

Re: Ruby or Python. Can you go wrong there?

Yes, this is the blog post that made me think about the switch.

But on the other hand, who cares? I like PHP, I know about its issues, and I tend not to write code that is ambiguous.

I'm sure you can find issues with every language, for example here is a funny presentation about ruby and javascript
http://www.youtube.com/watch?v=kXEgk1Hdze0


ArchLinux x86_64 on Dell Latitude E5410

Offline

#17 2012-04-18 21:12:54

frodoontop
Member
From: Netherlands
Registered: 2004-05-18
Posts: 37
Website

Re: Ruby or Python. Can you go wrong there?

I would like to recommend Ruby as a language. It's syntax is quite elegant, even compared to Python. I've programmed in Ruby for some years now as the main programmer of Rubyripper.

But in the end the language is not that important. Java or Python would suffice as well. More important than learning a specific programming language, is learning proper design. Experienced programmers may argue that code should be able to read "like a book". Telling a computer to do a thing the right way can be done easily. To let other people understand your code at once, you need some experience.

After learning the basic syntax, please learn about some design patterns for that specific language. A lot of material is documented in books. Especially in the Ruby and Java language.

Offline

Board footer

Powered by FluxBB