Meditations on programming, startups, and technology
Currently Browsing: Programming

Setup Ruby Enterprise Edition, nginx and Passenger (aka mod_rails) on Ubuntu

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...

Add code highlighting to your Google Waves

Google Wave is still rough around the edges, but it has a lot of potential in terms of becoming a great collaboration tool. As a developer, your first question will probably be: “How do I add code highlighting to my waves?”. The answer is straightforward, however not very easy to find if you google it. I hope this post will help fellow developers who are experimenting with Google Wave. The following...

Getting MacRuby’s compiler to work

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...

Benchmarking Tornado vs. Twisted Web vs. Tornado on Twisted

FriendFeed, which was recently acquired by Facebook, just released an interesting piece of open source software. Tornado is an open source version of the scalable, non-blocking web server and tools that power FriendFeed. The FriendFeed application is written using a web framework that looks a bit like web.py or Google’s webapp, but with additional tools and optimizations to take advantage of the underlying...

Improve the speed and security of your SQL queries

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...

Enabling support for DB2 and Python/Django/SQLAlchemy on Mac OS X Snow Leopard

This article is obsolete. Please refer to the following articles for up do date instructions: Ruby/Rails and DB2 | Python/Django and DB2. Thank you! This is the Python version of a post I made about Ruby a few days ago. Now that Mac OS X 10.6 is out, it’s time to leave the world of 32 bit computing behind. The pre-installed Python interpreter will run in 64 bit mode by default, so you may need to pay attention...

Installing the Ruby driver for DB2 on Mac OS X Snow Leopard

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...

Recommended Ruby and Rails books (August 2009)

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...

Do programmers still buy printed books?

Yesterday I published a post titled My latest order of programming books, which received a fair number of comments both here and elsewhere online. Aside from a few good suggestions for other must-read books for programmers, there were several comments about how buying hard copies of books in this day and age is stupid. A few advocated piracy as an alternative to buying books, printed or not. Aren’t we supposed...

My latest order of programming books

A few days ago it was my birthday. This year I decided to reward my aging self with some books I’d had my eyes on. My budget was roughly $250, nothing to snicker at, but programming and computer science books aren’t exactly famous for being inexpensive. The hardest part was shortlisting only a few titles, out of a substantial number of books that interest me. This ruthless streamlining was not solely...

How much faster is Ruby on Linux?

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...

On Scala’s future

Kenneth McDonald posted the following question about Scala’s future in the Scala mailing list: I thought it would be interesting to find out people’s predictions for how much of the Java market Scala will eventually penetrate. It’s nice to see Scala doing reasonably well so far, so now’s your chance to make a prediction on the future of Scala: a) Scala will remain a niche language, competing...

The DB2 adapter now supports Django 1.1

This article is obsolete. Please refer to the following articles for up do date instructions: Ruby/Rails and DB2 | Python/Django and DB2. Thank you! I’m glad to announce that the API team has just released version 1.0.2 of the adapter for Django. And on my birthday to boot, what a nice present. This version extends its support to the recently released Django 1.1, as well as incorporating the feedback that was...

A faster Ruby on Windows is possible (benchmarks for 4 implementations inside)

In yesterday’s post I compared IronRuby 0.9, Ruby 1.8.6 (from the One-Click Installer) and Ruby 1.9.1 (downloaded from the official site) against one another. IronRuby did great, but the discussion in the comment section quickly veered towards what version of the One-Click Ruby Installer should have been used. I justified my choice of using the “old” One-Click Installer, by the fact that I...

Comparing the performance of IronRuby, Ruby 1.8 and Ruby 1.9 on Windows

In my latest article I discussed the importance of JRuby as a means of introducing Ruby to the Enterprise world. Most of the companies that belong to this ecosystem are Java based, but we cannot forget that a sizable portion of them are Microsoft-centric. Within these companies, Ruby will be far more welcome if a .NET implementation is available. The answer to this need is sufficiently fulfilled by IronRuby (version...

On JRuby’s importance for the future of Ruby

In a recent blog entry, Charles Nutter argues about the importance of JRuby for Ruby’s adoption within the Enterprise. Or, in his own words: The idea of “Enterprise Ruby” has become less repellant since Dave Thomas’s infamous keynote at RailsConf 2006. There are a lot of large, lumbering organizations out there that have yet to adopt any of the newer agile language/framework combinations, and...

Why technical marketing is important for programmers

Most programmers I know hate marketing. Their dislike stems from two root causes: the fact that they aren’t naturally good at it, and their misconception of what technical marketing actually is. “Naturally” is the keyword here, given that technical marketing takes a certain sort of conscious effort and is a skill (a social one) that can be learned, just like programming. I fully understand that...

Serving Django Static Files through Apache

Django’s development server is capable of serving static (media) files thanks to the view django.views.static.serve. Popular web servers like Apache, Lighttpd or NGINX are much faster though, and as such should be used in production mode. Our goal is to bypass Django and let Apache (or other valid alternatives) directly serve static files like images, videos, CSS, JavaScript files, and so on, for us. Generally...

DB2 Express-C 9.7 and the Django adapter released

This is a great day for those of us who love DB2, as DB2 Express-C 9.7 has just been released. As mentioned before, this is the best DB2 ever, and an extremely important release. To learn more about what’s new in this release, please check out the recording of our latest webinar: If you run Linux, Unix or Windows, download it while it’s hot. DB2 9.7 on the Cloud Another great aspect of this release...

Discussing code reading and testing with Dave Thomas, Cory Foy and Tim Bray

Pat Eyler just published an interview/discussion with Dave Thomas, Cory Foy, Tim Bray and I on the subject of code reading and testing legacy code. I think the resulting article is a very interesting read with a lot of insight (thanks to the other participants). It was a fun discussion which left me feeling honored to be among such distinguished people. If you’d like, you can read this interview on Pat’s...

« Previous Entries Next Entries »

Copyright © 2005-2014 Antonio Cangiano. All rights reserved.