J-F Bilodeau's Blog @ chronogears.com

Friday, April 25, 2008

Control Panel for the Eee PC

This week, I wrote a small Eee PC control panel that takes advantage of the wonderful eee kernel module. The control panel runs in the background and is available through the system tray. Pointing on the icon gives the general status of your Eee PC. A click on the icon will bring up the actual panel. From there, you can control the fan, the front-side bus (overclocking) and the voltage (from what I can understand).

Obligatory screenshots:
The system tray icon & tooltip
Eee PC Control Panel Tooltip
The control panel
Eee PC Control Panel

The control panel is written in Gtk+, and works great on my eeeXubuntu. I would assume that it works fine on the default Xandros install or even (K)ubuntu. From start to end, the control panel was created on the Eee PC, proving that it can be used to get actual work done.

For the convenience of Debian or Ubuntu users, I've create a deb package. Otherwise, a tarball is available with a pre-compiled version of the control panel as well as the full source code. Of course, it's all GPL ;) Please copyleft.

eeectl.deb
eeectl.tar.bz2

Before you install the control panel, make sure you install the eee kernel module available at http://code.google.com/p/eeepc-linux/. Detailed installation instructions are available at http://wiki.eeeuser.com/howto:overclockfsb.

This is a first for me in many ways, so please forgive any stupidity or ignorance on my part. I've used Gtk, Glade and GkSu APIs for the first time, and I've created my first .deb package. I'm more than willing to learn from any guru who may find improvements to my little application.

Of course, usage of the Eee PC Control Panel is entirely at your own risk. Though I use it on my own machine, I cannot be held responsible if you fry or brick your little machine.

Hope you enjoy!

