Python is awesome

by

pythonPython is an awesome language. The objective of a programming language is to instruct the computer what you want it to do. Ideally, the lesser instructions you need to give, the better the language. What makes python awesome is not just the ease of programming or readability but the availability of a large number of really useful libraries. You can get directly to what you want to do, and let the machine bother about the rest.

Let me give you an example: Say you want your computer to read out all the post from an RSS/atom feed. Just put together a few lines of code as follows:


import feedparser;
import speech;
import sys;

feed = "http://nunespascal.com/feed/";
if len(sys.argv)==2:
	feed = sys.argv[1];
d = feedparser.parse(feed);
for e in d.entries:
        print e.title;
        speech.say(e.title);
        print e.description;
        speech.say(e.description);

If you wish to download python you can get it from the official python download page. A lot of flavors of Linux would already have it installed.

You will need the libraries feedParser (To read RSS/atom feeds) and pyspeech(To read out the text). These are not part of python by default. You can download them, or install using easy_install. Here is some very good documentation on easy_intall.

new theme?!

by

Malcom told me today that my blog looks really old. I couldn’t disagree that the theme has not changed for a long time now.

I did try searching for a new theme, only to realize how much I love the simplicity of this theme. I did find a few bugs that creeped in when I was making changes and fixed those.

So I settled for a change of colors. Hope you like it.

innovation

by

needs time.

If all your energies are dedicated to just completing a task, you will almost always decide to do it a way you know for sure will work. To innovate; to find better, simpler, faster, or more elegant solutions, one needs to have time to think about the problem at hand. Innovation needs you to experiment, have time to make mistakes and recover from them.

Naturally no one has infinite time to solve a problem. But if you are very hard pressed for time, processes will stagnate. Innovation will almost come to a stop. I believe that one should always be pursue innovation. That means that one should always have more time alloted for a task than strictly necessary.

The road to innovation is not by thinking out the best way. But by experimenting on several alternatives. Making the mistakes along the way. And learning the lessons forever.

Keep experimenting. Keep innovating.

Never work under a dumb boss

by

I am sure all those working normal jobs have at some point cribbed about how dumb there bosses are. No boss can be dumber than one who wastes the time of his team. There are several ways to waste time. I will not elaborate on those here. If you get a dumb boss, move on. Smart people are hard to find, but they are always good to work with. Hunt such smart people and work with them. Forget the rest. Respect your time. Someone who doesn’t respect his own time, and doesn’t care about yours; is wasting your life.

It is just your very immediate boss that matters. How do you know if you are working under someone dumb? Well, I am sure most of you can tell, but still: someone who wastes you time in needless tasks, isn’t confident in the skills of their team, takes all credit for things that go right, and blames the team for everything that goes wrong. The easiest way to find someone unfit as a boss is if the person doesn’t take responsibility for his team.