Posts Tagged ‘technology’

Yahoo! Open Hack 5 – The Experience

August 25, 2012 Leave a comment

Before we even start, here’s the idea which we hacked up during the 24 hour contest timeline. Brand horizon – When all the social media focuses on the count of re-tweets or share (or whatever they’d like to call it) None of it actually gives you the count of people your product update reached out to. That particular missing link is what addressed in Brand Horizon is. It’s not actually how many shared your update, rather it is who shared your update. The most influential person’s share would spread the word faster. You hit the right nerve, you get the information across faster.

Well before the event:

After Yahoo! Open Hack 4, the expectations were really high for the next edition. The two day weekend at The Lalit Ashok Palace Bangalore during July 2011 hiked up the anticipation for this one. The date was fixed for August second weekend at The Sheraton Bangalore. Two weeks prior to the event, me and my co-hacker came up with countless suggestions for the hack we were about to build. Some of it were: Rupyaa++ – a social media based money management tool which would help you split up the costs of a group hangout or a trip. TwitVote – a voting system with crowd sourced data from twitter. A sentiment analysis based system which gives you a pulse of the crowd’s thought over a given subject. We even came up with some fun hack ideas – A guy-bot who changes his emotions based on tweets he receives and a Guess-the-movie-based-on-its-quote site.

Just before the event:

As the event neared, the official categories for the hacks were published as: Digital Communications, Digital Media & Advertising, Multi-media Experiences and a wide bucket category called “Surprise Us”.  The last one was quite tempting. Although we chose to take the defined category of Digital Media & Advertising and that’s when we brought the idea of Brand Horizons to the fore.

The event:

Like any of its precedents, fifth edition had all the usual elements: Swanky hotel, Yahoos, A huge crowd of eager developers and none other than Anil. He’s Yahoo’s secret sauce when it comes to YDN and developer engagement. After the usual sessions from Murray, Saurabh, Jai – we drove straight into the hack and started with our product. We learnt a lot from our mistakes at YOH 4 which we vowed not to repeat this edition.

The Issues:

Well for starters, the WiFi gave away and we lost precious time after the 24 hour countdown started ticking down. Those wonderful Yahoos wracked their brain to help us connect, but our laptops just wouldn’t give up and connect. Next, once we started querying Twitter through YQL console we never got what we wanted. Turned out, due to multiple pings to Twitter APIs through YQL, Twitter blocked YQL. So our original idea of mashing up data from Twitter and Facebook was given up and the product specifically focussed on brands based out of Twitter. The last one was, neither of our team members, knew in-depth PHP. So we had to struggle overnight to complete the app which required a good use of OAuth.

Panel Evaluation:

The 24 hours counted down to 00:00:00 and we wrapped up our hack with a good description, a screencast on youtube. We were given the first slot for presentation, yay! And We were ready for the panel evaluation.  Our panel was of 3 judges with one extra time-keeper. We were offered strictly 2 minutes with 90 seconds for the demo and 30 seconds for any Questions from the judges. The key person on our panel was Shouvick and was indeed a pleasure to see our product examined by an industry leader.

The presentation went well although sadly for a remark that the prototype was constrained just to Twitter and there were other competitors like TweetReach with similar ideas. This gave a clear idea that our prototype didn’t make the cut, Nevertheless we were satisfied we could come up with a complete working prototype in under 24 hours.

The actual winners:

The final few hours of the event were made of the very popular open bar, and the presentations from the selected hacks. As remarked by one of the judges, not all ideas were worth selling but only a few were. And those were the ones which made the cut. Later that day, saurabh announced the winning hacks through the YDN website Brock, vibration reduction, pictrends, i am bored, bookmafia, beamOS. All deserved the accolades. It was a real experience into the world of startups where in a simple idea turns into something worth making money out of!



Creating a smoke using Particle System in Silverlight

Here’s what we’re trying to achieve: demo

One of a fellow programmer came up with a question of “How do you create Smoke effect using Silverlight?” Well there may be plenty of code, third-party tools and plug-ins strewn over the internet for this, but out of a professional curiosity I got into the business of creating one out of my own hands.

The whole concept of creating smoke (without fire ;)) can be done through what they call as Particle System. It’s a technique where in you employ very small graphical objects in large numbers to simulate effects like say Smoke, Fire, Snow, Dust, etc…

We need the smoke to be moving freely, so a canvas would be a best bet for the layout.

<Canvas x:Name="myCanvas" Background="White">

From this point on the rest of the Smoke effect would be programmed in code behind file (C-Sharp in my case)

Let’s think a minute about smoke, shall we? Smoke starts at a point, very concentrated (Generation Point). According to the complex laws of physics, it simply rises up becoming dilute all the way. Finally blending well with the air where it seems to disappear (Vanishing Point).


Understanding the dynamics of smoke

Our approach would be to consider smoke as made up of small particles, which would originate at the Generation Point. These particles as time passes would simply rise up, becoming transparent by smaller percentages as it goes and finally becoming invisible at the Vanishing Point.

These particles are going to be ellipses. Let’s have a method which does just that.

public static Ellipse createEllipse()
Ellipse objEllipse = new Ellipse();
//Smaller sized particles
objEllipse.Width = 1;
objEllipse.Height = 1;

//Giving the particles a Smokey look
RadialGradientBrush rgbObj = new RadialGradientBrush();

GradientStop gsObj1 = new GradientStop();
gsObj1.Color = Colors.Transparent;
gsObj1.Offset = 2;
GradientStop gsObj2 = new GradientStop();
gsObj2.Color = Colors.DarkGray;
gsObj2.Offset = 0.5;
GradientStop gsObj3 = new GradientStop();
gsObj3.Color = Colors.Black;
gsObj3.Offset = 0.001;


