MickBlog: programming

More thoughts on code.google.com hosting

I've been using code.google.com hosting a bit more and it's definitely getting quite usable now. Having a wiki and downloads covers a lot of common needs, and the tag approach to properties isn't a half bad idea.

The only real downside (or annoyance) I've encountered is the use of the same svn repository for the wiki and your source. This can lead to some spurious complaints about your checked out source being out of date if someone is doing a lot of wiki edits. While this is a common symptom of large busy projects, it can be annoying when you've only got yourself :)

Tim Bray on Ruby

Just finished reading Tim Bray's take on ruby. In short I think he's a convert, truly enjoying his ruby experience.

Now, I normally write about python, so you might be expecting something along the lines of "but python is so much better". I could write that, but it would probably be untrue.

What struck me about his piece was how much of what Tim loved about ruby is true of all good dynamic languages (you could almost do a direct s/ruby/python/g in some paragraphs).

The other thing that struck me is a suspicion I've had about ruby vs python for a long time: folks who like perl tend to gravitate to ruby. This is good. There are many good perl coders out there, and moving over to ruby is good for me 'cos if I squint I can read ruby, while I start crying when I see perl.

The way I see it, if everyone moved to python I'd be happy, if everyone moved to ruby I'd be happy, and if everyone split between ruby and python I'd still be happy. The important thing from my point of view is the use of dynamic languages for most programming tasks.

Even better, having both python and ruby means that they can borrow ideas from one another, as well as spur each other on with a sense of friendly competition.

Multiple image submit buttons and IE

Ran into an interesting problem with Internet Explorer today. I had a simple form for adding and removing people using nice + and - graphics as the submit images.:

<form action="add_remove_user" method="post">
    <input type="text" name="username" value="" />
    <input type="image" alt="add" src="add.png"
        name="action" value="add" />
    <input type="image" alt="remove" src="delete.png"
        name="action" value="remove" />
</form>

Nothing too exciting there, however I was getting some odd results from IE:

  1. If you clicked on one of the images then you got "action.x" and "action.y" but no actual action value.
  2. If you hit enter then the action field wasn't present.

The first problem I couldn't figure out, so rather than mess around with javascript or other hacks I just changed the buttons back to plain submit ones.

The second problem still persisted, and it turns out you need a fake input field (see this article for more detail). So having stuck in my fake field you can hit enter and click the buttons.:

<form action="add_remove_user" method="post">
    <input type="text" name="username" value="" />
    <input type="text" name="fake" class="fakefield" value="" />
    <input type="submit" name="action" value="add" />
    <input type="submit" name="action" value="remove" />
</form>

I'm not entirely happy with either solution, but IE has ground me down to the point where I just want to fix a problem and move on, avoiding javascript fixes where I can (since javascript on IE introduces a whole new set of problems).

What? No python?!?

I'm just going to repeat other sentiments I've encountered, why is there no python in Google's European code jam?

Is it because it'll give a huge advantage to the python coders who will get the problems done in a fraction of the time of the others? ;)

Waterfall 2006

Now this is a must on the conference trail: Waterfall 2006. It features talks such as "Very Large Projects: How to Go So Slow No One Knows You'll Never Deliver" and my favourite "Ruby On Snails: Slow Down Development With This New Framework".

View more pages

On page 1 of 2.

next page > | last >>