Skip navigation

Moved to my own web host today. I’ll be continuing to blog, post photos and a lot of other new things here now:

http://www.wicknicks.com/

Moving to a self governed web host gives me the ability to blog, post photos, code and working web servers all in the same place. Currently, I’m using Linode 512 plan, and I must say, it is very impressive. Even with 512mb of RAM, the system’s performance is on par with my home machine. Heavily recommended!

WordPress’s XML export mechanism worked like a charm.

Stay tuned to wicknicks.com for some fun updates!

 

Of late, I have become a big fan of the Python programming language. The language is incredible when its comes to solving problems requiring some experimentation. Given that the CueNet platform is made between Java (for algorithms), Javascript (for its HTTP interface) and MongoDB (storage), python was  a natural choice because of its ability to interpret JSON as a py dictionary.

During the last few days, I have been reading an entire collection (containing ~45K records) from my database, and doing some simple operations on them. Each record has 10 keys on average and the record size revolves between 100-150 bytes. I noticed that the python driver (PyMongo) took 145 seconds to read the entire collection. This is terribly slow. After debugging and profiling with cProfiler, I noticed that the PyMongo’s _bson_to_dict function was the bottleneck.

cProfiler find the bottleneck

The screenshot above shows that out of the 145 seconds execution time, pymongo’s deserialization module consumed 120 seconds. Interestingly, serializating py dicts to BSON is a much faster operation. After doing some looking around, and trying

>>> import pymongo
>>> pymongo.has_c()
False

on the python console, I decided to re-install the driver. This time with the C extension. After installing python-dev, I reinstalled pymongo with easy_install:

$ sudo apt-get install python-dev
$ sudo easy_install pymongo

This directly installs pymongo with the C extension. When I installed PyMongo the first time, there was no message saying that the required dev files are missing for the higher performance C extension. While being an excellent interface to install packages quickly, I think it is necessary to include messages to tell the programmer what is missing, so we can take required options immediately. After the install, execution time dropped from the whopping 145 seconds to a much more acceptable 8 seconds.Yuhoo!

Even though I am quite happy with the performance of PyMongo now, the python modules are really slow. Maybe this is a very good opportunity for someone to get their hands dirty with a real-world python library, and improve it.

The Skyrim soundtrack has created waves in the gaming music industry. This is probably the 20th time I’m listening to the main theme, and it still gives me goosebumps. Check it out here:

 

 

Here are some amazing covers of the song.

 

 

 

And of course, we cannot not have a metal cover.

 

Original Post: http://www.petapixel.com/2011/12/03/easy-ways-to-exceed-client-expectations/

Steve Jobs passed away this last week. A very unfortunate and unexpected event for all technies and people use have enjoyed using the Apple products. I am personally not an Apple fanboy, but there are two thing that I admire Steve Jobs for. First, his talk at the Stanford Commencement. This has inspired me a great deal in the past, and help get past some dark days.

The second are his world famous keynotes. Inspite of not owning a single Apple product, I had come to look forward to what Steve will bring on stage. Would there be a new phone? A new subscription plan with T-mobile? A cheaper classier iPad? Some new cool way of interacting with mobile devices? I had even begin to complain that the three month wait was too long.

Thanks, Steve — for making us look towards the future in optimism and hope.

The impact of this loss could be best summarized with the posts on Hacker News a couple of days ago. Screenshot (take from here) below:

I just got off a very interesting discussion today on how teaching introductory computer science must be improved. I must say that I was very excited to be part of this discussion where people (Rich and Eric) were very keen on changing things to improve the overall situation. Here are some of the points which were raised:

  1. In a quarter system, like the ten weekly one we have here in UCI, students have to grasp a ton of material, most of which have very short lived purpose — to pass the final exam.
  2. There are a lot of students who get by courses without completely understanding many fundamental concepts, and have a lot of trouble in later courses.
  3. The grade given to a person at the end of a course is the most misleading competence indicator. We do not have a better one (possible no one has anywhere in the world) — but the letter grade has to change into something more indicative of the student’s competence, abilities and creative skills.
  4. Introductory courses currently teach Java. This might not be the best thing to do. Java, besides being a verbose language, contains a lot of advanced object oriented features. For freshmen who have never written computer programs before, the dual battle of writing good object oriented programs and solving the problems at hand is a very overwhelming one.
    DISCLAIMER: I use Java as my primary programming language, and love most of its features. The stability of the virtual machine and rich set of libraries available from the community make it one of the most important platforms for doing anything real.
  5. In the beginning, it is important for both the teachers and students to have fun in the course. Computer science must be viewed as an enjoyable activity. This is very important. Probably the most important. Once people start having a bad taste, they will develop mental barriers in learning new things. Thus, doing something useless but superb fun will actually be a much better strategy to retain freshmen in computer science.

That being said, my personal take on this is the following:

