Christian Heilmann

Author Archive

Young rewired state in London on the 22nd of August – hacking for teens!

Friday, August 7th, 2009

I just got pinged by Dan Morris of the BBC on Facebook (yeah it is up again) about a really cool event in London on the 22nd of August:

YOUNG REWIRED STATE
Hack the Government, 22-23 August @ Google.

THE SKINNY

Young Rewired State is a free two-day hackday for young people work in
small teams to create software hacks using open Government data.

Government will be there and listening to what you have to say and
show. Groups will present at the end of the event to press, web &
business judges, and representatives from Government – There will be
prizes!

WHEN & WHERE

22-23 August at the Google offices in London.

If you want, you can bring your parent along with you, we’ll promise
to keep them busy while you hack. Support is available for travel and
overnight stay for you if you need it.

The date is getting close now so please signup now if you’re
interested in attending!

HOW GEEKY?

We’re expecting a mix of technical ability, so chances are you’ll fit
in just fine. So, whether you just dabble with HTML or dream in
machine code, this event is for definitely for you!

We have the largest set of open Government data going, all available
for you to use. Experienced hacker mentors will be assigned to groups,
and can help as much or as little as you need.

INFO & SIGNUP

http://rewiredstate.org/young

Pass it on!

Chris

Sunnyvale, Frankfurt, Toronto…

Thursday, August 6th, 2009

In case you wondered why there is a bit of a lull from me on the internets right now (even before the Twitter DDOS), I am right now in Sunnyvale, California where I attended the iPhoneDevCamp and now got bogged down in team meetings and internal trainings. I feel that I am much less effective in the US because a) I am driving in a car and not in public transport where I can use a laptop and b) cubicles stop people talking to each other – I hate these things.

I am flying back across the pond tomorrow to go to Frankfurt to attend a Web Brunch and speak about mashups and YQL at the WebMontag. I then get a day to go to London, switch suitcases and fly off to Toronto, Canada to speak at the Domain Convergence.

There are some more things in the making, so bear with me :)

Chris

Rickrolling Google translate with YQL – Rickrollwhisper

Wednesday, August 5th, 2009

This morning I found this wonderful blog post that shows what happens when you run the “never gonna give you up” aka. RickRoll lyrics through an automated translation tool and back into English.

This has been a classic time waster using Babelfish in the past for me and I thought we could knock it up a notch and used YQL and the Google Translation API to automate this process.

Check out Rickrollwhisper to see the results.

Rickrollwhisper

Google Translate is one of the Open Data Tables built by the outside community for YQL and you can use it simply by providing a source text and the language to translate to:

select * from google.translate where q="this is a test" and target="de";

Try it out for yourself or see it in the console.

The result is the text as a translatedText element:




true



185
178
2426


Dies ist ein Test

Using this, I simply took an array of supported languages and took a random one each time I translated the lyrics:

$lyrics = "We're no strangers to love,
[…]
I just wanna tell you how I'm feeling,
Gotta make you understand";

$target = getlanguage();
$t = getstuff($lyrics,$target);
$trans1 = '

'.$t.'

'. '

Language: '.$target.'

'; $target2 = $target; while($target2 == $target){ $target2 = getlanguage(); } $t = getstuff($t,$target2); $trans2 = '

'.$t.'

'. '

Language: '.$target2.'

'; $result = getstuff($t,'en'); function getlanguage(){ $languages = array('it','nl','fr','de','sv','pl','ro'); return $languages[rand(0,sizeof($languages)-1)]; } function getstuff($text,$target){ $root = 'http://query.yahooapis.com/v1/public/yql?env='. 'http%3A%2F%2Fdatatables.org%2Falltables.env&format=json&q='; $yql = 'select * from google.translate where q="'.$text.'"'. ' and target="'.$target.'"'; $url = $root.urlencode($yql); $curl_handle = curl_init(); curl_setopt($curl_handle, CURLOPT_URL, $url); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); $buffer = curl_exec($curl_handle); curl_close($curl_handle); if (empty($buffer)){ return 'Error retrieving data, please try later.'; } else { $json = json_decode($buffer); $result = $json->query->results->translatedText; return $result; } }

Maybe I find the time to create the multitranslate as an open table to make this more generic.

TTMMHTM: New evangelism handbook chapter, safe browsing, challenging IE6, free teaching resources and an answer to the question if hamsters can be milked

Monday, August 3rd, 2009

Things that made me happy this morning:

TTMMHTM: BOSS community, inate music, encoding and chinese glyphs for geeks, happiness, map overlays, JS scope and web databases

Saturday, August 1st, 2009

Things that made me happy this morning: