sbisson: (Default)
posted by [personal profile] sbisson at 08:41pm on 24/06/2007 under , ,
I have been bashing my head against the keyboard most the day, trying to write a location-based query against the Flickr API. Every time I ran my search I kept getting the same picture - that of a cat somewhere in the Seychelles. This wasn't right - as I was trying to search for images in London, Bath and Edinburgh.

My JavaScript JSON code was right, my loop was working. I was giving Flickr a latitude/longitude-based bounding box for the search, and a reasonable base date for the search results. So what was going wrong? I was getting the same results using Flickr's API explorer, so I knew it wasn't my code that was wrong - and a search with Flickr's own mapping tools gave me plenty of results. So there was some mismatch between the queries I was building and the data Flickr was querying on.

I finally found the answer, on my nth read through of the documentation. The reason why my queries weren't working was actually very simple - and also completely illogical.

Instead of using conventional lat/long pairs for the bounding box, Flickr is using long/lat. I have no idea why someone made that illogical decision - it's something that's very easy to miss, as we're conditioned to think in lat/long, so I just misparsed the documentation that Flickr provides every time I read it.

Still, my code's working now (I'll be putting my location/weather/interestingness mashup online soon at my new development web site - www.sbisson.com). I just need to make a few final refinements to the search loop, and then write the tutorial article that I've been developing the code for...

Lesson re-learnt: be more careful when reading the documentation.

And if I ever meet the person at Flickr who made the decision to have an API that reversed common conventions, I'm going to have a conversation about how design by contract needs to respect conventional data formats.
Mood:: 'aggravated' aggravated
location: Putney, London
sbisson: (Default)
posted by [personal profile] sbisson at 03:09pm on 20/02/2006 under , ,
...came from Microsoft's UK developer tools team, with the heading "Music to code to".
The survey of more than 100 developers revealed that rock is the preferred music to code by for professional developers of all ages. Those surveyed were also keen chart watchers with the votes for top band going to four big hitters of 2005 - in first place Chris Martin's band 'Coldplay', followed by U2, third most popular were Manchester boys 'Oasis' and in forth position, Stereophonics.

Of the developers surveyed more than 29% claim that rap or hip hop was the most off-putting music to code by. The other genres that developers were least likely to listen to whilst working were country music (12 %), ambient music (9%) and opera (8%).
An odd selection. Me, I code and write best to both ambient and trance. So thank goodness for the nice folk at Platipus records (where Art of Trance have started recording again).

HMV has a "Music to code to" radio station on its web site. So, if you really need wall to wall Coldplay...
Mood:: 'amused' amused
sbisson: (Default)
posted by [personal profile] sbisson at 03:31pm on 12/07/2005 under , ,
The BBC is releasing some of its internal development projects as open source. The first batch of projects includes video codecs and 3D interactive environments alongside more specialised broadcasting specific tools.

Yet more signs of the public service elements of the BBC's charter in action.

Good for them. And for us...
Music:: Sting - The Dream Of Blue Turtles
Mood:: 'pleased' pleased

January

SunMonTueWedThuFriSat
  1 2 3 4
 
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31