Welcome to the adventure

Does your router crash? It shouldn’t

Tuesday August 21, 2007

I’ve never had much luck with routers from any of the major brands (although I haven’t tried Apple). I mean, it’s a simple piece of hardware/software, so it shouldn’t be that hard to at least make it work. They either require random reboots or “power cycling,” or they have some silly deficiency like crashing when Azureus exists or the inability to do static DHCP (without it, your IPs will frequently change when using DHCP, making port-forwarding useless).

Then I installed Linux (OpenWRT) on a new Linksys router and hooked it up to its own power supply, so storms don’t knock it out. Since then, my router hasn’t turned off or stopped working in 2/3 of a year. Here’s its status:

Host Name: OpenWrt
Uptime: 265 days

Haven’t had to think about it in a long time. It just works, always. Not bad for consumer hardware.

alt+click window dragging in OSX

Tuesday August 21, 2007

Just discovered this great software called Zooom, for Mac (it’s $20).

If you don’t use software like this and you’re mouse-click crazy (I’m looking at you Neha), you really should. You can basically hold down a hotkey and click anywhere in a window to drag&move that window, so you don’t have to click on the titlebar at the top. Works with resizing, too. This feature really should be in all operating systems (it is in Gnome & KDE). Clicking those tiny areas to resize or move a window is terrible usability, and it gives me serious RSI — it makes me want to drive my car into the lake!

If you’ve ever used Gnome’s alt+click dragging function, this is a bit better, because you don’t actually have to click. There’s an option to just hold down the hotkey and move your mouse. Very elegant.

There are apps like this for mac (MondoMouse (non-free) and WindowDragon (free)), but neither work as well as Zooom does, and when you’re dragging windows around all the time, the smallest bugs will drive you insane. Zooom can resize Firefox smoothly, and it works with Textmate, neither of which is true for MondoMouse or WindowDragon.

Finally a key window management feature done properly in OSX.

Jjot news

Tuesday August 21, 2007

Jjot now has a blog, and fancy new popout support for notes (ala Gchat). Except the popped-out notes stay open even when you close the main Jjot window ;-)

I could see doing this for a living

Tuesday August 21, 2007

An artist doing interaction design:

Tom Otterness creates playful, storybook sculptures, many permanently positioned around the city. He spends hours secretly watching kids and adults react to his sculptures, then takes insights back to the studio, incorporating them into his next pieces.

From Ideaspotting, by Sam Harrison.

Make sure your browser detection is up-to-date

Tuesday August 21, 2007

Saw this while trying to use a shipping feature on paypal. They show me this warning and omit firefox from the recommended-browser list (what is netscape’s market share?), even though they have a version of safari from 1993.

So I marked up the image a bit and emailed it to them.

paypal2.png

Ninjahacking.com

Wednesday August 1, 2007

… is my new personal page. I just can’t resist buying fun domains.

Personal pages are a great place to try something new with design, so that’s what I did. This design is hung on a strong grid, which has its middle point in the center of the page. Grids are hard to do on the web, especially horizontal ones, since text can reflow all over the place; so this page was a beast to finish. This thing even scales with font-size — try increasing your font sizes (ctrl+ and ctrl- in Firefox). And it works in all browsers to boot (except you, Lynx!).

Phil Crosby

Got tired of the old page; needed more color! I even have the version from one year ago. That page has come a long way =)

Let me know what you think.

Jjot.com launch - take notes online, fast

Thursday July 19, 2007

Jjot - take notes online, fast

I’ve just launched a new service that helps you take notes online. It’s like sticky notes on the web. If you’ve ever emailed yourself a reminder note so you could have it on more than one computer, or if you have tons of small text or Word files scattered across your computer, then this is for you. It’s good at keeping small notes (meeting notes, todos, class notes, web research) in one place, which you can then access from any computer. They’re very easy to edit.

I wanted Jjot to be as fast as possible, because I hate having to click on links and suffer page refreshes just to write something down quickly, or see all of my notes. With Jjot, you can type in just eight characters (”jjot.com”) and have all of your notes in front of you (not just links to them — the whole note), fully editable and ready to print or email to people. The only thing faster is to directly read your mind, and we’re working on that for the next release.
Jjot

There are lots of desktop applications for taking notes, and a few on the web. I made Jjot because they all seem to suck in some way. Can’t we just keep things simple? I don’t need social video blogging in every app I use! For me, Jjot by comparison is refreshingly simple. When you go there, you get a page of note-like objects (looking like actual notes is important!). It does exactly what you’d you expect: you can type in them. No links to hunt through, no weird interfaces to figure out.

I admit, I get frustrated easily, but I don’t want to load a new page just to see the contents of my note, and I don’t want to have to worry about clicking a save button. Any slowdowns really hurt the effectiveness of an app that you use every day. Speed is key; we’ve got speed.

