Wednesday, December 27, 2006

FoxyTunes

You just have to admire the open source approach to software development. By enabling anybody access to the source code of an application you get the support all people who can think of new ways to make the application even better. If two heads are better than one, just imagine what the entire human populace is capable of.

Now the thing is, Firefox has become my default browser. It so far better than any other browser i ever used, it completely managed to change the way i use the internet. From tabbed browsing, to unbelievable amount of security in preventing pop-ups and thwarting phishing attacks, each new release only convinces me of how awesome this application really is. If you don't already use it, get it HERE.

To make things even better, it has in extensive list of extensions and add-ons that adds to its value. One such extension is FoxyTunes. This extension enables you to control your media player from within the firefox browser. It is so well done, i just can't believe that i ever lived without it. With the ability to instantly get the lyrics, album covers, track info and so much more without the need to leave your browser has only enhanced my web experience by a tremendous amount. If you haven't already tried it, you definitely should get it. This is one thing that i can recommend to any person with 100% confidince that they will thank me for it later. Get it HERE.

Tuesday, December 26, 2006

White Post for Tunisia

Hollywood Technological Catastrophies

OK, so after watching how hollywood movies rape the technological scene, i decided to compile a list of the 10 most unbelievably absurd ideas hollywood came up with over the years. With no further ado, here they are in no particular order:

1)Firewall (starring Harrison Ford): Not only is harrison ford a great linux system administrator (as shown in the first 5 minutes, when he's changing iptables rules to thwart an attack on the network), but he is also a Mac Developer. He managed to reprogram his iPod without having to learn any new syntax, APIs, or interfaces.

2)Minority Report (starring Tom Cruise): You see tom cruise in his office manipulating the computer desktop with a holographic touch activated device. If we disregard that 3D desktops aren't a thing of the future (they have been around for years now), having to work by touching and dragging icons in mid air is EXTREMELY tiring. Just imagine having to keep holding your hands up during the 8 hours you spend at work!!

3)Star Trek: You ask the computer a question and it magically understands you and responds. This is somewhat available these days, but seriously, who would want such a limited medium to convey extremely rich information? which is better for you to hear a listing of options or view a select menu in front of you?

4)Hackers: When hackers from around the world are trying to "Hack the Gibson" simultaneously, instead of dealing with each attack by itself, didn't the system administrators consider declaring a stateful firewall that would have blocked all attacks except on telnet? And then manually block or control the telnet port?

5)The Net (Starring Sandra Bullock): It's funny how every program must have a "back door", that enables the developer access to the system whenever he wishes. Didn't they hear of code review? coding standards? And why would the FBI buy a system that they can't verify?
Also, did anybody else get annoyed by the "virus" that was destroying the network did it's job by making the screen look like gibberish? looks like a bad video driver to me!!

6)Jurassic Park: The heroes are trapped in a room, dinosaurs are following them, and they need to reactivate the security system for the park. So the 12 year old girl looks at the computer terminal and declares "This is unix, i know it".
If we put aside the fact that it is extremely unlikely that a 12 year old knows unix, the girl managed to go to the high level security system, gain root privileges, and activate the security system in under 30 seconds. The only thing that comes to my mind is: WTF?

7)Independence Day (starring Will Smith): Will smith and Jeff Goldblum ride an alien aircraft and go to the alien mothership to infect it with a virus. Luckily, the alien's computer system are compatible with windows, and have the same technical vulnerabilities that allowed them to implant the virus and save the day.

8)Alias (starring Jennifer Garner): No matter what country she's in, no matter what language is being used, no matter what computer system is before here, it's only a matter of seconds for her to manipulate any computer that comes her way.

9)24 (starring Keiffer Sutherland): He's in the field, his team get the schematics for a building from an outside agency, import them to their system, then download the schematics to his PDA all without facing any kind of interoperability hassles and with impressive download speeds that are yet unattainable.

10)Any movie: Whenever there is a user authentication screen, the user first tries a username and password combination that doesn't work resulting in a huge "Access Denied" message. After a few attempts, the hero gets the correct username and password which results in a huge "Access Granted" message. This access granted message just annoys me.. who in hell would program such a lousy authentication system? if a user is authorized let them into the system, not congratulate them on their correct choice!!


Now, i know that hollywood is after entertainment value, not technical literacy, but this is just ridiculous. Also, it makes me (the developer) face end users who believe what they see on the screen, and demand things like it, or are annoyed by the fact that i can't program their microwave to monitor their pace maker, and communicate with the fridge to prepare a snack suitable for the current temperature!!

PS: If you have any additions, plz feel free to add.

Friday, December 15, 2006

Vista... Why Bother??

Well, the release of Microsoft's (M$) Windows Vista is approaching, and all people i hear are buzzing about how cool it is going to be and how they should get it. I BEG TO DIFFER!!!

Vista is not an operating system upgrade. It's not like upgrading from windows 2000 to windows XP, or from Mac OS X 10.4 to 10.5, or even from Ubuntu Linux 6.06 to 6.10.
No, Vista is a completely brand new operating system. This has many ramifications.

