Previous Posts

Subscribe

Basic feed (just the blog)

The Uberfeed (blog, pics & links)

Via e-mail:

04.05  05.05  06.05  07.05  08.05  09.05  10.05  11.05  12.05  01.06  02.06  03.06  04.06  05.06  06.06  07.06  08.06  09.06  10.06  11.06  12.06  01.07  02.07  03.07  04.07  05.07  06.07  07.07  08.07  09.07  10.07  11.07  12.07 

Advertise on Becky's Web

Becky's T-Blog

Saturday, August 13, 2005

Flickr Sudoku 1.1

For the last couple of days I've been obsessed with improving Flickr Sudoku, and the new version is now online!

Thanks to some hints from Siobhan I've finally started to get my head round the Flickr API, so that now you can create puzzles from a user name, or tag, or both. I've also tinkered with the interface a bit, and added "presets" that create puzzles from preset flickr group pools.

It's been a pretty self-indulgent exercise, really, but I found it was an excellent way of learning a bit more about web programming, particularly JavaScript which I'd never really got my head around before. Because the project I'd pitched myself was tantalisingly close to what I was able to do, it spurred me on to learn how to do it.

There was also a great sense of achievement getting things like the answer checking function to work. It checks the validity of each set of nine squares with a simple bit of code like this:
for (var y=0; y<10; y+=1) {

checksum = checksum + (grid[i] * Math.pow(10,grid [i]));

}
Which creates a checksum that can only equal 9876543210 if each grid square contains all the digits from 1 to 9. Which I thought was a pretty elegant way of doing it. Anyway, with the new version you can can finally play becky soduku, which alone makes it worth all the work!
Siobhan Curran  Impressed :-D

Are you going to tell them? 
Gemma  More worrying - is this the start of "Becky Ubergeek"? Code fragments in blogs? Eeek! And it's contagious - Becky, you've a bug! If that's a grid of 9 squares, why are you doing 10 checks? (y=0..9)

Gasp! Immediate tranny transfusion needed. Pass me that Bow Ho' outfit. More pink! More pink! 
Becky  You're right... that is a bug! :-O

Luckily it's only a bug in the sample I gave, the actual loops are more complex than that, and when I simplfied it I forgot that it only needed to count from 0 to 8. :) 
Joanna  Becks.. think you broke your template..... 
Becky  Hmm, seems to be working at the mo... what problem were you having? :-S 
Joanna  your sidebar doesnt begin until the last blog article.... in IE anyway.. 
Joanna  is OK in firefox... 
Becky  Ooops, looks like I.E. didn't like the preformatted text I'd used in that last posting.

Thanks for the heads-up Jo. x 
Joanna  ah thats better :-) 
Siobhan Curran  Ignore the IE users - they don't know what's good for them anyway :P 
Gemma  Hey, girl! Some of us like to use tools to do things, rather than scurrying about like maddened gophers looking for the next upgrade or wunder-app ;) 

Post a CommentPermalink     Subscribe to comments: this post | all posts

<< T*Blog Home