Technology

Make a smashing Valentine’s day card in MATLAB

MATLAB helps solve millions of computational problems in nearly all fields of human scientific knowledge every day. There is absolutely no reason it can’t help with the trivial matter of your valentine’s card.

The mathematical function we are after is aptly called a Cardioid and its pretty simple to plot in polar co-ordinates.

The following script generates a matrix that holds 15 shades of pink. This matrix will then be supplied to the ‘ColorOrder’ parameter to cycle through while plotting. A polar plot of 1 – a * sin( theta ) gets you the cardioid shape. The "a" parameter is varied to add thickness to the plot.


 % Get 15 shades of Pink
   ColOrd = ones(15,3);
   ColOrd(:,2) = 1/15:1/15:1;
 % 
 % Theeta from 0 to 2PI
   theta = 0:0.01:2*pi;
 % 
 % Set the figure background to White
   figure(1);
   set(gcf, 'Color', [1,1,1]);
 % 
 % Plot iteratively with varying values of a - 
 % where a varies from 0.7 to 0.12
   for a = 0.7:0.01:1.2
       set(gca, 'ColorOrder', ColOrd);
       polar(theta, (1 - a*sin(theta)));
       hold all;
   end;

And here is the resultant plot:
Cardioid

And there you have it folks, a quick and easy valentine's card. Who say's MATLAB cant solve all your problems!

Now for the serious bit. If you are a male and though this post was a smashing idea - then you need help my friend. If you a female and you found this interesting - then I need your phone number!

PS: Download a Facebook Cover picture made with this plot.

Google+

Quick question: Who invented the light bulb? If you answered Thomas Edison, then unfortunately you are starkly mistaken. The incandescent lightbulb as we know it was invented by British Physicist, Sir Joseph Wilson Swan. (Sir Humphry Davy pioneered the concept) Edison began his experiments nearly a decade later, vastly improving the life of the filament and its pragmatic scope.

So why does history and your fifth grade teacher remember Edison as the 'lightbulb guy'? Because he commercialized the lightbulb. He made it economically viable for homes, offices and public spaces to be lit by this futuristic lighting. Edison and his electric company created the electricity supply market and brought the power of moving electrons to the public. And that is why history recollects Edison as the lightbulb man; because Edison created an environment conducive to incandescent lighting.

Google Plus

A century later, a completely new generation of pioneers, the brilliant brains behind Google, look to pull of a similar historical hijack. Over the last decade Google has created myriad range of products that provide convenient, pertinent and fruitful services to millions of Internet users everyday. From e-mails (Gmail), organizing (Calendar), photo sharing (Picasa), scholarly research (Scholar and Books), to your mobile phone (Android) there is a Google product to suit each of your necessities and more. With Google+, the company simply looks to leverage its grasp on the internet market place and very effortlessly foray into the lucrative market of social networking, all this while simple re-enforcing, consolidating and integrating its existing line of products. Ensuring that, while they may be late on the social network game, they will not be diminished in memory a few decades from now.

Google Plus UI

Instead of comparing Google+ to competing services head on, lets look at what it brings to the table for Google and their 'consumers'. It takes multiple products which weren't precisely market leaders, and turns their technologies into stepping stones for Google+. Picasa, for example, wouldn't stand ground against Filckr. But by integrating Picasa services seamlessly into the Plus network, its gets a new lease at life with a new mission. Similarly, lessons learned from the unsuccessful Wave network manifest themselves everywhere. Hangouts to Huddles, everything makes communicating with a group easier than ever. Google's dominant position in the mobile operating system market only arguments the usefulness of Google+, with their mobile application integrating the best of various prevalent services like Foursquared and Twitpic to name a few. (Check-ins anyone?)