For instance, every line of code inside Vista was rewritten from scratch. Now that might be a good thing, but in the programming world this carries only one meaning: Trouble Ahead. You see, although windows XP is old, it also has more than 10 years of tested code inside it. All the major quirks and problems have already been ironed out. With Vista, this is simply release 1.0. This baby still needs to learn how to walk all over again. And for a company whose slogan is "Third time's a charm", i have no trust that they will remove all major dents in the new system before its release.

Also, Vista is still extremely short on the applications list. Most people don't care what operating system they are using, what they care about is the applications. And most applications written for XP will not work with Vista, or will not work very well.

Thirdly, the hardware upgrade bill attached to using all the bells and whistles in Vista is extremely hefty. Having to upgrade to 2-4 GBs of RAM, and 512 MB video card or better alone, will cost something around $500. Add the Vista license (cheapest is something around $230), and the rest of the machine parts, and you would easily jump the $1000 mark. This comes at a time where the $500 machine is popular. Not any more!!

But let's put those points aside. Maybe what we are facing is coding miracle and it won't have any problems at all. Maybe it'll run all your favorite applications right out of the box. And just maybe it won't require you to upgrade your machine or spend any dime on hardware. The most important question is this: Why should i upgrade to Vista?
If the system you have now is running the way you want it, if all your applications work just fine with your current machine, if your current hardware is good enough, Why should you even consider an upgrade?

Wednesday, December 6, 2006

Simple AJAX Tutorial

Today i was faced with the need to use AJAX in a programming project that i am currently working on. Since this was my first "real" use of AJAX, it took me some time to find a good, easy, and most importantly fast reference to get things rolling. So i decided to add my newfound knowledge, in a form that would hopefully benefit others.

PS: it is assumed in this tutorial that you already possess the knowledge for web programming.

In your web page, you need to add the following JavaScript:

/*This function creates the request object, we check if activeX is available, because Internet Explorer deals with the request object differently than other browsers */
function createRequestObject() {
    if(window.XMLHttpRequest) { // If Safari, Mozilla, Netscape, ...
        request = new XMLHttpRequest();
    } else if(window.ActiveXObject) { // If IE
        request = new ActiveXObject("Microsoft.XMLHTTP");
    }
    return request;
}

var request = createRequestObject();

/*This function sends the request, and defines the response handler. Notice that when we define the response handler, we mention the function name, we do not add paranthesis after it, nor do we pass it a parameter list. We simply define it, not call it. The open method opens a connection to the specified URL, to send the request to. */
function sendRequest(url) {
    request.onreadystatechange = responseHandler;
    request.open("GET", url);
    request.send(null);
}

/*This function is called when the request state changes. If request is complete and OK, then we process the result. */
function responseHandler(request) {
    if(request.readyState == 4) { //If request complete
        if(request.status == 200) { //If request OK
            var string = request.responseText;
            //Process response
        }
    }
}

All the previous code would be run and executed on the client machine. You just need to connect the sendRequest function with an event in your page, such as onClick button, or onChange select.
On the server side, you simply need to create a page which request.open connects to, read the parameters in your GET request, do some processing, and echo the results.

Of course, AJAX has so much more to it than this rather simple example. But this is meant as a starting point, to get things rolling fast. AJAX contains so much more, from using POST to send the request, to accepting XML as a response. The only limit is your imagination!!

--
Links i used to gain this knowledge:
1- Rasmus' 30 second AJAX tutorial
2- Mozilla Developer Center

Tuesday, December 5, 2006

Book Tag

This is a very interesting idea i got from this post by ALGHOUL. Grab the book closest to you and go to page 123. Scroll to the 5th sentence, and post the next 3 sentences. Name the book and author, then tag 3 people to do the same.

Here is what is closest to me:
"The internal organization of a digital system is defined by the sequence of micro operations it performs on data stored in its registers. The general purpose digital computer is capable of executing various micro operations and, in addition, can be instructed as to what specific sequence of operations it must perform. The user of a computer can control the process by means of a program."

Computer System Architecture by M. Morris Mano.

Now, i'm supposed to tag 3 people. But i won't do that. I like to hear from all of those that read books, so please consider yourself tagged, and let us hear what you are reading :)

Ignorance all around us

It is unbelievable what people would do out of ignorance. Someone would post a topic on a public site without first researching the material that they posted, it turns out to be extremely vulgar and pornographic and leads to their job termination. Another would "advise" a friend to go forth with a business transaction, only to have the later crash and burn because of the ill advise. A third would choose a career path, or education path just because it's the "trend" these days, and suffer 20 years of having to work in a job they can't stand.

Such people make me feel sorry for them. None of those people would have faced any kind of hardship have they even stopped for a second to consider what they are doing. A simple Google search would have provided them with enough information to make an informative decision.
But alas, not all people have the capibility to pull the brakes and think "wait a second, what am i doing? is it sensible? would it benefit me?"

Ah well, i guess that we NEED those people. Because after all if we didn't have our village idiots, ordinary people and wise men would be harder to spot, right?

Monday, December 4, 2006

My First Blog Post

So, I finally decided to take the plunge and start my own blog. Hopefully, this will be a technically, socially, and politcally informative blog. But let's take it one step at a time.

See you soon.