New Website: Web-O-Random

I made a new Ajax toy. Web-O-Random is a random website finder with some Ajaxy goodness:

  • Sites load into a carousel (slider) component. Thanks to Bill Scott and Yahoo! for providing the original component and Sebastien Gruhier for the prototype port which is used here.
  • Pages load into an IFrame (as with WebWait).
  • User can re-randomize, which leads to a JSON payload of new random sites.

If you hunt for it, you’ll find there’s a way to search too, but I had to de-emphasise it as mysql full-text search takes 1-2 minutes to crunch through 4M (indexed) rows (each representing a website). If I have time, I may set up a reverse index table to cache results.

Initial reactions:

  • “…?” This is the typical reaction. It may be interpreted as a polite version of Cartman’s “Dude, this is pretty **** right here?” as in “Who would ever use this?”. Sometimes people forget that not everything has to be as popular as Google…apps like Weborandom and Webwait can be coded in a few days and hosting costs are pretty trivial nowadays. As development time trends downwards to zero, it’s the long tail of web apps! See What Happens When t Approaches Zero?
  • “So I get a new site by clicking Randomize?” (You’re meant to use the carousel first. I added some initial animation to the carousel, which looks cool and shows people there’s more than meets the eye. I also made the carousel default to start in the middle instead of on the left.)
  • “Are those your ads?” (He thought the carousel was adsense. I refactored by showing a boldfaced website title instead of a blue link).
  • “How do I click the arrow key? I can’t see the cursor.” (Confusing to have keyboard bindings in the absence of a textarea/input control. Changed the instruction text.)

Current concerns with Ajax

A reader just mailed me about what I see as concerns with Ajax right now…what’s still worryng?

Well, here are a few things off the top of my head…

Accessibility is still a key issue, but more to do with if people bother to Ajaxify at all than if people break accessibility. If developers are required by their companies or regulations to make their web apps accessible, what’s the incentive to add Ajax and make it more usable as well? Making a website Ajax-enabled and accessible can sometimes be a lot of work. Managers really have to be aware of the benefits of Ajaxifying their apps so they can make a balanced choice.

Documentation for the key open-source frameworks (prototype and dojo) is still very lacking, though it’s good for Yahoo! and Mochikit. I really want to use Dojo in a big way and the mailing list support is great, but every time I look for docs, it’s just too discouraging and I revert to Prototype (being the default Rails library of choice). For a long, long, time, Prototype’s homepage was completely empty – essentially just a download link. Now there’s a little more, and also the Scriptaculous wiki, but still pretty raw.

In this world of mashups, it’s ironic that XMLHttpRequest is not at all suited to cross-domain calls. We can sort of work around that with Cross-Domain Proxy or On-Demand Javascript, but they are both hacks. The first is inefficient as it involves the host server in all calls, the second requires explicit permission and support from the external server. Neither is the ideal, clean, call that XHR was supposed to facilitate. A better model is required. Doug Crockford’s JSONRequest will help, but is unlikely to be adopted by MS – in an earnest way – anytime this decade.

Cross-browser programming is still painful. CSS is inconsistent and DOM models vary in subtle ways.

Comet (HTTP Streaming) is becoming really important, but is still out of reach for the typical Ajax programmer. Too resource-intensive, too many issues to overcome, especially in the server.

Podcast: Thoughts on Patterns

Stream-of-consciousness thoughts on patterns – where we’re at in 2007. Not a tutorial. Definitely not a tutorial.

  • Where did patterns come from? Not GoF, not Alexander.
  • Alexander, patterns, and architecture.
  • Patterns in the organisation – how can a pattern language pervade an organisation and help workers carry out its mission statement and operating principles? Different high level patterns (e.g. “People first” for one company, “Technology first” for another) mean different lower-level patterns (crude example: staff pattern in people-oriented firm – “managers come from HR” versus staff pattern in tech-oriented firm – “Managers become tech leadership”)
  • Wikis were literally built for patterns
  • Promoting and deploying patterns

Tabbing, Terminals, and Apple’s Popup Bug

Popup Bug

The most annoying thing about programming in OSX has now been fixed, finally. For years now, every time I want to switch tasks to an XTerm (under X11), it doesn’t work the first time. I have to choose it in the task switcher, then go back to my app, then go back to the XTerm (Alt-Tab,left a few times,Alt-Tab,right,Alt-Tab,left a few times) Many others have had this problem in the past too (Mike Kruckenberg, Crazy Bob). Some have reported it fixed in the past too, but it never worked for me, until today. THANKYOU!

Well, some of the annoying, tedious, tasks become subsconscious after a while, but not this one. It was way too frustrating to morph into a neurological shell script. I am now 10% more productive and 100% more satisfied with programming in OSX. And more so once I switch my Rails dev over from Eclipse (+Rail plugins) to the shiny new IntelliJ Rails setup. (IntelliJ+Rails+OSX==Could it get any easier?)

Terminals

Actually, I’d like to be using Multiterm – tabbed terminals makes so much more sense, and it would also have overcome the crippling popup problem that no longer cripples. But, like Apple’s own ITerm, it’s dog-slow. Very odd to have a visible delay on a terminal in 2007, as if you were hammering a VT100 in 1977, but yes that’s what happens. L..e…t..t.e…r..s s…h…o.w… …u..p ..t…o..o ..l..a.t….e :..-…). You can read here about the slowness of OSX terminal apps that is as astounding as it is frustrating.

I will also take this opportunity to start using the “screen” utility, a command-line shell switcher. I just now realised why I’ve always overlooked it: It was banned years ago at uni due to resource constraints. That’s when I started working with Unix, so I always ignored screen, but it seems to be the only realistic way to run multiple sessions in a single term window, on OSX.

Tabbing

The Diggnation guys were joking a while ago about how just saying something has a “tabbed interface” makes it cool nowadays. Fact is, tabs are pretty cool and applicable in many situations. Here’s an example. I have a new phone – Orange SPV M700 (which is about anything you could ever ask for in a smartphone, awesome!!!) – and installed Opera as it renders better and more reliably than IE. One extra benefit is tabbing – yes, this mobile edition of Opera has tabs, standing out from other mobile browsers just like its grandaddy on the desktop years ago (which was then bolted onto Moz/FF/Safari and finally IE7). Well, I was surfing the web while on the tube, browsing DiggRiver, and about to lose signal as the train went underground, but no worries, open up 5 or 6 new tabs in a few seconds, they all loaded, and I had enough content away from the signal. Windows Mobile has a nice popup menu feature where you hold down the stylus a second or so, so you hold the stylus down on a link and Opera gives you a popup menu for that link, including Open in New Tab. Sweet.

powered by performancing firefox