Archive for May, 2007

Hotwire 0.444

May 20, 2007

Hacked a bit Thursday and this weekend and put together Hotwire 0.444. For the impatient, you can skip directly to the Google Group and download. The cool thing about this release is that it has initial undo support. I’ll talk more about that in a minute.

Sometimes, writing applications for the web is quite nice, compared to traditional desktop UI toolkits.  It can be very easy to bang together something that looks awesome, is functional and usable.  In particular, one of my favorite features about the web is javascript:alert(). Wait a second you say, javascript:alert() sucks! Exactly. It’s so bad that no self respecting web developer uses it in the normal app flow. It’s impossible to make it look decent, and it just feels clunky and weird in a normal web page. Therefore, most web applications tend to avoid dialogs, and (hopefully) use better solutions like undo or whatever makes sense for the situation.

I think in general, there are 3 possible reasons you might add a modal dialog that requires a user action or choice to your application.

  1. Need username/password – Ok, but you better remember what I type.
  2. List infos – Things like the Eclipse new-class dialog. This one could be done inline too but it’s mostly fine as a dialog.
  3. It’s probably wrong – everything else.

In particular, I often notice that where a lot of the confirmation type dialogs (“Do you really want to foo?”) are used, it would make more sense to just do what I asked, and if it wasn’t what I really wanted, allow me to undo.

I am going to take a relatively extreme (and topical) example here; the default Fedora root .bashrc which has alias rm='rm -i'.


It asks you this for every file by default

Is there a better way? Yes.


Click to undo!

This took all of maybe 20 minutes to implement for the cd and rm commands; it should be relatively straightforward to add undo support to Hotwire’s builtin mv command, and cp will likely have it once it’s written.

Some other new features for this release:



Terminals in tabs


A help display so you don’t need to read the source to know what commands there are

For more details, see the Google group post.

Boston Zombie Walk 2007

May 13, 2007

The 2007 Boston Zombie March [link deleted, taken over by porn] was completely awesome. I heard from others last year was maybe 20-30 people; this year I would say there were at least 200 at the peak.


Zombie looking hungry

This guy was a bit more liberal with the stage blood than I was

Now originally I thought, being a computer programmer, I would have a leg up on the competition in the looking-undead department. However, when Brian and Steve mentioned they were thinking of going in their robot costumes as robots protesting zombies, I knew I would be spending most of the night watching them getting ogled. And I did, but I still had a ton of fun taking pictures and being part of the event! Carolyn took some good pictures too I think, I’ll edit this later when I get the link.

Me attempting to devour Brian

One completely amazing thing about this event was just how many people had digital cameras and video cameras. The two robots grabbed attention wherever we went. I had this feeling that everything visible would be tagged and uploaded to Flickr in short order, which will probably be more true as photographers wake up today. But this morning Mike discovered us!
For reference, their signs say Zombies take robot jobs and Robots against Zombies.

Steve having a malfunction while everyone is watching

We walked from Porter square down to Harvard. Watching the confused expressions of passersby was fun (especially when the zombies tried to eat them). I also had to laugh when the Cambridge police stopped traffic around Harvard so that the big crowd of zombies could…slowly one legged limp across the lanes. I can only imagine what people who just happened to be visiting Boston thought.

Some random highlights:


Zombie burying himself (while being consumed by girlfriend?)

A crowd of “protesters” were part of the event

Brian giving a zombie the beatdown

Heading home, this little kid thought he was meeting a real robot

Shopping at Shaw’s was hilarious

And, the full album. I know I’m a crappy photographer!

A Guided Tour of Hotwire 0.333

May 7, 2007

Hotwire has advanced quite a bit since last I mentioned it. For the most part now, I am using it to develop itself, instead of gnome-terminal. Of course I’ve tried this a few times in the past week, but I wouldrun into some bug that drove me back – until I fixed it. Add a lot of those fixes together though, and it’s starting to actually feel usable.

