Showing posts from January, 2008

I finally tried Ruby 1.9 (developer's release)

I have been putting this off - I have been busy. Ruby 1.9 uses the YARV and seems to be about twice as fast as Ruby 1.8 - a nice speed improvement which is likely to get much better before a Ruby 2.0 release. I tried the new version on several of my POR (plain old Ruby) programs, and everything worked fine for me. Rails would not work for me, but I did not expect it to. I like the way that gem and rake are now bundled with Ruby 1.9 - that makes good sense. With the good work also being done on JRuby and Rubinius, it is great to know that Ruby is under active development.

More TV/Internet convergence:

I don't know why, but I just received an invitation to beta and they look good! has a very nicely done web interface - playlist management looks especially good. Many, many online TV shows with few and short commercials. I have been using Joost for almost a year, so I am definitely into "watch TV shows and other videos anytime you want". I am a different kind of consumer than my Dad and older brother: between them, they own 4 high definition TVs, 3 Blue Ray players, and 2 HDDVD players. While they favor high definition (which is great!), I favor convenience - I like to take short breaks from work, exercise, and reading to watch movies and some TV. I find that being able to watch 10 or 20 minutes at a time, bookmark what I am in the middle of, etc. is just right for short breaks. For watching movies with my wife and friends, I am sold on Netflicks. I have yet to buy a Blue Ray or HDDVD player for our high def TV, but progressive scan DVDs are good enoug

I updated - now shows nutrients for meals and daily meal plans

I have been having fun with . It is now feature complete as far as what I want in it myself, but have received a few suggestions for improvement since I hosted a new version a few days ago. I wanted to track the vitamin K and fats in the recipes that I eat, then decided to show most of the nutrients in the USDA database. I now show nutrient breakdown by complete meals and 1 day meal plans. Meals are aggregates of one or more recipes. The easiest way to try it is to just click on "Show random recipe" and "Show random meal plan" a few times. I am only adding about one recipe a day, so it will be a while before there is a large selection. CookingSpace, except for the nutrient calculations, is a simple Ruby on Rails application. I run it on a very low cost VPS using mongrel clusters and nginx. The only complex part of the web application is the "admin only" part that is used to define recipes. Some ingredients have many entries in the USDA dat

Yes, tools matter

Sometimes people comment to me that I will change my mind rather quickly. I admit that this is sometimes true: life is a little like a game of chess, and you 'play the current position'. Anyway, I have been perhaps too smug with Ruby and Netbeans 6.0: really a fairly good development environment for a very good language. Anyway, I have really been enjoying using Ruby+Netbeans - so much better than using TextMate or Emacs. That said, Patrick Logan's blog on Dynamic Languages: Should the Tools Suck? made me do a double take. The first thing that I did was to fire up Squeak Smalltalk and run Patrick's message sender example. I am grateful to the developers of Netbeans and especially the Ruby support plugins, but yes, Ruby IDE support is still weak compared to Smalltalk - but hopefully getting better faster. (BTW, Squeak is almost as slow as Ruby, execution wise. Commercial VisualWorks Smalltalk is a lot faster if you need the extra speed.)

Ruby and Java integration

While JRuby provides an obvious strategy for Ruby and Java integration, looser coupling via asynchronous messaging is another good way to integrate Java and Ruby systems. I have some bias here: I have been using asynchronous messaging to build distributed systems since 1987 (mostly using ISIS and Java Messaging System (JMS)). Asynchronous messaging makes it possible to tie together legacy systems, modularize development, and allow easier testing of system components by mocking up test messaging interfaces. I have had some good experiences using Brian McCallister’s Ruby client for Stomp with the JMS implementation ActiveMQ. Installing the stomp client is easy: sudo gem install stomp and I have had to make a small change to the ActiveMQ configuration, adding a few lines to the conf/activemq.xml file: <connector> <serverTransport uri="stomp://localhost:61626"/> </connector> Here is a simple test client and test service: require 'rubygems' require

Ruby on Rails Fixed Price Quick Start Service

Although I am too busy to accept much new work right now, I am none the less putting in place something that I have been thinking about for a year: a Ruby on Rails Fixed Price Quick Start Service . I often talk with people who have a good idea but can not take the risk of escalating development costs - same scenario applies to small startup companies. As I have the time to work on them, I am going to start accepting a few small fixed price projects that are well defined.

RIP Bobby Fischer

I never met Fischer but someone I once worked with used to drive up to where Fischer was living to play ping pong with him. He described Fischer as being eccentric (and my colleague, who camped out in his work office to avoid paying rent for an apartment, was an expert on eccentric :-) Like most people I enjoy chess, but I am not very good a it: the one time that I played at the US Chess Open in 1978 I only scored 4.5 out of 12 points: a poor showing right after perfect scores in two local tournaments. I have worked with two people with international master ratings, and once sat with grandmaster Anatoly Lein while he went over a game in great detail that he had played the night before - people who are very good at chess perceive the game differently than the rest of us! I don't play much chess or Go anymore, but I do like to play over "famous games". My favorites are ancient Go games played in Shoguns' palaces in medieval Japan - cool stuff indeed.

Wow: a Java application with 25 megabytes of JAR files

I was just writing about the data mining tool RapidMiner on my AI blog . RapidMiner is based on many open source projects for machine learning, clustering, data access, and data visualization, so a lot of developers contributed to that 25 megabytes of compiled Java code :-) For comparison, NetBeans 6.0 seems to use about 15 megabytes of compiled code and Eclipse weighs in at about 100 megabytes.