One thing that instantaneously strikes the user is the sheer utility, neatness and intuitiveness of the User Interface, be it on the desktop, tablet or an Android powered mobile phone. (Sorry iOS, on application for you as of now.) The interface is smooth, clean and aesthetic. The beauty of the photo galleries, the rolling animation of the circles, and the little animations that play when you +1 a post, every small detail accrues your delight. A bouquet to Google's UI designers. Most of the UI is functional across browsers, though you might run into some niggles with Opera, but nothing drastic.

Google+ is a refreshing take on the social network which helps usher in a new era of idea and experience sharing. It extends Google's communication portfolio, functions as a master class in user interface design, rejuvenates weaker products by assigning new roles to them and most importantly, give Mark Zuckerberg sleepless nights.

The New Gmail Priority Inbox

If Larry Page and Sergey Brin asked me to scrub the floors of the Google office for half an hour a week, in exchange for using the new Priority Inbox feature on Gmail, I probably would. It's neat, well conceived, well implemented, efficient and nifty. Very nifty. In my book, it's the best thing to happen to E-mail, since Gmail.

It concept is easy enough; your Inbox is divided into three sections: 'Priority', 'Starred' and 'Everything Else'.

The Priority section contains all the emails and threads that Google thinks are important to you, and are unread. Once you read these messages, they are moved below to the Everything Else section. The stared section consists of emails that you have marked with a star, and are still sitting in you Inbox. The Everything Else section contrives of, well, everything else. (No surprises here!) Unread messages that Google thinks are unimportant: chain mails and Facebook notifications for instance, priority mails that you have finished reading, or messages that you have manually marked unimportant.

Since a picture is worth a kilo-word, here is a screen-shot of the priority Inbox in action. I have edited out some parts of the image, because after all, it is my mailbox, and I deserve a little privacy. No?
Gmail Priority Inbox

All this is of-course dependent on Google's “thoughts” on you E-mails. And boy, are they good at this thinking business. To be honest, I was a little apprehensive about the effectiveness of the algorithm at first. But after using this for a while now, I am impressed with the accuracy of the software. It works great right out of the box. Spare a couple of promotional emails, it has demoted nearly all social networking notifications, chain-mails and other unimportant messages downwards, all neatly lined up for quick deletion. And by no means does it do so blindly; it understands that replies and comments on Flickr etc. are important to me, so prioritizes them, while youtube, instructibles and what have you, notifications automatically head southward.

To top it off, the system is Bayesian, so it will adapt to your use.

All in all, its a powerful feature that saves a lot of time and effort. Its a zillion times more useful that Google's recent forays into innovation; case and point: the new ajax-ified image search. Not to mention Google wave. But hey, failures are only stepping stones to success, Aren't they? And this time, Google has hit the mark with an intercontinental ballistic missile.

The wonderful promotion people Google have made an amazing video explaining the new feature. I do recommended you watch it. It is delightful.

The priority inbox can be enabled from here: http://mail.google.com/mail/help/priority-inbox.html

Setting Up the Canon iP1700 printer for use on Fedora Linux

After much trials and tribunals, I finally got my Canon iP1700 to work with Fedora 11. Canon doesn't provide Linux drivers for this particular model so it wont work out of the box, but it is more than willing to print along happily with borrowed drivers.

I used the official Canon drivers for the iP2200. You can grab them from here: http://software.canon-europe.com/products/0010231.asp. In the OS selection pick “Linux”, choose your language and hit submit. Download the "Canon Print Filter for Linux (2.60 rev 3)" (or newer) package. Its a 22MB “.tgz” file.

Double click it to bring up “File Roller” (or use the terminal if you are feeling frisky). Extract the file “ip2200_Linux_260.tag.gz” to the Desktop. Extract the “guideip2200_2.60-1.tar.gz” if you want a manual. (Yeah, right.)

Fedora 11 Canon ip1700 setup

You will need to re-extract “ip2200_Linux_260.tag.gz” to a sub-folder on the Desktop (I call it ip2200), since it is also a compressed file. It contains these RPMs:

Fedora 11 Canon ip1700 setup

