Raspberry Pi Recipe

Being a Computer Scientist sure has its perks. Take for instance one occasion where I decided to take part in a company’s programming challenge just for the heck of it. The result was a brand new Raspberry Pi B 2! Yet another perk.

For the uninitiated, the Raspberry Pi is a credit card sized computer. Yes, when I say computer I don’t mean an embedded device that you program with some kind of esoteric language or a weird mutation of your preferred language (yes Processing, I’m talking about you), but a computer much akin to the one you use at work or at home to get through your day. Of course, being that small a computer means that it’s not as powerful as your Intel machines or Macbooks, but you’d be surprised by what you can accomplish.

Alas, to get started is the trickiest bit on the Pi! It’s small and cheap, but it lacks a lot of things such as secondary memory, wifi support, bluetooth connectivity and other things. So if you’re interested in working with a Pi, you’ll be interested in getting these items as well, but the choices are pretty overwhelming (and in some cases, exorbitant). That’s where this post comes in. If you follow the guidelines here, you’ll at least be up and running in no time.

First things first, the Pi is a computer and computers need operating systems to do a lot of the heavy lifting for you. You can head over to the Raspberry Pi Foundation page and get the images for the various compatible OSes. I personally prefer Raspbian (Jessie over Wheezy, since it is newer) and Windows IoT Core, since the Arch Linux image reportedly has problems and I outgrew Ubuntu. However, we have a small problem: we need a memory card to save the image on! Amazon to the rescue. I was able to order a 32GB card for approximately $10. You can get any card you like, just make sure it is a Class 10 Micro SDHC card. You can’t really go wrong with the memory card if you just buy the right type.

Installing the image is super easy and I wholly recommend following the procedure given by the distribution of your choice. I myself just needed 5 clicks to get the memory card ready. Next, you’ll want to actually see the device in action, so you need a screen since the Pi, sadly, doesn’t have one built-in. The Pi supports HDMI which is absolutely great since digital signal trumps anything else in terms of video communication. Either get an old TV monitor with HDMI ports or borrow one from your friend, though I recommend getting your own. You can get a good HDMI cable for super cheap off Amazon (~ $5).  Insert the memory card, hook up the Pi to the screen with the HDMI cable, and use your standard phone charger to power the Pi up. You should see it boot up in the coolest way possible.

Finally, what’s the point of having a portable mini-computer if it doesn’t connect to the internet? Pick up a Wi-Fi USB adapter (I used Edimax), and ensure it is Pi compatible. It should mention on the label if it supports the Raspberry Pi or not. Plug that in, let the drivers do their thing, and you should be good to go. Optionally you can also get a Bluetooth USB module that lets you connect wireless headphones and stuff, but that depends on your choice.

And there you go! Your Pi is all baked and ready for awesomeness. You now have all the power you need to run some crazy Internet of Things experiments and show off your Tony Stark to the world!

Responsive Responsibility

Today’s modern web is complex.

Not only do we have all the various programming languages, frameworks, standards and libraries (which is complicated enough already) for programming the web, but adding to the entropy is actual hardware! Yes, today screensize and form factor matter as well, especially since half the world owns either a smart phone or a tablet. Gone are the days when you had to check for cross-browser compatibility, these days very few sites are actually legible on mobile phones, forget about providing the awesome desktop functionality.

So we have the problem, now what’s the solution? It is a little something called Responsive Web Design. Responsive Web Design is a set of guidelines and techniques which one can use to enable their web pages to look good on various form factors, without having to worry about serving (and maintaining) different web pages based on the device. Sound confusing? Why don’t we check out an example?

Head over to my webpage. Hopefully, you opened it on desktop. Take in the pure concentrated awesomeness and then open the same site in a mobile browser. Do you get it now? The mobile version has streamlined itself automagically to provide the best user experience for that device and screen size. That, ladies and gentlemen, is the crux of responsive design.

Now how do you enable your website to be responsive? For starters, you can use the amazing Twitter Bootstrap library. There are other options like Foundation, but for a beginner, Bootstrap is by far the best! It also helps that Microsoft has an introductory Bootstrap course on EdX. Going through the site, it is quite easy to grasp Bootstrap since all you essentially do is use the CSS and JS files and simply add classes. Sample galleries and websites, and a plethora of questions on StackOverflow just ease things further. Of course, you can always go the whole monty and install Node, Less and Sass and really customize your Bootstrap files. What really happens under the hood is that we make use of CSS Media Queries to define screen size and viewport breakpoints, depending on which, different CSS rules are applied to your page, hence the magic re-adjustment. There is also a bit of JavaScript involved, but thankfully, Bootstrap already handles most of that for us.

Just to demonstrate how important responsive design is, every modern browser now comes with a responsive mode in their debugging tools, so you can quickly verify what your site looks like on a wide variety of devices. Even Google, whose entire business relies on the internet, has a sweet tutorial on responsive design while being framework agnostic.

In conclusion, making your website look good on all form factors is imperative in today’s day and age. With the internet becoming the backbone of the digital age and handheld devices taking preference over conventional desktops, it is our responsibility to be responsive.


2 Month Notice

Well, technically it’s been more than 2 months since I joined my new workplace, but I guess it is high time I gave an update as to what I am up to.