A more interesting language must be taught to these students. Eric and Rich are currently targeting Python as a possible replacement for Java. MIT is also heading in this direction. I personally believe that a better language for this purpose is Javascript. There are multiple features which make it interesting.

  • It is very easy to start introductory level programs which can be visually experienced by the students. It natively supports animation using HTML5 Canvas, or it can interact with CSS to provide very simple movements of images across the screen. The students can more easily get familiar with the system, play with it and explore it to make more interesting projects.
  • Its becoming more and more important today to interface multiple programming languages. This is no easy task. Javascript was built to live with CSS/HTML. There are very nice libraries (like jQuery) which make this seem even more easier (though it need not be necessary to introduce jQuery on day 1).
  • Good tools for debugging javascript are available (For example: Firebug), which allows students to create watches, add breakpoints. Firebug’s JS console is one of the most useful features. Students can try out snippets of code right there (using it as a REPL environment).

A few other things students must learn in an introductory programming class is the importance of working together. No real CS project is done alone. Working with other people is definitely the more fun case). Students must learn how they can form groups and work out projects together.

Defocussing from the standard examination grades is probably the most important thing to do. The role of education is to make us aware socially and technologically, not to post a 4.0 GPA on the front door. At the end of the day that’s just a number. What is more important that you are able to creatively think, formulate ideas and build robust systems which are useful to the community. Unfortunately, most courses are the opposite. They love to have that dark and gloomy examination at the end of the quarter to ruin all the fun. This is true in India (where I took courses for 20 years) and in UCI (much much lesser here, but still relevant). Rich had a wonderful point when he said that only entrance exams must be conducted, and not qualifying ones. The entrance exam has a better feedback opportunity. If one fails it, he can retake a pre-req course which he didn’t completely understand. A final exam is just a nail in the coffin — there is no way to mend things after it. UCI makes it worse by declaring that students cannot retake a course (once they have a grade for it).

 

 

K.K. Downing, the guitarist of the heavy metal band Judas Priest recently announced his retirement. Came as a gentle surprise given that he definitely has some riffs still in store.

Priest has been one of the most influential bands for both to the heavy metal scene and me personally. They have truly made a difference with all their anger and leather.

Here is K.K. with a recent amazing solo:

Are social networks useful? There seems to be no clear answer. There seem to be both disadvantages and advantages when I ponder about it. So I feel its time to tinker with this. As a first experiment, I unfollowed all the famous personalities from my twitter list. These are people who actively engage in building modern day software, or are world famous entrepreneurs or philosophers. Though they have good tweets, I want to see if it really makes any difference.

My guess is that it doesn’t. My life is going to go on without any changes. As if it never happened. A ton of these things are simply mind-engagers. Things a human mind can easily fix its attention on. Its similar to those crappy TV serials. Similar to those countless blog articles who give you advice on how to be better programmer/entrepreneur/scientist/<your-profession>/<your-hobby>.

To see how many of my followers are actually drowning in noise. I am going to ask them to send me a “hi” reply tweet. Needless to say, a person following me without the social noise syndrome will see my request to the “say hi” tweet, whereas those who do face it might not see my tweet itself.

On the usefulness of social networks, here is something that I found fascinating today: http://jonathanstark.com/card/. Really looking forward to see how this turns out. Wonder if the NY Bronx and Bombay Chawls can be connected in a such a way that they can help each other out.

On a slightly different note, this reminded me a lot of the population implosion McLuhan talked about in Understanding Media, and I decided to call this article Social Implosion. We are definitely facing social implosion on most of our networking sites. There is just so much jabber — very little of it actually useful.

The news is raging about Soc Net websites requiring people to put their real names. Danah Boyd hates the idea, citing how minority people mask their real identities. Whereas, the Atlantic thinks its a revolution. I hope the developers of future social media websites realize that both viewpoints are right in their own ways. What we need is flexibility for people to switch back and forth between the two extreme points. Just like in real life no one either hides in a cave or stays on the street their whole lives, future services must empower people with tools to completely hide their data whenever they need it, and expose private information to only those eyes to whom its deemed necessary.

As far as using private data for advertising is concerned, well, I don’t like it any more than you do. But someone’s gotta pay those bills.

Some lovely tools have been released demonstrating the power of JS and HTML5. The first one is Fabrice Bellard’s Linux Emulator: http://bellard.org/jslinux/. The second being a JS based MP3 player http://jsmad.org/.

I just stumbled upon popcorn js which very similar to a class project I worked on with a couple of friends: http://popcornjs.org/ Popcorn lets you create a time synchronized multimedia presentation. The demo on their front page explains it all.

This is a right time for all platforms to seriously consider HTML5 as THE platform for cross platform applications. I really wish iOS and Android embrace html as their de-facto SDK language rather than Objective-C or Java (both being great languages in their respective ways).

Follow

Get every new post delivered to your Inbox.