Currently Browsing: Ruby
Posted on May 9th, 2012 in
DB2,
Ruby,
Ruby on Rails |
2 comments
The API team at IBM recently released a new update for the ibm_db gem, which includes both the Ruby driver and the Rails adapter for DB2 (and Informix). This coincides with the release of the latest major upgrade to DB2 LUW (Linux/Unix/Windows), which is now up to version 10.1.
ibm_db 2.5.10 adds support for Rails 3.2 and fixes a few minor bugs that have been reported by the community. New features such as Time...
For the past several months I’ve been involved with, but unable to publicly discuss, an exciting project called RubyMotion. My friend Laurent Sansonetti, creator of MacRuby, has now officially launched a serious alternative to Objective-C for iPhone and iPad development.
RubyMotion is not a bridge; it actually generates native applications that are as fast as the ones written in Objective-C . You can check...
During a recent Rails project at IBM we had to deal with a large table consisting of customers. The table is made up of legacy enterprise data, and contains close to a million records.
Among many other fields, the table Customers includes a column name defined as VARCHAR. name is used to store company names.
One of the requirements for the project was to implement a Google Suggest-like feature. That is, when...
Posted on Jun 2nd, 2011 in
Ruby,
Scala |
20 comments
Someone came up with a list of 10 one-liner examples that are meant to showcase Scala’s expressiveness. A CoffeeScript version quickly emerged, so I thought I’d publish a Ruby one. I find Ruby’s syntax to be a bit cleaner than Scala’s, but the substance (at least as far as these examples are concerned) is relatively similar.
Multiply each item in a list by 2
(1..10).map { |n| n * 2 }
Sum a list of...
Posted on May 11th, 2011 in
DB2,
Ruby,
Ruby on Rails |
4 comments
In this tutorial I’ll show you how to create a complete Ruby on Rails setup for DB2 on Ubuntu. Following my step-by-step instructions, you’ll be able to install the following components:
Ruby 1.8.7
Rubygems
Ruby on Rails
DB2 Express-C 9.7.4
The official Ruby driver and Rails adapter for DB2
Installing Ruby
We are going to install Ruby 1.8.7 using the Debian packages that are available in the default...
Posted on Mar 9th, 2011 in
Books,
Ruby,
Ruby on Rails |
3 comments
The following is an interview with Michael Hartl, author of the popular Rails 3 Tutorial. I want to thank Michael for his time and answers. Be sure to read until the end; as per Monday’s post, I’m doing a Twitter giveaway for this interview, too.
1. How did you go from Theoretical Physics to Ruby Programming?
I have a background in computational physics, and I learned Perl and then Python to avoid the...
In 2007 Russ Olsen published Design Patterns in Ruby (US | UK | CA). Right around that time there were several other Ruby books hitting the shelves (as Rails was really reaching the peak of its popularity), however Olsen’s book managed to distinguish itself as a highly valuable resource for readers who wanted to better understand how to apply design patterns to Ruby programming (in an organic rather than dogmatic...
Posted on Dec 20th, 2010 in
Books,
Ruby,
Ruby on Rails |
0 comments
During the holiday lull I managed to finally update the Ruby and Rails book pages. The Ruby page includes a few new titles and sees a few existing ones get the axe, as I took the major emphasis on Ruby 1.9 into consideration when updating this list of books.
The Rails page is a complete rewrite as I’ve removed any trace of Rails 2 books. I outlined a useful path of Rails books to follow based on the few...
This is just a quick heads up for my US readers. Given the tough economy we’re all battling, I thought you might be interested in learning about a great employment opportunity. My friends at StreamSend are looking for a senior web developer (preferably one with Rails experience, however they don’t discriminate as long as you can learn quickly and have enough web development expertise to satisfy their...
The Great Ruby Shootout measures the performance of several Ruby implementations by testing them against a series of synthetic benchmarks. Recently I ran Mac and Windows shootouts as well, which tested a handful of implementations. However this article reports on the results of extensive benchmark testing of eight different Ruby implementations on Linux.
The setup
For this shootout I included a subset of the Ruby...
Posted on Jul 9th, 2010 in
Clojure,
Python,
Ruby |
5 comments
Lisp has had a tremendous impact on the world of programming. Even though Common Lisp and Scheme — the two main Lisp dialects — may not be considered mainstream today, several popular languages have been influenced by one or both of them.
It isn’t stretching things too much to say that both Ruby and Python can be seen as slower, easier (for beginners), object-oriented, infix Lisp dialects.
Some may...
This post contains the results of a Ruby shootout on Windows that I recently conducted. You can find the Mac edition, published last month, here. I was planning to have this one ready much sooner, but a couple of serious events in personal life prevented that from happening. Be sure to grab my feed or join the newsletter to avoid missing the upcoming Linux shootout.
The setup
For this shootout I included a subset of...
Posted on Jun 11th, 2010 in
Ruby,
Ruby on Rails |
0 comments
From the Padrino’s site:
Padrino is a ruby framework built upon the excellent Sinatra Microframework. Sinatra is a DSL for creating simple web applications in Ruby with speed and minimal effort. This framework makes it as fun and easy as possible to code increasingly advanced web applications by expanding upon Sinatra while maintaining the spirit that made it great.
The Ruby community has plenty of web...
Recently MacRuby 0.6 was released. The development team put a lot of emphasis on improving compatibility with Ruby 1.9, and the viability of MacRuby as a tool for developing Mac OS X applications. Focus on these aspects took precedence over performance, but I was still curious to see how well it performed when compared to Ruby 1.8.7 and Ruby 1.9, respectively.
This article showcases the results of a small Ruby...
The following is a very short guide on setting up Ruby Enterprise Edition (REE), nginx and Passenger, for serving Ruby on Rails applications on Ubuntu. It also includes a few quick and easy optimization tips.
We start with setting up REE (x64), using the .deb file provided by Phusion:
wget http://rubyforge.org/frs/download.php/66163/ruby-enterprise_1.8.7-2009.10_amd64.deb
sudo dpkg -i...
Posted on Oct 8th, 2009 in
Mac,
Quick Tips,
Ruby |
5 comments
There is major news in Rubyland today. MacRuby’s team just released their fist beta of version 0.5 (an experimental, still incomplete version of Ruby), which brings JIT, removal of the dreaded GIL (Global Interpreter Lock), native threads, GCD (Grand Central Dispatch) for multicore computing, and a whole new set of features found in the release announcement to the table.
The most important new feature is the...
Posted on Sep 9th, 2009 in
DB2,
Python,
Ruby |
4 comments
An easy way to improve the performance and security of SQL queries is to replace literals with parameters. By replacing literal values with parameters, advanced relational databases will be able to compile your queries and have their execution plans cached. This saves time and precious resources when the same query (minus the actual values) is executed over and over.
Consider the following series of...
Posted on Sep 3rd, 2009 in
DB2,
Mac,
Ruby,
Ruby on Rails |
1 comment
Now that Mac OS X 10.6 is out, it’s time to leave the world of 32 bit computing behind. The pre-installed Ruby interpreter will run in 64 bit mode by default, so you may need to pay attention when installing some C-based gems. The ibm_db Ruby gem for DB2 can easily be installed or updated to the latest available version by following these simple steps:
$ sudo -s
$ export...
Posted on Aug 24th, 2009 in
Books,
Merb,
Ruby,
Ruby on Rails |
7 comments
I finally got around to updating the Ruby and Rails book pages. The existing list was getting a bit obsolete and I didn’t like the idea of recommending old books to newcomers. I also had some interesting new entries.
Without further ado:
Recommended Ruby Books
Recommended Rails Books
A few people may disagree with the choices, but I think most experienced Ruby and Rails programmers, who’ve read those...
In a previous article I compared the performance of Ruby on Windows, built through Microsoft Visual C++ and GCC. The numbers for the MinGW version were very impressive. So the question now becomes, how does its performance compare to that of Ruby on Linux? To quote one person (Alex) who commented on the aforementioned post:
With the new mingw32 substantial speed improvements, think it makes sense now to also test...