November 13, 2009

Computer Science Project for Indian Engineering Colleges

How many times you put your best effort in making a project only to be ridiculed during the presentation with words like “This is shit”.”WTF is this” by the teachers.  OK OK! I am exaggerating, but it is a truth that students who put their best don’t get their reward. Most of such students put their sincere effort just because they like their work and not just for marks. To add insult to injury, those who copy-paste the projects get great reviews.

The situation is no different in Computer Science branch too. We loose hundreds of such talents students just because they became de-moralized after poor feedback for their project by the faculty. They should realize that hard-work in college hardly pays off. They should put their coding efforts in competitions like “Google Code Jam”, “CodeChef” or some open-source projects.

Now the million dollar question is “How to handle the college projects”? Let me explain with an example.

Keep reading →

October 28, 2009

My Stackoverflow archives #1

Usually when I am wandering around on stackoverflow, there are times when I find some of the questions being interesting and bookmark them. Since this list grows day by day, it came to my mind to publish them for the betterment of the general public. These are the questions which I found good and don’t claim to be the “Best of StackOverflow”. You would notice the variation in the type of questions.

If you have your list, please let me know. The comment section is open for this noble cause. BTW here is the part 1 of the list.

September 27, 2009

Feminism

Looks like Mark Shuttleworth has created a storm by uttering something which is not well received by a few Feminine Geeks. First I thought that ‘asking for apology’ is only my country’s national pastime, but probably it’s international.

The way everything is put forward, I can only say that things are blown out of proportion. Did Mark say that women are incompetent? Did he say that they are dumb or anything even faintly similar?  Quoting from Skud’s article  on geekfeminism

I’m sorry I wasn’t able to make it to LinuxCon this year; I hear it’s a pretty good event. I’ve been listening with some interest to people’s reports of what’s going on there, and this afternoon I heard from multiple sources about your keynote, in which you referred to our work in Linux as being “hard to explain to girls”.

She was herself not on the venue and all she knows is from *multiple* sources. Sometimes words get distorted and lose their context if they get passed from person to person. LinuxCon is not a place to  vent someone’s anger, nor to abuse anyone. If Mark wanted to abuse them, he would have said it somewhere else.

It just works

It just works

The reality is that the population of girls/women in FOSS world is very marginal. I know that situation is improving, but it would not happen overnight. In my country girls are more attracted towards  medical, healthcare, product services etc. First, India’s female literacy is less than male’s. Secondly,  the percentage of girls in Indian engineering colleges is quite less. Thirdly, most of the female engineering graduates want to pursue MBA. So, hardly girls are left whom you would find interested in FOSS. Those who are really enthusiastic surely go a long way.

Shuttleworth said that Linux is hard to explain to girls. I can only say that it’s even tough to explain to guys who are not interested in technical matters. Probably Mark must have tried explaining it to girls who are not even interested in computers. Neither me nor Mark has any intention to look down upon women, but nit-picking at each and every phrase is somewhat lame. This actually does more harm to women who want to be more involved in FOSS.

For those who are still trapped up in the same array of tweets and dents related to this event, you may prefer reading Matthew Brennan Jones’s response to geekfeminism. He has written a post on his blog clearing the misconceptions. Go read it as he was physically present that time of the event.

I know am late expressing my views, but it hardly matters.

September 4, 2009

List of useful Python libraries

If you are a .NET programmer, then you find Python a bit tough. Reason? Python does not include library for each and every operation possible in this world. You may have to work around to find the necessary packages, download them and continue with your development.

Python’s standard module list has a finite number of entries as opposed to .NET    ( I use .NET at my workplace). Here this is an attempt to collect all such libraries which are outside standard modules, which you might badly need for your development. Many of them are extensions or wrapper packages for already existing libraries.

1 ) scapy

