Recently I had an interesting heart to heart talk with a good friend of mine, about Individualism and freedom. We both seemed to agree on a lot of points. Most of these points seem very radical, in the sense that society tends to look things very differently. In this blog post, I’ll present some of these points.
A big part of the discussion was on Individualism. For most people, this is just a fancy word. But what does it actually mean? It can be understood very well using a simple example. Consider a case in which you’re in a social group, and everybody other than you takes a common stance on an issue. Individualism requires to you to stand by your own views, regardless of what the rest of the group believes in. It’s better to stand by your views, and leave the group, rather than continuing on, and losing your identity. Thus, Individualism doesn’t require you to isolate yourself from society, and live a life of loneliness. However, in case of a clash of ideologies, it’s best not to compromise.
A sparkling example of individualism is portrayed in Ayn Rand’s novel, The Fountainhead. The protagonist, Howard Roark, is a fine example of a person not willing to compromise an inch on his ideals. Roark is shown as an ultra-modernist, who refuses to have anything to do with classical architecture. Unfortunately for him, classical architecture was quiet hip during that time. Roark jumps from client to client, trying to make a deal which would suit him. He even ends up not having enough money to pay for his rent. His dedication is clearly demonstrated, when a client approaches him looking for a modern building, in line with Roark’s ideas. However, the client wants a slight Roman arch (or something like that) in front of the building. Roark, refusing to budge, declines the offer, even though he was almost down to the streets.
Some might argue that this is an extreme case of Individualism. Of course, it’s quiet doubtful that such a person could ever survive in real life. But that’s the power of fiction. Ayn Rand could showcase her feelings about individualism, by creating a fictional character, who refused to compromise on his ideals.
The question now arises, can Individualism lead to violence? We concluded that a true Individualist will never resort to violence. An individualist, by definition, recognizes a person’s freedom to do what he wants. Thus, a true individualist recognizes other people’s freedom as well, and would never try to block it.
The discussion shifted to freedom. We’ve always been pleasantly surprised at the amount of freedom offered by our campus. There is a certain feel to wasting your entire day doing nothing at all, and then leaving your hostel at 3 o clock in the morning to go study in the lab. Nobody to answer to, no guards to prompt you, nothing at all. Take a moment and recognize the amount of freedom given to you. We might not have it after a few years, while working a 9-to-5 job.
So, what are your views on Individualism and Freedom? Feel free to comment.
Some of the inspirations for this post : George Carlin (http://www.youtube.com/watch?v=Oi1DMu48z2c), Bill Hicks, and Christopher Hitchens.
Tweet This Post
February 20th, 2012 in
Blog |
2 Comments
I recently got a new laptop – a Dell Inspiron 14R, with a dual core 2.1 GHz i3 processor.

So I wasted no time in setting up Ubuntu 11.04 on it. No problems during installation. However, when I played some songs on it, it started freezing up. This does not occur on windows, which makes it highly likely that it’s a problem with my ubuntu drivers.
So I tried looking at my system performance whenever a song was played. I opened up my system monitor, and, believe it or not, it showed 4 CPUs :


Naturally I was a bit shocked. I searched all around, and everywhere it was mentioned that you get only a dual core with i3. One of my friends, who has a quad core processor, gets 8 cores in the system monitor. I set about trying to find out why the system monitor behaves in such a way.
Turns out, this was because the new intel processors use a thing called Hyperthreading. This basically assigns 2 virtual processors for each physical processor. This improves the parallelization of computations.
So if you have a PC with an i3 processor, and see 4 CPUs in your system monitors, don’t rejoice, it’s only Hyperthreading at work. You only have 2 cores.
Tweet This Post
August 23rd, 2011 in
Blog | tags:
ubuntu |
2 Comments
Recently I’ve gotten sick of reading stuff online. My usual habit in my second year was that I’d download an e-book, read around 1 or 2 chapters and then chuck it. Now I’d rather just read a proper physical book.
There are a lot of inherent problems in reading e-books. I, for one, would rather prefer reading while having no access to the internet. Whether it’s checking your mail, checking facebook, visiting Digg every 5 minutes, there are thousands of distractions the moment you insert that chord.
Another problem is amount of strain the LCD screen might be putting to your eyes. This is something which doesn’t get recognized directly. It might be that you read a paragraph, and then get bored of it. It’s not actually the boredom that’s bothering you, it’s the strain. When I felt such random spurts of boredom, the only reason I could think of was that I wanted to do something else at that time. But the fact of the matter was, the LCD screen was burning into my eyes and forcing me to do something else.
A MAJOR reason, specially for me, was the convenience factor. E-books just aren’t convenient. If you want to constantly keep switching between 2 chapters, you need 2 windows on your Desktop. You read a chapter earlier, and want to skim over it now. A real book will make that much easier. You can write notes on a real book. I know, I know, you might be able to do that with pdf documents, but I find those “sticky notes” very non-intuitive. It’s much more intuitive to scribble something that you might want to remember later.
Recently I got Duda, Hart : Pattern Recognition, and Awaken The Giant Within by Anthony Robbins. And I plan on buying more and more.
So what do you prefer reading? Books? E-Books?
Tweet This Post
August 15th, 2011 in
Blog |
No Comments
I was really bored at work today, so I decided to port one of desktop python games to android.
I found this library called Pygame subset for Android(PGS4A), through which basically you can port your pygame games to android with very little effort. This is some really cool shit. I mean, who would want to code games in Java?

I hadn’t delved much into Android Game Development so far because of it’s lack of support for Python. But with PGS4A, you can not only develop a game in Python, but even distribute it. Through a script, you get the apk, which can be installed on an Android phone without PGS4A installed. Heck, I don’t think you would even need the scripting tools for Android.
The procedure to sign the apk is the same as that for normal Android apps built using Java.
I began work on 2DRacing, a game I had developed in 2nd year. Man, it took me back to those good old days of coding in the 4th semester.

It’s really just “playable” on an emulator right now, since the emulator provides you with a default keyboard which doesn’t take up half of the screen, and I haven’t yet figured out what the appropriate controls would be for a touch phone. The keyboard on the device takes up so much space on the screen, it renders the game unplayable.
I’ll put up the code soon enough.
Tweet This Post
June 29th, 2011 in
Blog |
No Comments
You’ll find killing processes useful when you’re working with something like servers, which you need to run as a process. What happens is you end up pressing Ctr-z or something to end the process. Instead, what it does is that it keeps running the process in the background, but gives the terminal to you. The standard procedure in such a case would be :
1. ps -e
2. search for the process which you want to kill. Find its process id (Or as an alternative, just do ps -e | grep processname)
3. sudo kill -9 processid
4. enter your password.
I wrote a little script to automate this process. What it does is that it asks for a string from you (which is the processname). Then it redirects the output of ps -e | grep processname to a file, figures out the processid of the process, and executes the sudo kill command.
This has saved me a lot of time so far. Hopefully someone will find this useful.
(I could probably make this better by taking the string as a command line argument instead of as user input. Ah well, maybe later).
Here’s the code:
#!/usr/bin/python2.6
import os
t = raw_input("enter string ")
os.system("ps -e | grep "+t+" > 1")
r = file("1",'r')
for line in r:
line = line[:5]
print os.system("sudo kill -9 "+line)
Execute it using sudo python kill.py
Tweet This Post
June 26th, 2011 in
Blog | tags:
python,
shell |
2 Comments
I recently had the pleasure of taking part in a one day coding event organized by the Programming Club of my college called Hackathon. I jumped on the registration page the moment I heard about it. I mean, if this isn’t my kind of a thing, then what is?
The event basically consisted of people trying to code up something which would be beneficial to our campus community. While there was no restriction, all the projects consisted of web apps. It’s difficult to think of anything else that could be beneficial to the entire community and would involve coding.
My team consisted of 5 people. Initially we started by using a PHP framework whose name I seem to have forgotten. Apparently, it had been released just 2 weeks ago. We spent around half of our time trying to figure out the framework. This was my first experience with the MVC model used in web development. I have to admit, being exposed to this new idea was a great experience for me.

Halfway into the event, we were almost certain that we weren’t gonna go anywhere with this framework. It was mainly due to the scanty documentation and advanced nature of the framework ( I have nothing against the framework itself, it’s just that it had only just been released), although it might also have been due to the incredible amount of food being provided to us!
So, we decided to move onto Django. What attracted me was that it was a Python framework, although I have to admit that the tagline (The web framework for perfectionists with deadlines) also had something to do with it
Django is an awesome framework for any beginner to start out with. It gets a quick and dirty site up in a few moments. It’s probably the web developer’s analogy to the game developer’s pygame.
I was using the IDE Eclipse Helios for PHP developers. Although I didn’t do much PHP coding, it’s an awesome IDE for web development, with plugins for Javascript, HTML, CSS, etc. My advice would be that if you’re having trouble adding the PDT plugins with your present installation of eclipse, don’t fuss over it, just download the entire IDE on the PDT site. It will have the plugins pre installed. Trust me, its much easier to maintain 2 versions of the IDE on your system rather than trying to install all the plugins on your own. They are a pain, and cause too much unnecessary trouble.
All in all, it was a good experience, I ended up working with some really cool people. The food was the most awesome part! It was a pity we didn’t have much to show at the end of it, but we’re gonna keep working on the idea.
Tweet This Post
Recently I did an upgrade to Ubuntu 10.04. While on 9.10, I had set up my Eclipse with certain plugins (PyDev, Subversive), and everything was going along fine. After the upgrade, my ~/.eclipse folder was overwritten (I know I know .. I should have backed it up!).
However, since then, I’ve been having this wierd problem. Whenever I try to install a plugin using the “install software” option in eclipse, it seems to install fine, but when I restart eclipse, I’m not able to access the plugin.
I looked around for hours to deal with this problem, and now I finally have a solution! Though its not technically a solution, more like a workaround…
Usually, each plugins consists of 2 type of files, one of them goes into the plugins folder, the other into the features folder. The features one is more like a definition of the plugin, the plugins folder contains the actual plugin. Moreover, there are 2 locations for features and plugins folder. The /usr/lib/eclipse folder has 2 folders : plugins and features, and the ~/.eclipse folder has 2 folders of this name too. When you install eclipse, the plugins already there in standard installation of eclipse are put in /usr/lib/eclipse, while when we install some plugins ourselves, they are put in ~/.eclipse. Eclipse usually has the ability to read plugins from both these folders. But after the upgrade, god knows what happened, eclipse just couldn’t access the ~/.eclipse folder. So it only showed the plugins in /usr/eclipse
To deal with the problem, you can either :
1. Install plugins by running eclipse as root, and then when you run eclipse as normal user, you’ll be able to see the plugins.
2. Install plugins as normal user, and then copy the plugins installed in ~/.eclipse to /usr/eclipse, i.e. :
sudo cp -r ~/.eclipse/features/* /usr/lib/eclipse/features/
sudo cp -r ~/.eclipse/plugins/* /usr/lib/eclipse/plugins/
Tweet This Post
February 16th, 2011 in
Blog,
Tech | tags:
eclipse,
programming |
No Comments
Eclipse is one of the best IDEs to come about for programming enthusiasts. It’s great for working on large projects. And the best thing about it are the plugins. You can install the plugins manually by copying the corresponding folders, but the easier and better way is to install them using the “install software” option in eclipse. However, in Linux, setting the proxy settings in Eclipse is not usually the most intuitive thing you can do. I had this problem for ages. I kept trying out stuff by getting ideas from different forums, and it just seemed to me that it would randomly connect sometimes. But now I’ve finally hit the nail on the head.
To run Eclipse on a proxy server in Ubuntu, do the following :
1. Set the proxy settings in System -> Preferences -> Network Proxy
2. In Eclipse, go to Window -> Preferences -> General -> Network Connection and set the Active Provider to “Native”
3. Close Eclipse
4. Run eclipse from the terminal using eclipse -vmargs -Djava.net.preferIPv4Stack=true
Now, if things go as planned, you’ll get the proxy authentication box, asking for your username and password.
Happy coding!
Tweet This Post
February 16th, 2011 in
Blog,
Tech | tags:
eclipse,
proxy server |
No Comments
So finally I got started on the platformer I had been thinking about for so long. I was going through a huge amount of trouble trying to use cocos2d’s map engine. The problem finally got solved, I posted it on their forum and it got answered. This had been a source of frustration for me for a long time. I haven’t had any progress every since my pacman clone, and finally I had something.
Right now I’ve made the initial welcome and menu screens. I’ve started out a bit on the gameplay. Basically a map loads and the player moves and jumps around. That doesn’t sound much, but I now know how to set properties to the tiles, which is basically what I had been trying to learn. The documentation is quiet a lot, compared to PGU (which I used for my last game). However, finally I would be using an actual ENGINE. It would help it look more like a game. There are certain effects which will make it look more catchy with little effort on my part.

Other than that, I’ve been doing some research for the Boeing Project. It seems tough work, but exciting as hell. A real world project is much more exciting than plain software programming. However, till now, I haven’t been able to get much done because our bot keeps giving us trouble in all kinds of different ways.
I’ve also been gymming for almost an entire week. Its really exciting stuff, I’ve built up a whole workout routine. It feels good to extend your body to its limits.
Tweet This Post
Most of my programming time so far has been spent using certain libraries that other people have built. Recently, I got an idea of actually creating a library for an open source project. I’ve observed that most of the people who start out with game programming choose either of the 2 routes : python+pygame or flash/actionscript. The people using flash have the advantage of being able to embed the games in a web page, and thus getting more people to play their game. The best that the people who use pygame can hope for is to make an executable using py2exe (something which I do with all my games), since python cannot be embedded in a webpage.
This thought occured to me since I faced a similar dilemna : having coded almost all my games so far in pygame, I wanted to be able to embed them in a webpage so that more people would play it, rather than having them as an executable which they had to download. The only option was to somehow learn actionscript and then port the games to flash.
I tried to research around this idea, and looked around for some possible bindings, between flash and pygame, and reached this page. Theoretically, a pygame program can be made to run in a browser using 2 ways : first is that someone writes a plugin for python for the browsers. This can take a lot of work. Another would be to make Jython run with Pygame, then make an applet out of that Jython Code.
I, however, am not anywhere near doing any such kind of thing. It involves a lot of things : from Jython to applet programming to the internals of pygame. It’s just an idea, I might try it out for next year’s Gsoc. It will definitely make a lot of people’s lives easier. A lot of people (including me), prefer python over actonscript, for merely the amount of fun you have while coding in it, along with its power. I hope that someone implements such a thing soon enough.
P.S: Don’t misunderstand me, I’m not claiming that I thought of the implementation. It merely occured to me that it would be cool to embed python games in a browser, and came across the jython/plugin idea on that webpage.
Tweet This Post