Wednesday, May 2, 2012

The Expressive Backpack That Knows What's Inside It

I've always wanted my backpack to have a display that I can use to "broadcast" messages to the people around me. I would love to do the same when I'm driving my car so I can project messages on the road behind my car. I can imagine a message saying "I'm heading to NYC".


At Jansport's hackathon at the Media Lab, we had exactly this opportunity: Design a backpack that you can slide your iPad in and have it display messages for the people behind you. My team also took this to the next level and reused the screen on the backpack to display its contents. Here's the video:


Friday, March 30, 2012

Poem about your misplaced power adapter

Your power strip is white,
find it, you might.
Count on it, I would not,
'cause you delayed asking a lot.

Now other batteries your charger charges,
while your frustration enlarges.
But "borrowing" is bad, even from a troll,
so I hope of charger you will regain control.

Saturday, March 17, 2012

Puzzle time: The village emergency

Introduction


I was flying back to Boston and looking at small villages in the middle of nowhere from high above, when a puzzle idea came to mind: If people in a village decided to spread some news among them as fast as possible, how would they do it? I would like it to take as few steps as possible for the news to reach everyone, which means that I'd like to avoid having the same villager being contacted twice because that would be wasteful. A slightly more formal version follows.

The puzzle


A vilage is threatened by a fire during the night when everyone is asleep. One of the villagers happens to wake up (for whatever reason people wake up during the night) and spots the fire. She now has to make sure the village gets notified asap, since everyone else is asleep! But how? Let's assume the following:

  • Every house has a phone.

  • There are N houses in the village.

  • The only way to notify someone is by calling them.

  • Every phone call takes 1 minute.

  • A house can call another house in parallel with other phone calls (of course!).

  • A house can only place one phone call at a time.

What algorithm should the villagers devise to make sure that in such an emergency the whole village gets notified as fast as possible? How many minutes would that take?

Now, don't look at the solution just yet!!!

Here 's a naive solution to build upon. It is the first thing that came to mind in the airplane. Say there are 100 houses. The first house finds out, then notifies 9 houses and each of those notifies in turn 10 houses each, for a total of 100 houses. If phone calls could be placed in parallel, this would obviously only take two steps (or minutes) to notify every one. But how do we do it if only one phone call can be placed at a time?

Solution


Assign to each house a number between 0 to N-1 (thanks Scott!).
Let's assume that house 0 spots the fire first.
Each house i (0<=i<N) will contact house 2^(p+j),
where: p = floor( log2(i) ) and 0<j
The process will terminate for house i when 2^(p+j) >= N.

The following figure illustrates the solution. Think about it like you have a piece of paper that is folded in half as many times as there are steps involved in the gossipping process. Every time you unfold the paper, the houses on one of the folded sides notify the corresponding houses on the other folded side, thus doubling the number of houses that are notified with every unfold.

Each yellow line represents an unfold, starting with house 0 which notifies house 1 in the first unfold action. The adjacent yellow line unfolds house 0 into house 2 and house 1 into house 3, thus 4 houses are now notified. In the next step, houses 4,5,6 and 7 will also be notified by houses 0,1,2 and 3 respectively and so on. In the example shown below where N=100, all houses are notified in a total of 7 steps (or unfolds).


Friday, December 30, 2011

Playing with SparkFun's BigTime Watch Kit

I 've decided to work every year between Dec 25 and the new year day on a fun project that I might feel... tol "embarrassed" to work on on any other occasion. Last year it was an arduino-based game console with a 4x20 LCD screen and 4 buttons (about which I should write sometime). This year it was SparkFun's BigTime Watch, which is an Atmel-baed flavor of the Solder watch. I was already  thinking about throwing together something that I could use as a watch, so this was love at first sight.

The little red box arrived today and I started putting it together right away. Overall, I was very impressed by how well the pieces fitted together, with only minimum effort. This goes especially for the lasercut acrylic plates. The final piece is quite bulky, but there is a lot of space for improvement. I plan to wear it on a daily basis but let's be honest, this is a fun, geeky project and I've set a very low bar on how well it might fare on my wrist. Here are a couple of warnings:

  1. The end-result is really bulky and extremely geeky. You might want to think twice before wearing this on a first date.

  2. Let's face it: The 4-digit display makes the whole thing look like a time-bomb. I'd think twice before wearingit at an airport!

That said, here are the steps I followed in pictures with captions. It literally took me less than an hour between opening the box and wearing the completed thing on my wrist and I'm definitely not a hardware person.

Tuesday, July 12, 2011

Analyzing users in Google+ circles

The project is here: http://polychronis.gr/gplusanalyzer/

This started as an effort to look into Robert Scoble's circles to find interesting people. Since the Google+ API is not out yet, I decided not to spend more than 24h on this project, so this is literally how much time I 've spent on it.

You provide the ID of the user you want to analyze and the system looks up (read: uses some weird calls that Google+ makes) the people in the user's circles (information that is made publicly available by the user) and sorts them by the company that they are currently working on. It is very interesting to browse through Scoble's extensive list and find top geeks, bloggers, VCs, even TV stars.