A Tale of 3 IDEs

Except for occasional Common Lisp development (Emacs!), I just about live in an IDE. For the most part this is the excellent NetBeans 6.0 with Ruby support. However, I have dozens of existing Java projects and they almost all are IntelliJ projects so I will be using IntelliJ as long as I need these projects (long time!). To make this "IDE soup" even richer I am learning Scala (best development environment appears to be the Eclipse plugin) and experimenting a little with Google's Android portable device platform (again, an Eclipse plugin). It takes me a minute or two to really get into a different IDE when I change tasks - makes me nostalgic for the 1980s and 1990s when I lived in Emacs for programming, email, shell, and usenet. While there are interesting Emacs tools for Android, Ruby, Rails, Java, and Scala, I am not willing to go back in history and spend my days in Emacs.

The great static vs. dynamic typing debate

I will frame this just using two languages: Java and Ruby. I can make it even simpler: there really is no debate as far as I am concerned. There are certain classes of large mission critical systems that are best implemented using Java for reasons of type safety (avoid obscure bugs that creep past unit/functional/integration testing that occur long after a system is deployed), run time efficiency, and scalability over many CPU cores. There is a much larger class of systems that are not "mission critical" and it is more important to develop and deploy quickly, basically minimizing development and maintenance costs: I use Ruby for this type of development. Equally skilled programmers will always be able to develop faster in Ruby than in Java: less code to write and read for the same functionality because of dynamic typing, blocks, etc. It is not simply a matter of less code: statically typed languages like Scala are very terse, but I believe still slower to develop in. The prob

Nicholas Carr is correct re: world wide computing cloud

Wired Magazine: But a single global system? Nicholas Carr: I used to think we'd end up with something dynamic and heterogeneous — many companies loosely joined. But we're already seeing a great deal of consolidation by companies like Google and Microsoft. We'll probably see some kind of oligopoly, with standards that allow the movement of data among the utilities similar to the way current moves through the electric grid. Read the entire interview - Carr is right on it. As far as privacy laws, consumer data protection laws, etc. go: I believe that companies like Amazon, Google, Yahoo, and Microsoft (OK, I am being generous including Microsoft :-) stand a better chance of getting it right if one thing happens: quality of service contracts (I am assuming that cloud data services used by businesses and some individuals are paid for on some sort of subscription basis and not free) include guarantees for data security, including sufficient guarentees to satisfy medical record l

Cool: Common Lisp Elephant object persistence package

One of my customers uses Common Lisp for a lot of development and we go with Franz, largely because of AllegroCache object persistence and great support. Until today, I had never bothered getting Elephant installed and set up with a back end data store (I chose CL-SQL with native PostgreSQL). Since I own my own licensed copy of Franz Lisp (and my customer provides me with another license for their work), I was always happy to just use AllegroCache. Anyway, after reading Vetle Roeim's blog post Implementing a blog in Common Lisp I decided to take a little time setting up Elephant and Edi Weitz's Hunchentoot web server and his HTML-TEMPLATE Common Lisp templating system. I used a fairly recent release of SBCL Common Lisp on a MacBook. This is all free open source software. I found the Elephant API to be easy to use. After having some fun with this, I do have a few comments on Common Lisp vs. Ruby development: Common Lisp compiled code runs much faster than Ruby: typical benchm

NetBeans 6.0 Visual Web Pack: not ready, but looks promising

The NetBeans 6.0 Visual Web Pack looks promising: ability to visually edit web pages, wire in navigation, etc. Basically, automating a lot of JSP web application configuration and supports fast creation of JSP pages. I had problems with it however, and from searching the web, it looks like other people have problems also. I am going to make a note on my calendar to check for updates in a couple of months. Rails is my preferred web framework, Django looks good, but it would be naive of me to think that as a consultant I will not also have to write JSP/J2EE based web applications (since I have spent years doing this, and this technology is not going away). I would like a more agile development setup than my old approach of model classes, off the shelf tag libraries, my own custom tag libraries, and hand edited JSPs. I have been loving the Ruby/JRuby support in NetBeans - that was my motivation for looking at other good NetBeans plugins.

Plone 3: nice!

I had not used Plone in several years. I set up Plone for a customer's development team this evening (a few of us wanted something more full featured than a wiki), and perhaps it was previous experience with Plone, but I was amazed how easy version 3 was to set up. A few years ago, I needed to write a custom product (plugin) for Plone. At the time, I had little experience with Python and did not enjoy the experience. My attitude towards scripting languages has improved a lot in the last three years because I have spent so much time coding in Ruby. Python == Ruby in 'scripting goodness', although I do like 'Ruby blocks'. I expect to finish up my own Ruby Rails project in the next month and I might use Python+Django on a much smaller project that I plan on doing after that (I have just about standardized on using Rails for all web apps, but I do enjoy a change of perspective from different tools :-)

Scala programming language

I took a look at Scala last year and set it aside, but this weekend I was looking at the Computer Language Benchmarks Game and noticed just how fast Scala is because it compiles efficiently to the JVM (I dream of JRuby approaching this speed but this will not happen because Ruby is not a staticly typed language and has other nice language features that are harder to optimize) I am very happy now doing most of my work in Ruby (and/or JRuby) but I am keeping Scala in mind for possible future projects where Ruby is too slow. I find the syntax and language features pleasing and the Scala interactive REPL shell is nice. There is some initial NetBeans 6 and TextMate Scala support, but still works in progress.