(Before you ask, there is no Windows version, nor do I intend on creating a Windows version. For starters, I'm not willing to buy a Windows license for my Eee PC. Someone else can take care of that)

Labels: , , , , , , , , , , , , ,

Monday, April 21, 2008

Beware the Microsoft Poison Pill

As someone who uses mostly free and open source software, I can't help but be wary and cynical of Microsoft's position toward open standards.

If you are wondering why many of the members of the open source community feels that way, here are some facts:

Microsoft is well known for their Embrace, extend and extinguish (EEE) tactic. The moment a standard comes out that is supported by the industry, Microsoft launches their old tactic. They will 'adopt' the standard. Make changes to it that will only work with their software, ensuring that the standard becomes a Microsoft-only standard. Then, when the competition is mostly dead, they drop support for it.

Here are some notorious examples:
  • Refusing to support CSS standard for nearly a decade to ensure that webpages had to be formatted specifically for Internet Explorer.
  • Attempting to break Java's write-once-run-anywhere promise by adding Microsoft-only extensions.
  • Support for Unix applications using POSIX
  • Support for OpenGL to which Microsoft created a competing standard: Direct3D.

Each of the above technologies were once embraced by Microsoft, and most of them have been mostly abandoned. There are many more examples.

Another notorious tactic is to release multiplatform products to accelerate their acceptance as a 'standard,' then abandon support for those products. Examples include:
  • Internet Explorer for the Mac and UNIX.
  • Windows Media Player for the Mac
  • 'Sponsoring' Silverlight on Linux through Moonlight.

In the words of PJ from Groklaw, 'People aren't as dumb as Microsoft needs them to be' and I'm very thankful for that. Sure, there are folks that are strong partisans of Microsoft, paid or not. However, I think that the majority of the world is starting to realize that Microsoft is not all the gold and glitter they pretend to be. The EEE tactic is starting to backfire at Microsoft. For example, Opera has recently filed a lawsuit against Microsoft. In their press release they make mention of the "Embrace, Extend and Extinguish" strategy by name.

But EEE is not the only tactic that Microsoft uses, especially recently. I may not be a fan of Microsoft, but I don't think they are stupid. They are not where they are today in the marketplace out of blind luck (neither are they where they are because of technical superiority). The other tactic used by Microsoft which infuriates me is their total refusal to embrace standards. Be careful, I'm talking about embracing, not extending. Microsoft has split the market countless times by creating their own proprietary standards.

Examples of established standards Microsoft is refusing to support are:
...and the list goes on.

Some may argue that to remain competitive, Microsoft should not have to adopt competing technologies, but that's a fallacy. For starters, many of these standards existed before Microsoft created their competitors. Also, if Microsoft is not required to support 'competing' standards, their competitors should not be required to support Microsoft's proprietary standards either. Hint hint: Mono & Moonlight.

The latest trumpet blow from Microsoft is Open. You've got the Office Open XML, the Open Specification Promise, Microsoft Open License, Microsoft Open Value and even (GASP!) the Open Source Heroes. Now, how many of these so-called open initiatives actually are compatible with the free/open source software philosophy? As usual, Microsoft dances around the real issue: GPL compatibility.

So, how is this new tactic different from EEE? It's not. And that what I want people to realize. Microsoft is in the stage of Embracing and Extending open source. They are attempting to create a powerful divide between the 'Microsoft Open Source' and real free software (à la GPL) so they can move in for the Extinguish stage. I cringe every time Microsoft uses the word 'open' just as I cringe when someone pronounces my first name like that of a popular denim wear. It's not right to my ear. It's an abuse of the language that I'm familiar with. Furthermore, unlike Alanis Morrisette's poetic use of the word ironic, Microsoft is purposely muddying the water of the language to spread a thin layer of FUD jam to conceal their poison pill.

So, next time Microsoft slaps together a marketspeak sentence with the word open strewn in, look up Embrace, extend and extinguish, and think twice before you hop on the bandwagon, because it is not going in your direction. The Microsoft Open Bandwagontm is headed in one direction only — towards 1 Microsoft Way, and the ride can be very bumpy.

Labels: , , , , ,

Sunday, April 20, 2008

Discrimination Against Linux Is Discrimination

"This gas station only serves Ford and GM vehicles. Yes, the gas works in your Honda, but we will not serve you."

"This CD player only supports CDs from Sony or BMI, Yes, your United CD would work, but we won't play it."

"This website only serves Linux or MacOS X. Yes, your operating system will work, but we won't let you view it."

How does discrimination feel? I feel fortunate that I come from a country when discrimination against race, religion or gender is protected by the constitution. I've spend most of my life ignorant of racism, and I'm very happy about that.

However, going to a website, and being told that I cannot use it because I'm not using the 'browser of choice' or the 'operating system of choice' is very insulting — especially when the website works fine with my browser and operating system. This gives me an idea of how discrimination and racism must feel.

Dilbert.com recently entered a major overhaul. That's not a problem. What's a problem is that I was greeted with the message 'Windows 2000, Windows XP, Windows XP Media Center 2005, Mac OSX 10.3 or Mac OSX 10.4 is required to view this page.'

If you read any of my posts, you know that I run mostly Ubuntu Linux & Firefox. Thus, I was unable to enjoy part of the website. Now, before you gripe and say that Linux and Firefox do not have the capacity necessary to present the website, read on.

As someone who has developed a number of websites, I get suspicious when I'm told I can't use the site with my present configuration.

Should you be discriminated against, here are tips to help you.

Tip #1: If you are discriminated against, yell. The worst thing that you can do is decide "I'm never going back to that site." You are doing a disservice to yourself and to the site owner. Take a moment to use their comment or feedback page to tell them what you think. This is important. Some site owners may not realize the damage they are doing to their site. Help yourself by helping them. If they refuse to hear you, then leave, or try tip #2.

Tip #2: Use Firefox with the User Agent Switcher add-on. This add-on allows you to 'pretend' that you are a different browser on a different operating system. Using the agent switcher, I was able to use the section of the Dilbert's site by telling the site that I'm running (GASP!) Internet Explorer 7 running on Vista. Of course, I promptly wrote a (sorry to say) nasty message to the site telling them what I thought.

Tip #3: Don't switch! As long as your browser supports (most) of the W3C's recommendation, there is no reason for you to bow to discrimination. You have a right to choose your browser and your operating system.

I may disagree strongly with the browser that you use, but I will defend to the death your right to use it.

Labels: , , , ,

Saturday, April 19, 2008

Poking a bit of fun at Windows Vista

I was googling stuff while preparing my next article, when I came upon these two hilarious YouTube videos.

The first one shows how desperate Microsoft is to sell Vista to the enterprise market. The next is just too plain hilarious.

Hope you enjoy!



Labels: , , , ,

Friday, April 18, 2008

If it breaks, who do I blame?

A question I get in almost every seminar I present on topics like open source or Linux is: if the product fails, who can I yell at?

In other words, they are looking for a massive, faceless corporation they can call to complain (and sue). In the open source/Linux world, who can you scream at?

I think it's a valid concern ranging from home users to operators managing the information technology infrastructure of million dollars businesses. But is free software really that much of a risk compared to proprietary software?

If you download and install any piece of software licensed with the GPL, you will notice that the license boldly states that the software comes with no warranty whatsoever. In other words, if it breaks, you have no one to sue. Should you go back to proprietary software then?

If a warranty and support is the only reason to use proprietary software, well, you're in for a nasty surprise.

Let's take a look at a couple of commercial licenses:

To paraphrase the Microsoft Windows Home edition EULA, you have no warranty. Should the software not meet your needs, you have 90 days to ask for a refund. Should it cause your computer to meltdown, your claim is 'limited to the greater of the actual damages you incur in reasonable reliance on the Software up to the amount actually paid by you for the Software or US$5.00.'

I would love to peak at the Microsoft Office 2007 License, but it's in an EXE file. Strange that you need Windows to be able to see a license. Oh well, if Microsoft wants to be incompatible with the rest of the world, that's their choice.

The Adobe Photoshop CS3 license is not much more promising. Again, you have 90 days to ask for a refund. After that, you're on your own.

I'm assuming that if you feel that running proprietary software is preferable over open source, then you probably pay for an anti-virus. Here's the McAfee EULA. Aside from the warranty lasting only 30 days, the rest sounds awfully familiar. I don't know about you, but after a while, all licenses starts to sound the same, don't you think?

Just for giggles, let's take a look at one more license from a company that 'thinks different.' Can you guess who? Here's a link to their licenses. Any surprises over here? Not in terms of warranty, but looking at section 2.B, there's a mention of open source software included with the product. So, it seems that some software vendors do take a byte out of the forbidden fruit called open source.

So, are you still convinced that proprietary software offers better protection? But what about service and support agreements, you say? Microsoft will happily lighten your wallet in exchange for a phone number that you can call if you're up the creek without a paddle.

Here's the kicker. If you are in a situation where support is a requirement, that is readily available to you. You need help with your Ubuntu setup, call Canonical. You heard that PHP is a great web development language but want support, call Zend. What's a website without a database in the back end. Let's install MySQL and call Sun Microsystems for a support agreement.

If this is too many companies, you could look at one-stop single-vendor support from shops like IBM, Sun or even Novell.

And hey, if you're looking for friendly, personable support in Ontario or Quebec, call Farstar Networking.

By considering free and open source software as an alternative, not only do you get the complete source code to your application (which you don't with Microsoft), you can also get support. The choice is yours.

I'm hoping that this is a bit of a wake up call. I've seen a number of article discussing the virtues of single-vendor or multiple vendor-solutions. However, it sometimes seems like Microsoft is the only single-vendor solution out there. They may also seem to be the only one who is on solid financial grounds. If that's your opinion, be aware that when you buy Windows of Office, you are subsidizing their Internet and game division, which is known for losing money.

It may be surprising to know that Microsoft is not the only company that is making a profit. Open source is a billion dollar market that Microsoft has not been able to tap. Others are already tapping it.

So, next time you have a need for a new server or home computer, before you hit your quick dial button to Microsoft Sales, how about you place a few calls around. You may be surprised as to how much you can save in the short and long term.

And you can still have someone to blame if it doesn't work. Except you get to keep the code. What more could you want?

Labels: , , , , , , , ,

Thursday, April 17, 2008

The Complete Work of Darwin Online — One of the Most Important Contemporary Collection

Almost all of the complete collection of writing by Charles Darwin is available online at http://darwin-online.org.uk/.

I personally think that this is one of the most important contemporary document collections. There's a lot of great science papers available out there, some thousands of years old. So, why is Darwin so important?

For starters, he wrote in English, which is a language that is available to many people on the planet. I'm not sure how many people are able to read English, but we can see the very original writing of a great mind without having to go through a translation. Though there are many great translator out there, most translation causes a bit of the original texture and subtleties to be lost.

Another reason why Darwin Online is important is the fact that we get to glimpse inside one of the greatest minds there was. Darwin is known for taking meticulous notes on just about everything he observed. Those notes are available for anyone who is interested in observing a great mind at work, or anyone who simply wishes to look at a bit of history.

Darwin may be more approachable as a scientist model than Newton, Einstein or even Hawking. He spent most of his life unknown outside of botanical circles. He only became a 'superstar' after publishing On The Origin of Species, late in his life. Furthermore, the fruit of his research was not born out of a 'flash of brilliance' but out of careful observation on the natural world — something that anyone is capable of. Thus, observing Darwin's work communicates that an average person, with enough passion and dedication can draw startling conclusions about the universe in which we live.

I'm not saying that other scientific minds did not go through the same process as Darwin. What I'm saying is that Darwin's work demonstrates the power of the scientific method — something that is not always approachable for the average individual when looking at Newton's or Einstein's work.

Darwin forever changed the way we look at nature and the universe. I believe that the theory of evolution is probably the most important scientific discovery of all time. No other theory has ever shaken our perception of the world the way evolution did.

Earlier this April, my lovely wife and I had a chance to visit the Royal Ontario Museum to see the Darwin exhibit. I was moved to see Darwin's original writing right in from of my eyes. I was humbled by his careful hand-written notes and images that led to one of the most important books ever published. To me, it was as if I had a chance to meet an idol, a role model. Of course, I'll never get a chance to actually meet Darwin, but after having gone to the exhibition, I feel like I had a chance to meet him face to face.

Now, I can continue to meet Darwin anytime I wish by visiting http://darwin-online.org.uk/. I hope you'll take the time to meet him too. He's a really nice guy and easy to get along with ;)


Charles Darwin
12 February 1809 - 19 April 1882

What is Computer Programming?

Most computer users are mystified by computer. They know how to use them, but they're not sure how they work. There is also the concept of computer programming — the esoteric science used by developer to make the computer do something interesting.

In this article, I would like to give a quick introduction to what is computer programming. This is not a complete course or tutorial, but I think that this will be enough to give you a better idea of what computer programming is all about. Also, I hope this will will also show you why there are bugs in most of the applications we use day-to-day.

Let's start demystifying computers. To begin with, they are machines, and only machines. In my courses, I sometimes ask my students what is the most powerful computer on the planet. Some answer the brain. However, I can't accept that as an answer, because the human mind is not a computer...and that's a good thing! Though our minds are not capable of doing billions of calculations per second, it is able to think, which a computer is simply (as of yet) incapable of doing.

So, computers are not thinking machines. They are incapable of thought. But what are they? Fundamentally they are machine capable of storing information and processing that information. To process that information, a computer follows a sequence of precise instructions. Creating those instructions is what computer programming is all about.

Without a program (a series of instruction), a computer is incapable of doing anything. The instruction given by a computer programmer falls into certain categories.
  • Accessing memory — the ability to read and change what is in the memory of the computer
  • Performing calculations like additions, subtractions, multiplications, etc...
  • Evaluating conditions like 'is A greater than B' or 'is the number of characters entered less than 50'
  • Branching — or jumping around in the program. For example, if the password matches, allow entry, otherwise, display error message.
The last point — branching — is really what programming is all about. Telling the computer how to handle different scenarios.

To give instructions to a computer, a programmer uses a programming language. There are literally hundreds, if not thousands of programming languages out there. The reason there are so many languages is that some are better suited at certain task than others. Another way to view it is road vehicles. There are compacts cars, minivans, sports cars, buses, motorcycles, transport truck, etc. The reason there are so many different cars on the road is that each is better suited to one task or another.

Programming languages, as opposed to human languages, are very strict. Since computers don't think, if a period is missing, a comma is misplaced or a word is misspelled, the computer will not be able to make sense of the code. Chances are, the computer will not even execute the program. Even if the computer can execute the program, most likely, it will not do what you expect it to do. In other words, it encountered a bug. The programmer meant something, but told the computer something else. Call it a misunderstanding if you'd like.

Here's an example: The programmer tells the computer: 'The cat is shedding fur on the couch. Move it.' The computer comes back and says: 'I finished moving the couch. Next instruction?'

I'm a strong believer that the only way to learn something is to do it. Thus, to help you learn what is programming, we are going to look at code, and see it in action. I strongly recommend you play around with the code. Don't worry, you will not be able to break anything. If you mess up the code click the 'Reset' button, and it will be brought back to it's original state.

To explore programming, we'll use a language called JavaScript. It's a reasonably easy language to start with, and is readily available to most web browsers like Firefox and Internet Explorer.

Let's start with a simple example. We'll ask our computer to execute the 'alert' function. Look at the following code, and click 'Execute.'



If all went well, you should have seen a window popup with the text 'hello.' If it did not work, it may be that your browser has JavaScript disabled for one reason or another.

In the above example, we are asking the computer to execute the JavaScript 'alert' function. It's one of many functions we can use. We'll explore a couple more as we carry along.

For the fun of it, try to change the above code to:
  • alert(1+2);
  • alert("1+2");
  • alert(1+2*3);
  • alert(8/2);
  • alert("Hello " + " World!");
Did you try all of the example? Can you explain the difference between the first and second example? Also, in the third example, can you explain the result?

Once you are reasonably comfortable with the above example, let's move to the concept of variables. A variable is simply a placeholder for information. In other words, it's a chunck of memory we are reserving for our program, and we can put whatever value we like in it, and look at the content at any time. Try the following example:



Let's disect the above example. The first line which begins with 'var' tells JavaScript I would like to declare a variable named message. You choose the name of your variable. They can be any combination of letters and numbers, but they cannot begin with a number. You cannot use spaces or punctionation in the variable name. For example, message, message1, myvar, c123 are all valid names. On the other hand, 123, hello world, my*var are not valid names.

The second line tells JavaScript to store a value in the variable. Right now, we are storing the textual value 'Hello from a variable'. Try to replace the text by 2+2 and see what happens. Try it with and without the double quotes ("). Also, try to change the name of the variable to something else, like mymessage. Again, feel free to experiment.

You probably noticed that there is a semicolumn (;) at the end of each line. This is to tell JavaScript that we are finished a statement, just like in English we use a period (.) to indicate that we are finished a line.

In the next example, we will use two variables, as well as interact with the user. Try the following code:



I hope that it's not getting too sophisticated. It if seems like a lot of goobledygook, look at the program one line at a time.

The first line, 'var name,' declares a variable called name. In the next line, 'name = prompt("What is your name?");' we are asking JavaScript to prompt the user for their name, then store it in the variable called name.

The next too lines declare a second variable called message, then 'concatenate' (merges or puts together) three textual value: The text 'Hello, ', the text that the user entered, and finally, an exclamation mark. Notice how the plus (+) sign is used to tell JavaScript to concatenate text together.

Finally, the last line text JavaScript to display (alert) the content of the message variable.

Note that I could have reduced the lines of code. For example, you could have declared and initialize your variables on a single line, as follows:
var name = prompt("What is your name?");
var message = "Hello, " + name + "!";
alert(message);


The above code is equivalent to what we executed a moment ago. Try it now if you'd like.

Let's try another example, similar to the first. This time, we are going to calculate something.


Again, read the code line by line, and try to make sense of what's it's telling JavaScript to do. Have you noticed that we are using a new function called Number? What does it do? Try to remove it from the code, and see what happens.

The Number function tells JavaScript to take what is in the bracket, and convert to a number. The thing is, the prompt method assumes that whatever the user enters is going to be text. Thus, if we write 'number1+number2', JavaScript assumes that we'd like to concatenate two textual values. To force JavaScript to treat our variables as numbers, we use the Number function.

If the above explanation is not clear, remember that computers are not intelligent. They do not think. The prompt function returns the text of whatever the user types. Even if you type in a number, for JavaScript, it's text and not a number. We can tell the difference between a word and a letter, but JavaScript cannot. We have to explicitely tell it so. This is where programming can get a bit tedious. As a programmer, we have to explicitely tell the computer what to do, step-by-step. If you forget to tell the computer something, then the computer is not going to do it.

Though it may seem tedious, the fact that computer do not think is one of their strenght. Because they follow instructions to the letter without deviation, they ensure that a process is completed error-free. AS human being, we can think and rationalize, but we are prone to error. The only way a computer can do an error is if the programmer has introduced an error in their code. Errors in code are called bugs. I'm sure you heard that term before! So, now you know that whenever a program misbehaves, it's most likely because the programmer made a small error in their code. Please don't blame the poor programmer. It is very difficult to write bug-free code. If you're not convinced, try to write a simple program and see for yourself.

Speaking of simple programs, let's get back to our code. In the next example, we will to some actual programming. So far, the programs that we wrote simply execute one instruction after another. That's not real programming. Programming involves giving decision-making ability to our program. We will look at a simple example that will prompt the user for a password and let the program 'brach' in different direction depending on the password that has been entered.



Can you figure out what the 'secret' password is? Please note that this is only an example. The above code should never be used to protect a website.

We are using a new construct called an 'if' statement. This statement allows your to tell the computer to make a 'decision.' The double equal (==) operator tells JavaScript to compare if two values are the same. The reverse of that would be the != operator that compares to see if two values are different. How about you try it! Replace the == by != and see what happens now. Execute the code with a valid, and invalid password.

You have probably notices the curly brackets { }. These are used to 'group' statements together. They tell JavaScript that every statement between the opening and closing curly bracket should be executed one after another in that branch.

It is possible to 'chain' multiple if statements. Try the following code:


How many branches (else if) can you have? The answer is as many as you'd like.

If statements are one of many constructs that we can use to give define the behaviour of our program. In the next example, I would like to explore the concept of a loop. Loops allow you to tell the computer to repeat something over and over again while a condition is met. Try the following code:



The new construct that we are using is a do-while loop. You'll notice the use of curly bracket to indicate to JavaScript that everything between the do and the while should be executed for each iteration on the loop.

The above example will prompt the user until they enter a valid password. Note that the user cannot even cancel the action. Why not? The reason is, we haven't told the computer what to do if the user clicks the cancel button. Again, computers don't think. We have to tell it exactly what to do.

If you would like to be able to cancel, try the following code:


What you are seeing is starting to look more and more like a computer program. There are actually make ways a programmer can write the same program. The above example is just one.

If you've gotten this far, don't let the length of the program scare you. Disect it bit by bit, line by line. The only thing that is new is the && operator. This tells JavaScript that both comparison (password != "abc123" and password != "") have to be true to continue the loop. Since this is an overview of what computer programming is about, I won't spend too much time on sophisticated conditional statements. As always, feel free to experiment with it.

One last example, then we are moving to the grand finale. The next example will allow three tries to get the password right. If after three tries, the right password is not entered, we exit the loop. There is nothing really new in the next example, beyond merging together many of the concepts we have explored so far.



The only new construct here is the less-than operator (<). Can you see what is does? As long as the counter is less than three, we continue the loop. The moment it's greater than or equal to three, we exit the loop.

Notice the line 'counter = counter + 1;'. Can you figure out what it does? Everytime the loop is entered, we increase the value of the counter by one. For example, the first time we enter the loop, the counter is at zero. Thus, the line reads as 'counter = 0 + 1.' The value of the counter is increased from zero to one. At the next iteration, the line reads as 'counter = 1 + 1,' thus the counter is now at 2.

Again, there are many ways the above code could have been written. Because this is an introduction to what is programming and not an introduction to JavaScript, I'm not exploring all the possible approach here — I'm just exploring how to give instructions to the computer.

For our grand finale, I would like to give you a complete program. It's a game you most likely played in primary school. The computer will pick a number between 1 and 100. You have to guess what it is. The computer will tell you if you guess was less or greater than the secret number.

Look at the code. See if you can figure out what it does, and run it. This is more or less an example of a computer program.



Can you make sense of it? I wrote the code so that it would be reasonably easy to understand, but by the same token, I did not dumb it down too much. If you managed to follow me so far, I think you should be able to make sense of it. It may require you to look closely at the code, and even taking some note on paper, but do give it a try. You can even modify it if you'd like.


So, you've looked at computer code. You now know that computers have a memory (variables) and instructions that the machine will follow to the letter. Because computers do not think, you, as a programmer, are responsibile to tell the computer exactly what you want it to do. If your code does not execute exactly as you would expect, that's because there is a bug. Computer rarely do mistakes. For that matter, we might as well say that computers never do mistakes. So, if your code does not do what you expect it to do, it's not because the computer is wrong. It's because that's what you told the computer to do.

If you've enjoyed this little foray into the world of programming, there are plenty of great resources on the Internet available to you. You can, of course, continue to edit and modify any of the code on this page, and I encourage you to do so. To continue learning JavaScript, I personally would like to recommend w3schools.com. It's not the only place on the Internet, but it's one that I've used a lot. There are many programming languages you can learn, and JavaScript is only one of them. Also, there a number of best-practices that I did not use in the above examples. The given code is only meant as a learning tool, and not as enterprise-ready solutions.

One way or another, this article should have given you an understanding of what is computer programming — that is, giving very precise instruction to the computer. There's a lot more we can discuss and I'm sure you probably have questions. If you are looking for guidance as to where you would like to go next, or have any questions, please drop me a comment.

Or hey, if you created a cool program, please feel free to share it with us!

Enjoy the rest of your day!

Labels: , ,

Wednesday, April 16, 2008

Microsoft Windows for Free?

How is Microsoft to compete? I mean, Mac OS X Leopard is $129 CAD, Mandriva Linux is about ~$80 CAD and Ubuntu is free.

Windows Basic, on the other hand is (GASP!) $199 CAD! And it does not even come with an office suite. You definitely get more bang for you buck with Ubuntu.

This brings me to two big questions.

The first one is: What exactly is Windows? I get a fat DVD which will eat a sizable chunk of my diskspace. It lack drivers for some older and even newer devices, and the closest thing you have to a functional word processor is WordPad. Whoopdidoo. I fell like I'm really getting value for my big, fat $200 dollars. Well, I guess that's Microsoft privilege to charge whatever the hell they want for their operating system. That's the beauty of having a near monopoly.

The second question I have is: How is Microsoft going to compete? Computer are getting dirt cheap. The Asus Eee PC is changing the way people think of laptop in terms of size and price. At the rate prices are going down, more than half of the computer's price will be for Windows Vista Basic. Even now, it is possible to buy a laptop at FutureShop for less that $500 CAD. How much of that $500 goes towards Windows?

At the rate things are going, Microsoft is going to have to dramatically reduce the price of Windows. I personally feel that $200 for a 'basic' version that allows me to surf the web and the privilege to install spyware, is highly unjustified. Especially when I can get a complete system that includes my office suite and development tools for practically nothing.

Or maybe the high price tag is to help support emerging markets? Since Microsoft is so altruistic, they will charge the develop world more to help subsidize Windows for the poor. What a nice robin-hoodish, humanitarian approach...except for the fact that the Robin Hood we are talking about here has more gold in his coffer than all the rotten sheriffs in the world. Furthermore, this Robin Hood is gladly charging the poor.

Once again, since they have a monopoly, it's only natural that they choose how much they charge. For years, it was easy to hide this Microsoft Tax, since a computer typically went for thousands of dollars. Now that computers are barely half a grand and that the price of Microsoft Windows keeps increasing, this tax is quite noticeable. People will quickly realize that an Asus Eee PC preloaded with Linux actually offers a lot more out of the box than the same Eee PC loaded with only Windows.

That brings me back to my first question: What the heck is Windows anyways? What am I paying $200 for?

Labels: , , , , , , ,

Tuesday, April 15, 2008

Hold the Mono, please

Does Microsoft innovate? I think so, but not as much as people think. They are very good at taking existing ideas, and adapting them to work only on their products.

This leads me to the .NET Framework, their competitor to the Java programming language. Java is a programming language that has been around since 1995 and has enjoyed tremendous success in the computing world. Its success is due to a number of factor. Personally, I feel that Java succeeded because it used and encouraged a number of best practices, like forced exception checking, strongly typed language and taking full advantage of object orientation as well as design patterns. Furthermore, Java evolved through the Java Community Process. The JCP is a process managed by Sun Microsystem, the creator of the Java programming language, that allowed interested parties to participate in the development of the language. This means that Java is not the brainchild of solely Sun Microsoft, but also that of IBM, Borland, Novell, and many other organizations. Because many organizations actively participated in the development of the project, this encouraged adoption.

Today, the success of Java is undeniable. There is one company, however, who is directly threatened by Java, and that is Microsoft. One of the early promise of Java was write-once-run-anywhere. That is, you write your computer code once, compile it, and then you can run it on Windows, Mac OS X, Linux, your cellular phone or whatever else you'd like! This is a reality today. I do a lot of Java development, and use a lot of Java programs on Linux, the Mac and Windows.

It works. Microsoft does not like this. They would prefer that applications are written for Windows and stay on Windows.

To achieve that end: enter the .NET Framework. Microsoft created .NET as a response to Java. To compete, they create a language that superficially resembles Java called C#, and a framework that is tooted as write-once-run-anywhere. They even went a step further and got part of the .NET framework standardize with the ECMA.

Just like Java, the success of .NET is undeniable. Let me be the first to say that Microsoft actually came out with some cool ideas. I like LINQ and I think that Workflow Foundation will be an important set of API in the future.

However, I will not develop open-source application with .NET for two reasons:

1. It is not free software. Java has recently been freed by Sun Microsystems. Yay! I hope that this will continue to speed the adoption of Java on Linux. However, .NET is not free. Microsoft owns a number of patents on .NET and has yet to provide a license to their intellectual property that is compatible with the GPL. Until Microsoft opens .NET, I will not touch it with a ten foot pole on Linux.

2. It is not write-once-run-anywhere. It's true that I can create a .NET application on Windows and run it on Linux. However, please repeat after me: .NET is not write once run anywhere. Saying that .NET works on Linux is bullcaca.

For starters, there is a project that is sponsored by Novell (and indirectly, by Microsoft) called Mono which permits the development of .NET applications on Linux. However, repeat after me: .NET is not write-once-run-anywhere. I need to get that into your head. Sure, it looks like it's portable, but here are the problems you will encounter:
  • The API to write GUI (windowed) application is meant to run on Windows. Whatever application is created on Windows with .NET will look good on Windows, but look like crap on Linux. Futhermore, Mono has its own GUI API that is incompatible with the one provided by Microsoft. This means you either create your .NET application to run on Windows or Linux. Say bye-bye to portability. Score 1 for Microsoft!
  • Microsoft is introducing more and more Windows specific API. Just the names of the APIs should give you a clue: Windows Presentation Foundation. Windows Communication Foundation. In other words, Microsoft is making sure that your write-one-run-anywhere investment is glued to the Windows platform.
  • The is no community process. This means that Microsoft has sole control over the direction of .NET. Don't go whining to Microsoft that your gorgeous .NET application looks like crap on Linux and does not work on your Mac. They don't care. Actually, that's a lie. They do care. They care that it runs on Windows and only on Windows. You can expect more and more Microsoft Windows specific API on .NET masquerading as 'open,' 'portable' APIs.
  • You are creating .exe and .dll files. Unlike .class or .jar files in Java, These files are Windows specific. They contain MS-DOS and Windows code. In a Java application, there is not a single line of platform-specific code. That means that Mono has to be able to load a Windows executable on Linux. For something that is supposibly portable, it sure carries a lot of Windows with it.
  • But Linux already has strong support for .NET with Mono! you say? So, why not use Mono? The reason is simple. It's a Microsoft technology. It belongs to Microsoft, and should they decide your Mono application is eating away at Windows market shares, prepare to receive a kind letter from Microsoft politely indicating that since you are using their intellectual property, you owe them $$$.
  • Though I doubt that Microsoft will ever collect open source developer for the use of their so-called intellectual property, I think that the real problem will be that Mono on Linux will forever play catch-up with .NET on Windows. Who wants to use a 'write-one-run-anywhere' technology that is one or two years behind on some important platforms? Either you write a Windows-only application in .NET, or look at alternatives.

.NET exists solely to further Microsoft's agenda. Anyone that chooses to use Mono on Linux is kindly helping Microsoft achieve that agenda. Yes, there are some cool ideas in the .NET framework, but most of those ideas are copied from existing languages. For example, I've been using workflow management API and designers long before Microsoft came out with the Workflow Foundation API.

Before you consider Mono, please take a look at what's available on Linux already. You want true write-once-run-anywhere? Java is one solution. Not good enough? What about Python? Pascal? PHP, C/C++? Need I go on?

Linux is where it is today not because of heavy-handed sales tactics or razzle-dazzle marketing, but by its own merit. Let's continue to develop Linux through it's own merit.

We will not innovate if we follow the Microsoft path — that is, mostly copying what others are doing.

As for me, I think my plate is delicious as it is. I'll hold on that Mono sauce, thank you very much!

Labels: , , , , , , , , , ,

Sunday, April 13, 2008

Enjoying the Asus Eee PC

Having just received my Eee PC, I'm still getting familliar with it's capabilities. The keyboard requires getting used to, but I'm getting better. As long as I don't have to use the right shift key too much, I can almost achieve the same typing speed as on a regular keyboard ;) All joking aside, once you get used to the keyboard, it's actually quite pleasant.

I got the 8G model, which means that I have a whooping 8 gigabytes of 'hard disk' space. While this is tiny compared to a regular hard-disk, which is usually over 100 gigabytes for a laptop. However, for my needs, I think that 8G, or even 4G should be enough. Since the Eee PC supports SD cards, I'm using a 4 gigabyte card for my /home partition (for Windows users, think My Documents).

The pre-installed operating system is a custom version of Xandros Linux (which is based in Ottawa). Though the default is fine for most people's need, I wanted something that gave me more -- so I installed eeeXubuntu. I removed the default Gnome games, Abiword and
Gnumeric to save space, and them promptly installed:

I've got ~640M of space left (which ought to be enough for anybody) on my system partition. Not too bad, considering I've got a practically complete portable development system.

One of my goals is to get Morrowind working with Cedega. So far, no joy, but I'm not about to give up. I know some folks got it working, so I'm sure I can as well.

If you are going to install eeeXubuntu or Ubuntu, be aware of the Eee Wiki. One of the coolest trick I found is how to enable the ALT+F11 key to make a window take the full screen. That really takes advantage of the 800x640 screen resolution. There are many more cool tricks on the page. Check it out!

Software for Windows seems to take up much more room than software for Linux. If anyone plans to run Windows on the Eee PC, I would like to recommend they consider using Google Docs. It is a word processor, spreadsheet and presentation package that runs in a web browser like Internet Explorer or Firefox. Using Google Docs does not require you to install and special software. As long as you are connected to the Internet, you can use it. Futhermore, Google Gears should eventually allow you to run online application offline.

Actually, I'm using Google Docs one my Eee PC right now to author this article. So far, the Eee PC turns out to be a fun, yet useful machine. My wife is starting to strongly hint that I'm spending too much time on it. Oups! I think I should wrap up this article, and spend some quality time with her! See ya!

(Hum... I'm a bit disappointed with the Google Docs' HTML exporter. I wish it did XHTML)

Labels: , , , , , , , , , , ,

Thursday, April 10, 2008

Three good news

OOXML got voted in at the end of March, but Microsoft has not necessarily won.

I applaud the people of Norway who openly protested OOXML. I hope this is not the last of those protest.

Also, while the EU is investigating Microsoft, a member of the EU Parliament asked that Microsoft be excluded from public procurement. If that motion goes through, that would be a major blow to Microsoft's monopoly.

Finally, Microsoft has 'released' 14,000 pages of 'secret' protocols and APIs. Personally, I see this as Microsoft's attempt at easing the EU's antitrust concern, and also as Microsoft's attempt at locking developers on their platform. Microsoft is not stupid, and know that they need to adapt to the emerging changes and competition facing them. The fact that they release the documentation is not the good news. As I mentionned before, it's just an attempt at furthering their lock-in. However, it's definitely sings that they are feeling the pressure.

Let's hope the good news keep coming!

Labels: ,

Got my Eee PC!

I got my Eee PC yesterday. Need I say more?

So far: Wow!

I'm currently installing eeeXubuntu on it. As most folks commented, the screen and the keyboard is small, but the rest is just great.

You can bet the next entry will be from my brand spanking new Eee PC running Xubuntu. I'm sure I'll quickly get used to the tiny screen and keyboard. I mean, my first serious graphic applications ran in 320x200 and my first computer had 16K of ram. The Eee PC has plenty of juice for my needs!

This blog is written using Slax because I needed to burn an ISO, and Windows does not come with any tools to burn ISOs. For that matter, the Windows installation has over half a dozen devices it does not recognize, including the sound card. Slax detected everything ;).

Labels: , , ,

Saturday, April 5, 2008

Linux for Windows Administrators

If you are familiar with administrating Windows, but are curious to know about Linux, this article may be of interest to you.

This article is not for the everyday user who wants to get started with Linux. If systems administration is not your thing, but would like to learn some of the differences between Windows and Linux, I would recommend reading Is Linux Like Windows?. However, those who have a background in Windows system administration, please read on!

I'll warn you right now. Linux is not like Windows. It's a different operating system that stands on its own merits, and does not strive to duplicate the functionality of the operating system you are familiar with. Linux is based on Unix, which has been around since 1969. Its resilience is testimony to its success.

To help you migrate your skills to Linux, I've broken down the article in key topics that will help transition your Windows skills to the (rough) Linux equivalent. There is no 1-to-1 equivalent to the tools. There is a learning curve. Once again, it is a different operating system, and you may have to 'unlearn' some of the things you have learned.

Linux IS Supported
Let's tackle one of the biggest myth I hear from Windows system administrator. They assume that because Linux started (and continues) as a community project, it is not commercially supported. Let's get this out of the way: Linux is supported by a number of large company. Here's a few companies that supports Linux in one way or another: IBM, Novell, Red Hat, Canonical, Sun Microsystems and HP.

Just like Microsoft, you can enter a service agreement with any of those vendors. The difference is, with Microsoft, you buy the product and the support. With Linux, you (typically) just buy the support.

Command Line vs GUI
I won't lie to you. If you really want to learn to administer a Linux machine, getting familiar with the command line is a plus. However, if you have any experience administering Windows, you probably find yourself inside the command prompt from time to times anyways.

One of the reason that you may need to use the shell (command line) is due to the fact that the GUI is optional. As opposed to Windows, the graphical environment is just another program that can be started and stopped. Most administrative tasks in Linux can be done by the mouse. However, you may find that the command-line is necessary to rescue some system, or, as you get more familiar with it, you'll probably find yourself working faster and enjoy more control over your system. At least, I know I do!

There are many commands available to you. Each of those commands are separate programs that you are running. Most command will allow you to get help on the syntax by using either the -h parameter, the man or info commands. For example, to get help on the ls command, you can use either:
ls -h
man ls
info ls
(Hit the letter 'q' on your keyboard to exit out of man or info)

The Root User
The Linux equivalent to the administrator's account is called the root account. Logging-in as root gives you complete control over the machine. Using the root account is considered dangerous, and is disabled by default in many distributions.

To perform administrative task, the sudo command is used. Sudo (Super User Do) allows users to execute programs with elevated privileges. For example, the mount command needs to be executed by root. Thus, being logged in as a regular user, I can use sudo mount [...] to execute that command as the super user (root). Depending on your configuration, you may be prompted for a password before the command can be executed.

Another useful command is su (Substitute User, Switch User or Super User depending on who you ask). By using su, you can effectively 'become' another user, as if you had logged in as them. For example, executing su root or even just su would log me in as the root account. Of course, you may be prompted for a password.

File System Structure
Don't look for your C: drive. It does not exists. Linux uses a virtual filesystem. Everything starts from the root directory (not to be confused with the root user), which is represented by the forward slash (/). You can try:
cd /
ls

to see a list of all the files and directories in the root. The directory names are typically short. Here's a quick guide to orient you:
  • /home &mdash The user's home directory. Similar to Documents and Settings
  • /etc — The system's settings. Similar to the registry
  • root &mdash The root user's home directory. Similar to My Documents for the Administrator's account.
  • /dev &mdash The devices available to the machine. The closest equivalent I can think of is your Device Manager.
  • /boot — The files needed to boot the kernel. Similar to ntldr
  • /bin — User commands like ls or cd
  • /sbin — System Binary. Includes system's administration commands like ifconfig or mount
  • tmp &mdash Temporary files
  • var — VARiable files, like your system log, mailboxes and printer queues.

This is not a complete list, however, it should get your started.

Mounting Devices
One important directory that I left out is /mnt or /media. The Unix virtual filesystem allows you to 'mount' drives anywhere you want.

For example, in Windows, if a system has two drives, it is represented by two separated drive letter (ie: C: & D:). In Linux, those drives are 'mounted' into the file system. You 'C:' drive may be the root, and your 'D:' drive may be /var. So, the moment you enter the /var directory, you are now on another drive. This allows your to transparently (re)distribute your drives without having to reconfigure a single application. For example, if the /home directory is getting full, I can easily copy the content to another drive, and mount /home to that new drive. Everything will continue to work as-is. However, any files being read or written under /home will be done on the new drive.

To see where the devices are mounted, use the mount command.

File Systems
Forget about NTFS or FAT32. Though Linux supports them, the preferred file system is usually ext3 (third EXTented filesystem). Similar to NTFS, this file system is journaled. There are other file systems available like ZFS, XFS and ReiserFS. Ext4 is currently in development.

Linux support more filessytems than Windows or MacOS X combined.

Everything is a File
Unix popularized the idea that 'everything is a file.' That is, to access your hardware and services, 'virtual' files are used.

The /dev folder contains virtual files that represent the devices on your system. For example, you may see a file called mem which represent the ram of your machine. Other files may include /dev/cdrom0 — your first CD-ROM, /dev/sda — your first SATA or SCSI drive, /dev/sdb, your second SATA drive, and so on. IDE drives are represented by /dev/hda, /dev/hdb, and so on. Partition on the drives are numbered. For example, /dev/sda1 is your first partition on the first SATA drive. /dev/sda2 is the second partition and so on.

Accessing a block device like /dev/sda gives you direct access to the disk. That is, you can read and write at any position on the disk. This is very dangerous of course, since you are by-passing the normal directory structure, and accessign the bits and bytes of the disk directly.

To view the content of a disk normally, it needs to be 'mounted' to a directory. For example, if I would like to mount the second partition of my first disk as the /home directory, I would execute the following command:
sudo mount /dev/sda2 /home
The /home directory is now mapped to the second partition of the disk. I'm able to view and work with the files and folders located on that partition. To unmount it, use:
sudo umount /home
The /home directory is no longer mapped to the second partition.
Another example would be accessing the content of CD-ROMs, USB flash disk or floppy disk:
sudo mount /dev/cdrom0 /media/cdrom
sudo mount /dev/sdb1 /media/usb
sudo mount /dev/floppy /media/floppy

Settings
In Windows, you have the registry, which you are not allowed to edit, but everyone does anyways ;)
Linux is very different. Most of the system's configuration is under the /etc directory. There are many files in this directory, and most of them are text file. A few important files include:
  • fstab — File System TABle. This file documents how your drives and partitions are configured at boot.
  • passwd — The user accounts of the system
  • groups — The groups associated with the user accounts.
  • hosts — Practically the same thing as the Windows hosts file.
