01
Jul 10

Prototype / scriptaculous iPad dragdrop hack

I was really pleased when I got an iPad from the states a few months back.

I was really miffed that my app using prototype / scriptaculous didn’t dragdrop out of the box.

I looked around to see if anyone else had fixed the lib, to no avail, so I finally spent some of my wee small hours time hacking the library to support this.

The subtle differences in the API:

  • its “touchstart”, “touchend”, “touchmove” not “mousedown”, “mouseup”, “mousemove”
  • To work out if touch is supported use (just found out this isn’t supported in android):
    var supports = ('createTouch' in document)
  • There is no concept of a current pointer when your finger isn’t on the screen, so when you drop, you have to use the previous pointer (luckily already tracked in the dragdrop lib)
  • There is an array of touches on the iPad (for different fingers etc), so event.pageX is event.touches[0].pageX

dragdrop.js and prototype.js files attached

prototype.js
dragdrop.js

The bits that don’t work yet: the drag seems to be greedy right now, so I can’t activate links in the draggable.  Need to look at the webkitdragdrop.js lib to see how they handled that.

Thanks Thomas Fuchs, for scriptaculous in the first place, and secondly for the iPad demo which i ripped to bits to work out how it was put together.


23
Jun 10

Epicenter Dublin Update

Hi Folks,

It appears that the link to the epicenter session is now down.

The excerpt for the session was as follows:

How A Little Bit of Philosophy Can Affect The Products You Build

I will be presenting a look at StoryBoard, a planning tool with a little bit of a difference.
I will be explaining the overall technical approach of distributed, self-contained, collaborative web-applications, built by applying a few simple, adaptable philosophies to produce great results.
A few of which are:
- “Do The Simplest Thing That Could Possibly Work” shouldn’t mean barely useable
- Write fewer, more elegant features, which are used more often
- Intuition can be taught, if the conventions are simple enough (a.k.a. people aren’t dumb)

more to follow as part of the session…

The PDF version of the slides from the session HowALittleBitOfPhilosophyCanAffectTheProductsYouBuild doesn’t include speaker notes, so please let me know if you need any more details around the session.


02
Jun 10

Epicenter Dublin

I’ve had the distinct honour of being asked to talk at epicenter ireland next week.  Details of my session can be found here:

http://epicenter.ie/2010.html?zone_id=20&mode=agenda&session=193#session


31
May 10

Concordion: spec inherited the right kind of way

I love simplicity, and hate boredom.  Anyone who knows me will echo that.

I love some aspects of simplicity in http://www.concordion.org/

One of which is the way the test fixtures are not subservient to the spec.
Fitnesse totally does the reverse of that; and it makes it very complex (remember complex = bad) with classpath setups etc.

So, as an illustration, we had a bunch of different channels (telephony jargon for web, mobile web, SMS, voice, mobile apps etc) to test recently, but they fundamentally all had the same spec (i.e. settle my balance, view call log etc).

Sure they all had different implementations, but the behaviour of the channels were fundamentally the same.

We were able to setup a project in eclipse with only the specification which was written (basically html files with some concordion markup) and then inherit this in all the other channel fixtures we were using to test.

The beauty of concordion is that it uses a JUnit runner to load the html descriptor and execute the fixtures.
This means we were able to write different implementations of the fixtures behind the scenes, and write only one description of behaviour.
Try doing that in another framework…


19
Apr 10

And I didn’t need any loaves and fishes…

On Saturday I fed 19 people for £12. A good meal too! No miracle or loaves and fishes, I used rice and noodles instead…


25
Mar 10

Sleepwalking / Somnambulism / Automatism

I used to suffer badly from sleepwalking.

It’s a strange thing to do; after the fact you remember what you did (and it seems strange in retrospect).  However, when you’re doing it, everything seems perfectly normal.
The strangeness of your perception of the situation seems to be naturally, and nonchalantly, accepted by your brain.

I once cost my sister £150 because I thought I was going for a walk in the woods, stopping by a picnic area for a drink with friends.
In reality I had walked downstairs from the bar she was managing, broken through a locked door (of which I didn’t have the key) and poured myself a drink.  Where did the cost come in? Weeeell, when I got through the door the alarm went off, and it cost £75 to reset this with alarm company.  And I went walking in the woods with friends twice that evening.

I’ve since been able to train my brain, and wake myself up whenever I notice the signs (is that really a tree, or a door I’ve just broken through?).

However, what I’ve realised is that my brain (and possibly others too) is very good at telling stories to fill in the blanks well enough to actually alter the perception of what I see in front of me.  And I don’t think I’m alone.  It really fascinates me that the brain does this, and does this quite regularly.

I’ve been actively trying to lessen this effect, but I’ve also seen this happen with people in a communication starved environment; people make stuff up based on fleeting observation.  How do I know?  I’ve seen it happen a bunch of times.

And I’ve just done it in the last 3 days…


19
Feb 10

Automatism out!

Its time to wake up…


02
Feb 10

Evolutionary Design Deck

Looking for the Evo. design stuff?  This can be found at http://blog.itstherules.co.uk/evolutionary-design


21
Jan 10

Elegant Multitouch Worksurface Solution

I saw a relatively elegant multi-touch worksurface solution today – on a bus.

The toughened glass side panels within a bus have a nice way of holding the glass that could be turned around on its side, so to speak, to form an adjustable glass topped table that could be back projected… (obviously I would need to contain the sides of the table once built to avoid breaking the projection beam)

Now am looking at google for key clamped handrail providers (^-^)


02
Jan 10

Speaking what I think has become outlawed in Ireland

Blasphemy laws have come into effect in Ireland on the 1st January 2010 (article at http://news.bbc.co.uk/1/hi/world/europe/8437460.stm)

I think I need to do some research, as the company I work for has a back office in Ireland and I go over there a few times a year.
The problem that I have is that I’m an aethiest, and to say that out loud its blasphemous to all religions, and I could be slapped with a £22,000 fine (^~^)