Saturday, May 9, 2009
High Performance, Parallel, & Grid Computing
I realize that this is a bit of a rant. If any readers can provide counter-arguments or counter-examples, I’d be happy (and reassured) to read and know about them.
Update: I forgot to mention that if you’re doing academic research or teaching a class in clustering/distributed computing, you should check out the fairly new Amazon Web Services in Education program. They provide free credits to educators, researchers, and students. Pretty cool!
Sunday, May 3, 2009
Groovy versus Scala (Update)
Back in March of last year, I wrote a post comparing Groovy and Scala. Enough time has passed that I thought it was worth revisiting the topic.
In my original post, I reached the conclusion that at least for me, it made sense to first focus on Groovy and then later learn more Scala. I still feel that way, but my thoughts on the matter have evolved. How about combining Groovy and Scala in the same program or architecture? That thought had vaguely occurred to me already, but it was solidified by the discussion of Twitter’s use of Ruby and Scala. They started off using Ruby (Ruby on Rails, in particular) to run their whole site. When they ran into performance and scalability issues, they determined what was causing the most trouble (back-end tasks) and gradually converted the relevant parts of the system into Scala. This kind of polyglot programming makes sense to me. It follows the principle of “using the best tool for the job.” I think the combination of Groovy and Scala makes even better sense: they’re designed to run and interoperate with other languages on the same VM. Not surprisingly, I’m not the first person to think of this. I found two posts from Andres Almiray (“Griffon: Groovy & Scala working together” and the follow up “Follow up on Griffon/Groovy/Scala”) showing some practical examples and another on a different blog discussing the ability jointly compile “Groovy+Scala+Java”. I’m excited to watch and perhaps participate in these exciting developments.
Side Note: On the subject of Groovy, when my one-year IntelliJ license was close to expiring, I decided to check out NetBeans. I was pleased to discover it had quite good Groovy and Grails support. I’ve been using the 6.7 milestone builds and now the beta, in order to get support for Grails 1.1. If you haven’t tried Groovy/Grails development in NetBeans yet, you should.
Update: Here are links to the items Andres mentioned in the comments
Update (Jan 12, 2010): Andres recently posted the highly relevant Groovy & Scala: a tale of two JVM languages
Saturday, April 25, 2009
Simple, But Very Clever
p.s. I'm guessing they make a small amount of money on each purchase through Amazon Associates referral fees.
Friday, April 24, 2009
I'm Quoted in PCWorld!
The result was an article which appeared in PCWorld: "Amazon.com Eyes CIOs With Its AWS Cloud IT Services". My quotes were pretty clunky (apparently me thinks and me writes more gooder than me talks :) ), but I think readers will at least be able to figure out what I meant.
Update: the article also appears in InfoWorld and ComputerWorld Norway
Another Update: I contacted the reporter about the clunkiness of my quotes. He said that since the article had already been published, he would have to run any changes by his editors and it would effectively be treated as a retraction/correction. That's obviously overkill, so I guess I'll just have to live it and follow his suggestion for next time: ask the author to run quotes by me before the article is filed.
Sunday, April 5, 2009
Blogger Causing Problems for SyntaxHighlighter
I kept noticing blog entries with beautifully rendered source code snippets and finally clicked the blue question mark in the upper left of one and discovered that they were using Alex Gorbatchev's SyntaxHighlighter JavaScript library. For my last post, I followed the instructions in the Usage Guide, using the hosted version since I can't upload JS files to Blogger, at least as far as I know. If you look at my post, you'll notice that I have two 1 line Groovy snippets and one 5 line Java snippet. The 1 liners were no problem, but when I first tried to display the 5 lines of Java it showed up as just one line with visible <br> tags where the line breaks should have been. It turns out that when I pasted the code into Blogger's post editor, even though it was in HTML source mode, it inserted <br> tags for the line breaks even though they were showing up inside of a <pre> tag. It turns out that there are two solutions to the problem. I'll explain the better one first, although I didn't find out about it until trying the other one.
When I asked Google for help, it led me to a page talking about how to use SyntaxHighlighter with Blogger. The post itself didn't contain any new information for me, but the comments were useful. "Robje" had apparently experienced exactly the same problem as me. "Debiprasad" then asked, "What is your settings for 'Convert line breaks' set to? In my case, if I set it to 'Yes', it's inserting <br/> into codes defined under <pre> tag." Ah ha! I looked on the "Formatting" subtab under the "Settings" tab in the Blogger control panel and discovered that mine was set to "Yes". Ack! What an annoying default! With it set to "No", it seems to fix the problem.
In case that doesn't work for you, Google also brought me to a page on what must been the old home for SyntaxHighlighter. Once again, the gold was in the comments. "fahd.shariff" mentioned that if you use the post editor in Blogger in Draft, this isn't a problem. As I said earlier, I gave this a try before finding the preferable solution and it worked for me so it's a reasonable solution to fall back on.