One feature I added last night that’s kind of a small thing but I am fond of is the last command. What last does is pretty simple – it returns the output of the previous command. This lets you interactively refine pipelines. For example, say you type cat foo.log | grep error. Now, suppose you want to further refine that for strings that match ‘192.168.1.1’. In a shell, you’d likely hit the up arrow, then append to the previous command. But doing so is wasteful (and sometimes unsafe) because it re-executes the entire pipeline; if foo.log is big you have to wait for it to be refiltered (or save it to a file, grep that…ug). Using last in Hotwire feels natural (and I plan to shorten the syntax to just ‘|’).


Hotwire executing /sbin/ifconfig


After grepping for inet6

You may notice from the screenshot that a lot more has changed. Here’s a quick sample of stuff visible there:
  • Hotwire now auto-resolves commands you type by prefixing them with sh or term as appropriate. So for example you can just type ifconfig and Hotwire knows you mean sh /usr/sbin/ifconfig.
  • There are now tabs; try pressing Ctrl-t
  • The display looks a lot nicer! I’m mostly done “porting” to GTK+.

So, cool. But there’s more! Realizing that because right now Hotwire requires the output of commands to all be of the same class (e.g. LinuxProcess, unicode), I redid the entire rendering infrastructure using a tree view. A picture is worth a thousand words here:


Hotwire executing its ps command…on Windows!

So the first thing to notice here is that the output of the ps command is nicely formatted into columns based on its object properties (remember, the Hotwire builtin ps command outputs Process objects, not random bits of text).

The second thing to notice is…wait a minute, that’s Windows! Yes. Hotwire boots on Windows now, and I fully intend to make it a mostly-first class citizen. I am still recovering from the mental scars inflicted from trying to learn the Win32 API enough to enumerate processes, but it’s there. It’s a pretty rare developer in the world that doesn’t ever have to use Windows, and frankly I think Hotwire blows cmd.exe out of the water already for when you need to.

Another thing to notice in the above screenshot is the status message about kill – that’s what you see when you use…right click menus!


Right click on a process to get a Kill option

Now, I want to talk about completion. The TAB completion engine is on its third iteration, and it’s starting to feel about 80% of what bash does. If you use Hotwire for a while you will miss common-prefix completion (you’ll know what I mean), and some other details, but it’s mostly good enough, at least for me.

One thing that is a definite improvement though is that Hotwire offers you previous-token completion. Let’s say you type host example.com. Hotwire not only records this in your history (so if you type ping you can hit the up arrow to reuse the command), but also remembers example.com as a token you used previously. If you start to type it again in any context, Hotwire offers it. For example:


Remembering you typed example.com earlier

This is all part of the Hotwire philosophy of remembering everything you type, and making sure you never type the whole thing again.
Speaking of remembering things, Hotwire now also remembers which commands you used sh for and which you used term. For example, if you type term vi /tmp/foo.txt:

From now on you can just type vi and Hotwire will remember to prefix it with term instead of sh.

Last but not least, I battled setuputils and in the end produced a FC6 RPM and a source zip file: Download page.
I’m playing around with Google Apps for hosting the user pages, so excuse the bareness.

That’s it for now, going to post before LiveJournal eats this!

Investments

May 1, 2007

Application browsing and installing using the Big Board sidebar for GNOME has made a lot of advances recently. One change that I think turned out to be quite cool is that there is now a kind of “advertisement” section at the bottom; basically, it displays popular applications that you don’t currently have installed.


Browsing the Internet category

When you click on the link, you’re taken to an application page (Thunderbird), with the full description, links to other popular applications…but most importantly – an “Install Now” link. Right now it’s fairly basic; on Fedora it just pops up a terminal and “yum”, but it does work.

The “advert” section turned out to be such a nice way to discover an application and install it that the next plan is to extend the current search box to not only search applications you have installed, but also the advertisement section so you can see uninstalled ones. It feels like the relevance of the section is high in general because the popularity metric is software other people actually use, as measured by open windows, rather than say whether or not the package is just installed.

There’s a demo “Calendar” stock (mostly to flesh out the infrastructure for logging into Google):


Logging in

(Yes, that is the date of the Transformers movie in my Google Calendar)