Go to the sub-folder ip2200 on the Desktop, double click on “cnijfilter-common-2.60-1.i386.rpm” to install it. You may have to supply the administrator password and choose “Force Install”. Do the same with “cnijfilter-ip2200-2.60-1.i386.rpm”. This should install all the necessary drivers.

Note: If you have attempted to install these drivers before (and have been unsuccessful), the packages will conflict and you will need to completely remove them. The command is:
su -c 'yum erase [name-of-package]'
For example:
su -c 'yum erase cnijfilter-common-2.60*'

Once the drivers are installed, restart CUPS by typing the following at the terminal:
/etc/init.d/cups restart.

Now to setup the printer through the CUPS server.

  • From you browser go to this URL: http://localhost:631
  • Choose the “Administration” Menu
  • You may be prompted for a password. The username is usually “root” and the password is you system's root password.
  • Hit the “Add Printer” button and select “Canon iP1700 (Canon iP1700)” from the list.
  • Add a name, description and location or simply accept the defaults.
  • In the model selection list hunt for “Canon iP2200 Ver.2.60”
  • Choose a few configuration options and you are done!

At this point you may want to print a test page. You can do it through CUPS. To do this go to the “Printers” section, click on “Canon ip1700” (or what ever you called it) and from the drop down menu choose “Print a Test page”.

Fedora 11 Canon ip1700 setup Fedora 11 Canon ip1700 setup

