Skip

The Ascendancy of Ruby
October 10, 2005 6:36 AM   Subscribe

Warning: Geek Hype Alert! Artima.com has just launched a new on-line magazine, Ruby Code & Style. They already host Web `zines for two long-time, corporate powerhouse languages, C++ and Java. For their next subject one might have expected them to go with Python or perhaps Perl, but instead they picked Ruby.

Need more proof Ruby's time has come? The Fifth International Ruby Conference, to be held this week in San Diego, CA, is sold out. The attendance is triple what is was last year. Any readers of Slashdot here likely do not need yet another mention of Ruby on Rails, which has spread like wildfire. But Agile Web Development with Rails is currently in the top 500 over-all sales rank on Amazon, and currently #2 in the Computers and Internet Programming section.

While MeFi tends to focus on more socially-broad topics, I know there is a cadre of geeks here. So, tell me: Is this it for Perl, Python, and PHP? Are the P* languages to be sent packing? Or is this swell of Rubymania just a passing fad, the results of overblown blog hype? And what other programming languuages might be lurking to become The Next Big Geek Thing? (I'm still waiting for Lisp to assume return triumphant.)
posted by Ayn Marx (87 comments total)

 
[+] ?
posted by mds35 at 6:40 AM on October 10, 2005


"Is this it for Perl, Python, and PHP? Are the P* languages to be sent packing? Or is this swell of Rubymania just a passing fad, the results of overblown blog hype?"

Yes.

It doesn't matter what programming language you use(*).
What matters is that you are a good programmer

If you're a bad programmer no programming language can help you, just as a liquid-core depleted uranium bowling ball can't help you if you can't stay on the lane.

*) BASIC excepted, of course.
posted by spazzm at 6:42 AM on October 10, 2005


I remember when Pascal was the quite the shiny new toy...or, at least, the prevailing academic attempt to save us all from the damage BASIC's GOTO statement had done to us. I'm still waiting for an "ultimate" computer programming language, and it's looking like there really is no such animal any more than there's an "ultimate" human language. The only useful distinctions are that some are more feature-rich than others or work better for a given application.
posted by alumshubby at 6:54 AM on October 10, 2005


I was under the general impression that ruby on rails is kind of a long shot, with ajax or xml get requests.... depending on how much you hate the acronym ajax is the next big thing. Or at least thats what all the cool web 2.0 apps are using. By cool i mean usable ones like Gmail, Gmpas, Writey, Del.icio.us Director and others.....

although i did read a Python on Rails post earlier on slashdot, that seems to be some sort of dungeon masters creation of hodge podge python sql and of course AJAX.
posted by sourbrew at 6:56 AM on October 10, 2005


alumshubby, I feel like java will be the parent of ultimate programming languages. Object Oriented code is obviously a very powerful concept, but prior to the java API there was never a really solid way of interfacing lots of random objects. I see the approach to API's that have made java so scalable as having a long term impact on not just the programming industry, but on many other fields. Genetics being the first field outside programming where i see an api being massively useful for designing little critters with actual uses.
posted by sourbrew at 7:00 AM on October 10, 2005


Is this it for Perl, Python, and PHP? Are the P* languages to be sent packing? Or is this swell of Rubymania just a passing fad, the results of overblown blog hype?

er, no, no and no... is Ayn Marx living in a kitschy, hackneyed technological world where, in the language of movie cliches, "there can be only one"? That's a pretty silly way to see the IT situation.
posted by clevershark at 7:01 AM on October 10, 2005


sourbrew, ever heard of the STL?

And when did Java get generics? I ask because I seem to remember writing massively scalable apps ten years ago, using an obscure programming language called C++.
posted by veedubya at 7:04 AM on October 10, 2005


The Tao gave birth to machine language. Machine language gave birth to the assembler.

The assembler gave birth to the compiler. Now there are ten thousand languages.

Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.

But do not program in COBOL if you can avoid it.
( The Tao of Programming; Geoffrey James, Duke Hillard, et al.)
posted by leapfrog at 7:07 AM on October 10, 2005 [1 favorite]


The more obscure the language gets, the more valuable the programmer who can code in it. Provided that language was used in some mission critical, difficult to migrate platform.

*goes to dig up FORTAN maual to make oodles of cash from some multinational banking corporation*
posted by gwint at 7:16 AM on October 10, 2005


I've used PHP, albeit somewhat limitedly, and never really liked it. I always found that for really large applications it ran slow and was somewhat combersome to maintain. Of course this was about 5 years ago, but the PHP/MySQL relationship everyone gossips about seemed way overhyped to me.

I'm just getting back into web sites, I'll give Ruby a try.

PS, Metafilter used to be originally all geeky and great.
posted by geoff. at 7:17 AM on October 10, 2005


Ugh, if it replaces the scourge of PHP, that'd be nice. But I don't see that happening for a while.
posted by cmonkey at 7:20 AM on October 10, 2005


As a long-time python programmer I find it hard to get very excited about Ruby. The block syntax is pretty cool, but that is more than offset for me by the module naming. In python, if I see something referenced via its module, say foo.bar(), I know that I can look at the top of the file and see 'import foo', and know that is where the definition of bar() is coming from. In Ruby, It's arbitrary. I might 'require "hello"', and the module contents will actually be referenced as 'world.bar()'. No connection between how the module is imported and how you actually reference it's contents. Also, I would find it hard to live without a few language features like generators and list comprehensions. I don't know much ruby so for all I know there are equivalents though.


I think the real reason behind ruby's sucess is the marketing. This is not a slam, I think the python community has alot to learn from how well Ruby on Rails has been packaged and marketed. Turbogears is python's answer to RoR, but not really for any technical reason but because of packaging (it's dead easy to install) and marketing (it comes with a 20 minute tutorial video to make a Wiki).

That said, dynamic languges are a great tool to have, and the more accepted they become outside of their niche the better.
posted by hupp at 7:22 AM on October 10, 2005


Has anyone used Ruby on Rails in production work except 37signals (who invented it)?
posted by smackfu at 7:23 AM on October 10, 2005


Python is the new Ruby.

I haven't seen Ruby used for anything as cool as P.yObjC
posted by Space Coyote at 7:31 AM on October 10, 2005


(PyObjC)
posted by Space Coyote at 7:32 AM on October 10, 2005


Ruby seems to be caught up in some sort of blogger-positive-feedback-loop, its practically viral marketing. I had something long-winded to say, but spazzm, hupp, and smackfu already hit said nail on head.

besides, python is better!

and fuck semicolons and braces! indentation is the FUTURE!!

posted by Mach5 at 7:48 AM on October 10, 2005


No multiple inheritance? No thanks.
posted by nicwolff at 7:55 AM on October 10, 2005


Personally I hate the "indentation replaces curly braces" approach.
posted by clevershark at 8:04 AM on October 10, 2005


Has anyone used Ruby on Rails in production work except 37signals (who invented it)?

Yes, I'm told so.

Ruby is becoming established; that's all this means. It's a cool language, and Rails shows it off very nicely. But I haven't felt compelled to abandon Python just because I like Ruby.

There's also an undeniable youthful energy in the Rails scene that plugs nicely into the blog hype machine and spreads the Ruby mind-virus faster. At OSCON this past summer, the Ruby track was the "cool kids" track. They even staged a happening.
posted by pbx at 8:04 AM on October 10, 2005


Personally I hate the "indentation replaces curly braces" approach.

I agree. Whitespace Python is the only programming language where whitespace is 'active'. It's ridiculous, IMO. Good programmers will indent well on their own, and perhaps every once in a while deviate from a strict standard. Python may be great from a theoretical, CS language perspective, but active whitespace has kept me from being too interested.

As far as ruby is concerned, I may give it a look. The big problem for me is that it's more 'fun' for me to just write whatever I need in java then it is for me to learn new technologies. Hell, what can you do in Ruby that you can't do in java? What makes Ruby easier to use then Java?

This Rails thing (what is it, an API?) I have no idea what that's even about, but couldn't you do some kind of Java on Rails if it was really that revolutionary?
posted by delmoi at 8:15 AM on October 10, 2005


So, tell me: Is this it for Perl, Python, and PHP?

Of course not. At least not yet (most languages have their heyday and then wane). There are very specific situations where using Ruby would make no sense.
posted by RockCorpse at 8:20 AM on October 10, 2005


Each language has its strong point, but I really don't see much in either Ruby or Python that could really steer me away from PHP at this point, especially when I consider the improvements that PHP5 has brought to the table.
posted by clevershark at 8:22 AM on October 10, 2005


We're talking web apps here, people. ColdFusion is the fu

JRun Error
posted by mikeh at 8:24 AM on October 10, 2005 [1 favorite]


People still use Tcl.
posted by Eamon at 8:26 AM on October 10, 2005


If by Is this it you mean the end of the hype stage of the language, than yes probably. PHP and PERL are both past that stage of their growth (not sure Python was ever that over-hyped).

I still use PHP and PERL for the majority of my web development when I'm doing small sites. They're easy to learn and use (though regular expressions can be messy). This means people will continue to use them once the hype is passed onto whatever the hot language this week is at the bookstore.

True engineers learn how to program in general, they don't learn individual languages. Most of these languages are similar, just different libraries and syntax variations. Learn one, and the rest just fall into place. The right language to use is the one that gets the job done quickly and is easy to maintain. While the maintence aspect of all these languages is a little questionable, their certainly easy enough to use.
posted by inthe80s at 8:32 AM on October 10, 2005


All I can say to the anti-whitespace crowd is, try it, you'll like it.
It's not at all a theoretical CS excecise, I think python's success has proven that it's a viable feature. I love the indentation because it makes code so clean, so easy to read. There's not a single extra redundent character to get in the way.

Regarding what does Ruby have that Java doesn't, the main distinction is that Ruby and Python are dynamic, strongly typed languages. In comparison, perl and PHP are dynamic, weakly typed languages because they allow implict conversion between types, e.g. "1" + 1 makes sense. The difference between dyanamic and static typing is that with static typing all type checking is done at compile time, while dynamic typing defers that to run time. Because types and methods are first-class objects, it's very easy to generate new types and methods on the fly. This allows you to write much more succint, readable code, because your types can much more closely match your domain. It's a little hard to describe, so I really think everyone should know at least one dynamic language just so they have an intuitive understanding of when it's useful.
posted by hupp at 8:39 AM on October 10, 2005


yeah, i never got the 'my language is best' thing either...once you learn to program, your basic knowledge is portable, and you spend a weekend or so adapting it to some new language...i think the thing with ruby is that latecomers (not said in a disparaging way, as we get here when we get here) like a language they can get into on the ground floor...so java was the big thing, though still slammed by many, but it was already established by the time they came along, and then ruby hits, and they're like 'i can grow up with this language'...and there's also the i'm-marketable-because-i-know-the-hot-new-thing crowd, but they're kinda whores
posted by troybob at 8:41 AM on October 10, 2005


php is not going anywhere, obviously. Python might lose some mindshare to Ruby, but not much. The core Python crowd seem pretty loyal.

But if you are a long time web app developer, developing in RoR feels like taking off leg braces and shoes made of large wooden blocks and running free in the wild wild web.

Many of the advantages of RoR are being rapidly replicated in other platforms/frameworks, but ruby is so deliciously expressive it is continually giving that warm good feeling inside that I used to feel two decades ago when when I was first learning to program in c. It's as expressive as Lisp, but more readable & modern. It shares with lisp the wonderful feature that abstractions look the same as syntax, making it easy & convenient to create your own "domain specific languages" -- this is a large part of what makes RoR relaxing & fun to work with. You spend much less time experiencing that trying to put a square peg in a round hole feeling.

Python is also very expressive, and I doubt there's really a case to be made for one being more expressive than the other, it's just a matter of which fits better with your internal way of thinking about things. Php is not particularly expressive but it is dead simple to learn & understand & you can do quick & dirty things very quickly. And unfortunately dirtily.
posted by lastobelus at 8:46 AM on October 10, 2005


Space Coyote, there is a library for writing Cocoa applications in Ruby, it's called (surprise) RubyCocoa. And there is some interesting work being doing to create self-contained app bundles that don't require an external Ruby install, so to the uneducated consumer of an app, it looks like it was written in Obj-C or Java. I've been using RubyCocoa for a few years now, I think it's pretty great.

delmoi, there is a Java rails adapation, it's called Trails. The rails folks say that it doesn't allow for as rapid of a development cycle as rails, but I've heard that Trails is faster than other Java webapp technologies. It will be interesting to see where it goes.

I come from a Perl/C++/Java background, but have been using Ruby for almost five years now. It's pretty much replaced perl for all of my scripting needs, and if projects like RubyInRuby (a Smalltalk-like VM where the interpreter and core classes are written in a subset of Ruby and then bootstrapped) and YARV (a bytecode rewrite of the VM that is promising healthy performance improvements) take off, then I think Ruby will get another boost.

And on a special note, if you ever have had to write Perl glue for C/C++ code, Ruby's extension model is a godsend. Very clean and easy to understand. And the language implementation itself is relatively clean compared to Perl, even though Ruby and Perl 5 are roughly the same age, although that might be a function of the smaller size of Ruby's core development team.
posted by beaverd at 8:50 AM on October 10, 2005


Hell, what can you do in Ruby that you can't do in java?

Well, obviously nothing since they are both Turing-complete

What makes Ruby easier to use then Java?

Blocks & closures, and the lisp-like conflation of syntax with user-programmed abstractions.
posted by lastobelus at 8:57 AM on October 10, 2005


I dont see any one language "winning out" over the others - you use the tool or programming language that's best for the job at hand.

(disclaimer: I bought both the Pragmatic books; the pickaxe book and the Rails book - but I havent dived into them yet)
posted by mrbill at 9:03 AM on October 10, 2005


I still use Perl for my shell scripts. Ruby is definitely my hands down favorite for my own RAD, and Java will continue to pay my bills.
posted by furtive at 9:05 AM on October 10, 2005


Ruby looks like a pretty schnazzy language. I do not think that Ruby storm troopers will go around any time soon enforcing that Ruby is the one true language.

Java will stick around for awhile. Despite setAnnoyance(new Boolean(true)) of the getConvention("java beans"), there are many useful little bits of code written in java. I wouldn't like to dismiss java, as it occasionally shows a glimmer of promise here and there, but Java technology is definately pushed by the Sales-guy crowds. I'll leave out the C++ for Dummies joke.

I think enthusiasm for java will wane slowly. As far as Ruby goes, things look promising.
posted by chibikeandy at 9:09 AM on October 10, 2005


hupp: All I can say to the anti-whitespace crowd is, try it, you'll like it.

No, I'll never like it.

"Why?" might one ask. So I'll tell one.

If you use real syntax, then formatting can be arbitrary. Formatting is easily broken; break formatting on Python code, and it stops working. Break formatting on PHP code, and nothing much happens at all except that it becomes harder for humans to maintain. The machines that actually run it, though -- they don't care.

All Python really accomplishes with "active whitespace" (to borrow someone else's phrase) is improved readability. It does do that. I don't work in Python, but I can easily understand it and hack it. But I don't trust it, because I know how easy it would be to break that "active whitespace"...

Now, you could easily get the same readability by, say, embedding structures in xml containers. That would be kind of interesting -- an XML-ized Python.
posted by lodurr at 9:26 AM on October 10, 2005


I agree. Whitespace Python is the only programming language where whitespace is 'active'.

No, it isn't. Haskell has significant whitespace as well.

Formatting is easily broken; break formatting on Python code, and it stops working.

How exactly is this going to happen? You have an editor that eats spaces but not braces? It's not as if Python editors aren't indentation-aware.
posted by kenko at 9:33 AM on October 10, 2005


PHP might not disappear anytime soon but I have it on excellent authority that its use is definitely on the wane in Europe and in the US.
posted by fenriq at 9:50 AM on October 10, 2005


I am a Python fan, so take the following with a grain of salt.

Programming languages are tools: we use them to get things done. Now, as every craftsman has his favorite hammer or screwdriver, so every programmer has his favorite language. I prefer Python, others prefer Ruby, some others Perl, and then they are the nutters who swear by Korn shell.

However, there's one point when the tool/programming language analogy falls short: programming languages are also just that, languages: i.e. once in a while that piece of code, that "text," needs to be communicated to and understood by some one else, someone who may not be as versed in the language.

And in that point, there is a great dichotomy among coders: If you believe that whoever is reading your code, your "text", must and should be versed in the same language with the same level of expertise, you pick the language you like the best (which is a personal preference). If you believe that you should be able to read and understand someone else's code as easily as possible and that others should understand yours, then readability is paramount and particular features are just "syntactic sugar".

I fall in the second camp: I am willing to put up with Python's lack of a "switch" statement for example, or the mess of the standard library, because I can go back to code I've written 2-3 years ago and change it and re-use it in minutes --I have Awk and PHP code I've written myself about as long ago that I have no clue how to change now. Never mind looking at someone else's code or figuring out a particular trick.

Some people would say that proponents of readability are people with more experience in software development firms. I think that's only partially true: I believe that if your software house has strict coding guidelines and good documentation, then the choice of language is irrelevant: you have an "idiom", and a "dictionary" to make sense of others' code and all is well. But in certain situations and certain environments (start-ups for example, or dispersed teams), readability is very important to get the best software out there, and I for one appreciate a language (a tool) that's written with that design objective paramount.

Having said that, the latest Python features (decorators and such) leave me unimpressed and my infatuation with the language is waning, exactly because readability is becoming worse. And having said that let me also say that I've gone through the Ruby tutorials a few times, and Ruby doesn't click for me; it's as orthogonal to my mind as Perl --but at least a lot better designed.

Finally on the whitespace issue: originally I went through the Python tutorial as a dare from a co-worker, because we both thought whitespace-as-syntax was stupid. Two days later, I could not imagine coding without it. Fact is, any modern editor will deal with whitespace so that Python will never be bothered, you'll have fewer syntax erros in the code from the get-go, and the absense of extraneous braces means that more (readable) code fits in a screen, so you can understand larger pieces of logic easier. Try it, you will convert.
posted by costas at 10:02 AM on October 10, 2005


That would be kind of interesting -- an XML-ized Python.

I'm consulting at a major bank that for some strange reason is using Ant for a big chunk of their middleware. You don't know the definition of verbose until you've seen an XML based for loop with if/else wrapped in a try/catch.
posted by furtive at 10:02 AM on October 10, 2005


Personally, I've been using PHP a lot lately. Not because PHP is intrinsically a fantastic language or anything, but because the apps that I'm interested in (MediaWiki and WordPress) are written in PHP. I spent a lot of time on GForge before that, and I'm also starting to play with phpGedView for genealogy stuff. All of them built in PHP.

I've poked at Rails a little bit, and it looks interesting and cool and all that, but the nagging doubt I have is this: if it makes building killer apps so easy, where are the killer apps? I doubt that I'm going to be the first to build a killer app in Ruby, so I'll wait for someone else to do it before making the leap.
posted by robla at 10:51 AM on October 10, 2005


How exactly is this going to happen? You have an editor that eats spaces but not braces? It's not as if Python editors aren't indentation-aware.

Well, HTML/XML eats whitespace... you can't post a Python example on a web site without bracketing it in <pre> tags. Even then, some browsers make it hard to copy and paste preformatted examples while preserving the spaces. A minor annoyance, for sure, but one that's bound to trip up a few people. Especially on forms where HTML tags aren't allowed.

Python looks like a great language apart from the white-space controversy. Why don't they just allow _both_ styles (braces and whitespace), and open the language up to more people? Python's advantages come from its closures, dynamic typing, set constructors, etc., not from its whitespace behavior -- no sense in making that the impediment.
posted by purple_frogs at 10:58 AM on October 10, 2005


purple_frogs writes "Why don't they just allow _both_ styles (braces and whitespace), and open the language up to more people?"

YES YES YES! Have you ever seen two editors that handled whitespace in exactly the same way? Give the developer at least the option, instead of reinventing the wheel...
posted by clevershark at 11:00 AM on October 10, 2005


What costas said...

I just picked up the pickaxe book last friday.
posted by BrotherCaine at 11:33 AM on October 10, 2005


From the zen of python:

"There should be one-- and preferably only one --obvious way to do it."

Two styles of block delimiters would violate this principle.

The complaint about pasting python code into a web form is a valid argument, I agree. Over the last 5 years of python usage I have had about 2 syntax errors (caught at compile time) from bad indentation. It's really not a problem.
posted by hupp at 11:36 AM on October 10, 2005


... Python editors ...

See, that's the thing: I don't use a "python editor". I use a "text editor". Perhaps you've heard of them? Wonderful things. They even work for more than one programming language.
posted by lodurr at 11:41 AM on October 10, 2005


Python's advantages come from its closures, dynamic typing, set constructors, etc., not from its whitespace behavior -- no sense in making that the impediment.

I find the way Haskell does it to be just about perfect. You can mix whitespace notation and brace/semicolon in the same function (sooo pleasant), but this feature is closely related to the semantics of the language and would almost certainly not be easy to implement as a syntactic add-on to language with wildly different semantics.
posted by sonofsamiam at 11:48 AM on October 10, 2005


I've just spent my free time in the last two weeks picking up Ruby and Ruby On Rails, recoding a fairly basic project that I had some PHP effort on. RoR made it -much- simpler to build something workable and adaptable.

There's a learning curve, to be sure, but if you know Perl or PHP, it won't be steep to learn Ruby. RoR is something quite different for someone like me who has never had to work with MVC concepts or a framework. It's a little constraining at first, but once you find your feet creation of a working website goes quickly.
posted by Kickstart70 at 11:54 AM on October 10, 2005


I use a "text editor"

I just made a basic script in notepad and vi, without making any changes to prefrences/options. Both worked with only a tab for indentation, no problem.
Here's the test case:

if 1:
print 'horray!'

posted by Mach5 at 12:06 PM on October 10, 2005


I agree with pbx's take on Ruby.

Ruby has been appropriated by the "Web 2.0" hype machine which is attempting to stage a new bubble, using blogs as the medium of advertisement.

Lots of hype and excitement about using the web in new and creative ways to revolutionize the way businesses and communities interact, but like the dotcom bubble, they have absolutely no business model. A souped up AJAX Wiki which multiple people can log into and edit can only go so far.

(Actually, I believe the concealed business model is to get bought out by Google/Yahoo/MS, but only a miniscule number of companies will be successfull, such as 37signals.)

I have worked in Perl for many years, so my perspective on a hot-new dynamically-typed "agile" language is:
so what!
Ruby has an MVC framework for web apps.
Now they just have 5-7 more years to go to re-create Perl's CPAN archive before they can be as practically useful on as wide a scale as Perl is today.

But by then Perl6 will be in general release, and with Perl6's Parrot VM, the choice of language will be obsolete: make up your own damn language.
Use Parrot to convert Ruby, Python, Perl, Java or whatever extension you have into Perl, C, Java or whatever machine code you want.
posted by archae at 12:20 PM on October 10, 2005


Now they just have 5-7 more years to go to re-create Perl's CPAN archive before they can be as practically useful on as wide a scale as Perl is today.

I think you need to look up RubyGem, it beat you to the punch, and with 5-7 years of time to spare ;-)
posted by furtive at 12:27 PM on October 10, 2005


Couple of points:

I phrased my post in the either/or, "One Man Standing" form in order to provoke discussion. So, guilty: -1 trolling.

Ruby has "active whitespace". Newlines have meaning. But no active indentation, and you can join multiple lines onto one by using semicolons. The use of newlines is arguable more transparent than indentation, and less (if any) of a problem for cut-n-paste.

The canard that all programming knowledge is portable, that if you "learn to program" you can pick up any language, is bullshit. Go find someone who only knows VB 6 or COBOL and toss them any Lisp or Smalltalk book you please. They may pick up the syntax, but they may also have been hopelessly crippled by previous programming experience to the point they will never really "get" functional or OO programming.

Merely being able to type out code that compiles or runs is not the same as programming. Language choice matters; it effects the way you think about and solve problems.

Whether Ruby is a better choice than some other language is part of the debate, but whatever you choose, make sure you understand how it shapes your thinking. (My gripe with Rails is precisely on this matter: it curves your thinking into particular types of solutions, not always the best ones.)
posted by Ayn Marx at 12:44 PM on October 10, 2005


Oh, and another thing. Please do not let the nonsense hype over Rails (and Rails+AJAX) put you off Ruby in general. Rails is good stuff, worth looking into, though there are other, less bombastic Web tool as well, such as Og/Nitro, Wee, and IOWA.

But if Rails is even half as good as people claim, it's because it is built on Ruby. Go learn Ruby, then, if you like it, think about what Web tools work best for you.
posted by Ayn Marx at 12:54 PM on October 10, 2005


See, that's the thing: I don't use a "python editor". I use a "text editor"

So do I. It's called emacs, and it works great for Python.
posted by nev at 1:19 PM on October 10, 2005


Ayn Marx: if you program MVC and OOP, you can pretty much pick up any language that uses these principles, then proceed from there to learn the finer points of that specific language. Your example of COBOL and VB6 doesn't fly.
posted by linux at 1:24 PM on October 10, 2005


I don't see the problem with indentation in Python. If you use indentation in other languages, it's just natural and how you would code anyway. The fact that it enforces it is somewhat irrelevant and even may help find bugs in your code as a consequence.

I code all of my python programs purely in vi, and I've never had a problem with the identation requirement of Python.

That being said, you can use semicolons and merge lines in Python as well.
posted by johannes at 1:39 PM on October 10, 2005


The canard that all programming knowledge is portable, that if you "learn to program" you can pick up any language, is bullshit. Go find someone who only knows VB 6 or COBOL and toss them any Lisp or Smalltalk book you please. They may pick up the syntax, but they may also have been hopelessly crippled by previous programming experience to the point they will never really "get" functional or OO programming.

It's not a canard. Plenty of people started with VB and later learned OO languages. I'm one of them.
posted by me & my monkey at 1:39 PM on October 10, 2005


I have little programming experience (mainly simple perl scripts). I've played with ruby recently and found it fairly easy to pick up the basics and, from what i've read, it's powerful enough to compete with other languages over more complex tasks.
I can easily see it being adopted as a language used for learning programming in schools and colleges. As well as RoR I think it's the ease of learning (and perhaps cute name!) that will likely make the language increasingly popular.
posted by tnai at 1:43 PM on October 10, 2005


I think the important point (regarding "the canard") is that while all languages are isomorphic in the sense that they are all Turing-complete, different languages influence how you think about problems, sort of a Sapir-Whorf hypothesis for programming. I don't think anyone would claim Alan Kay doesn't understand OO programming just because it wasn't what he learned first. What is important is that switching languages requires more than just learning the syntax and standard library, it requires you to completely rethink how to approach a problem. As Alan Perlis said, "Any language that does change the way you think about programming isn't worth learning."
posted by hupp at 1:51 PM on October 10, 2005


I'm not so crazy about Rails (I have no need for it) but I love Ruby - nicest scripting language I've used. I pay the bills with Java and C#, but do a *lot* with Ruby on other projects. The ease of extending with C is really beauty - as glue around existing stuff you couldn't ask for anything better imho.

Closures are excellent.

Great language.
posted by parki at 2:05 PM on October 10, 2005


Python is the only programming language where whitespace is 'active'.

No, it isn't. Haskell has significant whitespace as well.

There's also a proprietary language called PROMAL which predated Haskell by four years. Back in the days when you could actually sell programming languages.
posted by kindall at 2:41 PM on October 10, 2005


Just one word - Logix. You heard it here first.
posted by Duug at 2:50 PM on October 10, 2005


If whitespace were truly a problem, then Python wouldn't have a humongous library, a bajillion sourceforge projects, and so many adherents. Give your head a shake, folk: whatever you think about whitespace, a whole lotta people much smarter than you are hip with it. I would suggest they might be on to something, eh?

Having said that, the latest Python features (decorators and such) leave me unimpressed and my infatuation with the language is waning, exactly because readability is becoming worse. And having said that let me also say that I've gone through the Ruby tutorials a few times, and Ruby doesn't click for me; it's as orthogonal to my mind as Perl

What he said. Python a few years back was a simple, immensely readable language. These days it's becoming a little too cluttered with arcane symbology to be truly readable. And readable was always Python's #1 strength: one could pick up almost any bit of code and actually, truly understand it at first glance. You can not underestimate how important that is in any large and ongoing project. Readability is the #1 important factor in writing good code.
posted by five fresh fish at 3:15 PM on October 10, 2005


And when did Java get generics?

Version 1.5, I think.
posted by spazzm at 3:31 PM on October 10, 2005


i'm too busy with python web frameworks to spend any time with ruby on rails. it may be the great. i wouldn't know. basecamp is nice, though.

it's apostasy to me, though, to hear python mentioned in the same breath with perl and php. maybe in the days of mod_python. but who uses cgi anymore? geez.
posted by 3.2.3 at 3:37 PM on October 10, 2005


RE "The canard":

You aren't making any sense at all. How often does a significant development happen in programming languages? The last one happened sometime in the 80s with C++ with OO programming, and despite whatever the "hot new thing" crowd wants to evangelize, things have yet to change a whole lot.

If you learned C++ back in the 80's and had a good grasp of it, what would stop you from learning Java, C#, or even your precious Ruby? In fact, is there a single useful language that you would have trouble understanding?

(And by useful, I mean in the "You stand a good chance of being able to find a job using it" sense, and not the "Oh wow, this is neat!" sense)
posted by afroblanca at 3:41 PM on October 10, 2005


Okay, I tried briefly to penetrate all the buzzwords surrounding Rails, without much success.
Is it a whole new concept, like Object Orientation, or just another fad the headless chickens run to implement?

Can someone explain it to me, like I'm 8 years old, please?
posted by spazzm at 3:46 PM on October 10, 2005


oh, also, there are more python frameworks that do the rails kind thing now than you can shake a stick at. some came before ruby on rails, some after. subway, django, turbogears, paste, jotweb, quixote, crackajax, zope, plone, silva, nuxeo, cherrypy, cheetah, twisted, blah, blah, blah...

then again, this guy has something to say about that fragmentation. he has some decent observations. then some commenters have some decent rebuttals.

i have this to say to the rails community after experiencing the plone phenomenon: explosive community growth has its own problems. the python community has had to address that through things like wsgi, zope3, five, and project goldegg.
posted by 3.2.3 at 3:57 PM on October 10, 2005


good lord. they're talking about turbogears over on slashdot under the title "python on rails."
posted by 3.2.3 at 4:28 PM on October 10, 2005


I just watched the TurboGears video.

Wow.
posted by five fresh fish at 5:11 PM on October 10, 2005


All technical issues aside, Ruby is one damn ugly language.
For that reason alone I don't like it.

The near-constant buzzing hype over that Rails thing certainly doesn't help either. It really does seem like a whole bunch of people bouncing the phrase "omg this is cool" back and forth over their blogs and tech news sites, with very little else.
posted by nightchrome at 5:22 PM on October 10, 2005


sigh

I'm tired of a lot of things, but the all-out hype of Ruby and the comments about PHP are near the top of my list.

Ruby, like any language, has its ups and downs. It's not going to cure cancer, and it's not a guaranteed way to develop web sites, applications, etc. any quicker than any other language... depending on who is writing the code.

PHP gets a lot of flack for being "dirty", but it's not the language itself... it's the developer(s). You can write bad/dirty/inappropriate/etc. code on any platform and with any language. Blaming PHP for bad code is like blaming a car for it's drunk driver.

Having said that I like Ruby and I like PHP. They both have their uses.

No language (Java, Ruby, PHP, C++, etc.) is a panacea for "ideal" development under every circumstance imaginable.
posted by crankydoodle at 5:29 PM on October 10, 2005


Man, I predict: this thread is going to find itself in a book some day.
posted by y2karl at 5:42 PM on October 10, 2005


All technical issues aside, Ruby is one damn ugly language.
For that reason alone I don't like it.


Out of curiousity, could you post some examples of the ugliness of ruby, and the same code in your preferred language?
posted by I Love Tacos at 5:48 PM on October 10, 2005 [1 favorite]


Oh, and I'm not a ruby advocate (or detractor).

I'm just curious to see what you're talking about.
posted by I Love Tacos at 5:50 PM on October 10, 2005


I use a "text editor"

Yeah, me too. It's called "emacs". Maybe you prefer one called "vi"—heard of them? They both have python-specific modes.
posted by kenko at 6:00 PM on October 10, 2005


Second vote here for starting in VB and having no problem migrating to the OOPs.

Any decent developer/engineer should be able to pick up a language in a weekend...really, it's not that hard. Seriously. It's not precious or magical- it's just a job.

Now, relax...
posted by mrblondemang at 6:21 PM on October 10, 2005


As far as the topic of the power of languages goes, I'm with Paul Graham. A language's power is proportional to how succinct it is in real world practice. There are other considerations, like readability, speed, footprint, etc. and in fact readability is a good part of why I favor ruby of lisp. It's certainly also true however that languages are tools, and not every job requires the same tool or set of tools. For most of the work that I do, I'm drowning in processor cycles provided I don't do anything NP-complete or the like, so succinctness and readability are what I'm looking for.

To those who don't know much about Ruby: Ruby is second to Python in readability because of all of the blocks, but is generally understandable. It supports lexical closures, which among other things, make working with lists of things much better than even Python's list comprehensions (which I loved so dearly).

For those who don't know much about Rails: Rails makes working with databases easier than pie. Want the book with id 7 from the table books? Put down that SQL and just type Book.find(7). Have a book but want its title? my_book.title will give it to you. Other neat features are understandable urls (like http://example.com/books/Hemmingway), a nice templating language, and easy breazy AJAX. Rails is just plain easy to work with, especially if you've done a fair bit of programming before. If you don't know OO or MVC, you'll be lost for quite some time, but for many it's coding joy.

As far as the hype surrounding Rails, I'd say it isn't the authors talking it up or any skeevy marketing so much as it is coders trying it and enjoying it so much that they want to tell other people about it. That's my motivation.
posted by Rictic at 6:45 PM on October 10, 2005


Any decent developer/engineer should be able to pick up a language in a weekend

yep. you can pick up any language in a weekend.

the problem is the next couple of years it takes you to workaround the potholes, pick up enough proficiency with library modules to actually do something useful, come up to speed with the state of the community, integrate with components at large in the world, etc., etc..

that's what makes choosing a language a relevant question. anybody can pick up a language in a weekend. doing something with it is a much larger proposition (which is why basecamp being the only outstanding application is a point of concern for many people). heck, there's a website where you can learn the rudiments of magyar in a weekend. it won't do you much good in budapest, though.

i've had too much to do with people who float from technology to technology to trust the "right tool for the right problem" mindset. nah. find a toolset that's useful across a broad problem domain. find a tool that encourages good design (sorry, there are a lot of bad php programmers, sure, but the "language" encourages it, so it *is* a bad toolset). specialize in a good toolset. enjoy your niche. programming fashions come and go. programming bigotry is a good thing.

yeah, no language is a panacea. some are just better practices than other, while best practices are a discipline which comes with time. i'm sure ruby on rails is fine. it seems to have a lot of good practices associated with it. ruby bigotry is probably justifiable. i think the unattractiveness of the hype comes from, well, "coders trying it and enjoying it so much that they want to tell other people about it." it makes a developer want to ask, where've you been?

does it take a 15 minute video to get you to see some light? it just brings the credibility of the phenomenon into question. are the people who like it so much to be taken seriously? does #2 on the amazon list mean anything more than a lot of people are ignorant enough about ruby on rails to need a book to penetrate it? i mean, you can learn a language in a weekend, right? so who needs a book? is it that difficult?

another thing is the "coders trying it and enjoying it so much that they want to tell other people about it" has been just a little too apparently coordinated. it would be weird to see development follow recent politics where the toolset with the most blog momentum becomes the front runner only to crash and burn down the stretch, leaving teaming legions screaming about how they was robbed.

(apologies to howard dean, whom i like very much, and who suffered from backend socio-technological chaos in ways which will probably never get properly told.)
posted by 3.2.3 at 7:45 PM on October 10, 2005


I'm also not terribly impressed with the "#2 on Amazon" stuff -- #1 on the NYT bestsellers list for hardcover advice books is NATURAL CURES "THEY" DON'T WANT YOU TO KNOW ABOUT, by Kevin Trudeau -- which is an extremely dubious collection of so-called "folk medicines" and old wives' tales sold mostly by appealing to the gullible and paranoid using infomercials.
posted by clevershark at 8:24 PM on October 10, 2005


Approaching a new language (with some sort of object mindset bias) usually consists of being led down several historical detours and having to understand implementation artifacts: "oh yea an integer isn't really an object, and you have to treat a class object carefully" or "sprinkle the magic self to make a method" etc

There are very few detours necessary in Ruby.

Everything can be understood as sending messages to objects.

Everything.

(ok callcc might be stretching it...)
posted by marlowe at 9:05 PM on October 10, 2005


I'm also not terribly impressed with the "#2 on Amazon" stuff -- #1 on the NYT bestsellers list for hardcover advice books is NATURAL CURES "THEY" DON'T WANT YOU TO KNOW ABOUT, by Kevin Trudeau

The point of the post was that Ruby is popular, not that it cures cancer.

I don't think this post needed all the pizazz -- Ruby's just a nice, clean, pleasant language and Rails is a truly sweet framework, but the basic ideas in RoR are by no means unique and could (and have been) easily imitated in other environments. Personally I think that's a good thing -- it's forcing a kind of across-the-board growing up to a new level of web-proficient programming environments that can only create more cool things for bloggers to talk about down the road. Oh, and people to use, too.

Dan is tired of platform wars. Can you tell?

I was never a big OO programmer, and certainly never had formal training, so the big hump for me to get over is as said the MVC model and so forth. I think RoR makes it pretty easy to get over. I wish I'd done more than noodle around with PHP and so forth, but I'm not sure that's the impediment in the long run that it feels like right now. Clearly though Python is much more of the competitor to Ruby, and yet Python just has some unlovableness about it. I think Ruby is the sexy one, and Python is the sensible one, but maybe that's just me.
posted by dhartung at 11:01 PM on October 10, 2005


Want the book with id 7 from the table books? Put down that SQL and just type Book.find(7). Have a book but want its title? my_book.title will give it to you.

Ah, so it's kind of like Microsoft's Active Data Objects for IIS...

(OK, ADO isn't quite that syntactically sweet -- though it does take the necessary step of abstracting the API from SQL.)
posted by kindall at 11:10 PM on October 10, 2005


There are very few detours necessary in Ruby.

Everything can be understood as sending
messages to objects.

Just like in Smalltalk!
posted by kenko at 11:56 PM on October 10, 2005


PHP gets a lot of flack for being "dirty", but it's not the language itself... it's the developer(s).

No, it's the language. I speak as a bread-and-butter PHP developer who is right now cleaning up dozens of SQL injection holes in someone else's code. Even with imcompetent developers, stuff like this should not exist.

bool sort ( array &array)

mixed array_search ( mixed needle, array haystack)
string strrchr ( string haystack, string needle )

And what the hell is this doing in the core libs?

mixed date_sunrise ( int timestamp )
mixed date_sunset ( int timestamp )

'nuff said.
posted by Leon at 4:37 AM on October 11, 2005


Actually, I believe the concealed business model is to get bought out by Google/Yahoo/MS, but only a miniscule number of companies will be successfull, such as 37signals.

I don't think one can speak for every player here, but 37signals for one has gotten a lot of mileage out of their independence. As a business model, their RoR, AJAX, Web 2.0 applications -- all of which are free at a basic level, supported by textads, but some of which have subscription fees for upgrades -- are now supporting a team of half-a-dozen programmers.

> Well, if we think of Basecamp as a client, it's our biggest client. It's definitely driving us in the direction we want to go. It's profitable for us, so we're really able to spend time and resources on it. It's allowing us to say no to client work.

Jason Fried also had a little debate with Mena Trott recently about company size, among other things, and Mena made the point that 37signals -- by deliberately choosing to remain small -- would never be more than what investors call a "lifestyle business" (aka "boutique"), whereas SixApart was turning into a company that could support the aspirations of scores of people across umpteen continents. There are arguments both ways, of course, but Fried made clear that 37signals preferred independence for now.

Now, with all the money that's suddenly flowing, with independent companies like Flickr and Bloglines and del.icio.us and Upcoming getting bought out, that can't be out of the minds of people entirely, but then again Yahoo and so forth must see some future in the segment itself otherwise it wouldn't be throwing all that money into it. Some of them may just have some cussed independence, like Fried (although they haven't seen a check-with-many-zeros waved before their nose yet, so who knows), but yet others may have aspirations of being the next Google/Yahoo/MS themselves.

Sure, only a minority (more than "a few") will be successful, but you know -- that's how entrepreneurship works. I think the Fried point that having tools like RoR (bringing us back on topic) and web services APIs and easy access to niche advertising revenue sources brings the bar to entry of this market remarkably low. That can only be good for innovation.
posted by dhartung at 12:32 PM on October 11, 2005


Ah, so it's kind of like Microsoft's Active Data Objects for IIS...

Yeah, I imagine. Hibernate for Java is probably a closer analogy, as it's an object/relational mapping system. The point about Rails isn't that any particular feature was groundbreaking. The thing that drew me to it was that it rolled a bunch of nice features together into something that's very easy to use in a language that seemed Pythonic. That, and I was really impressed with the upload progress bar. I'd be surprised if there were anything that does AJAX as well and as simply as RoR does anytime in the near future.
posted by Rictic at 6:01 PM on October 11, 2005


Has anyone used Ruby on Rails in production work except 37signals (who invented it)?

Today on the Rails Blog: Major Healthcare Application Switches from J2EE to Rails

Their conclusion? 6 weeks of Java work done over in 8 days at 1/20th the code and a slick AJAX interface.

And with that I'll shut up.
posted by Rictic at 9:59 PM on October 11, 2005


Wow. so many laughable little lordlings in one place! Hott.

I'm not a programmer but did a joint major in CS and something else in college (we learned in Scheme initially, which was about as beautiful an introduction to programming as you can ask for), so a lot of the conceptual side of programming is familiar to me, though I lack the skills to put it into easy practice. I found I didn't have the stomach for learning lots of oppressive syntax - weak? Sure. But that's how it is. And my strengths lie elsewhere.

I've taught myself a little programming in Java, C++, Perl. I love Perl but it's like an eccentric genius cousin, and reading other people's Perl code does not come easily to me. I'm a pretty smart guy but getting into a zone of rapid learning about coding has been hard for me.

I decided last week to build from scratch a Web engine for playing Nomic, never having written a line of SQL before, not knowing what a Makefile was or what 'MVC' stood for, and never having written a line of code for the Web. This weekend I started coding it up with Ruby on Rails (having heard of Ruby for the first time around Columbus Day).

As of last night's airing of 'The Colbert Report' I have the skeleton of the first version of the site, with easy-peasy password protection, a harrowing number of SQL join-tables chugging along under the hood (Rails made 'em with a song in its heart), a consistent and coherent hierarchy of files that makes perfect sense to me, a VERY easy path to expanding, and a non-aesthetically-displeasing look to boot. I'm learning a lot as I go and last night a number of things clicked into place conceptually.

Rails is a (pretty darn) minor miracle of usability, and Ruby is - as several people have pointed out upthread - utterly readable, with a dash of personality that feels unique. Better yet, the RoR community makes the whole thing fun.

So those blowing smoke about a Web 2.0 bubble, or the inherent superiority of this or that language, feel free to kiss the ass of every newbie who's learning how to do in a few hours what used to take you a few days, and is doing it for kicks. Rails is potentially a great learning tool, and lowers the floor for a lot of projects that non-experts might want to undertake. Is Joe Sixpack gonna code up Slashdot.org in a day following along with a tutorial? Nope. Meaning you guys still get to keep your jobs and your soapboxes, so chill the hell out.

But Joe S. can definitely move a lot closer to that stage a lot faster than he ever could before, using tools like Rails. That's good in a whole mess of ways.
posted by waxbanks at 7:54 AM on October 19, 2005


« Older Lys and missed connections   |   The 2005 Nobel Prize for Economics Newer »


This thread has been archived and is closed to new comments



Post