Ruby: Productive Programming Language
Every few years something significant happens in the land of computer programming. In my opinion the Ruby computer language is such a landmark.
Over the years I have seen programmer productivity go up. These are no hard measured calculations, but I have the impression that every five years the speed of delivering software doubles. Not only that, the curve for writing maintainable software appears to increase linearly too. A lot of that speed can be attributed to the tools of a developer, and core to these tools is the computer language.
Computer languages are essentially alike. There are more similarities than differences between any language. Nevertheless, the differences have a large impact on solving problems, finding ways of expression and human interaction. For example, LISP, a language of great beauty and simplicity in conception, reflects its allegiance more to computers than to humans. A language easy to interpret is not necessarily easy to program, as many a student can attest. LISP's most amazing feature is that it shows with how few rules one can create a powerful computer language.
Structured languages like Pascal and C clearly bridged a gap between native assembler and quick, human-readable coding. C is still widely used where performance matters--it is possible to write close to the assembler, as the Linux and BSD kernels prove.
With C++ in the early nineties, I personally went through a period of exploration and discovery. Classes, objects, containers, operator overloading, the works. Reading Stroustrup's classic book was crucial to understanding C++ as a language, and I loved it. But with hindsight I can see it takes something extra to become productive in C++; it is not for everyone.
Java came to the rescue. A much simpler language with an elegance in OOP (object-oriented programming), Java does have some down sides, like slow JVMs dealing with large libraries. The language itself has some short comings too. Many experienced C++ programmers use Java, and the complaint will come that it feels like working with their hands tied behind the back. Nevertheless Java is great for corporate-type team programming efforts. As a language it goes some way in enforcing structure and using OOP concepts.
In parallel, two other languages made a mark in the nineties: Perl and Python. Both are (interpreted) scripting languages and have some real advantages over C++ and Java in terms of delivery time of software (more on that below). With current levels of computing power, performance is hardly an issue for most "user-land" software.
Perl was a revolution in a way. and most of its productivity boost was due to the introduction of a full programming language with light notation for regular expressions, arrays and especially hashes.
Perl has some real problems, though, as almost everyone will assert who has participated in large Perl programming efforts. Perl has OOP extensions, but they are non-obvious and laborious. I did enjoy learning Perl OOP because it taught me a lot about OOP itself and how to implement OOP in a language as a single hack. Writing Perl OOP, however, is no joy. Maintaining a large Perl source base is only possible with the highest level of discipline by the coders, and the language itself does not help enforcing correct coding practices.
Python is cleaner as a language though its OOP was added as an afterthought--and it shows. I spent some serious time looking into Python and did not like it that much. It gives a lot but runs short, for example, with object elements all being public. In a team effort, that means developers have trouble understanding how their classes are being used (or abused). In this situation, I would even have trouble trusting my own code. Operator overloading is ugly, the syntax of a colon after an if statement I find to be non-obvious, etc. The indentation idea is clever, but somehow it doesn't improve code readability. In short, Python almost makes it but not quite.
Late last year I got my hands on the Ruby book by the (self-named) pragmatic programmers, Dave Thomas and Andy Hunt. The book also has an on-line version. I read the book in one go, and it goes into the hall of fame of important computer books, as far as I am concerned, right next to the Stroustrup. After reading it, I almost skipped sleep for a week because I was so excited by the implications of Ruby, a programming language that reads like poetry.
The author of Ruby, Yukihiro Matsumoto, aka Matz, knows his languages (LISP, Small Talk, Perl, Python and others) and aimed to create his perfect language. Ruby follows the Principle of Least Surprise and, funny enough, gets close. It feels, in fact, exactly like the computer language I have wanted to design all my life (without really knowing it).
Ruby was developed after 1994 and does not carry the baggage of Perl and Python; it is the new kid on the block. It comes with extensive libraries, not as rich as Perl's CPAN, but after a year of working with Ruby, I haven't missed any critical components. Ruby is complete with HTML and FTP classes, CGI support, XML parsers, database libraries, GTK and Qt bindings and even a pure Ruby BTree library. It is also quite straightforward to link up Ruby and Python libraries, which gives it an even richer base. Ruby is well supported on UNIX and Windows; developing on UNIX and deploying on Windows works without a hitch, including GUI development.
|Speed Up Your Web Site with Varnish||Jun 19, 2013|
|Non-Linux FOSS: libnotify, OS X Style||Jun 18, 2013|
|Containers—Not Virtual Machines—Are the Future Cloud||Jun 17, 2013|
|Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer||Jun 12, 2013|
|Weechat, Irssi's Little Brother||Jun 11, 2013|
|One Tail Just Isn't Enough||Jun 07, 2013|
- Speed Up Your Web Site with Varnish
- Containers—Not Virtual Machines—Are the Future Cloud
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Non-Linux FOSS: libnotify, OS X Style
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- RSS Feeds
- Reply to comment | Linux Journal
51 min 18 sec ago
- Reply to comment | Linux Journal
4 hours 50 min ago
- Yeah, user namespaces are
6 hours 7 min ago
- Cari Uang
9 hours 38 min ago
- user namespaces
12 hours 32 min ago
12 hours 57 min ago
- One advantage with VMs
15 hours 26 min ago
- about info
15 hours 59 min ago
16 hours 38 sec ago
16 hours 1 min ago
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?