This is a library for  TCP/IP stack wherein you can have full control over the lowest detail of the Packet that leaves your computer. It supports many protocols like ETH, IP, ARP, ICMP, TCP, UDP etc. You can create custom TCP/IP packet and send it to any host. Typical implementation is ARP Ping, ICMP Ping.

Experience: Tried. Works perfectly. Havn’t stumbled across any bugs as of now.

2) soaplib

Used for creating lightweight web services. As the page says, it comes with a client and server built in and on-demand WSDL generation.

Experience: Havn’t tried. Heard about it’s existence.

3) mysql

Uh? Do I really have to tell what this is actually. I hope everyone knows.

Documentation for python-mysql

Experience: Obviously! Obviously! I think I should remove this line.

4) aubio

Stating directly from it’s site – “aubio is a library for audio labelling. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio. The name aubio comes from ‘audio’ with a typo”

Experience: None. Presently in To-Do List.

5) Beautiful Soup

BeautifulSoup is an SGML parser which is highly robust and doesn’t die straight-off even if you give it poorly formed data. To make it scream and die all you have to do is to give something that isn’t SGML at all. It even has a parser class named BeautifulSOAP which is used to parse SOAP message (as the name applies). It even has a class named ICantBelieveItsBeautifulSoup. Sounds stupid? Who cares as long as it does it work.

Experience: Tried when I saw Anomit using it. Need more experience as I have lost touch as of now. Never tried BeautifulSOAP.

6) python-clamav

It is pending in my To-Do list. Will start working as I get time.  Check a small tutorial

Experience: No! Read the line above.

7) python-crypto

Presently in #1 position of To-Do list. Sounds just too promising. Hope it is as I thought it to be.

Check the API and it’s general overview

Experience: No

8 ) django

Now if you don’t know django – Go shoot yourself or read about it here if you somehow survive.

[ As pointed by Anomit, it isnt a framework, but library is a general name I have used for the title ]

Experience: Obviously!

9) gd

I have used GD a lot in PHP, but hardly on Python. GD is simpler than ImageMagik (never used) as people told me. Hope to use this library if I ever require.

If you ever require the documentation, head yourself to this page.

Experience: Not used in Python, but in PHP

10) gmp

GMP stands for GMP Multi Precision and gmpy is a python wrapper over it. Though you might not need it in Python, but if you are coming from C background, this might be a familiar name.

Experience: Normal, not an expert

11) python-jabber

Python-Jabber is a python module which implements jabber instant messaging protocol. Check out the documentation and a funny example .

Experience: Little experience. Not much. After all it doesn’t look so tough, so will sit down for a hacking session,

12) python-irclib

I encountered this library when I was searching more on python-jabber library. This also falls in the category of real-time messaging. The problem I can see is that there is no documentation. How to proceed? Use dir() and inspect module extensively?

Experience: Kidding? Please show me the documentation. I don’t have more time for hacks as I did with scapy.

Till now ,I had kept this list for my own reference. Many more required libraries are missing. If you have any more in mind, please mention it. I would be glad to add it.

August 22, 2009

Idiotic Twitter Activities

With the uncontrolled explosion of microblogging we have seen every Tom, Dick and Harry having a Twitter account. The problem doesn’t lie in having a account, but how they use it.

Re-tweets

At times it looks like some people have just no work and only thing they do is to re-tweet another’s thoughts. Re tweeting a few exceptional ones makes some sense, but why re-tweet each and every fuckin tweet in this damn universe? Come-on, create a script, follow people and do mass re-tweets. In this way you won’t miss even a single piece of shit thrown upon you. Sometimes re-tweets can be thought upon as a method to gain more followers. God knows how? Am just making wild guesses.

Trending Topics

When topic trend, it means everyone is talking about the same shit and redundancy is at it’s peak. Hell Yeah! Re-tweets even complicate this delicate ecosystem of twitter. Lots of re-tweets mean those fuckin topics start trending. These days trending topics hardly have any originality and the only way to save your sanity is to hide the section.

Tweets with Innumerable Handles