Give it a shot; I think it’s a very useful app. You can drag notes around, create bullet points, create noteboards, email notes to people or share a whole noteboard with them, print it, whatever. It’s fun just to play with it =) Try the search — it searches-as-you-type, and it’s wicked fast.

 

After 5 months of hacking, I can say something like this is damn hard to make, if you want to do it right. Designing a good UI is always hard, but the client-side scripting on Jjot needed to be very sophisticated. Here are a few examples:

We could have used one of the rich text editors on the web, but they are slow, poorly coded, and hard to extend with the feature set we need. So we wrote our own; it has capabilities no other editor has, like really fast initialization (important when you have tens of these editors on one page), drag and drop abilities, and support for those blue titles we use. That was really hard, but it’s made a big difference.

We could give you a save button or a “wait” cursor whenever you change something, but that would slow you down to a snail’s pace. So we’ve made everything save completely asynchronously, in the background, without bothering you at all. Much harder, but it’s the behavior we want as users.

We’ve engineered something that springs up quickly even on dialup and satellite connections. It’s easier to say “forget users with slow connections”, but we hate waiting. So we’ve made our site really slim.

 

Please, let me know if Jjot works for you — bug reports, usability comments, feature requests, or anything else can always be sent here:

contact@jjot.com

or just leave a comment. Enjoy!

Symlinks in windows ntfs

Friday July 6, 2007

If you’re using Windows and NTFS, MS has a program that can create symlinks for you. It’s called Microsoft Junction. Factory44 has a very short writeup on how to use it.

If you use Cygwin you can create symlinks the regular linux way, but those symlinks only work with Cygwin and its ilk. With Junction, any Win32 program can follow them.

Plotr (Javascript Graphing) for Mootools

Sunday June 10, 2007

Plotr is a Javascript toolkit for drawing arbitrary graphs. It does this by using the <canvas> tag, which allows you to draw rich graphics on the client. It’s supported by everyone except Internet Explorer. You can get around that by emulating canvas using IE’s VML rendering support (thanks Google!).

So, this library is great, but it’s written for Prototype. I needed it for a project using Mootools, so I wrote a small wrapper around some Prototype functions that allows you to drop in the Plotr release into your project without modifying it one bit, making it easy to update to new versions. This is doable because Mootools and Prototype are very similar: they each aim to do the least surprising thing, which tends to lead to similar APIs. And because the biggest Prototype-only feature — its extensive functionality for enumerable objects — has already been ported to Mootools by Bas Wenneker, the same author who wrote Plotr. Excellent.

So here’s what my wrapper around Prototype; it works against Mootools 1.0 and 1.1. In fact this probably will be enough to get most javascripts written for Prototype working on Mootools.

plotrmootoolssupport.js

/*
 * Supplements Mootools with some Prototype functions required by Plotr
 *
 *  (c) 2007 Phil Crosby <phil .crosby@gmail.com>
 */

Prototype={};
Class.create=function(){
	return new Class({});
};
Element.setStyle=function(){
	var e = $(arguments[0]);
	var a = arguments[1];
	// Prototype allows you to pass in many style declarations at once. Mootools
	// has a separate API for this
	if (typeof a=="object")
		e.setStyles(a);
	else
		e.setStyle(a);
};

Array.prototype.flatten=function(){
    return this.inject([], function(array, value) {
      return array.concat(value && value.constructor == Array ?
        value.flatten() : [value]);
    });
};

Number.prototype.toColorPart= function() {
    var digits = this.toString(16);
    if (this < 16) return '0' + digits;
    return digits;
};

Throw in the EnumArray.js file from Bas Wenneker and you’re ready to go. Include the files in this order in your project:

mootools.js
plotrMootoolsSupport.js
EnumArray.js
plotr.js

Give your users a break by combining the last 3 javascripts into one file (in that order). Thanks Bas for the great library.

Huge Rails backtraces got you down?

Thursday May 31, 2007

I’ve got just the thing. Shorten them up!

While debugging an exception in a controller, after each page load I would get a 60 line backtrace, forcing me to scroll my console all the way up to see the relevant parts. I hate scrolling. I needed prettier & more relevant debug output.

It turns out you can customize how you want errors to be logged from inside your controllers — see rescue.rb in your rails distribution for more info. If you smack this sucker on your application.rb base-controller, your stack traces will be only 5 lines long.

  #
  # Custom logging of errors
  # What we're doing here is trimming down the backtrace of the inner exception
  # of TemplateErrors, because their backtrace is as long as a Tolstoy novel
  #
  # See rescue.rb in Rails for more information on how errors are handled/logged
  #
  def log_error(exception)
    if (exception.class == ActionView::TemplateError)
      e = exception.original_exception

      # trim down the stacktrace before we log it
      e.set_backtrace(e.backtrace[0..5])
    end
    # call original log_error defined in rescue.rb
    super
  end

Conceptually it’s not very elegant, but it’s simple enough. Good additions might be to not change the stacktrace if RAILS_ENV == 'production', and to make the number of stack trace lines configurable via a parameter (so you could define in environment.rb).