Now that the twitter hype is cooling down, and companies tart to realize that it is, in fact, just CB radio in a new asynchronous form, only the “true tweeps” still hang around. And now, it’s time to t(w)inker with it.
Category: Fun
Javascript Window Shake
This evening I came accross the window.moveBy() JavaScript function and thought it would be cool to shake the browser window when a user fails to log in. It turns out that I was not the only one thinking this, but none of the examples worked for me. Some had no proper delays, others only worked from the page header, and some were plain unreadable.
I’m no Javascript guru, but I hacked this together which is working pretty nicely. It is in fact almost undistinguishable from the Apple login window shake at a login failure:
<script type="text/javascript">
if (window.moveBy) {
delay = 70;
shakes = 3;
window.moveBy(-10, 0);
for (j = shakes; j > 0; j--) {
setTimeout( "window.moveBy(20, 0)", j*delay );
setTimeout( "window.moveBy(-20, 0)",
j*delay+(delay/2));
}
setTimeout( "window.moveBy(10, 0)", (shakes+1)*delay );
}
</script>
In my case, I surrounded this code with a Tapestry @Conditional and made it into a reusable Tapestry component so that I can make any window shake as soon as it contains an error.
The code will work anywhere on your page, but I advise you to put it at the bottom of the HTML. This will make sure that the content is shown in the browser before you shake it.
It’s visually much stronger than just adding an errortext to the page. If people log in a couple of times a day, they don’t even notice extra text on the screen. This will “shake” them awake 🙂
Have fun!
Bill’s Mosquitoes
Bill Gates found a very good way to get the news reporters to pay attention to the malaria problem. In his talk at the TED conference, he released a few mosquitoes, stating that malaria should not be just for poor people to experience. People who did not see the whole performance may react shocked, because when placed out of context it sounds like an outrageous thing to do.
If you think that’s the case, you should maybe have a look at his talk, available (for free, without registering) at TED.com. You’ll see that the audience is actually laughing when he releases the mosquitoes, and at the end of the talk Bill gets a standing ovation.
In addition to the malaria problem, Bill also makes a very good case about how important good teachers are, and what we can do to help teachers become just that.
Care vs Careless
Wiimote Whiteboard
For people wanting to have an interactive whiteboard but don’t have the money, Johnny Chung Lee has found the solution. Using a Wiimote, he can track an infrared lightsource (like an LED) and use that to control the mousecursor. I tried some software on the Mac and the PC, and I actually got both to work without too much trouble.
Brilliant TV
People who know me know that I’m not a big fan of commercial TV. It hasn’t got any depth, it usually underproduced, overmarketed and makes an insulting assumption on the viewer’s intelligence. (Wow, all in one sentence 🙂 )
So I usually get my information elsewhere. Most of the stuff I find interesting is provided through RSS feeds. Some of it is made available through audio podcasts, which is brilliant when commuting. As for video, youtube looked promising, but the messy interface and sheer overload of people making silly movies with their mobile phones has made it hard for me to find actual interesting video there. The rating system with YouTube did improve the past week, but it’s still hard to find stuff that interests me.
Enter the TED talks. These are brilliant video’s mostly of a presentation, or sometimes music. But generally, the TED talks are just that tiny bit more interesting than TV, without commercials, and with real contents.
Just now I finished watching Mena Trott’s entertaining presentation on how blogs are building a friendlier world. The TED.com site is really clean, easy to browse and contains tons of video’s about remarkable people with very interesting stories to tell. If my TV died, the only way I’d notice is when I switch on my PS3 to play a video game.
Monkeys: How to get rich.
I recently got an email with a brilliant little fairytale about how to trick people into happily giving you all their money. I wanted to share with you, but it was in Dutch, and the origin was cleary not the original author.
Today I was rummaging around the internet to see if I could find the original author, and I did. I found out that the Dutch story was freely translated from an English source. Here’s the original story from that English source, unaltered (and with reference):
Let Me Google That For You
We’ve probably all had it. Just when you thought you found the right number of Palindromic Square Sums, you receive a mail from somewhere up the chain of command with a cry for help. The rather lengthy mail contains 3 paragraphs on why this mail was so important, why it was sent to you and why you need to reply “immediately”. At the end of the mail, there is a fairly trivial question like “How many pounds is in one kilogram”?
So you search Google and find out that 1 kilogram is 2.20462262 pounds. Depending on your irritation, you mail the information, or a link to the google results (because it is a top hit). For people not taking the hint of your Google url, there’s now another nice option, called “Let Me Google That For You”.Â
It’s a bit more obvious to the hard hearing, and less blunt than a similar service I used a few years ago. Here’s the empty link so you can roll your own: letmegooglethatforyou.com
You are a pirate!
The Three Great Virtues of a Programmer
I ran across this wiki page which has a nice piece on the virtues of a good programmer. I found it so recognizable that I decided to copy it over for you to enjoy:
“We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris.” — Larry Wall, Programming Perl (1st edition), O’Reilly and Associates
Laziness
The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful, and document what you wrote so you don’t have to answer so many questions about it. Hence, the first great virtue of a programmer. Also hence, this book. See also impatience and hubris. (p.609)Impatience
The anger you feel when the computer is being lazy. This makes you write programs that don’t just react to your needs, but actually anticipate them. Or at least pretend to. Hence, the second great virtue of a programmer. See also laziness and hubris. (p.608)Hubris
Excessive pride, the sort of thing Zeus zaps you for. Also the quality that makes you write (and maintain) programs that other people won’t want to say bad things about. Hence, the third great virtue of a programmer. See also laziness and impatience. (p.607)
(The original context can be found at
http://c2.com/cgi/wiki?LazinessImpatienceHubris)