I have seen some people whose tweets contains more twitter handles than they have text. Consider an example

@deathsen It would be better that me, @fcukarrington @dziuba go out for drive with @gragsha. Should we  @scobleshit @fkbeer ?

If you can decipher the tweets, it is well and good. If you get such tweets on a daily basis, the unfollow button comes handy. Just hit that button before insanity starts getting hold of you. I am hardly able to understand whom they are talking to or whether trying to gain attention. I am even curious whether they know what they are writing.

There are more, but probably not so nasty as these. SMS Lingo is one which still gets on my nerves, but somehow I have managed to live with it.

August 15, 2009

FOSS Industry Adoption

Probably I am not so much qualified to enlighten others on this topic, but this is what I can see from my eyes.

Praise Python! Praise Linux! Praise any other FOSS technology! Now go and check what is being used in the corporations. I would like to list them down a few – .NET, IE6 , ActiveX, Rational Suite, Lotus Notes etc etc.  Most of the technologies are either outdated or fully enterprise software. Half of them would be probably new for anyone.

.NET

Even when I was in college, all I used to hear was that .NET used to be an integral part of  their requirement of any company that hits the campus. Even in the Internship last year, .NET was the religion. Even in all the jobs around why is .NET so important? We hear so much about Python, isn’t it? Where is it? When will it be adopted as mainstream popular development language?

Don’t confuse between .NET and Python. When we say .NET we usually mean C#.NET. This language was responsible for the success of the framework. We even have IronPython, but hardly anyone uses it. (Please don’t bring VB.NET in between). One reason is that since all of the language having .NET bindings generate MSIL, the language doesn’t matter. Since C# has syntax very similar to Java, it becomes a preferred choice even for beginner and experts.

I personally don’t like the .NET runtime. It is slow and hogs the resources. Visual Studio sucks more RAM and resources than the OS itself(read Vista). It is slow in response, freezes a lot. (Please don’t give bullshit suggestions to get a 4GB RAM Module). The only positive thing is C# which is very familiar and is probably the best language from Microsoft.

To make Python more famous, we need to look out from the standard modules and create a huge collection of libraries and organize them in categories.  .NET has a bigger library for more functionality (makes it more heavy).

Source Control

ClearCase! I would keep my mouth shut over here, but the web interface sucks. Sucks bigtime! Doesn’t look like a web app in the first place. Upgrades are slow in enterprise and we are forced to use the old versions of any software which should be kicked out by now.

Why not subversion? I know some of my friends who say that their company uses it, but still ClearCase still has a big market share. Probably a big reason may be due to early adoption and a complete Suite. I have attended one conference of IBM Rational Suite in which I was really impressed by the way it was being explained. I hope people should get the point. Marketing matters as much as quality matters. Subversion may be excellent, but it needs an excellent  marketing to make it more appealing. A rock-solid support is also needed.

IE6

Probably nothing sucks more than IE6 when web is mentioned. The usage of IE6 is highest in corporate offices. Employees are forced to use this stone-age browser because either their company policies don’t allow or they don’t have admin privileges or the worst of all – The smart-ass programmers made the company’s intranet to work only on IE6.

Operating System

Do I even need to mention this? All companies have deals with the software giant for bulk licenses to keep their systems running. They strike special deals if they ever need *nix systems. This decision is usually taken after lot of brainstorming.

This post was not to show someone superior or inferior. Just my point of view! Your point of view goes down in the comments section.

June 22, 2009

