Douwe Osinga's Blog: 2010

Tuesday, September 7, 2010

I have your dog

There's a bunch of web thingies around that let you compose a text into a ransom note style collection of images based on a set of twitter images that represent letters. These twitter letters are hand picked of course and you'd think in these automated times we wouldn't need hands to do the picking when we have Google sorting our images.

And indeed, if you search for [letter x] on image search, Google will quite consistently return a set of images that look like letters X. Add the Ajax Search API and css rotation for extra ransom-note-ness and you have a party.

Google Ransom note is exactly this. Enter a note and each letter will be searched for using image search and a random result from the top-4 will be returned and displayed with a rotation ranging from -10 to 10 degrees. Simple but it works out quite nicely.

Give it a try

Thursday, July 29, 2010

New project: Auto poster

Motivational posters pop up everywhere, either the serious ones, but really mostly at least on the internet the demotivational ones. People on all sorts of forums seem to have fun creating themselves. It's not hard - you find a powerpoint template, find an image, pick some colors, type in your funny text, create a screenshot and upload the result. Still quite a bit of work. Especially since you'll usually end up using image search to get the picture and if you want to do it right, base the color scheme on the image you use. Plus sharing by image is not as handy as sharing by url.

Auto poster does the entire thing online. You type a search string for your image, a word for the poster and your tagline and the program does the rest (i.e. fetch the image, calculate the color and project the entire thing in badly css'd html). Give it a go.

Saturday, July 17, 2010

The advance of APIs: WordColor and Landgeist are back

A while ago I had a server crash and it was really painful to restore the Zope instance I had before. I decided to do away with Zope and go with django on App Engine instead. This meant however rewriting all projects. I never really got around to that and ended up with just a subset.

Today I decided to update some, more specifically WordColor and LandGeist. It is interesting to see how much APIs have improved and how these projects can now be done a lot better.

WordColor used to be a windows executable that would screen scrape image search to get images that matched a search, average the pixel colors returned and declare the average color (with some normalization of saturation) the color of your word. That was kinda bad. If image search changed its html, the program would stop working. And anybody who had installed the program would then have to find back where it came from. But doing this online was near impossible.

Now there is a search api that lets you do image searches right from the page. You still can't access the color values from javascript of course, but a quick ajax call back to the server solves that. App engine comes with a handy images module that has a function to get the histogram of an image so that's really quick and painless now.

Landgeist was in a similar fashion a client side program that would given a word, do searches for that word and all the names of all the countries and then calculate the google share of that country for that word.

But now there is a search api callable from javascript! And you can use the chart api to update a map while you watch. The fun thing is that all the work is now just done in the browser.


Tuesday, June 22, 2010

Living like an American

The Internet is this great place without borders. You can do anything from wherever you want. Check your email using your phone from the airport, post a facebook update from an cyber cafe over a dial up line somewhere in the south east asian jungles. Post a tweet update while watching the world cup right from the stadium.

Except for that you can't. The media companies (music, books, films etc) are starting to figure out that playing nice with the web is better than suffer the piracy. Excellent. But if you are outside of the US it doesn't quite work. You can't buy your latest movies and tv shows on iTunes. Amazon sells you some books outside of the US on the kindle, but not many. And no MP3s. Netflix lets you stream movies and tv shows but only if you are in the states, the only place where you get to see Hulu.com.

Over the last years or so I've collected some tricks around these restrictions. It leaves you of course still in a weird gray area. You pay for the content and you don't really lie, but still the content owners didn't intent for you to consume the content. Some might argue that you might as well use Bittorrent or Usenet to get to the goods for free. I think this way is a lot better.

So, what do you need? First you need to get an American ip address. You can try your luck with open proxies if you want to go free. Or you can set up your own using an ssh tunnel if you have something on the other end (a cheap vps will set you back around 5 dollars a month). Proxies can be detected though, a VPN is better. I am using StrongVpn.Com. They have plans from 55 dollars a month.

With a US ip address you can watch hulu.com, which might be worth your 55 dollars. Next up: iTunes. Now, iTunes has versions for most countries of course, but the US version is cheaper and has a wider selection (especially for movies) and earlier releases. To use the iTunes store in general you need a credit card that matches the country of the store. You can get a prepaid credit card but they're usually a terrible deal (charge you per month and per transaction), so I think that's best avoided.

iTunes gift certificates are the other way in. If you have an American friend you can buy a card online and ship it to your friend who'll then forward the code. If you don't you can pay people on ebay to do the same for around 15% over the face value. On your US ip address and using the gift card you can open your account and you can replenish your account the same way when needed.

An American Amazon address is useful to buy books on the kindle or if you want to buy any other digital goods on Amazon (MP3s, video on demand). Amazon also likes an American credit card, but will let you buy Amazon gift certificates with a non American credit card. However, they need your address to be in the US before they'll believe you are too (and for non kindle purchases, you need that US ip address). Add a credit card and enter a valid US address - they don't need to match. The other thing you need to make sure to set this address to be your one click delivery address.

Netflix obviously will only work for the streaming, since they deliver only to the US. The also have gift certificates, but you need a credit card even if you are on a gift certificate (to pay for any DVDs you don't return, presumably). When verifying the credit card, netflix only seems to check that the zip code you entered, matches your credit card. So you can enter any (US) address, as long as you enter the zip code of your actually credit card. Postal codes in Australia are 4 digits, not 5, but I got away with prepending a zero and the match went through just fine. If you're postal codes contain letters, you should be able to just leave them out and apply zeros as necessary.

It would be nice if we could just get rid of all this and have a true world market. I am pretty sure we'll get there at some point, but until then these tips might come in handy.

Monday, May 3, 2010

Manly Ferry App

When I switched from the iPhone to Android there were many things to like (the bigger screen, multi tasking, IM, over the air sync), but there were also things I missed. One of them was the excellent Trip View app. Trip View lets you indicate trips that you often make (within Sydney I believe) and then clicking that trip immediately gets you when the next connection on that trip is. Much easier to use from a phone than a full blown public transport planner and especially handy if you depend on a ferry for your daily commute like me.

There was no such thing for Android. Android however has a nice SDK, so I decided to roll my own. And make it simpler. Mostly because I am lazy of course, but when you think about it, most commuters have only one question when they reach for that app: when is the next ferry (train, bus). So that's what my app tells you. There are no routes to find, it always just tells you when the next ferry to or from Manly is.

To or from? Ah, yes, that's the clever bit. These modern phones know where they are, so my little app just checks the location. If you are closer to Manly, it tells you when the next ferry from Manly is, if you are closer to Sydney CBD, it tells you when the next ferry to Manly is.

Unfortunately I haven't found a way to link to Android Apps, but AppBrain has so for now this will have to do: http://www.appbrain.com/app/com.douweosinga.nextmanlyferry