Happy browsing!

Saturday, June 18, 2011

Geo.gy: the location shortener

My new project is out: http://geo.gy/

Were you ever in the middle of a conversation and needed to share your location with the other party? Geo.gy is a platform-independent, location shortener service. It uses HTML5 to detect your location, then gives you a short url to a pointer on a map. You can use Geo.gy to add location context to a post, tweet, SMS, anything you want decorated with location context.

Tweets are already geolocated, but location information is hard-coded into individual tweets and when a follower re-tweets your tweet, your location information is lost. Geo.gy allows you to share pointers to location with the same flexibility that imgur.com allows you to share pointers to pictures.




UPDATE: Geo.gy made to no.6 at Ycombinator hacker news!

Monday, June 6, 2011

Xerox-ed commencement address

I just read here about Ursula M. Burns, CEO of Xerox, who delivered the commencement address at Rochester on May 15th and then the commencement address at MIT on June 3rd. She brought xerox-ed copies to whole new level.

For best results, let the video from Rochester play in the background and read through the transcribed MIT version below:

[...]

Their advice to me can be boiled down into seven words:

[...]
“Keep it real and keep it short!”

So with that in mind, let me give you a little bit of simple advice.

You are about to enter a pretty messy world. The words Charles Dickens used to describe 18th century London are eerily apt:

“It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the season of light, it was the season of darkness.”

As the British would say, that strikes me as “spot-on.” We live in a world of both sobering challenges and awesome opportunities.

As you leave this serene campus, our nation is engaged in wars in Iraq, Afghanistan and Libya. We are mired in debt and recovering at a painfully slow pace from the deepest recession in 80 years. Our political system at times seems incapable of action and our political rhetoric seems largely devoid of civility. There is a gross mismatch between the skills we need to build a 21st century economy and the product our public education system is producing.

And yet, for all our shortcomings:

  • Our system of government is still the envy of the world. The “Arab spring” is all about a thirst for freedom and democratic rule.

  • Our universities at their best are also the envy of the world. I dare say that the graduates here today are among the best and brightest that have been produced at any time and in any place in the long history of mankind.

  • Our economy is sputtering and yet our ability to innovate continues to lead the world and create new industries.


So my first piece of advice to you is to not be discouraged. In the words of an old Johnny Mercer song that your parents will remember:
“You’ve got to accentuate the positive
Eliminate the negative
Latch on to the affirmative
And don’t mess with Mister In-Between.”

Yes, we have problems. But we also have great opportunities. Despite the tremendous challenges you face, I implore you to embrace them. The truth is the world needs you as perhaps never before. We need your passion, creativity and drive. We need the spirit of exploration and the thirst for knowledge that you embraced here. We’re finding that some of our old assumptions and ideas don’t work anymore, and we can use people who are willing to ask “why do we do it that way?” and “how can we do it differently and better?”

Yes, it’s a challenge, but it’s also an opportunity. That is precisely what is rolled up in your diplomas. It’s all yours. You earned it. You deserve it. And, no one can take it away.

At the same time, I hope none of you will think of your diploma as an end-point. This event is called a commencement, not a curtain call. You’ve been given a wonderful academic foundation — an invitation to begin a journey of lifelong learning. No less an authority than Albert Einstein wrote that “learning is not a product of schooling but the lifelong attempt to acquire it.”

Well, for openers, I would encourage all of you to follow the example of MIT and embrace change and learning willingly and with a sense of excitement and wonder. Think about that.  The University is celebrating its 150th anniversary. It has survived and excelled for a century and a half because it has evolved and changed.

The only thing I can predict about your lives with any certainty is that change will be a constant in your lives as well. Back in 1980 when I sat where you are sitting today, there were no cell phones. The Internet, let alone the iPad, was not even the stuff of dreams. Chinese capitalism and the fall of the Soviet Union were unimaginable. Kabul and Islamabad conjured up only the vaguest recognition of places in some distant corner of the world. Genetics was in its infancy. Even as recently as a few years ago, the thought of a global economic melt-down was beyond comprehension.

[...]

You should also have fun. Enjoy life. Choose a career that gives you pleasure and fulfillment. Surround yourselves with people who make you laugh. People you love and people who are good.

I know that people are more likely to be successful if they have a passion for what they do.   [...]

Change, but be true to yourself in the process. Your family … MIT … your church or synagogue or mosque or mountaintop … have given you a set of core values — a moral compass.  Hang on to it.

I have a great sign that hangs on the wall of my office:

“Don’t do anything that wouldn’t make your Mom proud!”

Your life's journey will include some turbulent waters. You will face difficult choices. You will be challenged and tested. The values you have developed through family and MIT will hold you in good stead.  [...]

Set your sights on changing the world — in leaving this planet a little better than you found it. [...]

Believe in something larger than yourself. Make a difference. [...]

The Bible teaches us that “to whom much has been given, much is expected.”

[...]

My congratulations to all of you. You’ve worked long and hard to arrive at this weekend. And my congratulations also to all the parents, grandparents, spouses, family members and faculty that helped push you across the finish line. All of you should feel very, very proud.