Truth, Computing and Fail

  • rss
  • Home
  • About

Parsing XML in Python

anomit | November 16, 2008

I started off with BeautifulSoup for a certain project that needs to construct database queries out of XML. I was almost done with this component when I discovered much to my chagrin that BeautifulSoup does not respect the case of the strings in the tag name. For eg some text would yield the name of the tag as 'foobar'. I had to find some way to replace the code base within a short time.
I quickly went through some of my starred items in Google Reader. One of the interesting finds was using lxml from the IBM developer works pages. One of the examples in that page seemed very similar to using a SAX parser. I wasn't quite interested at that moment to learn a third party library from scratch, so I decided to go for the xml.sax package already provided by default. A tutorial and reading through a couple of pages from the book 'Python and XML' later, I managed to get it right.

Basically, an SAX parser is event driven, and you can define functions that can be described like event handlers in JAVA which act upon those events. These events include encountering the opening or closing of an XML text node, an XML element node etc. The JAVA implementation of SAX defined interfaces for the handlers. SAX for one thing, doesn't have a formal specification as yet and since Python doesn't support interfaces, it included four classes in xml.sax.handler. You can read about them in the python docs. From the docs:

Handler implementations should inherit from the base classes provided in the module xml.sax.handler, so that all methods get default implementations.

The one we will be using the most is the class ContentHandler. The handler for our own XML format will inherit it. We override functions implemented in ContentHandler to customize them to our own needs. Some of the important functions are:

startElement(name,attrs): This is called by the parser when it encounters the start of an element. name holds the name of the element and attr holds the attributes.

endElement(name): Called by the parser when it encounters the end of an element.

character(content): Returns chunks of character data when found. The character data may be included in a single chunk or split into multiple chunks. It's advisable to use flags rather than relying on the former assumption.

Since a SAX parser is a stream parser and doesn't build an in-memory tree, you can't backtrack in the tree and nodes don't have the usual child-parent relationship found in DOM style parsers. Flags are used to track what element the parser is currently in and take appropriate actions. There is a caveat here. If you are working on a tree with a large depth, it can be really frustrating and painful to manage a lot of flags. The one I am working on can have a maximum depth of 5, but it would rarely exceed 4. So it wasn't a big deal for me to handle that many flags.

The basic outline of a program that makes use of SAX in Python would be like
#####################################################

PYTHON:
from xml.sax.handler import ContentHandler
from xml.sax import make_parser

class CustomHandler(ContentHandler):
    def __init__(self):
        #initialize flags and other data structures if needed
    def startElement(self,name,attrs):
        #set flags, get value of attributes etc
    def endElement(self,name):
        #clear flags etc
    def character(self,ch):
        #copy character data to any data structure if needed
ch=CustomHandler()
saxparser=make_parser()
saxparser.setContentHandler(ch)
saxparser.parse(some_file_stream)

########################################################

PS: I am still stuck with Python 2.5.2. I'm trying to keep pace by reading the changes in 2.6. I am counting on Harsh to bail me out when the need arises :p

Comments
2 Comments »
Categories
Coding
Tags
python, xml
Comments rss Comments rss
Trackback Trackback

Wuss R Us

anomit | September 20, 2008

This is the most strongly worded article I have ever come across on TMJ. Which is as manly as Prince gets.

I'm a mean motherfucker

The closest form of the so called PDAs being reported in that article I have seen in my 2+ years of stay here is hugging. Yes, nothing more than that. There is no French Lassiez Faire thing going on here, and even if it was, balls on your face if you think you have the moral high ground to complain about it.

The entire foundation around which the premise of a bunch of haggard fools going around policing people who are actually 'adults', in the legal sense of the word, is as strong as a crumbling cookie. I'm tempted to make a ridiculous looking attempt at putting across some equally damning yet very logical counter arguments that actually exist on paper as law of the Country and also accepted unequivocally across the civilized world as something called Human Rights, which...well, some people living in the medieval ages are still in the dark about.

1. The cultural sensibility marauding monster that PDA is, can also be termed as a peaceful assembly of two persons and the last time I had studied Social Sciences in school, every right to it existed in the Indian Constitution and in other countries too.

2. I touched upon this earlier too. They are adults and hence fully qualified to choose where they want to go and with whom. Do we really need a law to explicitly state this?

Since I'm not a lawyer, I can't dig out citations of some Supreme Court or an International Court judgment but hey, you get the point, don't you?

I don't know from where did this current trend of some institution, which isn't anyways legally empowered, to decide about how others go on about their lives caught on. For all the glossy promotional campaigns about this place being an 'International University Town', you'd get to see thirteen different kinds of barricades and walls at every step. Also throw into this grand concept about two dozens of illiterate security guards and a semi literate, jobless, unqualified for any kind of education 'Hostel Caretaker' who are clearly enjoying their day in the sun and making hay while it shines, and you get the perfect picture of a campus that I've no doubt other Universities abroad will be in a rat race to implement before anyone else does. India Shining indeed. What else can be a better example of a place to pursue your academic career other than this?

PS: From what I and some of my friends have got to know, our blogs and twitter accounts are being monitored by the people 'higher up'. But then, I don't belong to the clan mentioned in the post title. What I have learnt in all these years of my schooling and upbringing is to stand up to the truth, whatever it may be and I know I'm not wrong. I may not be a great orator like Winston Churchill but that's what blogs are for. :D

Comments
1 Comment »
Categories
My Life
Comments rss Comments rss
Trackback Trackback

Round robin process scheduling simulation

anomit | September 11, 2008

No big deal. Everyone has to do it once for their UNIX concepts practical work I guess. What irked me was that the teacher and some of the 'good students' were hell bent on arguing that non-preemptive process scheduling simulations do not require any kind of data regarding the arrival time of processes in the ready queue. I still don't understand how that simulates a real life scenario, that is, after the completion of a process, to which other process would the scheduler perform a context switch. Could someone point me out if I am missing something here?

Anyways, this is the code I wrote today during the practical class:

C:
#include<stdio.h>

struct processinfo

{

        int id;

        int burst;

        int arr;

};

typedef struct processinfo process;

/*checks if all the processes have finished execution*/

int check(process* p,int n)

{

        int i=0,flag=0;

        for(i=0;i<n;i++)

        {

                if(p[i].burst!=0)

                {

                        flag=1;

                        break;

                }

        }

        return flag;

}

int main()

{

        int n;

        printf("No. of processes:");

        scanf("%d",&n);

        process p[n];

        int i=0,j=0;

        int wt[n]/*the waiting time array*/,last[n]/*last[i] stores the last executed instant of the process i*/;

        for(i=0;i<n;i++)

        {

            printf("Proccess id:");

            scanf("%d",&p[i].id);

                printf("Arrival time:");

                scanf("%d",&p[i].arr);

                printf("Burst time:");

                scanf("%d",&p[i].burst);

                wt[i]=0;

                last[i]=0;

        }

        /*gah, bubble sort*/

       /*anyways we won't be doing any sorting in a real scheduler, I guess*/

        for(i=0;i<n-1;i++)
        {

            for(j=i+1;j<n;j++)

            {

                if(p[j-1].arr>p[j].arr)

                {

                 process temp=p[j-1];

                 p[j-1]=p[j];

                 p[j]=temp;

                }

            }

        }

int timequantum=2/*the time quantum*/,time=0/*running time*/;

while(1)

{

        if(!check(p,n))

                break;

    int k=0;

for(k=0;k<n;k++)

{

        if(p[k].burst!=0)

        {

                if(p[k].burst<timequantum)

                {

                        wt[k]+=time-last[k];

                        time+=p[k].burst;

                        p[k].burst=0;

                }

                else

                {

                        p[k].burst-=timequantum;

                        wt[k]+=time-last[k];

                        time+=timequantum;

                }
                last[k]=time;
        }

}

 }//end of while

for(i=0;i<n;i++)

    printf("\nWaiting time for Process %d:%d",p[i].id,wt[i]);

return 0;

}

Comments
2 Comments »
Categories
Coding, GNU/Linux
Tags
scheduler, unix
Comments rss Comments rss
Trackback Trackback

Just what I have been saying

anomit | August 10, 2008

Read this

A detailed post about the problematic mindset plaguing our society in general. Now don't go about calling it a rant, you dunce.

Some recent developments in my college that is gonna reinforce the points outlined in that post:

1. We are being literally threatened to stop carrying mobiles (and for that matter, any kind of gadgets) otherwise some badass 'Discipline Enforcement Team' is gonna conduct 'raids' and snatch those from us. No logic, no explanation needed. Shoot shoot, bang bang modern day cowboy. I don't yet understand what is it with that 'raid' terminology. Are we some kinda terrorists or anti-socials?

2. I saw a TGMC poster on the department notice board. Till now there hasn't been no announcement of it, leave alone which faculty member to contact to register for the event. Looks like the authorities are busier trying to enforce 'discipline'. I also wonder if they tried telling the IBM people that those in charge of the labs and the so called R&D centre(which now is just another magnificent building converted into a bunch of labs) are too eager to head home after 5 pm and that the college thinks students don't need internet access from midnight to 5 AM. Oh, did I forget to mention that you won't get a single fuckin day of attendance even if you managed to get to work on some project under that initiative? If someone with a Microsoft internship and another one with a fractured kneecap didn't manage to get that, what chance do you stand?

All of these just point to a single fact. They abso-fucking-lutely have nothing better to do.

The only positive development: we are being taught syscalls and my friends are taking interest in writing standardized codes and reading the man pages :D . Only if they made us write the text editor in the Systems Programming lab with ncurses for designing the interface and C instead of just that wretched Turbo C. Yeah, gotoxy() is for losers. Getty?

As for me, I am all tangled up with signals. Classes have been keeping me busy and tired but I hope to get my head around that in a couple of days from now.

Perfection is achieved only at the point of collapse -- C.N. Parkinson

Comments
1 Comment »
Categories
Uncategorized
Tags
college, fuckery, syscalls
Comments rss Comments rss
Trackback Trackback

Unparalleled Fuckery

anomit | July 24, 2008

My college decided to put out all internet access from midnight to 5 AM. The reasons haven't been made official yet. Not even a single student was consulted about it. Damn wait, you may cut that out if you include the wimpy bastards in the so-called Student Council. It is a so-called one 'coz the members aren't elected by students but chosen by the director himself. Sounds like an oxymoron, right? Almost none knows not even a single member from the council. Now, about the unavailability of internet access during the peak hours for a college student to actually work on something outside the syllabus, obviously I'm not going to explain to some idiot who barely scraped through high school what I do and deal with. It is useless talking to the authorities. I can at best label them as prehistoric dinosaurs stuck in a time warp, who think 'aengsters' are getting morally corrupted by the internet and we are all jacking off whole night long watching Jenna Jameson. Yeah, I jerk off. So? Isn't that my fucking personal choice and even more so when I'm paying for that shit of a connection. I gotta finish this fast, the clock's ticking and the connection may be switched off any time.

Only way out now, to get hold of a private broadband connection but I sincerely hope the hostel authorities would put forward their best known instance of retarded behavior and create a hell lot of problems for me.

Comments
No Comments »
Categories
My Life
Comments rss Comments rss
Trackback Trackback

mpd now playing plugin for XChat

anomit | July 6, 2008

It is 3 in the morning. Don't expect me to blabber much. Windows users, please fuck off at this point. Just give the file a py extension and move it to ~/.xchat2 so that it loads automatically at startup. Use /show to tell everyone in the channel you are playing [insert an emo band name here] and proceed to cut your wrist or let everyone know you are a real emo with the legwarmers and all. OK ENOUGH.

PYTHON:
import socket,re,xchat

__module_name__ = "mpd-np"
__module_version__ = "0.1"
__module_description__ = "mpd now playing"

def playing(word, word_eol, userdata):
    mpd=socket.socket ( socket.AF_INET, socket.SOCK_STREAM )
    host='127.0.0.1'
    port=6600
    mpd.connect((host,port))
        #welcome msg could be used to extract mpd version information
    welcome=mpd.recv(1024)
    mpd.send('currentsong\r\n')
        #get all the info about current track being played
    data=mpd.recv(4096)
    #I wont be explaining any REs
    artist=re.findall(r'Artist[:]\s[\S ]+',data)[0].split(':')[1]
    title=re.findall(r'Title[:]\s[\S ]+',data)[0].split(':')[1]
    msg='Now playing:'+artist+'-'+title
    xchat.command('me '+msg)
    data=""
    mpd.close()
    return xchat.EAT_ALL
#hooks into the show xchat command
xchat.hook_command("show",playing)

Reports of idiotic behavior go into the comments.

Comments
2 Comments »
Categories
Coding, GNU/Linux
Tags
mpd, plugin, python, xchat
Comments rss Comments rss
Trackback Trackback

Working with gnuplot

anomit | July 5, 2008

I had to plot a graph for the result of the simulation models I am running. The output happens to be something like the following for a simple model consisting of just a single HTTP server and another client requesting HTTP data with certain probability distributions that specify the number of page requests in a session and also the number of objects that would be there on a requested page. Actually it uses the dml configuration file included with the SSFNet WWW package in the test directory. This is how it looks if simulated for 3600 seconds:

199.27878718 [ sid 0 start 89.99831406 ] clnt 1 srv 2(0) #pages: 3 #objects: 28 total: 395466B seconds: 109.28047312 SUCCESS
346.0642575 [ sid 1 start 345.81315335 ] clnt 1 srv 2(0) #pages: 1 #objects: 2 total: 18603B seconds: 0.25110415 SUCCESS
1311.24547598 [ sid 2 start 901.76614728 ] clnt 1 srv 2(0) #pages: 2 #objects: 725 total: 5925458B seconds: 409.4793287 SUCCESS
1339.09795493 [ sid 3 start 1338.52968641 ] clnt 1 srv 2(0) #pages: 1 #objects: 2 total: 4977B seconds: 0.56826852 SUCCESS
1421.11860574 [ sid 4 start 1345.75319688 ] clnt 1 srv 2(0) #pages: 3 #objects: 6 total: 25174B seconds: 75.36540886 SUCCESS
1559.72102735 [ sid 5 start 1530.85835094 ] clnt 1 srv 2(0) #pages: 2 #objects: 3 total: 9565B seconds: 28.86267641 SUCCESS
1762.46745924 [ sid 6 start 1591.87139928 ] clnt 1 srv 2(0) #pages: 3 #objects: 3 total: 9898B seconds: 170.59605996 SUCCESS
2020.12789558 [ sid 7 start 1822.41333981 ] clnt 1 srv 2(0) #pages: 6 #objects: 9 total: 61346B seconds: 197.71455577 SUCCESS
2348.85181273 [ sid 8 start 2067.45385462 ] clnt 1 srv 2(0) #pages: 7 #objects: 14 total: 69341B seconds: 281.39795811 SUCCESS
2492.52192579 [ sid 9 start 2492.49153171 ] clnt 1 srv 2(0) #pages: 1 #objects: 1 total: 2606B seconds: 0.03039408 SUCCESS
2590.15405846 [ sid 10 start 2528.44871353 ] clnt 1 srv 2(0) #pages: 3 #objects: 5 total: 36481B seconds: 61.70534493 SUCCESS
2631.19590927 [ sid 11 start 2593.40280719 ] clnt 1 srv 2(0) #pages: 2 #objects: 4 total: 14987B seconds: 37.79310208 SUCCESS
2768.67779732 [ sid 12 start 2708.89820375 ] clnt 1 srv 2(0) #pages: 3 #objects: 3 total: 17770B seconds: 59.77959357 SUCCESS
3037.57726869 [ sid 13 start 2854.45071944 ] clnt 1 srv 2(0) #pages: 5 #objects: 9 total: 33623B seconds: 183.12654925 SUCCESS
3212.22081067 [ sid 14 start 3132.34843616 ] clnt 1 srv 2(0) #pages: 3 #objects: 3 total: 15702B seconds: 79.87237451 SUCCESS

I made a few regexs to parse the required data from this output like the start time, end time, bytes transferred etc etc. But then I'll save it for the next post where I'll deal with it at length and talk about what this post is supposed to be about i.e. gnuplot.

gnuplot is really a versatile tool for plotting both 2D graphs and 3D surfaces. It comes with a very small syntax set that is easy to get hang of once you start using it. I first installed it from the repos without checking the version. So even though the current stable version is v4.2.3 , the repos had v4.0 without any patches. I decided to chuck it and rather build from source. It was a real pain. I spent two hours on getting the right configuration to have the X Windows system support installed. Tried quite a lot of flags with --with-x being included every time but still it was configured without the X windows system support. In the mean time I was being helped by a certain user on #gnuplot. I was about to give it up for the day but then we had a discussion about the possibility of X11 library paths being fucked up in ubuntu. So I decided to configure with the following flags:

$./configure --with-x --with-x-includes=/usr/include/X11 --with-x-libraries=/usr/lib/X11 --with-readline=gnu
..and it was done!

There are different kinds of 2D plots in gnuplot, like lines, linespoints, points, steps etc. I was looking for something that would give me something like a bar chart for the time intervals of the different sessions. So I went for the boxes. The tricky part in plotting with boxes is that you can specify the width of each box in a separate column but the box is drawn centred around the x-axis values. This had me confused for some time before I read the help topic on boxes. So I made a minor change in my program that would put the midpoint of the interval for the x-axis values. The graph looks something like this:

Resources:
1. The demo directory in the source code. Minimal online explanation here.
2. Collection of gnuplot tutorials

Comments
No Comments »
Categories
Coding, GNU/Linux, SSF
Tags
build, gnuplot, simulation, SSFNet
Comments rss Comments rss
Trackback Trackback

One time XOR pad with /dev/urandom

anomit | June 27, 2008

I made one :) I think doing a md5 hash of the resulting ciphertext would add an extra layer of security. What do the others think of this idea? Of course, the safe storage and transmission of the XOR key becomes an issue. Check the code and see if you could come up with suggestions to optimize it. I particularly don't like the exponential order for loop at the very end. The XOR key is stored in the xor-key file in the same directory where the code is run.

PYTHON:
import sys

if len(sys.argv)<=1:
    print 'Usage: python basicsalt.py <input file>'
    sys.exit(1)

frandom=open('/dev/urandom','r')  #open the random device
fpickle=open(sys.argv[1],'r')   #open the input file in read-only mode
bytes=1024

key=open('xor-key','w') #open/create the xor-key file

picklebuf=fpickle.read() #read the input file
fpickle.close()

fpickle=open(sys.argv[1],'w')   #open the input file in write mode
                #the ciphertext is stored in the same file
tempicklebuf=''   #temporary buffer for storing the ciphertext

fileLen=len(picklebuf)
print fileLen

#a function that doesn't exactly 'add' the salt in the classical sense of the term
def addsalt(pb,sb,fileLen):
    global tempicklebuf
    for i in range(fileLen):
        tempicklebuf+=chr(ord(pb[i]) ^ ord(sb[i]))  #just plain XOR

bufsalt=frandom.read(fileLen)
addsalt(picklebuf,bufsalt,fileLen)
key.write(bufsalt)

fpickle.write(tempicklebuf)
frandom.close()
key.close()

Comments
2 Comments »
Categories
Coding, GNU/Linux, Security
Tags
cryptography, python
Comments rss Comments rss
Trackback Trackback

Tech blogging: you are doing it wrong

anomit |

Ladies and gentlemen, fasten your seat belts and get ready to be taken through a whirlwind tour through the kingdom of the self proclaimed 'tech bloggers' who profess to live, eat and breathe technology. Soon you would come to know they fart too.

Some generalized observations on the sweeping epidemic that is 'tech blogging' :

1. Someone starts a damn, fucking blog with a nice theme. Point to be noted. He could later throw around that fact and claim to be a CSS geek.

2. He starts writing vociferously about mobile phones, 'gadgets', 'latest tech news' (sic), 'tips and tricks' (did I forget to add Windows here?), 'tweaks' (o yeah, what's next? tweaking nipples video on youtube?) etc etc

3. Uses the term 'geek' atleast once while describing himself.

That is all that is there to it. Uhm..you would say how do I term it as an epidemic? Let me begin with some specific cases in the Indian blogosphere scene. Cases that would make Tim Berners Lee cringe.

--------
Case I:
--------

Ashfame tech blog

What is it about: So this guy is a tech blogger. Heck, he knows he is damn popular. He even tom toms his blog stats in a separate post.

What does his blog offer: Let us allow him to describe it himself, "I blog about blogging, tips and tricks, tutorials, hacking, hardware and reviews. A niche is less than what I blog about."

Fart factor (on a scale of 10): 9.5

Quick analysis: Looking at the first page, I see posts on Opera download, some obscure tool for creating animated gif, 'tips' on using IrfanView (aargh) and write protecting USB drives. No need to take the pain to delve dipper into the guano. Mr. Ashfame, you'd have got a 8 but for your zomg-look-i-am-a-hacker posts. Now Mr. Ashfame has 'tips' for becoming a hacker too! No wonder the old farts at AntiOnline are going to lose their jobs soon. In his md5sum post, he has a radically different view of the security of hash functions:

It is extremely unlikely for two non-identical files to have same md5sum as calculated by hashing algorithms (however the theory says something else).

Extremely unlikely, no way. The very nature of the 128-bit md5 hashing function opens it up to collisions as some researchers have already demonstrated and which I am not fully qualified to discuss. Mr. Ashfame, I have a task for you. I have a XOR encrypted C source file. Let me see you break it. This hint should be enough for you as I presume you have extensive knowledge of something even more secure than this i.e. one-way hashing functions.

--------
Case II
--------

Akshay Gandhi's tips & tricks and blah blah...

What is it about: A blog that would give you tons of info on freeware and...again...*bangs head on a wall* tips & tricks!

What does his blog offer: Again, nothing better than allowing the person himself to demonstrate it to you.

An ALL INCLUSIVE BLOG - Find trivias, graphology, Vista tips, troubleshooting, mobile secrets, mobile code, reviews, freewares, tips, tricks,legal info, law firms, legal view, jokes, interesting facts, etc...

Fart factor (on a scale of 10): 9

Quick analysis: An all inclusive blog. What more could you ask for, eh? But wait, I thought people satisfied those needs by visiting santabanta.com . Some remarkable gems from the first page: Power Defragmenter 2.0.125, Rapid Typing tutor (they still have openings for typists?) and some shit about System Restore in Vista. Seriously dude, if you need 'tips & tricks' for working on Vista you better re-evaluate your current technical knowledge base.

----------
Case III
----------

John TP

Do I need to say more?

*SIGH* See, how things get redundant after a short trip to only two blogs? Redundancy, as we have come to know, is frowned upon in the computing world. We have extremely reliable and well edited sources of information for gadgets and cellphone news, new softwares, games and OS releases, major policy upheaval by decision makers in Government and all that on the Wired, Ars Technica, Endgadget, ZDNet blogs (no, I won't be mentioning TechCrunch here) and a lot many which I don't visit but have a loyal reader base. The point I'm trying to make here is that don't fucking post just for the sake of it if you don't have anything new to add to the already vast source of information available on the same topic. Why? It gets really frustrating for a newbie who would google for something like optimizing his PC and would end up at the countless sites like the ones mentioned above. Total wastage of his bandwidth and time. If an established site has already covered the same thing, DO NOT fucking post the same thing again. (Do I sound like Brad Pitt here?)

BONUS TIP: Stop using Windows and you'd never need to rummage through such shitholes for optimizing applications. There are enough GNU and other open source tools that come bundled with all *nix OSs which would take care of such nifty matters. Case in point: iptables or Zone Alarm?

Get a cue from the blogs of the numerous FOSS developers and also programming stalwarts like Jeff Atwood. Write something that really matters, has some real content. Else, just fucking get off the tube. You are doing no good to us. Just because you have been handed an internet connection, you can't get away with swinging your fuckin badass boner like it was nobody else's business (read: posting content with 8+ fart factor).

Signing off, as the lords of code would say:

Talk is cheap. Show me the code.

Comments
6 Comments »
Categories
Blog, Coding, GNU/Linux, My Life
Comments rss Comments rss
Trackback Trackback

ISPs and RandomBigMusicCorp- FAIL

anomit | June 20, 2008

A storm of discussions and opinions has been kicked up in the online community regarding the decision of some ISPs to introduce metered access. The argument put forward by the ISPs is that while majority of the people use their internet connection for casual e-mails and browsing stuff, the smartass motherfuckers in this minority get away with downloading tons of movies, music, software etc etc even though both of them shell out the same amount for access. Don't be fooled, all their trash talk about inadequate infrastructure to handle the burgeoning demand of bandwidth is crap. They have been finding a way to deal with since the last 15 years. They would do quite well to repeat the same in the future too. If they are actually concerned about the customer who pays more yet uses less, why don't they introduce some special plan for these kind of users where they would be charged for something like per 500 MB of data transfer? That would be enough to handle your 'casual surfers'. Face it assholes, the internet is no more about just e-mail and HTML 3.1 . We have come a long way since that.

How does the rant against the big music corps figure in this discussion? Well, you would soon see how they are related. Yesterday I was listening to songs on the last.fm recommendations radio with the '80s tag. I came across a band named Kix, which was one of those countless glam metal/sleaze rock bands from L.A. who had a meteoric rise only to fade away that soon. I don't remember the track name but it was terrible shit and someone in the shoutbox said that the band sounds like a 'poor man's version of Ratt'. To put it in a word, batshit. Now, if the big music corps were to have their way, I would have been forced to buy a copy of the whole album only to be stomping over the CD after a single session of listening to it. Don't mention iTunes. I find paying 99 cents for each track equally retarded. If my internet connection was supposedly metered and I was just inching towards the 40 GB limit they imposed on my connection, I would have thought twice before streaming the song, thereby having no other choice but to buy the CD.

The point here is that both these businesses are working on concepts and models that are totally outdated and irrelevant in today's highly advanced technological society. The bands and artists have always made shitloads of money even if their albums have been a modest success at best. 'There can never be adequate compensation for an artist's efforts' is just BS. People have families to look after, kids to raise, ailing parents to tend to. They don't earn just to splurge on some airheaded diva. If RandomBigMusicCorp still plays the same stuck record, tell them to shoot the artists so that they could go to heaven and play with dollar bills and dive in pools of gold coins like Uncle Scrooge.

So here is to both of you,

fail

P.S. Haven't posted anything technical for a while. Surely will make up for it within the next 3-4 days :)

Comments
No Comments »
Categories
Uncategorized
Tags
rant, suppression
Comments rss Comments rss
Trackback Trackback

« Previous Entries

What's in

  • Parsing XML in Python
  • Wuss R Us
  • Round robin process scheduling simulation
  • Just what I have been saying
  • Unparalleled Fuckery

 

November 2008
M T W T F S S
« Sep    
 12
3456789
10111213141516
17181920212223
24252627282930

Blogroll

  • Akhshay’s blog
  • Harsh J
  • Hullap
  • LUG manipal
  • Manish Sinha
  • Sindhu S
  • Swap

Tags

aircrack assembly build college cryptography faculty fuckery gnuplot hacking mpd NASM plugin python rant scheduler simulation SSFNet stupidity suppression syscall syscalls unix xchat xml

Archives

  • November 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • October 2007
  • September 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007

License

Creative Commons License
This work by Anomit Ghosh is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 India License.
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox