Rails ExceptionNotifier plugin

I’m irritated with myself that I hadn’t found this before. If you aren’t using it now on your rails sites, you need to install it right away:

http://agilewebdevelopment.com/plugins/exception_notifier

Indeed, if it were up to me, I would include it as part of the standard distribution. It’s small, quick to set up, and a huge help in tracking down and eliminating problems.

JavaFX

I’m not convinced.

It looks to me like they’re aiming at something a bit more dynamic/higher level than Java, in more or less the space that Javascript, Ruby and Python operate in.

The declarative GUI stuff looks pretty good, but I don’t know if the rest will make that worth it.

The language itself seems neither here nor there. It’s a lot like Javascript – but not quite. It doesn’t have real hash tables, something I don’t care for in JS, and I didn’t see an eval() method in the documentation, which means that their aim is to make something that you compile, and that doesn’t carry around an interpreter with it like most dynamic languages with eval have to.

I wonder what kind of support it will get from Sun and the open source community? Will the internal Java group view this as some sort of competitor? I wonder what sort of discussions went on during the creation of this system at Sun. They can’t have take the decision to make a new, incompatible language very lightly.

A new language has to have a killer app to drive acceptance, and I don’t quite see one for this. The FAQ sheds some light on where they’d like to go:

Why did you create another scripting language?

JavaFX Script is specifically designed to optimize the creative process of building rich and compelling UIs leveraging Java Swing, Java 2D and Java 3D for developers and content authors.

Why isn’t Groovy enough?

Groovy and other languages have two specific traits which don’t precisely meet these needs, namely that they are generic in nature and don’t provide the appropriate abstractions necessary to optimize the UI design process and similarly are designed specifically for programmers other than content authors.

So it does look like they’re aiming for a language that makes it easy to quickly create GUI’s for people who perhaps aren’t expert enough (or patient enough) to deal with Java itself. Pity they didn’t just stick with Tcl and Tk, which have had a more or less declarative syntax for specifying layout for something like 10 years, and in any case have a flexible enough syntax to “run DSL circles” around most languages that are currently popular.

As the author of Hecl, I’m particularly curious about their mobile strategy. If I may be permitted a bit of hubris, it’s nice that they see things my way, that mobile apps need a good scripting language in order to make them more accessible to the masses, but it wasn’t too hard to see that coming, with the ever increasing capabilities of higher end phones, and the “scaling down” that scripting languages bring to programming (making it easier for people to get started even if they aren’t experts).

I wonder what sort of diffusion they’ll get with their phone system, and how fast, and how easy it will actually be to program the phones. For many people it’s probably not as important, but by creating a real interpreter, rather than something that’s compiled and doesn’t have an eval function, Hecl lets you download and execute code, which makes for some very interesting possibilities (as well as some risks, of course). That’s probably not important though, if they can actually make a system that’s widely used, and easier to create applications for than J2ME currently is. I wonder if they’ll allow J2ME on the phone platform, or close that down in favor of JavaFX?

Even for Big Companies, launching a new language is a difficult endeavour[1], and it will be a number of years before we see where this ends up, but I’m not convinced.

[1]
The Economics of Programming Languages

Rails bitten by Ruby’s nil.to_f

I guess I’m still new enough to Ruby that this does not make sense to me:

>> nil.to_f
=> 0.0

Magically, from nothing, you have something. I suppose it might be convenient in places, but today I ran into a minor bug in Rails that causes problems when trying to get the average of a column that doesn’t have any entries.

So what is the reasoning behind nil.to_f being 0.0 (and nil.to_i being 0, to_s being “”), anyway?

Permission denied to get property Object.constructor

I struggled a little bit to figure out what was going on with the Prototype javascript library in terms of this error I was getting in my application, rather cryptically reported as:

