Part of the EllisLab Network
   
1 of 2
1
Ruby & Python
Posted: 12 December 2006 06:02 AM   [ Ignore ]  
Summer Student
Total Posts:  24
Joined  12-08-2006

After the “rate yourself” thread I notice that quite a few of you harbor some animosity towards these languages. I was just curious why.. I mean sure they are immature and not as well supported as PHP, but I admire their approach to OO and clean syntax. Coming back to PHP always strikes me as a bit messy. This is of course coming from a very green programmer (I am more of a designer than anything else) So I am curious to hear what you hardened vets have to say.

Profile
 
 
Posted: 12 December 2006 08:46 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  486
Joined  09-14-2006

I didn’t post in the “rate yourself”, but IMO this may stem from Ruby and Python fanboys obsessing over how great their language is, even worse, bashing PHP. This then causes PHP lovers to dislike the languages without knowing much about or having tried them. This is similar to what you see in with OS debates. Mac and Ubuntu lovers, for example, cause similar distaste for their respective OS because of their attitudes. This is, of course, my humble opinion.

 Signature 

Code Igniter 1.5.4 / CentOS 5 / PHP 5.2.3 / Apache 2.2.2 / MySQL 5.0.27

Profile
 
 
Posted: 12 December 2006 08:48 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  82
Joined  05-26-2006
Ace of Dubs - 12 December 2006 06:02 AM

I mean sure they are immature and not as well supported as PHP, but I admire their approach to OO and clean syntax. Coming back to PHP always strikes me as a bit messy.

In my experience so far, messy code isn’t exclusive to any one or few languages. You can write messy code in any language, it just depends on you as a programmer as to how you write your code. If you have a habit of writing it in a clean way, it would hardly matter whether you are writing it in PHP, Ruby, C, or anything else. smile

