Fire Fighting Robot

April 9, 2010

We’ve finally finished our fire fighting robot! If anyone is interested in seeing the robot in action, check out the video below. I know it’s kinda boring, we probably should’ve taken a longer video… but alas, we forgot.

This was taken while we were testing it’s sweeping functionality. It scans the 3×3 grid in front, then if and only if a candle is detected, the extinguishing mechanism (the sponge on the arm) is actuated and poof the flame is gone.

You’ll notice after it extinguishes the first two candles that it “bounces” against the black line before stopping. This is actually its self-aligning algorithm. One of the biggest problems we encountered during the course of the project was that the robot would be misaligned whenever it stopped. Essentially, the momentum would carry the robot in anunpredictable direction… Sometimes left, sometimes right. Obviously, as a result, the subsequent trajectory would be affected as well. So, in order to ensure that the robot is straight before proceeding, it is equipped with two photodiodes on the bottom that enables it to do a kind of a repeated “parallel parking” against the line that it’s perpendicular with (aka the line in front of it)… It does this backing up and driving forward motion repeatedly until it is perfectly aligned. Get it? If not, watch the video!

PS. If you’re wondering… here’s the code for the straightening algorithm =)

while( flag == 0) { 


   //not on black
   while( (sensor[2] > highBlack2) && (sensor[3] > highBlack3) ) {  }       


   sensor2 = sensor[2];
   sensor3 = sensor[3];

   //if both sensors are on black, we're straight
   if((sensor2 < highBlack2)  && (sensor3 < highBlack3)) {
   else {
      //right sensor is on black and left is on white
      if( (sensor2  highBlack3) ) {
         set_dc1_power(-35);            //back up
         while(sensor[2] < white2){}    //until white
      //left sensor is on black and right is on white
      else if( (sensor3  highBlack2) ) {
         set_dc2_power(-35);             //back up
         while(sensor[3] < white3){}     //until white

Zune Phone

January 18, 2010

Zune Phone, anyone? I don’t know about you, but I’ve been dreaming of a Zune Phone ever since the first ZuneHD rumours. Who knows if it’ll happen, but Engadget posted this mock-up of a “Zune Phone” and it just got me thinking… Microsoft could really put a dent into the iPhone’s dominance if they can produce a phone that was as good as the ZuneHD was a music player!

Disclaimer: This is just a wishful mock-up…

All we can do now is wait until the next Mobile World Congress…

Goodbye, Gears!

December 2, 2009

So much for Gears support in Chrome OS! And I was wondering why Gears was missing from Chrome OS and Android 2.0… Now I know! Google announced yesterday that they are closing down the Gears project. It’s is kind of sad to see it come to and end because I did a lot of work with Google Gears this work term. Actually, I’m glad that I did because it taught me a lot about HTML 5 and its new features! I guess that this announcement was expected with the shift towards the new HTML 5 standard. There was no point in putting so much engineering effort into Gears when HTML 5 will include all its features and more. Oh, well… it’s kind of ironic since I’m using Gears with WordPress to write this post. I wonder how long it’ll take them to phase it out completely?

Chromium OS

November 29, 2009

Wow, it’s been way too long. Over a month? I think that’s the longest gap ever… It seems like I’m busier when I’m working than when I’m studying =S, go figure.

What’s the hottest thing in technology right now? Google’s Chrome OS, that’s what. And I got a chance to test it out for the first time last week. I’m actually doing some work with Google Gears now, so I wanted to test it out on Chrome OS. Well, guess what… It doesn’t have support for Gears yet!! Why!?! Beats me. I’m going to assume that they’ve just left it out for development and will incorporate it in the final build.

In any case, my overall impression of Chrome OS can be summed up in one word, “depends”. Your experience of Chrome OS really does depend on how you plan on using your computer. If all you plan on doing is surfing the internet and primarily using it for web applications, then sure it may be a great solution. But what about people who need CPU intensive applications like video editing and gaming? I don’t know how they plan on targeting that market, but right now it seems to only consider those heavy web application users. It’s still a fresh concept and is definitely still being changed, but I just don’t see myself buying into this “Everything in the cloud” phenom. Only time will tell though. They’d need a pretty convincing argument to make me switch.

(I really hope to update soon.)

Check it out! Street view is now in Canada. I was having so much fun with this the other day.

Find your home:
Drag the orange man down to your street. Hope they blurred out your license plate.

This past week, Sybase hosted an internal competition called “Innovation Idol” (it’s supposed to be a spin-off of “American Idol”, but more techie). The description of the event reads:

Innovation Idol is a Sybase-sponsored, 3-hour event where Waterloo employees and co-ops showcase their ideas and innovations in an atmosphere of fun and friendly competition. Innovation Idol aims to foster a spirit of innovation and original thinking at Sybase, and to identify and promote promising innovations that could improve our workplace, our products, and the ways we work.

I was shocked by how much effort the folks here at Sybase put into the event, even the setup of the “stage” was really cool. When I walked into the cafeteria, I expected some chairs and maybe a projector for a slide show. But, to my surprise, they had closed all the blinds and turned off all the lights. There were these large speakers with a sound system borrowed from one of the staff who is a singer. Ambiance, anyone? A couple spotlights (read lamps) lit the judges (yes, there were judges =P) and the contestants. Also, three projectors provided video feeds of the contestant and the judges, and one more for the contestant’s presentation. Finally, they even played soundtracks at the beginning and end to enhance the game show experience.

However, it wasn’t just smoke and mirrors. The presenters had some really innovative and bright ideas. It would take too long to list and describe all the ideas, but the one intrigued me the most (and ended up winning) was given by Eric, titled “Using Ray Tracing to Create Rich Presentations and Marketing Materials”. You can read up more on ray tracing, but on a high level, it is an advanced technique used to render photorealistic computer graphics. Eric talked about how the architecture and infrastructure of computer systems can be very complicated and often shapes and lines don’t fully convey the overall interaction between individual components. With ray tracing, you can represent a complicated network setup of servers and software with a photo-realistic image. For example, a database store can be a water tank, water pipes can be used to show the connections between components, the water pipes can then have valves that turn on and off depending on the flow of data, a red fence can surround a server that has a firewall, etc. All this data is put into code and a very realistic photo is returned. This kind of graphical representation is not only well-pleasing to the eye, but also portrays a complicated computer set up in an easy to understand image.

From a marketing perspective, the benefits are obvious. These generated images are much nicer than a standard flow chart. Since our eyes are drawn to things that look nice, it is possible to create rich presentations and marketing materials that will grab a customer’s attention. Also, using more common objects to represent things like databases, communication, data flow and firewalls, gives customers a better understand complex architectures. It may be true that developers don’t need “pretty pictures”. However, I believe that the ray tracing technique would simplify the learning curve associated with understanding larger systems.

A picture speaks a thousand words. If we can visualize abstract pieces of software like databases and firewalls with concrete objects like water tanks, pipes and fences, it would help us understand a system setup better and thereby allow us to solve our problems more efficiently.

Zune HD vs. iPod Touch 3G

September 9, 2009

The time has come, time to look for a new portable media player (PMP). They used to just be called mp3 players, but now they can do everything. So one contestant is the Zune HD, I blogged about it before when it was still just a bunch of rumours. Now, it has been officially confirmed and the release date is less than a week away (Sept. 15)!

Right now, I’m using the iPod Nano 2G mainly because it came free with my MacBook. Compared to what’s out there now, it’s not outstanding. But it was revolutionary when it first came out and I haven’t encountered any major issues, so I’ve been also considering the iPod Touch as well… Apple has been dominating the mp3 player market, so would I be wrong to give them a look?

I was highly-anticipating the Apple event [this morning] because of some rumoured announcements (camera anyone?). What Apple announces could really be the deciding factor for me. I was holding my breath to see how Apple would respond to Microsoft’s Zune HD.

What new surprise did Apple unveil this morning? Well, not that much. Let’s just say that I expected more, everyone expected more. With rumours and photos flying around of an iPod Touch with a camera, the fact that there was no camera was a major disappointment. In fact, all they did was cut the price on an already expensive music player and made it a bit faster… and games. They kept going on about their vast selection of games compared to the PSP and Nintendo DS. I’m not much of a gamer, so this didn’t really impress me. All in all, not much can be said about the new and improved iPod Touch. Nothing that would tip the balance. At least, not for me.

I think the fact that the Zune HD is cheaper, offers HD radio, HD video output, a cheaper subscription service, OLED screen on top of what Apple offers (App Store, iTunes LP) is making me lean towards the Zune HD. Please don’t disappoint, Microsoft.

The one thing that’s holding me back is the fact that I need iSilo. Currently, there is no support for iSilo on the Zune HD, but there is for the iPod Touch. I hope that Microsoft will release an SDK for the Zune HD so that developers can get started on that iSilo application! I really want to get the Zune HD, but if it can’t run iSilo, I may have to turn to the iPod Touch (or iPhone) or a Windows Mobile smart phone (way more expensive). But that’s a different story.

In case you’re not constantly keeping track of my life and which school or co-op term I’m in… I thought that I’d just let you know that I have started another work term. I have once again chosen to return to Sybase (for those keeping count, this is my fourth term there). Many people have asked me why I keep returning to Sybase. The short answer is because the atmosphere is great, the work is challenging and as one who is familiar with the culture and services of the company, you get to work on more important projects. Some have argued that it is necessary to  try different jobs in order to discover what you really like. To some extent, that is true. However I really enjoy what I’m doing and in the software world, nothing is ever stagnant. The maturity of the product is always developing and the stage of  the “software life cycle” always changes as well. Contributing and being a part of different stages of the life cycle of one company and one product over a long period of time has definitely given me a broader understanding of how software is developed. It’s never a dull moment!

microsoft_silverlightRecently I had the chance to work with Microsoft Silverlight (web application framework) Essentially, I was asked to demo SQL Anywhere’s compatibility with Silverlight. So, I developed this application with Silverlight and incorporated as many new features as I could cram into it to push it to its limit. I truly believe that Silverlight has gone a long way since it’s first release which was mainly targeted at streaming video (like Flash). However, it has evolved into a fully-fledged web application framework that businesses can use to create professional data-driven web sites quickly and easily. I watched a lot of talks from MIX 09 and was thoroughly impressed at how simple it was to hook up our database to Silverlight using the ADO.NET Entity Framework. But, it didn’t just stop there. With the latest version, Silverlight 3, Microsoft developed something called the “Silverlight Navigation Framework”. I thought this was absolutely brilliant. It only took a couple hours to get a beautiful (not to mention customizable) site up and running connected to a database with all CRUD (create, read, update, delete) operations. The great thing about Silverlight is not only its ability to display data efficiently, but also in an elegant manner. I’m working on getting this demo wrapped up and still I’m finding new features to play with! I hope that developers would really give Silverlight a try because it has a lot to offer and potential to take a site to the next level.

After discussions this past week between Canada and Facebook, the social-networking giant has agreed to make changes to comply with the nation’s privacy laws. These changes are expected to take effect within one year and affect users worldwide.

Some of the changes include:

  • Third-party applications are now required to state explicitly what information is requested and users must also consent to share their information. That’s good because I always wondered what information these third-party applications had access to.
  • Upon de-activation, users will be given the option to delete their accounts so that all their data is gone.
  • Facebook will update its terms of service to better explain what it does with information about people who aren’t Facebook users.
  • I didn’t know this was possible, but apparently when a user passes away, their Facebook profile can become an online memorial. Friends can post pictures or write on their wall. Creepy. Anyway, Facebook will now better explain what happens to a user’s account when they pass away.

As more personal information is becoming easily accessible on the internet, I think these changes are necessary to protect users.  Hooray Canada!

I’ve had over a week now to test my MacBook’s new wireless card after being sending it in for repairs. For the record, this is actually the third time that I’ve had to get my MacBook fixed during the three years since I bought it. Boy, am I ever glad that I got the three-year extended Apple Care warranty! First, the LCD backlight started to flicker; next the keyboard chipped and most recently, the wireless card stopped working. Fortunately for me, I had an Apple-authorized repair shop right on campus. This definitely saved a lot of aggravation of having to find and get to an Apple store. Although, I am quite unhappy with the quality of their hardware, I am extremely happy with the service I received. I was never asked any questions and the turnaround time was really fast (two days in the case of my most recent incident). I cannot stress how convenient having a repair shop on campus was. If I had to drive to the local Apple Store, I think my sentiments would be completely different… so kudos to CHIP. Now, I’m just hoping that this wireless card will hold out for the remainder of my MacBook’s lifespan, and that nothing else breaks. I have just over a month left in my warranty >.<.