[Exception... "'Permission denied to get property 
Object.constructor' when calling method:
[nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]

I was setting up an observer to make some async requests when a checkbox is set or unset. Setting the checkbox to true worked just fine, but unsetting it seems to cause the above exception. It turns out the fix is pretty simple. Instead of this:

<%= observe_field('blah_yes', :url =>
                  {:action => 'set_blah', :id => @someobj.id},
                  :update => 'blahmessages') %>

I made sure to use a :with parameter:

<%= observe_field('blah_yes', :url =>
                  {:action => 'set_blah', :id => @someobj.id},
                  :update => 'blahmessages', :with => 'yes') %>

My guess as to what’s occuring comes from the parameters passed into my controller. Before the modification:

{"action"=>"set_blah", "id"=>"4", "1"=>"", "controller"=>"xyz"}

That “1” is being passed as the variable name, rather than its value… After adding the with, the parameters come in like so when it’s being set:

{"action"=>"set_blah", "id"=>"4", "controller"=>"xyz", "yeah"=>"1"}

And like so when it isn’t… aha!

 {"action"=>"set_blah", "id"=>"4", "controller"=>"xyz", "yeah"=>"null"}

I bet that null is what was causing problems.

I thought I’d publish it so that an answer is available for those searching with google, as I wasn’t able to find one.

Perhaps the Prototype library should be a little bit more careful with its data somewhere in order to fail more gracefully, but I’m not sure where one would go about looking.

Google Apps + Domain Registration

I’m impressed. Via Google Apps, I was able to register a domain (squeezedbooks.com – nothing there yet, though) for $10. But it’s not just a domain, it comes with email, google calendar, and a bunch of the other google apps thrown in for free.

That’s a lot of stuff for ten bucks – especially for the large portions of the world where the currencies are appreciating against the dollar.

The service does have some drawbacks though.

  • It doesn’t do .it domains, something that I would find handy. For that matter, it only seems to offer .com, .net, .org, .info or .biz, which is sort of limited. I guess I don’t blame them for not wanting to take on the Italian domain registry and its stupid, bureaurocratic rules, but having some other TLD’s there would be nice.

  • It relies on another site for DNS fiddling. Google partnered with enom.com for their registration service, and one notices the difference between the nice, clean google interfaces, and the enom app when you get shunted off there to make DNS changes. The app isn’t even that bad, it would just be nicer if it weren’t necessary to log on to something external.

  • The amount of power that google is ammassing is scary in some ways. I have happily used gandi.net for a number of years, and would have continued, but 14 Euro vs 10 Dollars + the apps is simply not a contest.

Cell Phone Software Requires a New Mindset

Alex Krupp talks about cell phone software and why it’s not working

These are good points, but I remain pretty certain that it will be an area that takes off. I think that, as things stand right now, some of the ingredients are:

  • Discard what you know about what an application should be like. I think a lot of people approach things with an idea that might work on the web or a desktop, and “whittle it down” some. I think the best cell phone apps will be things that are created from the ground up with the cell phone environment in mind. For example:

  • Radically simple. It has to be super simple and easy to use. You should get the basic functionality from it within one or two clicks of opening it (consider that the user already had to click 3 or 4 times just to open your application in many cases).

  • By making an application that’s radically simple, it becomes easier to port it to all the many phone platforms out there. If you aren’t doing much that’s fancy, you’re not likely to run into strange limitations.

  • The advantages will come from what makes mobile phones convenient: the fact that they are portable and can basically do simple network access all the time.

  • Since it’s networked, build applications that are half mobile, half on the web. Complicated interaction goes on the web, and the mobile portion does “the simplest thing that could possibly work”.

My own simple example of an application that basically meets these requirements is a mobile shopping list (with the highly original name of ShopList that doesn’t suck. By that I mean that you would either be already insane or be insane in short order if you tried to enter a shopping list into a phone via its keypad, so that is taken care of on the web.

Sure, it’s not a billion dollar startup idea, but I think I’m on the right track with how to create applications and what sorts of things to create.

Detailed Austrian Topographic Maps

My wife Ilenia can attest to my love for maps. Whenever we go hiking and I find a nice map of the area, she usually has to pry me away from it. But I especially love maps on line. As a kid, I used to buy the USGS topo maps at the bookstore, but getting more than a few was expensive for my budget and sort of futile, as you would have to purchase a large number of them to cover any significant amount of territory. So I was happy indeed when I discovered TopoZone. And who doesn’t like google maps?

It was with great joy that today I finally found some good map sites for our new home in Tirol:

http://www.geoland.at/

It’s not the fastest thing in there, but it’s got lots of information that you can play around with.

The second one that I found utilizes the dataset to produce maps with mountain bike routes on them:

http://tiris.tirol.gv.at/scripts/esrimap.dll?name=Bike&Cmd=Start

Too cool!

Stuff To Do for everyone

As mentioned previously in this space, I’ve been thinking about what exactly to work on, and one of the conclusions that I’ve come to is that Stuff To Do is a very handy tool, but there are already too many similar applications out there. Even if they might not have quite the mix of features that makes me like Stuff To Do and keep me using it, it’s not the best space for me to be competing in.

So, with that in mind, I dropped the price to 6 USD a month, and opened it up so that anyone can use the group enabled version for free as long as they don’t mind a few adsense ads. Paying the money gets you an ad free version and a warm fuzzy feeling.

We’ll see how things go with those parameters, and of course I reserve the right to change things in the future.

Depending on how things go, I suppose I might even consider open sourcing it in the future, although since it does what I need, and I don’t want to be responsible for trying to manage it as an open source project, I’m not sure, yet.

Now… on to the next thing…

“Ideas are worthless”

In one of his many well written and thought provoking essays (Ideas for Startups), Paul Graham has this to say:

Actually, startup ideas are not million dollar ideas, and here’s an experiment you can try to prove it: just try to sell one. Nothing evolves faster than markets. The fact that there’s no market for startup ideas suggests there’s no demand. Which means, in the narrow sense of the word, that startup ideas are worthless.

While I agree with his main point that execution counts, his affermation bugs me a little bit because it clashes with my understanding of economics. To wit, that ideas are “Non-excludable goods“.

As the linked page says,

Non-excludable goods are defined in economics as goods or service whereby it is impossible to prevent an individual who does not pay for that thing from enjoying the benefits of it. Market allocation of such goods is not feasible.

How would a market for ideas work, in any case? How could you prevent someone from listening to a bunch of ideas and just walking away with the ones they like?

Perhaps with lots of lawyering and monitoring schemes, something could be kludged together, but at that point, since the ideas alone most likely aren’t worth that much compared to well executed ideas, putting together that market would probably be more trouble than it’s worth.

So Paul Graham is right, for practical purposes, but his economics don’t seem correct to me.

Founders at Work – Who’s Missing?

I just finished reading Jessica Livingston’s Founders at Work, which I found very interesting, and valuable in terms of information on startups. Unlike a lot of businessy books, since the whole thing is interviews, there isn’t really any “filler”. One thing I think might have been more interesting in some ways is to have some more information on failed startups and what went wrong, but it’s probably more difficult to research that.

My question to the world, though, is this:

Who (or what startup?) would you have liked to see interviewed?

It would have been interesting to see Dave Sifry, both because I know him from my time at Linuxcare, but also because he went through a couple companies before the stars aligned with Technorati, which seems to be doing pretty well.