As expected from working at one of the top tech companies in the world, there is a lot of work (and fun), but there is a great potential for learning as well. And man have I learned a lot!! In my first month here, I worked on a Windows 8 Modern UI app and understood the architecture of building a Modern app hands-on. Not only that, but I also had to integrate the app with a web service using Javascript (which, by the way, is my weakest programming language), and after a lot of fumbling in the dark, I can now bend JS to my absolute will (Evil laughter)!!

In my free time, I got together with a senior of mine, Prakhar Gupta, who works at the same company albeit in the Bangalore office, and quickly coded up a Windows Phone 8 app. The app basically acts as a birthday reminder for all those like me who are poor at remembering dates. Expect to see the app in the Windows Marketplace soon! Along the way, I have also been drawn to Cloud Computing, thanks to the amazing Windows Azure (they have tutorials on creating Android apps with an Azure back-end), and hope to soon gain certifications in Cloud Computing. This along with some other projects that I really can’t talk about (Non Disclosure Agreement, you see) have made my life coding bliss!!

Oh, and did I mention that I have also started development on the Leap Motion? Expect to see more on that and Kinect development in my next few posts. This is from a practical standpoint. From a knowledge standpoint, I am learning everyday. I have learned about good design and best practices while coding in C# and am also re-exploring functional programming with F#. SQL and database querying now seem to come more naturally than ever, and I have also started looking into query execution plans to further optimize my SQL code. I have also been trying to read up on the Common Language Runtime (CLR) which so far looks great with the way the CLR handles managed modules and the variety of support provided for different languages, but with all the work and coding going on, I am having a hard time actually removing time for myself to read more. Will have to stretch more on the reading front!

In the pipeline are some more apps (maybe on Android?) and reading papers and texts on NLP (for WishWasher) and Computer Vision (which is still my favoured field). I do seem to be loaded with work, but hopefully, I will keep inventing things and inspiring you to try new things. Keep an eye out for more on this domain.


Android: A Beginning

Well, it seems I have finally done it! Amidst a busy senior year schedule, I have finally managed to dabble a bit in mobile computing and Android specifically. It wasn’t clean, it wasn’t straightforward. Reason: Maybe it was the book I was reading, but the paradigms of mobile computing are significantly different from your normal desktop power machines. I actually spent more time reading up on how the new limitations of mobile devices impose unique restrictions on us that prompt us to look at solutions differently. Kinda like parallel programming (more on that soon!).

You could say that my foray into this field started very dryly, like studying theoretical computer science even before you can write a single line of code. While the inverse is abundant (many programmers aren’t even aware of the subject), this approach is good and bad. Good, because I understand the philosophy I need to follow to write good apps for these devices without resorting to premature optimization – the root of all evil. Bad, because it was boring and delayed my explorations significantly. Yes, I said boring as in drab, dull, bugging! I had way more fun making the app rather than reading on why Android is a great software platform. The only reason I continued reading that book is because it was highly recommended and covered almost all aspect of Android, including location-based services. Well, enough of the cynicism now, eh?
My first app was a real goody! I had an idea for an app way back in 2010, but never got around to coding it up – till now that is! A simple friend arrival notification system that uses your and your friend’s location to help you co-ordinate better, it is by no means trivial and I am still far away from a release version (blame my final year college schedule 😛 ). The basic structure is up and running both on the emulator as well as my Android phone, so it seems that the app is heading the right way. Will definitely keep you posted on any new insights.

Better was the next day, when I had a free afternoon and decided to do a quick hack! I had promised a girl an app for playing the famous Name-Place-Animal-Thing game, and that is exactly what I ended up making. A simple app, it displays a new character each time you press a button. Not spectacular, I know (what can you expect from a noob in just 1.5 hours?), but I have a tower of improvements for that app as well and it will hopefully see the light of day soon.

Finally, what I really want to put across is that Android is cool and it is fun. Being free (as in free beer), it was a cinch to setup and the integration with Eclipse is the icing! The best part now is, I can not only skip some pages in the book I was reading, but I now have a new platform to experiment on and the possibilities are currently limitless. My Senior project on Facial Expression Analysis could become a mobile app for all you know! 😀

Till next time then, eat-sleep-code! Eviva!!


I and a bunch of guys at my college decided to take part in the Atos IT Challenge and try to win ourselves a trip to the UK for the 2012 London Olympics, the theme being Smart Mobility.

Our college was one of the lucky ones to have been selected to participate in this contest and I can see the competition from my institute itself, if not the entire world, is pretty nerve-wracking.

My team consists of Arth “Vyarth” Patel, Nimit “Lame-it” Shah, Sunny “Not Funny” Shah, Jigar “The Dafda” Dafda and Yours truly.

Having vetoed the original idea for a mobile disaster management system, I suggested a smart app that can mine and learn from the User’s history, match that with the current trends in the world and filter it with his/her geo-location to give the User some truly meaningful information that is highly relevant to their current situation, with all the data-crunching taking place on the Cloud.

This competition gives us a great opportunity to learn about a new field, Mobile Computing, a new platform, and also a chance to practice some of the AI techniques we’ve picked up in the past few months. But the biggest plan is to possibly Patent our idea. That would be TOTALLY COOL :-D.

Our idea page is here. If you liked our idea, please don’t hesitate to click on the FaceBook Like Button.

Now let’s hope the judges deem our idea worthy of selection so we can make it into the next round and begin the development stage.