Upcoming exciting news from Tech World

  1. Steve Ballmer throws a car at Eric Schmidt.
  2. Ubuntu L***** L**** just works without any goof-ups.
  3. Apple makes iPhone un-pwnable.
  4. Windows 8 removes administrative privileges from default user. In short, now onwards viruses will run with non-administrative privileges.
  5. Opera re-invents the web again. Bundles an Operating System in it’s upcoming “Opera Fright”.
  6. Flash 11 needs 4 CPU cores to render basic animations.
  7. Internet Explorer becomes the safest browser. Reminds “Connecting to the Internet might expose you to viruses, do you want to go offline?” and shows an OK button.
  8. Sun re-writes Solaris in Java. Amen!
  9. Windows 8 requires just 8GB of RAM to run properly.
  10. Script kiddies write malware for Linux and Mac and affect them badly.
  11. FreeBSD gets fool-proof secure. Asks for password when opening Firefox.
  12. Ballmer boasts “Windows has maximum number of applications” (considering viruses as apps too)

June 12, 2009

Dousing the Mono Flames

The Free Software community is up in the arms and split into two factions on whether Mono is polluting the ecosystem? The discussions are endless and there is no hope that it will ever subside. I have been following ubuntu-devel-discuss and the topic “shameful censoring of mono opposition” has got the attention of nearly everyone on the list. I think save me, everyone has answered to that discussion. Heck! I am still getting mails now.

I find all these discussions to be getting out of control. Check boycottnovell.com and a tons of other sites. Mono supporters and mono haters are busy discussing whose stand is holier.

Threat

Let me be impartial. There is a threat that Microsoft may one day sue the FOSS companies on the use of it’s IP. Is it true? I don’t find Microsoft can do much as the bigger question is that can they sue each and every single user? They should sue Novell since they are leading the project. Will they sue each and every user out there using Mono?

The threats are more of speculations. Probably Ballmer can tell us what he thinks of Mono exactly, but for that he needs to find time from his busy schedule of dancing and throwing chairs.

Reality

Whatever Mono haters say, the reality is that there is no at par substitute for for GNOME applications like F-Spot, Tomboy and GNOME Do. I would be happy if GNOME is made mono free, but what about these three applications? When it comes to media player, I find Banshee much better than Rhythmbox. Amarok is much better but it is for KDE. I am talking about GNOME apps which don’t need KDE libs to be installed.

I don’t use Tomboy and F-Spot, but GNOME Do is really good. It saves a lot of time. The keybinding saves a lot of time. Everything need not be geek-oriented, but should be such that everyone can be use it. This is in accordance with GNOME Human Interface Guidelines

If anyone wants that GNOME should forget Mono we first need to find good substitutes of the above softwares. An alternative for Tomboy is Gnote. I agree it is lighter, but still it has a long way to go. If Gnote really kicks ass one fine day, that is a day for celebration for anti-mono campaigners.

Middle Ground

Time is money. Let us not waste time by just fighting who is correct and who is wrong. Mono lovers find the other camp stupid and vice-versa. Will the flame ever end? Mailing-lists are too busy these days discussing whether Microsoft can kill Linux by just issuing threats! So what can we do next?

Solution #1

Make it easy to remove Mono stack from GNOME. Probably make it dead easy to do so by including it in Synaptics.

Try issuing this command on the terminal

sudo apt-get remove –purge mono-common

and you get

The following packages will be REMOVED
banshee f-spot libart2.0-cil libavahi1.0-cil libboo2.0-cil libflickrnet2.1.5-cil libgconf2.0-cil libglade2.0-cil
libglib2.0-cil libgmime2.2-cil libgnome-vfs2.0-cil libgnome2.0-cil libgtk2.0-cil libgtkhtml3.16-cil
libmono-addins-gui0.2-cil libmono-addins0.2-cil libmono-cairo1.0-cil libmono-cairo2.0-cil libmono-corlib1.0-cil
libmono-corlib2.0-cil libmono-data-tds1.0-cil libmono-data-tds2.0-cil libmono-security1.0-cil libmono-security2.0-cil
libmono-sharpzip0.84-cil libmono-sharpzip2.84-cil libmono-sqlite2.0-cil libmono-system-data1.0-cil
libmono-system-data2.0-cil libmono-system-web1.0-cil libmono-system-web2.0-cil libmono-system1.0-cil libmono-system2.0-cil
libmono-zeroconf1.0-cil libmono1.0-cil libmono2.0-cil libndesk-dbus-glib1.0-cil libndesk-dbus1.0-cil libtaglib2.0-cil
mono-common mono-gac mono-jit mono-runtime tomboy

