Posts tagged as "software":

My Experience Learning Scala

Sometime in the last week I read an article about Scala, actually I think it was the interview with Twitter engineers about Scala vs. Ruby, and it really sparked an interest in the language for me. I’m sure at least part of the reason is because I’ve been writing mostly JavaScript lately and reading a description of Scala it seemed like a number of the functional programming practices I’ve picked up writing JavaScript would carry over well. At the same time though Scala is built on top of Java, a language I’ve become intimately familiar with even if it has fallen somewhat into disuse. Last week after reading the article and feeling this resonance with what I read further about Scala I decided to jump into it and see how much I could pick up.

The Scala website is well documented and has a number of good tutorials but something just wasn’t clicking in my head about the syntax or the language in general. I think feeling like I could get a handle on this language quickly is what has really driven me to obsess about it this past week. I ordered Programming in Scala from Amazon (before Amazonfail as it’s being called on Twitter [From AmazonFail to SorryAmazon]) which I’ve read about 200 pages of and continued to read over (and over) the pdf tutorials available to me. This weekend I started putting together an application written in Scala to be deployed on Google’s AppEngine since they released Java support and Scala compiles to Java. Additionally, my tentative plan for the application is to make use of a number of ‘Social APIs’ which are coming up more and more at work but I still know quite little about. The first API I decided to work with was Twitter’s and in just a couple of days (maybe 16 hours) of work I have the basic model classes written along with BDD specs for them using Scala Specs, and I’m also able to pull the data I want from Twitter and deploy to the AppEngine service. All in all I’d say not bad for a weekend’s work. There is of course quite a bit left to do before the application is finished but I’m proud of the first steps I’ve made. If inclined, the source for this experiment is publicly viewable as twitter-favorites on github.

April 12, 2009

The Lesson About /usr

Lately I have taken it upon myself to upgrade certain unix friendly applications which ship by default with Mac OS X Leopard. I can not say for sure what started this but I’m fairly certain it began with MacFuse and and my desire to find various things which would allow me to make use of this awesome bit of technology. The first one I found was sshfs which is available as from the MacFuse developers. Soon after I read something about the mystically difficult to find ftpfs. For reasons I can no longer recall I decided I simply had to find and install it. The one I found was curlftpfs and when I attempted to compile it I quickly discovered my version of curl was not up to snuff.

Having been shamed once by an installer I quickly reached out in search of the latest version of curl’s source. After all I’ve done the configure; make; make install routine plenty of times before. Sadly it took me far too long to realized the vast majority of time I’ve done the configure; make; make install routine it was to install new software not upgrade existing packages. So I went through the process the first time and couldn’t get curlftpfs to compile still; curl had not been compiled to the correct location because the old version of curl was still being found in the path. Running blithely ahead I recompiled with the ‘correct’ prefix of /usr. Now this install location should have been my second clue signifying I should stop what I was doing. Instead I moved right along compiling and installing into the /usr directories. I finished compile attempt number two for curlftpfs having learned it had not been compiled with some necessary option enabled and so it was time to compile curl again this time with the option enabled. Of course here the configure fails because I am missing the necessary libraries.

Naturally forging ahead I go and get the missing libraries compile and install them and try curl again. I have forgotten the reason but I know I was doomed for a couple more failures before I attempted to do what I should have done in the first place which is use my already installed MacPorts and just upgrade. Which is what I eventually try. However, it would appear the port command provided by MacPorts also relies on curl so this is a total bust. At this point I’ve forgotten all about getting curlftpfs to work and just want curl and port working again. By this time my frustration must have been palpable because I have no recollection of what I did to get those two things correctly compiled and running again.

The lesson I have learned from this is pretty simple. Don’t mess with the /usr directory without a backup/restore plan.

January 22, 2009

Chrome: First Impressions

Google released their first version of Chrome this afternoon and while I am quite disappointed to see only a PC version I can certainly understand it given the vast differences in market share.

Having said that I did fire up my handy dandy virtual machine in order to download and take Chrome for a spin. The first place I went was the Motorola USA Phone Browse page because I wrote most of the JavaScript for it and I wanted to see how it would perform in the version of WebKit Chrome uses. Much to my dismay the display of the page is horribly wrong and it looked like some errors were generated. This made me sad so I rapidly vacated the area and started looking at some other oft-used pages of mine1 just to get a general feel for how things were operating. Everything felt quite zippy on those two sites but that is really to be expected.2 So then I decided to check out Processed Tower Defense which is a pretty intense JavaScript application and it ran surprisingly well especially considering I’m doing this in a virtual machine with limited memory resources allocated to it.3 To be honest though I expected the JavaScript execution speed to be impressive, the thing I’m really curious about is how the garbage collection performs compared to other browsers.

The thing I found particularly impressive though was how useful the ‘omnibox’ was, I daresay it was quite a bit more awesome than Firefox 3’s ‘awesome bar’. I’ll go ahead and say a great deal of this is because I really dislike the ‘awesome bar’, I think it falls far short of it’s lofty goals whereas Chrome’s ‘omnibox’ delivers. A big part of the reason I feel the omnibox delivers while the awesome bar falls short is something mentioned in the comic on page 20. Essentially you don’t have to hit the down arrow to get what auto-completion is suggesting because it does it inline and you will only go to URLs you have explicitly typed before.

The feature John Resig dubbed ‘the killer feature’ is something I believe is pretty awesome but it will take a while for the impact John foresees to come to fruition. After all of the six tabs I have open in Chrome right now4 Gmail is consuming by far the most resources and Google is often hailed for it’s lightweight applications.

In conclusion, I actually like Chrome in a virtualized environment better than Firefox 3 which is running natively which I think says a fair bit. Of course I’ve also been using Camino over Firefox 3 so perhaps it is just Firefox 3 doesn’t really do it for me.

  1. Gmail and Google Reader 

  2. After all, it would just be tragic if the browser developed by Google had issues on Google’s on pages 

  3. 512 MB 

  4. Yes, virtual machine is still in effect 

September 2, 2008