If you found this page helpful, do consider sharing with others who may be looking for something similar. Digg, twitter and links on forums work great. Let me know if the method worked for worked for you. (or perhaps didn't!) Or if you find an error in what's described above. Use the comment form below, or mail me.

Facebook Founder's Open Letter to Users

Facebook's has grown to a user-base of about 350 million, making the it single most popular social network on the web. With an estimated 1734 million people connected to the Internet today, this effectively means that one in every five Internet users have a Facebook account.

In light of its massive global popularity, Facebook has decided to upgrade its 'regional network' based privacy control. In an open letter to users, founder Mark Zuckerberg has highlighted how the existing network based privacy control is proving to be ineffective and Facebook will now implement a new, simple privacy model that will allow the user greater control over his or her information.

The letter can be found here: http://bit.ly/7vMW87

Google Forces Hindi Down Your Throat

Its Saturday morning, and I settle down in front of my desktop with my morning mug of Mocha, and open my Gmail inbox, expecting to find a subscription update from Youtube. Sure enough, its there, but with one minor distortion. It was in Hindi.

Why do these companies decide, that since I am from India, I would be overjoyed at the sight of the devanagari scrawl mutating my subscription update? Now don't get me wrong here. I love my nation, I even speak fluent Hindi, but reading devanagari gets a little difficult, more so on a computer screen.

English is as natural to urban India as it is to the British. Granted, we do not speak it with the same vocalics, we are still nearly native English speakers, at-least this generation is. Some of us even do a brilliant job of donning a fake American accent.

Our education is imparted in the queen's language. All work transacts in English. Well, except for in depraved government offices, where work transacts in bribes. Around us, from newspapers, advertising hoardings, movies, music, television; all the information we are bombarded with, is in English.

This facile adaptation of the language is not necessarily a bad thing. It allows us to be the prime destination for outsourcing. It allows us to settle in every corner of the planet. A testament to the power this dexterous adaptation is the fact that there is a Non Resident Indian, NRI for short, present 180 of the 183 countries in the world.

Now lets reason a bit here. Most computer systems sold in India, are sold with English versions of operating systems. Pirated versions at that, but I am not driving there. Therefore, most people with access to a computer in India, and who know how to use it must be adept in English. Then why on earth does the Google management expect me to jump in joy at being greeted with Hindi, I will never figure out.

Now lets get to the second aspect, regional divide. The number of people from Tamil Nadu, Bengal, Andhra Pradesh etc. pleased with this bit of enthusiastic localization from Google is a purely imaginary number. Even a cretain Mr. Raj wouldn't be too pleased either.

Something similar happened with Microsoft's MSDN a sometime ago. Tempers and angry emails flew and today the language sets to India-English by default. The question remains. Why do these companies simply refuse to understand, that today, we Indians are more English than fish 'n' chips?

So, will Google please keep me out of its campaign of fervent localization? I do not need to type my email in Hindi, and I most definitely don't need my Saturday morning and my subscription updates to be ruined searching desperately for the change language link.

And yeah, I do not even like Youtube India, its filled with perverted videos of scantly clad B-grade models. The first thing I do on Youtube is set my Geo-filter to 'World'.

Here is a screen-shot of the email:
Youtube Subscription Email in Hindi
While we are at it lets poke fun at Google's transliteration. Subscription become 'ग्राहकी' which, if my Hindi serves me correct, is more to do with customer than subscriber. If you are like me and are looking for a way to quickly change back to English, click on the very first link, the one that says 'सहायता केंद्र' and follow the English instructions.

Provider Hopping with Mobile Number Portability

If you are unhappy with the quality of service of your current mobile service provider and want to shift service providers without having to change your phone number, you will now be able to do so seamlessly. All a matter of submitting an application and waiting for a couple of days.

The TRAI on Wednesday announced a framework for 'mobile number portability' which will allow subscribers, who fulfill TRAI's basic requirements to switch service providers without changing numbers.

You will be eligible to shift providers only if you have been a subscriber of your mobile operator for more than 90 days, and have no outstanding payments due towards the operator. The basic steps for changing service providers are:

  • You need to submit an application to both, the provider you are moving from and the provider you are moving to.
  • Once the application is submitted, your provider will validate your application within 24 hours.
  • If you meet all the basic requirements, your application will be approved and your provider will be shifted within 36 hours. For subscribers in Kashmir, Assam and North East service areas, this deadline is set to 10 days.
  • Providers may charge a fee for this service.
  • If you change your mind, you may revoke your application within 24 hours. The fee however will not be refunded.

A complete list of requirements and guidelines can be found in section 10 through section 12 of the TRAI press regulation. A word of warning though, it is not an easy read. Download it from here: http://bit.ly/14wVpz

Human Spambots

What do you get when you connect a country, with one billion people, with lots of free time, to the internet? Human generated spam.

If you have ever visited any major Indian web publisher, chances are you have run into it already. Sify, MSN India, Rediff, IndiaTimes, you name it. Any exposed comment form, potentially becomes a candidate for parasitic unsolicited advertisement.


It's a sure bet in Vegas that any visitor to one of these Indian web portals will be greeted to at-least one such comment:

“Dear Friends, Are you interested to make Rs.20,000 to Rs.1,20,000 A Day ? This is not a get rich quick scheme. This is a legal opportunity to make good money."


Dear Friends, Are you interested to make Rs.20,000 to Rs.1,20,000 A Day ? This is not a get rich quick scheme. This is a legal opportunity to make good money.
Fig: Human Generated Spam.



I do not wish to imply that this enthusiasm towards making easy money is limited to the Indian subcontinent alone. But the ratio of parasitic advertisement to genuine user feedback is alarmingly high in web sites targeted at audiences in India and her neighbors.

Humans, with lots of free-time, access to the internet and a desire to make easy money, become highly efficient spambots. Bots, capable of defeating most anti-spam measures with biological precision and flooding sites with 'piggy-back' advertisements and referral links, in hope of improving their bank balance.


What's The Harm?

The internet by nature depends and thrives on users and their generated content. If the very content that is to drive these sites turns out to be unsolicited advertorials, the very foundation is shaken. That coupled with the fact that these spam comments considerably subtract from user experience. They serve as a major annoyance to genuine traffic, driving it away faster than you can say Web 2.0. No genuine users, no good content, no advertisement, no dough. It a simple equation really.

Advertisers pay for advertisement on sites because they want to get a message to the site's traffic, who they view as potential customers. Now, if a large percentage of traffic comprises of 'micro-advertisers' themselves, who do not really form 'customer candidates', advertisers would definitely not like to pay for it. Gradually, but surely, advertisers are going to start recognize this 'undesired' traffic factor in Indian sites, if they already haven't, They would reluctant towards advertising on India-centric sites at the same rates they pay internationally.

Thus, while the regular Indian 'comment-to-comment salesman' may seem harmless, comic, and a integral part of the Indian way of life, they damage the prospect of Indian internet and new age businesses.

And lastly it leaves us to wonder, does anyone ever make any money this way?

Meme: Yahoo's microblogging application

Mimicry is said to be the best form of flattery. But you cant be too pleased with it if it causes you a loss of revenue. Riding on twitter's phenomenal success and their own recent lack of it, Yahoo has launched its 'adaptation' of it and christened it, Meme.

Meme does manage to strike a chord. Its fresh, well designed and smooth. It has its own set of innovations and is based on a tried and tested idea. Right from the name to the interface, everything is dynamic, fun and slick. Those familiar with twitter (who isn't?) will be right at home with Meme. The underlying concept is the same. You post short messages which show up in your followers time-line and vice-versa.


Yahoo Meme
Fig: Screenshot of the interface.

The primary variation from twitter is that Meme allows you to post four types of content. Text, Photo, Video and Audio. Photos can be uploaded from your hard drive but video and audio need to be hosted else where. This is for obvious storage space constraint reasons. Yes, computer storage has become cheap over the years, but it is still not cheap enough for Yahoo to allow users to upload a gazillion terabytes of audio and video content.

I found the concept of audio posting to be unique and thought provoking. All around us, internet media nonchalantly ignores the most basic form of human communication, speech. While videos and images are streamed around, the simple human voice is not paid too much attention. It will be really nice if Yahoo allows users to upload audio directly from their hard drives, or perhaps, capture from their microphones.


Meme Audio post interface
Fig: Audio posting interface.

Meme faces unrelenting competition it faces from the Goliath of micro-blogging, Twitter. That, added to Yahoo's recent spate of failure with social media, Meme's future is questionable. Full marks to yahoo for trying though.

Meme is currently in closed Alpha. I was sent an invite by Pallab [Thanks!] and now I do have a few invites to send out in turn. If you would like one please leave a comment here or message me on twitter.

My Meme is: http://meme.yahoo.com/shaunak

How to Record a Screencast on Linux

A video recording of your screen or desktop can be greatly useful when trying to explain some steps to someone, or showing off your Minesweeper skills. All you need is a screen capture tool like Istanbul. It can be downloaded from: The Istanbul homepage or its Linuxappfinder listing. Istanbul should be also be available on the repositories of all major distros. To install Istanbul on Fedora, open the terminal and type:

su -c 'yum install istanbul -y'

Or you can use the package manager [System » Administration » Add/Remove Software]. Ubuntu users might want to refer to the community documentation.

Install Istanbul on Fedora using packagekit
Fig: The Package Manager

Once installed, run it. It shows up as a red dot in the task-bar. Right clicking it brings up the options and configuration menu, and left clicking it starts the recording. You can select an area or window to record, or record your whole screen. Some basic scaling options are also available.

Istanbul Taskbar Icon
Fig: Taskbar Icon

Instanbul Options Menu
Fig: Options Menu

To stop recording, click the icon again. The application will then prompt you to save the screencast. Istanbul currently saves to Ogg Theora format only. The saved video can be played back on VLC media player.

Save Screencast Dialog box
Fig: Save Options


Sharing the Screencast

Dailymotion is the only major video sharing site that supports direct Ogg Theora upload and sharing. Youtube and the others transcode it to propitiatory formats. But that should hardly matter, since the end result achieved either way. There is also a HTML < video > tag. Ogg Therora video is supported via the Video tag in Firefox and Opera. Here is a short sample screen cast in which I use Linear's SPICE simulator to demonstrate a series positive clipper circuit.

Syndicate content