Of course, there are more. Feel free to open them in your favourite text editor.

Another nifty trick is to use the & after a command. This allows you to launch a command in the background. For example, the updatedb may take a while to execute. By using the &, I can continue working, while updatedb is running in the background.
sudo updatedb &
You can also temporary interrupt an application by hitting CTRL+Z on the console. This does not terminate the application (like CTRL+C), but suspends it. To continue executing the application, use fg (ForeGround) to return to the application, or bg (BackGround) to allow the application to execute in the background. (If you've used fg to return the application, you can continue to use CTRL+Z to suspend it at anytime!)

Package Manager
Most modern Linux distributions have a package manager that takes care of installing, uninstalling and upgrading any applications you have installed.

For example, on my Ubuntu box, to install a LAMP (Linux, Apache, MySQL & PHP), I can run:
sudo apt-get install apache mysql php
The package manager will download the necessary files and install the programs for me. To configure the programs, I can download additional GUI tools, or edit the appropriate files under /etc. No more messing around with CDs and/or activation keys!

Starting and Stopping Services
Services can be managed from the GUI, but should you desire to start and stop services from the command line, you'll find them in the /etc/init.d directory.
For example, to start the Apache web server, I could use:
sudo /etc/init.d/apache start
Typically, those services support the start, stop, restart and status parameter. Furthermore, be aware that the /etc/init.d/apache command is just a shell script. You can see the code used to start and stop the service. It's just another program.

Log File
To see your logs, take a look under the /var/log directory. They should be all there for you. Some of the important logs are:
  • messages — Various messages from the system are recorded there
  • auth.log — Authentication log
  • security — Self explanatory
  • cron — Scheduled tasks
  • Xorg.log.0 — XServer (GUI) log.
There are others of course. Most of the log files are just text. Learn to use the search feature of your favourite text editor!

It's Free
Linux is a free operating system. By free, we mean free as in free speech. This is important, because it allows you to use and customize the operating system to your liking. This is the main reason why Linux is used anywhere from routes to super computers.

To learn more about free software, I would recommend reading Free Software 101.

Linux has a lot to offer. It is succeeding not by marketing forces, but through its own merits. Many large players use and support Linux. Most of the top players on the Internet use Linux or another free operating system to host their sites. From my end, I use Linux everyday, both as a desktop operating system and in my servers. This has offered me tremendous savings as well as opening possibilities that proprietary (non-free) operating system cannot offer.

I hope you will give Linux a go, and get a feel for it. If you have any question, please drop me a comment.

Have a great day!

Labels: ,

12 Cool Desktop Linux Tricks

In this article, I would like to introduce newcomers (and maybe oldcomers) to some cool desktop Linux tricks.

...Well, I least I think they're cool!

Quick Copy-Paste
Most users coming from Windows or the Mac to Linux are likely familiar with the CTRL+C, CTRL+V keyboard combo to perform a copy & paste.
Most Linux desktops offers an alternative. Simply select the text as you would normally do, then point where you would like to paste it, and middle-click (press down on the wheel on your mouse). Voila! Instant copy-paste, and you didn't even touch the keyboard.

Restart the X Server
Though the Linux kernel stable, sometimes, a desktop application crashes or goes crazy. Similar to Windows or the Mac, you can bring up your task manager and try to end or kill the offending application(s), or hold down the power-button until the machine restarts.
In Linux, hit the CTRL+ALT+BACKSPACE key. This will stop the X Server (your graphical environment), and bring you back to your login prompt. Of course, any unsaved work will be lost, so use this only when necessary.

Move Things Around
Ya don't like the layout of your desktop? Fell free to customize! One characteristic of most Linux desktop (KDE, Gnome & Xfce) is that you control the layout. It is possible to add as many panels as you'd like, and choose what you see on those panel.
Go ahead and try it now! Right-click on a panel, and select 'Add to Panel' or an equivalent command.
To move things around, middle-click (press down on the mouse wheel), and drag the item where you'd like it to be. You can add, remove and move anything you'd like — even the main menu.

Change your Resolution Quickly
Use the CTRL+ALT++ (the plus key) to increase your resolution and CTRL+ALT+- to reduce your resolution. This can be especially handy if you connect your laptop to exernal monitors, and you need to change your resolution quickly.

Open the Menu or Run a Command
For keyboard users: ALT+F1 usually opens your systems menu. In some environments, like KDE, the Meta (also known as the Windows) key may be used instead.
If you like to run commands by typing them in, ALT+F2 brings up a 'run' dialog.
I like keyboard shortcuts!

Measure your Graphics Performance
This trick requires you to use a terminal window. Start a terminal. If you are not sure how, look for Terminal or Console in your menu, or hit ALT+F2, and type xterm. Once the terminal window is opened, type 'glxgears' (don't type in the quotes ;)) and hit ENTER.
You will see three spinning gears. If you wait a moment, the average frames-per-second (FPS) will be displayed in your terminal. The higher the number, the better.
This is not a complete performance test, but gives you an idea of the performance of your video display.

Use Workspaces
On your desktop panels, you may notice a bunch of little squares. These may be your workspaces. Click on them to see. They will bring you to separate desktop. If this window goes away, Do Not Panic™! You have found your workspaces. Click on the various workspaces until you return to this window.
The workspaces are useful if you're scatterbrain like me, and is trying to do 20 things at the same time, but do not want to clutter-up your desktop. You can open some application in one workspace, then others in a second workspace. Try to move windows from one workspace to the next. The trick usually is simply to drag and drop the window outline in the panel from one workspace to the next.
Another fantastic use of workspace is when using application that open many windows like the Gimp.

View Hidden Files
Linux will hide any files that begins with a dot (.). Typically, hidden files contains your configuration settings, so you'll rarely need to see them. However, should you wish to see them, try CTRL+H or ALT+. to view them in Gnome or KDE. If that doesn't work, look in the menu of the application you are currently using. You will most likely see an option to show hidden files.

Turn on the Desktop Effects
You think the Mac or Vista looks hot with the sliding windows? If you have a decent graphic card, turn on the desktop effects and see what Linux has to offer.
Here is a video to show you what the effects can look like:

I can run the 3d effect on a 2 1/2 years old laptop that is marked as Vista Capable. If you have a resonable modern machine, chances are you can enjoy the nice effects.
Oh, and if you are one of those who is fond of saying 'who needs those fancy effect?', well, then don't turn them on ;).

Run Linux Everywhere
As a last trick, try to run Linux anywhere. You have an Xbox or a PlayStation? Try to boot Linux on it. You have an old Pentium computer gathering dust? Try to install Vector Linux on it. You have a USB flash drive, install Slax or Damn Small Linux on it and boot your buddies computer with it. This can also be very handy when you need to rescue a file from a machine that cannot boot normally. There no limit as to where you can enjoy Linux.

BONUS:Try these Linux Games
If you are a gamer like me, I strongly recommend you try the following games:
There's more. Please fell free to explore!

Middle-Click with Two Button Mouse
Most modern mouse have a scroll wheel, or at least three buttons. Most Linux desktop take advantage of the three buttons on a mouse. However, you are not always blessed with three buttons. For example, I'm writing this from a laptop that has only two buttons on the touchpad. By default, most desktops will treat pressing both the left and right button as a middle-click. For example, if I want to close a tab in Firefox, I can simply point to the tab, and press the left and right mouse button at the same time.

Well, that's it for now. I hope you enjoyed those little trick!

When I first started this article, I was aiming for 3 cool Linux tricks to show Windows users. Later, I decided to go for five, racking my brain, wondering if I could come up with five cool tricks. Now, I'm up to 12. I know there's probably more I can come up with, but I think I'll leave it as-is for now.

If you know of any cool tricks, please feel free to share them with me as well!

Labels: , , ,

Friday, April 4, 2008

It's a boy!

Jess and I did our first ultrasound. We were happy to learn that the baby is normal and healthy. Watching the little thing move around inside Jess was quite a show, and I think we were both moved.



Have a great day!

Labels:

Wednesday, April 2, 2008

A Linux Dude Installs a SharePoint Server

Today, I had the dubious pleasure of having to install SharePoint 2007 on Windows Server 2003. Yay!

I'm a Linux user. I enjoy working with Ubuntu amongst other distros. I can setup LAMPs (Linux, Apache, MySQL & PHP|Perl|Python) with my eyes closed. I mean, I spend more time waiting for my package manager to download the packages than I actually spend configuring stuff. All the tools I need are immediately available at my fingertip.

A colleague of mine who is well versed in the Windows world kindly setup Windows Server 2003 on a laptop. He even installed drivers (they don't come with the OS?) and service pack 2. Now, it's my turn!

So, how does one install a package on Windows?

I easily found the 'Add or Remove Program', but quickly learned that it was more along the lines of 'Remove Programs'. I mean, I could only find the option to remove existing packages. There was no option to search for packages to install or how to configure your application repositories.

That's when I remembered that most Microsoft programs come on CDs. I found a CD for SharePoint 2007 in the office. This may not be so hard after all.

Now, with the laptop in one hand and the SharePoint 2007 CD in the other, I'm ready to rock! I slap in the CD, and wait for an install program to pop-up.

Instead, Internet Explorer 6 pops up with a security security warning. Click OK, and I'm brought to a little webpage that contains a confusing collection of links. After I find the link to the SharePoint installation program, it opens Windows Explorer, exposing a file called setup.cmd.

That looks kosher, so I double click on it. Oups! Looks like I need the .NET Framework 3.0, SQL Server 2005 as well as IIS 6.

So, how does one go about installing SQL Server 2005, .NET 3.0 and IIS 6? Why can it not take care of it's dependencies like my package manager on Ubuntu? This seems like a lot of trouble just to install a web application. One of the things that makes Windows so difficult to use it the lack of a solid package manager. Microsoft really needs to work on that before I can take Windows seriously. I feel like I'm back in the stone age where I have to manually download and compile stuff. I can already tell that installing SharePoint 2007 is not going to be a walk in the park.

I didn't chance Add or Remove Program again. I went straight for the CD. Going trough the setup was reasonably painless. However, I'm surprised as the number of steps (screen, windows, whatever) one has to go through just to install a database server. Why can't Windows keep things simple?

Now, onto the .NET framework 3.0. Before I started to look for yet again another CD, I though to myself mdash; there has to be an easier way! Thankfully, I've had enough experience with Windows to know about Windows Update. It took me a moment to find it in the Start menu. There were nearly two dozen updates. This is not concerning to me, since in Ubuntu, I may get dozens of updates for all my installed application (and I have a lot!). However, I'm concerned that the vast majority of my update are security related — and these are only for the OS.

Interesting, Internet Explorer 7 is a recommended update, but .NET 3.0 is an optional update. Nevertheless, I select all recommended updates as well as .NET 3.0. Click the button, and KABOOM! All the updates fail to install. The carefully worded error message recommends that I try again, otherwise, look up troubleshooting in the help.

I try again...and again...and again to no avail. Even a single update fails. So, I click on the convenient URL that links to the help. As convenient as the link seemed, the help was not.

Being in foreign territory, I turn to my Windows guru. After reproducing my steps a couple of time, He recommends a reboot.

Miraculously, rebooting worked! The updates downloaded and installed without problem mdash; except that I had to reboot twice more. I guess they were mostly kernel updates. How often do you have to reboot Windows? I have some server that have been live for over a year without reboot. I wonder if I could do the same with Windows...

I've also noticed that Internet Explorer required a couple of clicks to installs, and performed some work at boot-up. I wonder what kind of browser needs to spend about a minute setting itself up after a reboot?

Alright, so after a few reboots, I now have the .NET framework 3.0 installed. Now, to IIS 6.

This one took a bit of searching around. I found it where I kinda expect to find it but could not see it at first. There a 'button' on the left side that says 'Add Windows Component.' The button brought me to a dialog that I remember from the days when I first installed Windows 95. Digging in there, I found IIS 6.0. Thankfully, I love Java. When I saw Application Server as a category, I immediately clicked on it to see if JBoss or Glassfish was included. My first surprise is that there were not. My second is that IIS is considered an application server. I would have though it's a web server. But who am I to argue with Microsoft?

I select IIS 6.0 (including ASP.NET, which is not included by default), and clicked install. Windows prompted me for the original CD. I could not find a way to change the software repository to use the web instead of the CD. That's kind of annoying. Does that mean I have to carry my Windows CD everywhere I go? I mean, thats three CDs I'm going through.

The installation actually went smoothly. No annoying popups or anything like that. Just like Ubuntu, it installed and configured the server for me. Yay! So now I can install SharePoint!

I double clicked on setup.cmd again. This time, SharePoint complained about having to enable something in IIS 6.0. The popup kindly explained what I needed to do. So, I followed the instruction, which brought me to some kind of wizard. As luck would have it, after the third step, the wizard asked me if I wanted to remove some stuff. I said no, and retraced my steps to make sure I had done everything correctly. The same thing happened second time through. I do wish that Windows was less cryptic so that I could understand what I'm going through. There's a lot of popup windows over popup windows, and the interface is a bit inconsistent. I took a deep breath and continued forward.

Once again, I was prompted for the original Windows CD. After I slap it in, Windows starts installing this 'Active Directory.' It must have been a large package, because it took a long time. Furthermore, it asked me to reboot again! I can setup (even compile) an entire LAMP server with a fully functional GUI from the ground up and never have to reboot. What is it with Windows and rebooting every time you change something?

At this point, my coworker are wishing me good evening. Well, I've had enough of this Windows fad for the day, so I go home, and start blogging. While I'm blogging, I'm going to do something fun. Hardy Heron is out in beta, so I might as well upgrade!

I launch my good-ol' package manager, and click Upgrade to Hardy Heron. The upgrade warns me that it may take a long time to download all the necessary packages, but at least I can continue working while I upgrade my OS. I wonder if upgrading to the new Windows Server 2008 is going to be as easy?

It's always fun trying new operating system. Though Windows seems solid, it still has a number of frustrating quirks. Installing applications should be easier, and the consistency of the interface could be greatly improved. I'm concerned about the need to reboot so often &mdash especially when adding a desktop application like Internet Explorer. There is absolutely no excuse to force a reboot after the installation of a desktop component on a server machine.

I wish Microsoft would borrow a thing or two from Linux and make Windows truly easy to setup and use.

Labels: , , , , ,

Tuesday, April 1, 2008

Frustrating Freedom

Microsoft seems to have won the OOXML ISO vote. I'm very annoyed.

I can't throw away any Microsoft products, since I don't have any at hand. I use Linux and mostly free and open source software. The level of corruption displayed and allowed by ISO has further convinced me of the need for freedom in the world of computers.

There are plenty of articles and blogs out there documenting the masquerade that was allowed to take place world wide, so I will not reiterate.

However, I need to vent on two things.

1. Microsoft is the only company as of yet that has a near implementation of OOXML. Everyone else has to play catch up. By the time that other companies will have implemented the 6000+ pages of incomplete and broken implementation, Microsoft will already be at OOXML version 2. Good luck catching up.

2. There is NO, I repeat NO need for two standards. Backwards compatibility is about the silliest, most bass ackward reason for the existence of OOXML. Sure, there are plenty of documents created in Microsoft's proprietary formats. However, most (all?) of the so-called backward compatibility elements of OOXML are marked as deprecated. Wow! That means that:
a) You do not have to implement those features (So why do they exist?)
b) It is not documented how you should implement those features (Only Microsoft knows)
c) It's a glossy, 'brand new' format, and already we are deprecating some of it's features (Talks about quality, doesn't it)

If Microsoft REALLY cared for interoperability, they would have kindly documented how those features work, and removed ALL proprietary, undocumented, deprecated tags from their half-assed format.

There are many reasons why OOXML should never has been approved by any standard organization. I mean, if the format is so technically superior, why would Bill Gates call presidents of countries around the world to get then to rubber-stamp his format?

I certainly hope that this blows up in Microsoft's face. Their illegal monopoly is hurting computing freedom too much.

Labels: ,