objEllipse.Fill = rgbObj;

//Set the position of the ellipses to the Generation Point
Canvas.SetTop(objEllipse, 300);
Canvas.SetLeft(objEllipse, 150);
return objEllipse;

While the Silverlight application initializes, we’d simply call the following line to add a new smoke particle:


Well, this is just one particle. By every tick of the clock, new particles should be generated to give the effect of the smoke billowing. This calls for a DispatcherTimer instance which would give me an event for say every 2 millisecond.

System.Windows.Threading.DispatcherTimer timer = new System.Windows.Threading.DispatcherTimer();
timer.Interval = new TimeSpan(2);
timer.Tick += timer_Tick;

At every tick, we need to be doing a set of tasks based on a few decisions.

Firstly, we cannot afford to overload the memory/screen with infinite number of particles. When a smoke particle simply disappears beyond the vanishing point, we can move them down to the generation point and reuse them. For this purpose, let’s have a limit of 1000 particles that can be freshly generated. If the screen has less than 1000 of them, we can go ahead and generate a new one.

if (myCanvas.Children.Count < 1000){

Secondly, at every instant – *all* the smoke particles should perform the following tasks:

  • Rise up
Canvas.SetTop(item, Canvas.GetTop(item) - 1.25);
  • Grow and become lighter in visibility
item.Opacity = item.Opacity - 0.009;
item.Width = item.Width + 0.075;
item.Height = item.Height + 0.075;
  • And take a wavy path up. Smoke particles take a simply chaotic path up, they just don’t go up in a straight line.
Random randObj = new Random(10);
Canvas.SetLeft(item, Canvas.GetLeft(item) - (Math.Pow(-1, randObj.Next(5)) * randObj.Next(2)));

Thirdly, Move every vanished particle back to its original point.

if (item.Opacity < 0.0001){
item.Opacity = 1;
item.Width = item.Height = 1;
Canvas.SetTop(item, 150);
Canvas.SetLeft(item, 300);

So, considering all above, my timer tick event would look like this:

void timer_Tick(object sender, EventArgs e)
if (myCanvas.Children.Count < 1000)
foreach (Ellipse item in myCanvas.Children)
if (item.Opacity < 0.0001)
item.Opacity = 1;
item.Width = item.Height = 1;
Canvas.SetTop(item, Y);
Canvas.SetLeft(item, X);
item.Opacity = item.Opacity - 0.009;
item.Width = item.Width + 0.075;
item.Height = item.Height + 0.075;
Canvas.SetTop(item, Canvas.GetTop(item) - 1.25);
Canvas.SetLeft(item, Canvas.GetLeft(item) - (Math.Pow(-1, randObj.Next(5)) * randObj.Next(2)));

Thus, was how we can generate a smoke effect in Silverlight using Particle System. With a minor change in the color and nature of the ellipse, you can create Fire or other similiar effects.

Suggestions welcome from expert readers on alternate or even better ways!

Online Identity Explosion – Securing your identities

March 4, 2012 2 comments

Firstly, be it a tech-savvy or be it a normal person, everyone has a life online. Here online, I refer to the internet and the myriads of websites there in. Programming forums, healthcare, lifestyle, romance, banking, travel, blogging, electronic mail, ecommerce; these are just few of the categories that pop in my head when I think of what we do online.

Let’s do the math. Each of these categories has at least n different websites/vendors associated with it. Say, electronic mail – you have Gmail, Hotmail, and MSN and so on. Take for instance ecommerce, you have Amazon, e-bay, or may be even the flip kart. Each of these require you to register and have an identity (username and password) associated with them.

Normally you choose to have the same username with all of them. But the rules vary with many, some allowing symbols, some disallowing numbers – you are forced to vary your usernames with the websites. And same is true for passwords – One of your comfortable passwords might be unacceptable by some accounts. Some websites have to be associated with email identities. If you took to internet after Gmail came in, then chances are you’ve associated all your email accounts with it. If otherwise, you might have had a host of other email accounts like, or

Now each identity needs a password. Let’s see.

1.       You can use the same password for all your accounts.

      Great choice. Allows you to remember a single password for all your identities. But this leaves you at a risk. One of your accounts gets hacked into, and you lose across the board.

2.       You use a new password for each of your accounts.

      This reduces your vulnerability to a hack. Even if one of your accounts gets compromised, you can save all your rest. But that gives you N passwords for n accounts you hold. Mighty hard to remember isn’t it?

Good online behaviour states, you cycle your passwords at least every 45 days to prevent your accounts from getting compromised. Now how do you do that, without having to go through the trouble of remembering the new sets of passwords again?

This discussion did not mention, ghost accounts (which you have probably false identities), intranet accounts (which are not under the internet category – but still requires a username/password and hence a necessary payload on your brain)

IMO, this seems to be a pretty interesting and wide area for research. If necessity is the mother of invention, this is the right time to invent, discover or re-discover a cost-effective solution that is within reach for a normal internet user. A normal user is right now juggling with at least 10 online accounts in his hands, forgetting passwords every 10 days, clicking on that seemingly helpful “Forgot your password” link. Or an unassuming user is in a false-sense of assurance having a same password for all his online accounts, screaming to be hacked and compromised.

The solution being proposed for curbing online identity explosion should provide, a way to access all your online accounts in an easier manner, while ensuring that:

  1. Safety of the identities are secure against any forms of hack
  2. Solution is accessible to nay web user – with minimal or zero-overhead
  3. Various modes of access are addressed – Mobile, single point of access, multiple point of access
%d bloggers like this: