Monthly Archives: September 2009

The Truman Show !!!

I saw this wonderful movie some time ago , and really the beauty of this movie forced me to see it again and again . JIM CARREY has dominated the movie all the time . He has proved that why his name is always taken with a lot of respect in cinema all over world .

Here comes it’s short synopsis –

The film is set mostly in a town wholly dedicated to a continually running television show. All of the people present in the town are actors or film crew except protagonist Truman Burbank, who is unaware that he lives in a constructed reality filmed for the entertainment of those outside. Central characters simulate friendship or familial relations to Truman.

Truman was chosen out of five unwanted babies to be a TV star, whereupon film producer Christof ordered built a gigantic studio to encapsulate Seahaven, the artificial town in which Truman lives, believing himself to be part of a genuine neighborhood. The enclosed studio allowed the producers, directors and crew to control every aspect of Truman’s environment, including the weather.

To prevent Truman from trying to escape and discover the truth underlying his artificial world, his father is “killed” in a staged boating incident so as to make Truman afraid of water. Because Seahaven appears to be an island, this fear removes Truman’s every chance of escape. Despite Truman’s staged relationship with his wife Meryl, he desires to meet and court the scene-extra called Sylvia, who is removed from the cast by the producers while trying to explain to Truman the true nature of his life. In the thirtieth year of his life, Truman begins to realize the unrealistic routine of his world and tries to escape Seahaven.Along his path to truth and escape, Truman encounters obstacles placed in his way, including choreographed traffic jams, the inability to arrange any trips, sudden breakdowns of transport, a non-existent nuclear meltdown, and an artificially created hurricane on the “ocean”. He finally reaches the edge of the constructed reality and exits via a door in the wall, cheered on by an audience of millions (including Sylvia). Christof finally talks to Truman from the clouds. He tries to convince Truman to stay. Truman, however, says “In case I don’t see you, good afternoon, good evening, and good night.” He bows to his audience and steps into the real world through the door.

snap from movie –

In case I don't see you, good afternoon, good evening, and good night

In case I don't see you, good afternoon, good evening, and good night

Leave a comment

Filed under My silver BOX !

Little-Endianism and Big-Endianism , know what your system follow !!!

Hello friends ,

This is not a new thing for most of you , but still I am trying to enlighten this topic .

I’ll focus mainly on two things –

1.How can I determine whether a machine’s byte order is big-endian or little endian?
2. How can we convert from one to another?

For above queries , first you need to know Little Endian and Big Endian .

Little Endian means that the lower order byte of the number is stored in memory at the lowest address, and the higher order byte is stored at the highest address. That is, the little end comes first.

For example, a 4 byte, 32-bit integer
Byte3 Byte2 Byte1 Byte0
will be arranged in memory as follows:

Base_Address+0 Byte0
Base_Address+1 Byte1
Base_Address+2 Byte2
Base_Address+3 Byte3

Here base address may be any valid address of location .

Intel processors use “Little Endian” byte order. That’s why most of us use little endian systems .

Big Endian means that the higher order byte of the number is stored in memory at the lowest address, and the lower order byte at the highest address. The big end comes first.

Base_Address+0 Byte3
Base_Address+1 Byte2
Base_Address+2 Byte1
Base_Address+3 Byte0

Motorola, Solaris processors use “Big Endian” byte order.

Now with the help of following code you can find out that which endianism your system follow !

int main()
int num=1;
if(*(char *)&num==1)
printf(“System follows Little Endian \n”);
printf(“System follows Big Endian \n”);

return 0;


So friends run this code on your machine .

Now for second query we have a function which converts a number from one endian to another .

And here we go –

int convert_endian(int a)
int byte0,byte1,byte2,byte3;
byte0=(a & 0x000000ff)>>0;
byte1=(a & 0x0000ff00)>>8;
byte2=(a & 0x00ff0000)>>16;
byte3=(a & 0xff000000)>>24;
return (byte0<<24 | byte1<<16|byte2<<8|byte3<<0);

The explanation of this code –

Code assumes 32 bit architecture and store all the bytes (4 in number) into separate temporary integers .. also ensure to have all the 8-bits are at their LSB’s
now return the number formed by concatenating of byte’s in reverse order .. this has been achieved in the code by ORing the various bytes shifted to the appropriate positions.

Hope this will help you to know your system better ! 🙂

Leave a comment

Filed under Tech-Bowl

Why is Ubuntu the most popular distro?

I just came across a discussion on Reddit why Ubuntu is the most popular distro? Everyone who comes to know about Linux first hears about Ubuntu. Why is it so? Why do newbies feel like home when they try out Ubuntu? Sure! It has its own set of problems and isn’t perfect, that doesn’t stop it from making it the leader.

Here is the dicussion going on Reddit (Linux)

The first answer clears the conception, am shamelessly copying the answer so that people can read it here-

Go to that link and read the rest of the comments too. It’s really an eye-opener.

Neutrality Ubuntu is a self-sustaining non-profit organization. Canonical does offer commercial support, but they do not spent the 10 million that Mark put into the Ubuntu organization. Aspects and features that have a direct commercial advantage for Canonical are kept separate and are not included in the main distribution. What they add to Ubuntu is always opensource and competitors are free and encouraged to pick it up. (and often they do)

Transparency The complete proccess is open for everybody to participate. Not just packaging, but creating specs, brainstorming, discussions, etc. Everybody can follow and/or participate. If you think something is lacking and you have the skills to fix it, you can maintain that project in sync with everything else. And if it’s a big contribution; you will get free plane tickets to the live meetings, etc.

They polish the learning-curve, not the system The focus of Ubuntu is not a system your mother can use, but a system that teaches you how to set it up for your mother. The learning-curve of system administration in Ubuntu is much more thoughout than the actual GUI interfaces. This includes documentation, tweaks and intelligent defaults.

Their marketing targets casual users using opensource ideals They are the poster-child of free software. It’s not in your face radical extremist propaganda, but rather subtle honest compassion that they use to market it. Not in geek-speak, but in human language. Take a look at the ubuntu promise at the front page of .. some friends (that are casual users) explain their love for Ubuntu as “it’s just a very sympathetic project”. Which is a much more emotional assessment compared to the “we are no longer suppressed by M$ nazi’s with their vendor locking and patent trolls”

They build the community first and then the project They chose a mature, almost gay hippy vibe. This keeps the zealots away. And because the adoption rate stays high; the majority of ubuntu users are always new users. The majority of people on the forums are always users with 1 to 3 years of experience. They are still eager to share their knowledge and haven’t become such geeks that they use xmonad or compile their own kernel. Again, this was all intentional.

They are loyal to upstream They don’t diverge from upstream too much. The choices of GNOME/KDE/Linus are all respected; they have a strong tendency not to want to change defaults. They also embrace new technology, even when it’s not ready yet, but needs the attention and bug reports. They want to be, in Marks’ words, “upstream’s rock”. They filter and triage the thousands of bug reports by ordinary users into actual useful bug reports that are then posted upstream. Some projects (debian) do complain that Ubuntu is not cooperating enough. Yet i’m quite sure, that drowning those excellent upstream developers with the noise that launchpad gets wouldn’t be very productive for anybody.

They don’t misuse their position in the Linux ecosystem They intentionally don’t make it easy to add binary repositories and they intentionally break binary compatibility with updates. Because given their position a lot of commercial vendors and hardware suppliers would prefer to just support Ubuntu with binary drivers and software; thereby hurting all the other distributions. This keeps the choice to NOT use Ubuntu alive, and that attitude should demand more respect from the rest of the opensource ecosystem than they are currently getting.

They are predictable They want to play the part of gate-keeper for the complete free software ecosystem. One of the ways to do this is too have regular scheduled released. They are already in sync with gnome and chances are high for KDE to also jump into ship with this schedule. More and more are we seeing other vendors (like Red Had and SUSE) pick the same technology and the same releases as Ubuntu does. And rather than acting all ‘you stole our thunder and our patches’ they are actually welcoming and encouraging the ‘competitors’ to do this. They are becoming the heart-beat of the free software world.

They compete with Microsoft and Apple, not other linux distro’s This tactical choice explains a lot of points above. Why they welcome integration, synchronization and cooperation with other distributions. How to prevent divide and conquer in the linux ecosystem. More linux users is good for everybody. Not everybody stays with Ubuntu, but the 99% of all new linux users of the last 3 years, have started with Ubuntu. That’s the key here. And they aren’t just users; they have become advocates for free software. Some will start using it professionally. This benefits Red Hat and SUSE just as much.

1 Comment

Filed under Linux

New way of listening the song !

Hello friends ,

Today I was just trying to know that is it possible to view the lyrics while playing a song in LINUX . As i had found plug-in for some music players in windows for the same purpose .

Well , then I tried Rhythmbox and found that It has already plug-in to view the lyrics of the currently playing song . But you have to enable it as it is disable by default .

To make it enable , first open the rhythmbox  , go to edit->plugins-> and then check the box of song lyrics . So now to view the lyrics go to view->song lyrics OR just use the short cut ctrl+L. But make sure you’ll have to take the net connection for viewing the lyrics .As most of the lyrics are fetched from .

Here is a screenshot demonstrating the use of this lyrics viewer –

rhythmbox lyrics viewer

To add song lyrics manually :

If all of the website failed to find lyric for your song(misstyped tag), you can check & change misstyped song title & artist name by right clicking on the selected song, select ‘Properties’. At ‘Basic’ tab, you can edit & change the song title, artist, album etc.(Tips : Exact song title & artist spelling can improve search result)

If the lyrics still unavailable & you want to add your own lyrics, select ‘Lyrics’ tab & click ‘Edit’, paste/write the lyrics & Save it…

So friends, don’t stop the music !!!

Leave a comment

Filed under Linux

Why Linux is better !

Many newbies think that why they should move to the world of linux . So for them I am representing some facts , and after knowing them , I can bet , you can’t wait to try linux on your loving machine .

So Here we go –

1.Forget about viruses

This was one of the basic need of mine due to which I moved to linux.

Linux hardly has any viruses. And that’s not like “Oh well, not very often, you know”. That’s like “If you’ve ever heard of a real Linux virus, please tell me”. Of course, a Linux virus is not impossible to get. However, Linux makes it very hard for this to happen, for several reasons:

  • Most people use Microsoft Windows, and pirates want to do as much damage (or control) as possible: therefore, they target Windows. But that’s not the only reason; the Apache web server (a web server is a program located on a remote computer that sends web pages to your browser when you ask for them), which is open source software, has the biggest market share (against Microsoft’s IIS server), but it still suffers from much fewer attacks/flaws than the Microsoft one.
  • Linux uses smart authorization management. In Windows you (and any program you install) usually have the right to do pretty much anything to the system. If you feel like punishing your PC because it just let your precious work disappear, you can go inside the system folder and delete whatever you want: Windows won’t complain. Of course, the next time you reboot, trouble begins. But imagine that if you can delete this system stuff, other programs can, too, or just mess it up. Linux doesn’t allow that. Every time you request to do something that has to do with the system, an administrator password is required (and if you’re not an administrator on this system, you simply can’t do it). Viruses can’t just go around and delete or modify what they want in the system; they don’t have the authorization for that.

2.Don’t pay $300 for your operating system

And friends don’t copy  them illegally .

You’re probably saying to yourself : “Oh, I didn’t pay for Windows”. Are you absolutely sure ? If your computer came with a copy of Windows, then you paid for it, even if the store didn’t tell you about that. The price for a Windows license amounts to an average of one fourth of each new computer’s price. So unless you obtained Windows illegally, you probably paid for it. Where do you think Microsoft gets its money from?

On the other hand, you can get Linux completely free of charge. That’s right, all these guys all around the world worked very hard to make a neat, secure, efficient, good-looking system, and they are giving their work away for everybody to use freely (if you wonder why these guys do such things, drop me an email and I’ll try to explain the best I can 🙂 ). Of course, some companies are making good business by selling support, documentation, hotline, etc., for their own version of Linux, and this is certainly a good thing. But most of the time, you won’t need to pay a cent.

3.Too many windows? Use workspaces

Weird situation when you open too many windows in Microsoft’s windows . [:P]

Here we have workspaces to avoid this situation.

Workspaces is a feature I would never trade for anything else. You probably only have one screen, right? Try Linux, and you have four. Well, you can’t actually look at the four of them at the same time, but this doesn’t matter since your eyes can’t look in two directions at once, right? On the first screen, lets put your word processor. On the second one, your instant messenger software. On the third one, your web browser. So when you’re writing something in your word processor and you want to check out something on the web, no need to review all your windows to find your browser, stacked all the way behind the others. You just switch to your third screen and voilà, here it is.

windows problem solved !
windows problem solved !

hat’s your “workspace switcher”. You can see it has four (virtual) screens, but you can have more than this (I use 12 of them, but some people have many more). The one on the left is highlighted: it’s the current one. To switch to another one, just click on the one you want (each one of them shows a small preview of the windows they contain: in this case the three others are empty), or use a keyboard shortcut.

4.Use MSN, AIM, ICQ, Jabber, with a single program

You may have accounts for several instant messaging services, such as MSN, Yahoo, ICQ, Jabber, AIM, etc. While running Windows or Mac OS X, you probably need one program to connect to each one of those : MSN Messenger for MSN, ICQ for ICQ, etc.

With Pidgin, the instant messenger for Linux (it exists for Windows as well, and for Mac OS X with the name “Adium”), you can connect to all these services at once, with this one program, and see all your buddies at the same time.

Enjoy to be in touch with your friends atonce in a single window !
Enjoy to be in touch with your friends atonce in a single window !

5.Enjoy free and unlimited support

One of the great assets of the Open Source community (and Linux in particular), is that it’s a real community. Users and developers really are out there, on web forums, on mailing lists, on IRC channels, helping out new users. They’re all happy to see more and more people switch to Linux, and they’re happy to help them get a grip on their new system.

So if there’s something you don’t understand, a program that doesn’t behave the way you would expect, or a feature that you can’t seem to find, don’t hesitate to go and ask for help. If there’s somebody near you (family? co-workers?) who is using Linux, he or she will probably be happy to help you out. Otherwise, just go online and you’ll find literally thousands of places where nice people will answer you and walk you out of your problem most of the time: geeks actually are very nice people, if you ask your question politely. Just type “linux help” (or replace “linux” with whatever distribution you chose — see the install section) in Google and you’ll undoubtedly find everything you need.

6.Why does your Windows get slower day after day

Windows has a number of design flaws, resulting in it becoming slower and slower and not lasting very long. You’ve probably heard more than once someone say “My computer is getting sluggish, I’m gonna reinstall”. Reinstalling Windows solves the problem… until next time.

You may think this is just how computers work: they’re very new technology, and not really stable yet. Well, try Linux and you’ll be surprised. Five years from now, your system will be just as fast and responsive as the day you installed it, not to mention that you won’t have any viruses, adwares, trojans, worms, etc., that would force you to reinstall anyway.

I have managed to convince many people to switch to Linux, while keeping Windows on their hard disk, because they needed to use some piece of software that Linux doesn’t have (eg Autocad), so they use both systems. Since the day they switched, most of them have reinstalled Windows about once in a year or two; but Linux didn’t let them down, and is still running perfectly well and is still snappy today.

Linux lets you spend more time working, less time reinstalling over and over again.

7.Need new software? Don’t bother searching the web, Linux gets it for you

If you want to check out a new piece of software in Windows, you’ll need to:

  1. Search the web to find which piece of software suits your needs.
  2. Find a web site that allows you to download it.
  3. Maybe pay for it.
  4. Actually download the software.
  5. Install it.
  6. Sometimes reboot your computer.

Whew, that’s a lot of work to just try out something new!

With Linux, everything is much simpler. Linux has what is called a “package manager”: each piece of software is contained in its own “package”. If you need some new software, just open the package manager, type a few keywords, choose which software you want to install and press “Apply” or “OK”. Or you can just browse existing software (that’s a lot of choice!) in categories.

Here I just typed “mine game” to search for a mine sweeper (actually, I already had one coming with my Linux, but anyway). If I want to install a new program, I’ll just tick the checkbox on the left, and click “Apply” (“Appliquer” in French – which is greyed out for now, since there is nothing to be installed yet):

Synaptic package manager
Synaptic package manager

8.Why copy software illegally if you can get it for free

So, you’re perfectly clean, you have *cough* purchased a license for all the software you’ve ever used *cough*, and nobody can bother you about this? Well, if that’s the case, congratulations 🙂

However, for most people, let’s be honest, illegally copied software is very common. Copying Adobe Photoshop instead of buying it probably doesn’t let you have nightmares. But are you really confident that you won’t ever have trouble for that? Not so sure, huh… Software makers are progressing and finding more and more ways to track down illegal owners, and since more and more people tend to have broadband (permanent) connections, they might add an online functionality on the software that will control and verify your copy each time you launch it.

If you run Linux and install free software, you won’t have to worry about this ever again! Most of free (as in free speech) software is free (as in free beer). You can find a free replacement for most of the commercial software out there. They might lack some of the advanced functionality, but they’ll be more than enough for most people. Here’s a list of some commercial software, and their open source equivalents :

Commercial Open source Exists on Windows?
Adobe Illustrator (~$500) Inkscape Yes
Adobe InDesign (~$700) Scribus Yes
Adobe Photoshop (~$600) The GIMP Yes
Adobe Premiere (~$800) Kino, Cinelerra No
Adobe Reader (free) Evince, Kpdf, GV No
Apple iTunes (free) AmaroK, Rhythmbox, Banshee No
Autodesk 3ds Max (~$3500) Blender Yes
Autodesk Maya (~$7000) Blender Yes
Kazaa (free) aMule, eMule Yes
Microsoft Excel (~$200) OpenOffice Spreadsheet Yes
Microsoft Internet Explorer (free) Firefox, Konqueror Yes
Microsoft Office (~$400) OpenOffice Yes
Microsoft Outlook (free) Thunderbird, Evolution, KMail Yes
Microsoft Powerpoint (~$200) OpenOffice Presentation Yes
Microsoft Windows Media Player (free) Mplayer, VLC, Totem, Kaffeine, Xine Yes
Microsoft Word (~$200) OpenOffice Word Processor Yes
MSN Messenger (free) Pidgin, Kopete, aMSN Yes
Nero (~$100) K3b, Gnomebaker No
Palm Desktop (free) Gnome-Pilot, KPilot No
Quark XPress (~$800) Scribus Yes
QuickTime Player (free) Mplayer, VLC, Totem, Kaffeine, Xine Yes
Winamp (free) AmaroK, Rhythmbox, Banshee

9.Are your tired of restarting your computer all the time

Have you just upgraded one or two little things on your Windows system with “Windows update”? Please reboot. Have you just installed some new software? Please reboot. Does your system seem unstable? Try to reboot, everything will probably work better after that.

Windows always asks you to restart your computer, and that can be annoying (maybe you happen to have a long download going on, and you don’t want to interrupt it just because you updated a few pieces of your system). But even if you click “Restart later”, Windows still keeps bothering you every ten minutes to let you know that you really should restart the computer. And if you happen to be away from your computer and you didn’t see the question, it will happily reboot automatically. Bye bye long download.

Linux basically doesn’t need to restart. Whether you install new software (even very big programs) or perform routine upgrades for your system, you will not be asked to restart the computer. It is only necessary when a part from the heart of the system has been updated, and that only happens once every several weeks.

Do you know Internet servers? They’re the big computers that answer you when you ask for a web page, and send the information to your browser. Most of them run Linux, and since they need to always be available (a visitor could come anytime), they aren’t restarted very often (services aren’t available while the system is starting). Actually, many of them haven’t restarted for several years. Linux is stable, it runs perfectly well without restarting all the time.

You’ll probably not let your computer stay on for several weeks but the point is: the system won’t bother you with restarting all the time.

10.Reporting bugs

If you find a bug in Windows, you can basically wait and pray that Microsoft will fix it fast (and if it compromises your system’s security, you would have to pray twice as hard). You might think that reporting that bug to Microsoft (so that they can fix it more quickly) must be easy. Well, think again. What if Microsoft doesn’t even notice the bug ? Well then, let’s hope the next version of Windows will fix it (but you’ll need to pay another few hundred bucks).

Nearly all open source software (including Linux distributions) have a bug tracking system. You can not only file bug reports (and you’re encouraged to do so !) explaining what the problem is, but you can see what happens next : everything is open and clear for everyone. Developers will answer, they also might ask a little extra information to help them fix the bug. You will know when the bug has been fixed, and you will know how to get the new version (still for free, needless to say). So here you have people taking care of your problems, keeping you informed about it, and all that for free ! If the problem is solved on your system, it will be on everyone else’s : it’s in everyone’s interest to work together to make software better. This is how open source works.

  • More eyes make fewer security flaws. Linux is Open source software, which means that any programmer in the world can have a look at the code (the “recipe” of any program), and help out, or just tell other developers “Hey, what if blah blah, isn’t this a security flaw?”.

    Filed under Linux

    Raise Your voice !

    Hello folks ,

    The next one in chart is “RAISE YOUR VOICE”. Movie of singer/actress Hillery Duff.

    Hillery duff

    Hillery duff

    A teenage girl, Terri, has a passion for music. School’s out and she wants to spend the summer at a performing arts academy in L.A. She is encouraged by her mother and brother but has a hard time convincing her father, who is a little rough around the edges. Things go bad when she sneaks her brother, Paul, out to a concert and they both end up in a car crash. Terri survives but Paul was less fortunate and he died. Terri was devastated and she decides to quit music, but with a little encouragement and a sly plan from her family (except her father) she decides to go ahead to L.A. Noone is nice to her at the academy at first but gradually they got better and she made some friends; Kiwi, Denise and Jay whom she starts dating after awhile. She also meets some bullies; Robin and her friends. Throughout her time there, she learns that her brother is the reason she got accepted in the first place. She gets closer to Jay, while continuing to lie to her dad. Haunted by her brothers death, her musical talents intensify.

    A snap from movie :

    raise ur voice

    raise ur voice

    Leave a comment

    Filed under My silver BOX !

    Byte packing !

    Hello friends ,

    I was studing C++ late in night and I faced a little weird situation . I saw a code as follows:

    class check
    int i;
    float j;
    char k;
    int main()
    check c;
    return 0;

    As I was expecting the output 9,9 , but it didn’t give the same on my linux machine.

    And then I came to know that byte packing is done here .

    Linux  being a 32-bit OS , so the object would be aligned on a 4-byte boundary.

    Hence I got the output 12,12.

    Isn’t it memory consuming ?

    Well , we can overcome from this situation by using pragma.

    We can force the alignment on a 1-byte boundary. To do this , we have to use

    #pragma pack(1)  just before the class declaration.But friends , one more thing is still left, you can’t use #pragma pack with any random number. The number in the paranthesis must be a small power of two. Otherwise you may get the warning stating the same.

    So don’t wait , open your text editor and try this . ♥

    Leave a comment

    Filed under Tech-Bowl