notes.husk.org. scribblings by Paul Mison.

2012-01-10

post/15603992043

quote 04:00:04
“ The Web is teeming with code because code is text and text is cheap, portable and searchable. Copying is encouraged, not frowned upon. The neophyte programmer never has to learn alone. ”

2010-12-24

Flickr API Corners: ID to URL

text 09:57:07

If you have the URL of a Flickr photo, and want the URL of the page containing that photo, here are two ways, one on the website, and one using the API.

(Why would you want to do this? Well, people seem to be good at breaking the terms of service and not linking back to Flickr with a photo. Perhaps it’s been through ffffound or tumblr, or it’s been used on a blog. If that happens, but you want to find out who posted it, carry on.)

Firstly, using the website. Say your URL is http://farm5.static.flickr.com/4031/4497550401_11d8d708a7_z.jpg. Select up to the number behind the final slash and replace the text with http://flickr.com/photo.gne?id=. You’ll be redirected to a page containing the photo. (It’s possible that the photo will be private, but you’ll still be told who the uploader was.) Note you don’t need to trim things from the end of the URL; Flickr’s smart enough to do that for you.

Secondly, through the API. Open up the API explorer and look at flickr.photos.getInfo. Again, look after the last slash, and copy the number there (in this case, 4497550401) into the “ID” field. Once you call the method, you’ll see a variety of information about the photo, including (at the bottom of the XML) a URL.

It’s possible, if you don’t sign the call, or if the photo’s private, that you’ll need the second (hex) string, in this case 11d8d708a7, in the “secret” field. Providing this grants a little more access to a photo than the ID alone, but you may still find that the photo is private.

There you have it: two ways to get from a Flickr photo ID to the URL of the page containing it.

2010-10-21

post/1368408469

quote 22:06:49
“ More people need to do stupid shit. I mean that from the bottom of my heart. Don’t do it to make money. Don’t even do it to learn hip new technology X. Do it for the sake of doing something stupid. ”
Zack Holmen, author of Facelette: On TechCrunch in Three Hours and $0. Or, as I’d put it: In Praise Of Hobby Programming.

2009-12-31

Crowdsourcing for the Conservatives

text 20:51:55

iamdanw:

The Wisdom of Cameron: Crowdsourcing for the Conservatives

The Conservative Party offered to pay £1m to produce something that can “harness the wisdom” of voters6 hours later Tom Scott launches one. He’s rather fast.

I suspect the Tories were hoping for a bit more than a yes or no voting app. Still, I applaud Tom Scott’s work: either it’ll win the money, in which case the prize has been proven to be a bit of a joke, or it won’t, and it’ll force the party to explain a bit more carefully exactly what it is that they do want. After all, a £1m project usually has a better scope document than a BBC News page.

2009-11-15

post/244683399

quote 11:01:45
“ I did have another job at one point, as a computer programmer, but I kept up with my other work because it was so much more enjoyable. I did the two — computer programmer by day, prostitute by night — for three or four months. ”
Belle de Jour, in the Times Online in a long interview where she reveals her identity.

2009-08-11

post/160430634

quote 10:44:10
“ 200 times as many COBOL transactions take place each day than Google searches – a figure which puts the influence of Web 2.0 into stark perspective. ”

2009-08-09

Simon Willison’s Twitter client

text 22:33:38

I went through pages of history so you don’t have to. Sounds like it’d be pretty easy to copy.

Finally broke down and wrote my own stupid twitter client on the train… it does groups! (July 3rd)
@rboulton as a matter of fact I did :) mongodb + about 100 lines of Python (July 3rd)
Having your own Twitter client that saves tweets to a persistent store is AWESOME - group support, search over just people you follow… (July 4th)
my dumb home grown Twitter client is now powered by djng! (July 4th)
@TrevorGerzen it’s really simple - just a script that dumps tweets in to mongodb every 60 seconds, and a one-page Django app that shows them (July 4th)
@rboulton @cackhanded haven’t decided if I’ll release my client yet (July 6th)
@JimPurbrick my custom Twitter client now archives everything from people I follow (in MongoDB), it’s a really useful feature (July 8th)

2009-04-28

post/101197924

quote 22:54:00
“ A lightbulb is just a hot wire in a jar and look how long that took. ”

2009-01-14

post/70399331

photo 10:42:27
Visualizing Weather Patterns from the Mathematica blog. Not sure it’s worth $2000, but it’s impressive.

Visualizing Weather Patterns from the Mathematica blog. Not sure it’s worth $2000, but it’s impressive.

2008-12-16

post/65054177

quote 00:07:53
“ XML is not the answer. It is not even the question. … This is a different situation than in Java, because compared to Java code, XML is agile and flexible. Compared to Python code, XML is a boat anchor, a ball and chain. ”
Phillip J. Eby, Python is not Java.

about

pages

options