Which is enough to scare the shit out of you. Such a long list! Is the system going to break?

To solve the above problem Mark Packages By Task can be a good place to place Mono. Just Uncheck and Voila!

Mono should also find a place here

Mono should also find a place here

Solution #2

Accelerate Gnote development! Gnote is lighter, faster by still behind Tomboy when it comes to features. I personally prefer physical sticky notes at my workplace or at home. I am not here to discuss which one if better, the above is just my persona views and I hope many people agree with me.

I think Tomboy is like a flagbearer of Mono community. Like Linux is for FOSS. Of all my friends who know something about Mono know about Tomboy. Probably it us the other way round – due to Tomboy they came to know that something called mono exists.

Concluding

I have worked on .NET on windows, but prefer Python on Linux. I also think that we can do without mono, but not at this situation when we don’t have better options to Tomboy, F-Spot and GNOME-Do. I always feel that discussing on the cleanliness of mono is required, but it should end somewhere or the other. Why keep it discussing it over ages? Whenever I read a mono v/s anti-mono thread, two thoughts come to my mind which I summarised above.

June 7, 2009

Indian Technical Education System needs an overhaul

I had my own rant for Indian Education system, but kept mum most of the time. I have read Sayamindu’s post when he posted it on his blog, but had nothing more to add that time.

I would suggest you to just read the following links.

I wanted to write more on these, but resisted that time, was just waiting for my engineering to be over. I felt that it would be better if I provide links to those people’s experience whom I know or have come across.

June 6, 2009

Speeding up Internet Surfing (Squid + BIND)

I am not writing something very much ground-breaking, but since friends do ask me how to use their slow internet lines, here is the solution: Web Proxy with Cache and DNS Caching.

You might find exhaustive articles all over the net, this one is which I made from my experience. Getting them to work is so so simple. It isn’t a rocket science as you might be thinking.

You basically need Squid to act as Web Server Proxy and Bind9 as DNS Caching.  The work of Bind9 and squid is not limited just for caching, but you might want to know that Bind powers much of world’s DNS servers. Let’s start

You first need squid and squid-common packages for squid and bind9 and dnsutils for bind.

sudo apt-get install squid bind9

squid-common and dnsutils are dependencies of the the two, so you don’t need to specify

BIND

Just open the file named.conf.options in the folder /etc/bind and change the following section

// forwarders {
// 0.0.0.0;
// }

to

forwarders {
208.67.222.222;
208.67.220.220;
};

Here the two IP addresses are those of the DNS servers (OpenDNS in this case). You can even use the IP address of your router if the latter is configured for DNS.

Now restart bind daemon

sudo /etc/init.d/bind9 restart

Bind can also be used for more than just DNS caching. It can be used for Primary Master Server, Secondary Master Server or mix of all of them. The slightly geekish HOWTO is here. It is written for  Ubuntu, but nearly same for all other distros.

Squid

When you installed squid, it has been auto-configured as a caching proxy server. You just need to point your browser’s proxy settings to it. The best way is to set up Network Proxy so that every application can use it.

System > Preferences > Network Proxy

GNOME Proxy Settings

GNOME Proxy Settings

forwarders {
208.67.222.222;

Squid uses port no 3128 as default. You can change it later.

If you want Squid just to surf the internet, then can just change the proxy settings of Firefox.

Edit > Preferences > Advanced > Network

Choose the Settings Button, set up the proxy settings similar to that shown inthe above figure.

You can check the official docs at squid for configuring squid or use this simplified doc at Ubuntu Wiki. Again, it works on all the distros.

Using squid you can customized error pages, shut down network for specified duration of time, block websites and many more.

Suggested Reading: