Archive for September, 2007

Are you interested in a DB2 driver for Lua?

Antonio Cangiano September 26th, 2007

lua_logo.pngAccording to Wikipedia, Lua is “a lightweight, reflective, imperative and procedural language, designed as a scripting language with extensible semantics as a primary goal”. It is employed by Adobe Photoshop Lightroom and many other programs, particularly in the gaming industry (where it excels). Lua has a proven track record and it is far from a toy language, but I wonder, outside of game development, how popular is Lua really?

According to the TIOBE index, from September 2006 to September 2007, Lua managed to jump from the 50th most popular language to the 18th. Even if TIOBE’s accuracy is debatable, it still shows an interesting surge in Lua adoption.

Do you use Lua? If so, for what kind of projects? DB2 Express-C is all about empowering developers, hence if there is a concrete need and request for a Lua driver for DB2 9, we would eagerly like to hear from you. Please use the comments to express your interest and opinions.

A great combo of lenses for Canon Digital SLRs that won’t break the bank

Antonio Cangiano September 26th, 2007

This is a rather unusual post for this blog, which normally focuses on programming. However, amongst my readers there are plenty of photo hobbyists so this post may come in handy to a few of you. I’ve also added a ‘Photography’ category for possible future posts.

My original purchase

When I purchased my Canon EOS 30D Digital SLR camera less than a year ago, I only bought the camera body and skipped the cheap (in terms of cost and quality) kit lens. I opted instead for the vertical grip BG-E2 and a Canon EF 50mm f/1.8 II lens. The vertical grip is handy for portraits, accepts an extra battery for extended usage and makes, in my opinion, the camera more balanced and more comfortable to use. The 50mm f/1.8 lens on the other hand is an incredible bargain.

For $80 I got a very sharp optic, which is able to reproduce beautiful colors and contrasts, and it’s a very “fast” lens given the extremely large maximum aperture. Sure, it doesn’t focus that quickly, especially in low light situations (it not USM). It’s also made out of inexpensive plastic (unlike the previous version which was much more robust). But for what it costs, there is really no reason not to own it. The f/1.4 version of the 50mm solves all these problems, and it provides an even nicer background blur (bokeh). As well though it happens to cost more than three times as much.

Time to upgrade my lens arsenal

I’m quite happy with my initial purchase that I made back in 2006. The 30D is a very nice camera and that 50mm (aka “nifty fifty”) gets the job done (I’ve a few nice pictures up on my flickr account that were taken with it). Considering the 1.6 crop factor introduced by the APS sized Canon sensor on cameras like my 30D, the 50mm is equivalent to 80mm on a 35mm film camera or on a full frame digital camera. 80mm is typically a focal length well suited for portraits, and that’s an area of photography that interests me a lot.

Despite the darn good deal, this inexpensive lens is still a prime that doesn’t offer too much flexibility. Sure I can “zoom with my feet” but this is not always possible and there is a wide range of focal lengths that become challenging to emulate with this single lens alone, simply by getting closer or backing down a bit.

With my old equipment from the film days not being compatible with my digital camera, and a need to gain some flexibility for a range of photographic subjects, from landscapes to fashion and people photography, or why not, even some product shots, I decided to add a few lenses to my arsenal. The challenge of course was to find great lenses without breaking the bank.

I decided to split the useful (to me) range of focal lengths amongst three lenses:

  • 1 Super Wide-Angle
  • 1 Mid-range zoom
  • 1 Telephoto zoom

With each lens, I was looking for the following characteristics:

  • Excellent image quality
  • Fixed maximum aperture (at least f/4) across the zoom range
  • Well built
  • Stellar reviews
  • Less than $600

After careful consideration and having weighed all the possibilities, I came up with a combo that I believe is hard to beat for what I paid. As usual in fact, I put my money where my mouth is, and I’ve already ordered the three lenses and I should received them soon.

Super-wide angle

The choice here was not so easy. There are a few valid options for affordable wide angle lenses. Canon, Sigma, Tamron and Tokina all make very good super wide angles targeted towards crop digital bodies. Canon EF-S 10-22mm f/3.5-4.5 USM was tempting, but essentially beyond the reach of my budget. I decided to go with Tokina AF 12-24mm f/4 AT-X 124AF Pro DX. It’s built out of solid metal “like a tank”, the image quality is excellent, it costs less than $500 and at 12mm it’s surely wide enough for my needs. Tokina’s super wide angle is also the only one to have a fixed maximum aperture across the zoom range. FredMiranda’s reviewers gave it an exceptional 9.2 out of 10. It also comes with a 3 year international warranty.
tokina12-24.jpg

Mid-range zoom

Canon EF 24-70mm f/2.8L USM is an incredible lens, but it’s more than $1,100. Luckily, Sigma and Tamron produce excellent optics with the same range and the same maximum aperture for about a third of the price. These are used successfully by many people photographers, and the Tamron in particular seems to meet and exceed every expectation. I purchased the Tamron AF 28-75mm f/2.8 XR Di LD Aspherical (IF) because of its excellent image quality, a cost of less than $400 and a positive 8.7 on FredMiranda. From what I’ve seen and read, the Tamron has an edge over the more expensive Sigma (Sigma 24-70mm f/2.8 EX DG Macro Aspherical).
tamron28-75.gif

Telephoto zoom

In the telphoto zoom arena, Canon produces the finest lenses available on the market. Most of them are way out of my prefixed budget, but the Canon EF 70-200mm f/4L USM, while considered a professional lens, costs just under $600. As with every other L lens (L stands for luxury), it has the utmost build and image quality. FredMiranda’s reviewers gave it an astonishing 9.5. 200mm on a 30D is equivalent to 320mm on a 35mm film camera, which is just long enough for about everything except for wildlife and the like (which I don’t plan to really get into too much for the time being).
70200.jpg

Conclusion

To recap, in matter of days my lens collection will be composed of:

So there you have it, three top notch lenses (and a bargain one) that won’t break the bank and that will give you lots of versatility as well. I really look forward to receiving them and I hope that I made your own decision process a little bit easier.

DB2 on Mac

Antonio Cangiano September 19th, 2007

Python and DB2

We now have a working Python driver for DB2 which is currently undergoing internal testing. The driver is similar to the Ruby and PHP ones, which means that you get an advanced and very easy to use API. It also means that if you are confident with the Ruby driver, you will be able to use the Python one in no time.

Ruby:

require 'ibm_db'

conn = IBM_DB::connect(database, user, password)

if conn
  puts "Connection succeded."
  IBM_DB::close(conn)
else
  puts "Connection failed."
  puts IBM_DB::conn_errormsg
end



Python:

import ibm_db

conn = ibm_db.connect(database, user, password)

if conn:
    print "Connection succeeded."
    ibm_db.close(conn)
else:
    print "Connection failed."
    print ibm_db.conn_errormsg


We made it so that if you know one, you already know the other. These drivers are CLI wrappers that provide you with performance and stability. Also they don’t limit you to user data and are able to retrieve a good deal of metadata about your database. We’ll also provide a thin wrapper for those of you who intend to use a PEP 249 API. The next step, working on SQLAlchemy, has already started.

DB2 on Mac (no, really!)

macpro.pngWhen I first posted about our interest in Python/Django and DB2, the comment thread got hijacked by many people who asked for a Mac client in order to develop on Mac and deploy on Linux. Ask and you shall receive. I’ve promoted the idea of Django/SQLAlchemy/Python in IBM for a while now, and we are finally close to delivering the driver (with the adapter progressing at the same time too). Well, don’t take this as an official announcement, but Python wasn’t the only thing that I’ve been promoting for months within IBM. With the ever growing community of Ruby/Python hackers adopting Mac as their development platform of choice, I strongly believe that an investment in porting the great free version of DB2 to Mac is a very valid one.

I couldn’t talk about this for weeks, and it must be viewed as a rumor until IBM makes an official announcement, but we have been working on porting DB2 to Intel Mac. Not just the client, the whole package. This makes me a happy panda, no longer will a virtual machine be required to develop with DB2 on Rails on my Mac Book Pro. It’s a joy to see DB2 Express-C run on a Mac Pro (shown in picture) next to the other black boxes in the lab. Work is still in progress, but we should have a beta out there relatively soon (before winter kicks in). DB2 Express-C on Mac is intended for development purposes rather than production, this means that we expect you to develop on your shiny Mac but deploy on Linux or Windows. DB2 on Mac will be a beta product, but again it won’t just be a client runtime, it will be the full product and there is no reason why it shouldn’t be just as stable and efficient as the Linux and Windows versions.

Time to employee some of the newly acquired Cocoa-fu. I’m starting to feel that I could even learn Wasabi and IBM would still be able to let me use that skill in my day job. Awesome.

Next »