Profile
 
 
Posted: 12 December 2006 09:03 AM   [ Ignore ]   [ # 3 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  486
Joined  09-14-2006

Very good point, amit.

 Signature 

Code Igniter 1.5.4 / CentOS 5 / PHP 5.2.3 / Apache 2.2.2 / MySQL 5.0.27

Profile
 
 
Posted: 12 December 2006 11:30 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  24
Joined  12-08-2006

I didnt mean messy in terms of organization, more of an aesthetic thing. PHP seems wordier and visually not as appealing to me. Plus all those question marks gives me the feeling of a language that is not very sure of itself. :D

All kidding aside, there is a certain irony behind PHP-haters who bash from Wordpress blogs. I think the more well-rounded programmers tend to rely on various languages, enjoying the perks of each one. Best tool for the job as they say. All the same, it seems our industry is ripe for a lot of changes and all the hype around Rails, Django, etc has been good for PHP as well, inspiring a more modular approach to coding and great projects such as CI.

Profile
 
 
Posted: 12 December 2006 01:21 PM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  886
Joined  03-06-2006

I love Perl for sysadmin stuff, and for processing things like .CSV files, images, all kinds of stuff.  There are things in Perl, like more quoting options, that I really wish PHP had included. For example,

$mystring = qq{<img src='image.jpg' onclick="this.style.color='red';" />\n};

In PHP there are two quoting characters, ” and ’ ... but Perl can use any non-alpha-numeric as a quoting delimiter.

It is also a lot easier to use regexes in Perl, and I like things like

die unless $a;

I also often mix Perl and BASH, for quick and dirty tasks.

However, as soon as I start using web pages, I REALLY like all the functions built into PHP.  After all, it was DESIGNED for the web, and that shows.  I find I am doing over half my work now in PHP, even though it is not my favorite language overall.

For a couple of years I taught an introductory programming course in Python, and I would still tend to use it for teaching, partly because it has a nice textbook you can download as a PDF and use for free.  But I couldn’t really get used to having whitespace be so important, and also it made me do too much typing.

I looked at Ruby, and was strongly considering switching to Ruby and Rails, when I came across CI.  I really like the design of the language, but when I actually tried to use Ruby and Rails on the web, I backed off.  There were just too many hoops to jump through to get things set up.  This may be easier, almost a year later, when many more web hosting services support Rails, but also I didn’t have time to learn a new language.

What I think I intend to come out of this rambling, is that the choice of programming language usually comes down to issues other than the inherent strength of the language.  I have even heard if you want to be assured of finding niche employment at a good wage forever, learn Cobol.  It would be boring work, but as the few remaining Cobol programmers retire, there will always be a business somewhere that just needs maintenance of its Cobol stuff.

 Signature 

Corozal, Belize | Linux.bz | Using Kubuntu Linux 7.10 | CodeIgniter 1.5.3

Profile
 
 
Posted: 12 December 2006 02:51 PM   [ Ignore ]   [ # 6 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  481
Joined  03-08-2006

Ruby is actually an old language, dating back to 1993 in Japan. It’s only recently the web framework (using Ruby as its base) appeared. And it is this implementation that some people hate in the web world. Some because of the reason already mentioned by joeles; and some people because it’s not very good anyway. (Code generation with scripts. WEBRick. Total PITA to install. Not widely supported. Need I go on? grin)

 Signature 

Flickr | Last.fm | Del.icio.us

Profile
 
 
Posted: 12 December 2006 04:22 PM   [ Ignore ]   [ # 7 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  5893
Joined  11-23-2003

I have actually started to learn Ruby for much the same reason that LinuxBZ uses Perl.  Ruby is also very good for system admin type stuff and of course you can use it for the web.  I also think that learning Ruby will make me a better programmer overall.  I am not going to go away from PHP because my favorite applications (CI and EE) are built in PHP but I do have my reason for learning Ruby as well.  Another reason is that I am a computer science student and other languages are part of the curriculum.

I would never say that one is better than the other.  CI and EE are built in PHP because building those apps in any other language would be silliness at this point.  If the developers were building hosted applications they would at least move to PHP 5.X but even that is not fully an option at this point.  I think EE makes the case that PHP is good enough though.  Great applications are built by great programmers not great programming languages.

Edit:  Ok, you might make a case that CI could be moved to 5.x because it is a developers app but lets not go there.  wink

 Signature 

EE 2.0:  A designers dream becomes a developers dream | Follow me on Twitter.

Profile
 
 
Posted: 12 December 2006 06:30 PM   [ Ignore ]   [ # 8 ]  
Grad Student
Avatar
Rank
Total Posts:  56
Joined  05-10-2006

I don’t hate either language. In fact I would like to learn Python. The problem is that both environments are hard to set up for a production web server for the average person that is not a system administrator. Yes I know about local installation and development but I’m motivated to do anything if I can’t put the code on the dedicated server I have. Both Ruby and Python interest me but building something my client can take with them elsewhere easily if they choose to host elsewhere is why I have based everything I do on PHP.

Profile
 
 
Posted: 12 December 2006 06:58 PM   [ Ignore ]   [ # 9 ]  
Summer Student
Total Posts:  24
Joined  12-08-2006

The Dude makes some good points.

I am focusing most of my energy on PHP for a lot of the same reasons. Thanks for your avatar..reminded me I need to buy milk

Profile
 
 
Posted: 14 December 2006 04:10 AM   [ Ignore ]   [ # 10 ]  
Lab Assistant
RankRank
Total Posts:  109
Joined  05-25-2006

I have said “i hate Python and Ruby” in “rate yourself” thread.
Yes, it is true. I like languages based on C. I have coded in C and nowadays i use Java and PHP.
PHP is good for rapid web development and small projects. Java is good for serious projects.
I am a Java fan.

 Signature 

CI 1.5 on WAMP (W2k Pro, Apache 2, MySQL 4.1, PHP 4.4)

Profile
 
 
Posted: 14 December 2006 07:21 AM   [ Ignore ]   [ # 11 ]  
Summer Student
Total Posts:  20
Joined  12-08-2006

Everyone loves what he knows. And everyone hates what he doesn’t know. Hate comes from misapprehension.  So it’s only human nature, we study things we don’t know, to love’em. I love C and langs based on it, love brackets and semicolons, but at the same time I study Ruby and I bought some books about Ruby and Rails, cos docs are not enough. Python ... I ignore. Ignore is better.

 Signature 

I’m agile developer (not designer) from Slovakia smile Samples of my work you can find at http://www.ivansuchy.com

Profile
 
 
Posted: 14 December 2006 10:52 AM   [ Ignore ]   [ # 12 ]  
Grad Student
Avatar
Rank
Total Posts:  59
Joined  11-13-2006
Ivan - 14 December 2006 07:21 AM

Everyone loves what he knows. And everyone hates what he doesn’t know.

I know PHP, but don’t particularly love it. It’s a tool I use, and it’s a tool I know well, so I have a definite preference. Likewise, I don’t know Ruby or Python, but don’t hate them. Since I don’t know them, I cannot use them, so they simply don’t enter into my realm of thought. That doesn’t mean they are bad or unsuitable, but simply that they are tools that I cannot access at this point.

I think that some people “get” certain languages better than others. I have trouble with Java sometimes (and my knowledge of it is minimal). Some OO concepts in PHP seem complicated to me despite years of experience in PHP. And so on and so forth.

I would like to learn both Ruby and Python at some point. Right now it’s not some arbitrary “hatred” of things not PHP holding me back so much as a lack of time to really jump in and learn new languages. At this point, increasing my understanding of PHP and enhancing my coding techniques is the best way for me to spend my learning time.

My ignorance of a particular language doesn’t reflect on the usefulness of that language. Languages are neither good or bad, but they do have specific levels of usefulness in particular situations. I have a comfort zone in PHP due to a large amount of knowledge. Ask me to do something in Ruby and my total lack of knowledge there would make me uncomfortable, and I might hate the experience, but not the language. It kind of boils down to not having emotional reactions to a tool. I don’t.

Profile
 
 
Posted: 15 December 2006 02:17 PM   [ Ignore ]   [ # 13 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  472
Joined  09-26-2006

I bumped into Ruby some years ago, (I think it was bundled with a suse distro). I was and still am intrigued,
but I confess Matz’s ‘Principle of least surprise’ often surprised the hell out of me.

I learned to program using COBOL and Fortran. The ICL mainframe OS provided a lovely little language called
SCL or ‘system control language’ . It was my introduction to ‘interpreted’ languages and I loved it.

Most of my time was spent building large pieces of even larger applications. I loved being able to dash off a
database extract or a report with a few lines of code. Next came perl, and I hated it because I had got so
used to SCL.  But perl excels at sys admin, and works everywhere.

Python I enjoy a great deal, it does sys admin nicely, is great for prototyping or code-while-u-think. It has an
excellent GUI library and can be used for standalone or web applications. In my opinion the python community
has produced some of the ugliest ducklings ever seen when it comes to web apps, but hey, u can’t have it all!

Java was the biggest language disappointment I’ve suffered so far. Great, it’s not compiled. But then they make
it look and feel like C, with reams of code to get anything done.

PHP is my preferred language for working with web stuff. Not because I am married to it, or hate other stuff, it just
lets me get things done, and thats what I care about.

 Signature 

Old programmers never die, they just parse away.

Profile
 
 
Posted: 15 December 2006 03:46 PM   [ Ignore ]   [ # 14 ]  
Summer Student
Total Posts:  24
Joined  12-08-2006
Oscar Bajner - 15 December 2006 02:17 PM

In my opinion the python community
has produced some of the ugliest ducklings ever seen when it comes to web apps, but hey, u can’t have it all!

LOL! So true. Why is it that the best programmers are often the worst designers? Must have something to do with left/right side of brain issues. Django is probably the only decent looking Python project I have seen in a long time.

Profile
 
 
Posted: 16 December 2006 11:56 PM   [ Ignore ]   [ # 15 ]  
Grad Student
Avatar
Rank
Total Posts:  53
Joined  04-10-2006

ruby is cool but hard to understand at the beginning

 Signature 

Portfolio : benjamindavid.cc
Company : twodecember.com
Web Designer Things : webdesignerthings.com

Benjamin David, Chef de projet multimédia

Profile
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 66430 Total Logged-in Users: 38
Total Topics: 84793 Total Anonymous Users: 5
Total Replies: 455061 Total Guests: 251
Total Posts: 539854    
Members ( View Memberlist )
Newest Members:  Dylan1978X_franbaguasllogocsaturkeyPeter BryanttherendStudioGeorgiaJZeerfedeghe