Archive | February, 2010

Having uploaded Wiki-Data showcase, we’re halfway through 12 Days of TiddlyWiki http://12days.osmosoft.com

27 Feb
Media_httpfarm5static_xpfdv

Ajax was the key improvement in search in recent years, says search expert

22 Feb
starO’Reilly Radar – Insight, analysis, and research about emerging technologies.
February 19, 2010 3:00 PM
by Mac Slocum

Search is the Web’s fun and wicked problem

Peter Morville, co-author of “Search Patterns” and a long-time observer of the search domain, looks at the next wave of search in the following Q&A. He shows how “weird ideas” will shape search’s future, and he also reveals the one recent innovation that unlocked a watershed moment for search (it’s not what you’d expect).

MS: What’s been the best search/UI development of the last 3-5 years? What really opened things up?

PM: Autocomplete is an old pattern from the desktop that’s found new life in Web and mobile search. Once relegated to the musty modules of “help” in desktop software, autocomplete is now part of our everyday experience. It’s a great answer to the question: why wait for results? It saves time and typos by serving up suggested searches or destinations while we’re still entering our query. And, it’s a simple design pattern with powerful potential. For instance, Yahoo complements basic autocomplete with an offer to explore related concepts. By analyzing query-query reformulation data and post-query browse behavior, Yahoo is able to suggest similar queries that don’t even contain the original keywords. We can find what we didn’t know to seek.

So, what really opened things up? I’d argue it was Google Maps. All of a sudden, designers realized what could be done with programming frameworks like Ajax, and autocomplete was simply one of many interaction design patterns that flourished on the Web soon after that watershed moment.

UnderscoreJS’s _.isEqual() is perfect for unit tests

19 Feb
UPDATE: @andybeeching points out what shouldabeen the bleeding obvious: QUnit’s same(). (I’d internalised QUnit as having just ok() and equal() as I always think it’s unusally small compared to Junit’s myriad ofassertGreaterThan etc (which I prefer)…I forgot the third and obvious one.)

Drop this into your QUnit (http://docs.jquery.com/QUnit) test (or similar in other Javascript testing frameworks). It’s a drop-in replacement for the standard “equals” equality test in QUnit. It will recurse through data structures and so check proper equality of objects and arrays. Plus, it will still compare normal values too, using === (http://longgoldenears.blogspot.com/2007/09/triple-equals-in-javascript.html).

I just started using it here:

to test:

PHP serialisation

18 Feb

Working with @FND to get a PHP script talking to TiddyWeb. (The same way it would talk to a MySQL server for persistence, but making RESTful HTTP calls.) Anyway, trivial stuff and we divvy up between JSON serialisation and making the HTTP call. Here's the JSON serialisation:

<?

????require_once "JSON.php";

????$teams = array(
???? ??"carlton" => "blues",
???? ??"collingwood" => "maggies",
???? ??"essendon" => "bombers",
???? ??"wins" => 16,
???? ??"managers" => array("president" => "bob", "caretaker"=>"harry" ),
???? ??"years" => array(1906, "1915-1915", FALSE)
????);

????$json = new Services_JSON();
????print($json->encode($teams));

?>

It's using Michael Mygurski's PHP library (http://mike.teczno.com/json.html) … now in PEAR.

Aside: Thanks to jQuery 1.4 making a big deal of it, I'm now using "" on the left-hand side (the hash keys), always. Whether in PHP (where I have to), Javascript (where it's possible not to), or wherever. It's the standard.

State of TiddlySpace

17 Feb

We've done some work between last week and tomorrow's weekly hackathon. Building the current tiddlyspace is pretty easy, which will hopefully get tomorrow's session off to a flying start:

> git clone git@github.com:FND/

tiddlyspace.git
> cd tiddlyspace
> ./dev.sh (uncomment the "pip install" line the first time you run it, to ensure you have the latest version)

All things being excellent, you'll then have some instructions about how to try out your new TiddlySpace instance.

We should be able to change Javascript under this setup and just refresh the browser; and Python changes we just need to run "twanager server".

Front-End Dev: No Excuses!

16 Feb

@LennyM shares this (http://xkcd.com/303/):

Media_httpimgsxkcdcom_ygfyx

Back in the day, I used to wait tedious minutes for complex EJBs to rock out. Things got better with the right kinds of unit testing or complex hot-deploy setups involving symlink micromanagement, but still, any integration and it would be back to "test in 300, 299, 298 …".

Now, I mostly work in the browser where testing a full integration is as simple as hitting Reload. A lot more entertaining on the whole, even if there's no more excuses for inter-office chair fencing.

:%!sort|uniq …. running vim contents into a unix command line

15 Feb