Thursday, September 28, 2006

Windows, Linux, Cars and Lego's (Part 2 of 5)

Problem #2: Linux is too different from Windows

This next issue arises when people do expect Linux to be different, but find that some differences are just too radical for their liking. Probably the biggest example of this is the sheer amount of choice available to Linux users. Whereas an out-of-the-box-Windows user has the Classic or XP desktop with Wordpad, Internet Explorer, and Outlook Express installed, an out-of-the-box-Linux user has hundreds of distributions to choose from, then Gnome or KDE or Fluxbox or whatever, with vi or emacs or kate, Konqueror or Opera or Firefox or Mozilla, and so on and so forth.

A Windows user isn't used to making so many choices just to get up & running. Exasperated "Does there have to be so much choice?" This question is very common.

Does Linux really have to be so different from Windows? After all, they're both operating systems. They both do the same job: Power your computer & give you something to run applications on. Surely they should be more or less identical?

Look at it this way: Step outside and take a look at all the different vehicles driving along the road. These are all vehicles designed with more or less the same purpose: To get you from A to B via the roads. Note the variety in designs.

But, you may be thinking, car differences are really quite minor: they all have steering wheels, gas-pedals, a manual or automatic transmission, brakes, windows & doors, a gas tank. . . If you can drive one car, you can drive any car, although, to some manual transmissions are a bear.

Quite true. But did you not see that some people weren't driving cars, but were driving motorcycles (yeah baby) instead. . ?

Switching from one version of Windows to another is like switching from one car to another. Win95 to Win98 to WinMe (of which sucked), I honestly couldn't tell the difference. Win98 to WinXP, now that was a bigger change but really nothing major.

But switching from Windows to Linux is like switching from a car to a motorcycle. They may both be operating systems (OSes)/road vehicles. They may both use the same hardware/roads. They may both provide an environment for you to run applications/transport you from A to B. But they use fundamentally different approaches to do so.

Windows/cars are not safe from viruses/theft unless you install an anti virus/lock the doors. Linux/motorcycles don't have viruses/doors, so are perfectly safe without you having to install an anti virus/lock any doors.

Or look at it the other way round:

Linux/cars were designed from the ground up for multiple users/passengers. Windows/motorcycles were designed for one user/passenger. Every Windows user/motorcycle driver (Biker) is used to being in full control of his computer/vehicle at all times. A Linux user/car passenger is used to only being in control of his computer/vehicle when logged in as root/sitting in the driver's seat.

Two different approaches to fulfilling the same goal. They differ in fundamental ways. They have different strengths and weaknesses: A car is the clear winner at transporting a family & a lot of cargo from A to B: More seats & more storage space. A motorcycle is the clear winner at getting one person from A to B: Less affected by congestion and uses less gas.

There are many things that don't change when you switch between cars and motorcycles, You still have to put gas in the tank, you still have to drive on the same roads, you still have to obey the traffic lights and Stop signs, you still have to indicate before turning, you still have to obey the same speed limits.

But there are also many things that do change: Car drivers don't have to wear helmets, motorcycle drivers (Bikers) don't have to put on a seatbelt. Car drivers have to turn the steering wheel to get around a corner, Bikers have to lean over. Car drivers accelerate by pushing the gas pedal, Bikers accelerate by twisting a hand control(Throttle).

A Biker who tries to corner a car by leaning over is going to run into problems very quickly. And Windows users who try to use their existing skills and habits generally also find themselves having many issues. In fact, Windows "Power Users" frequently have more problems with Linux than people with little or no computer experience at all, for this very reason. Typically, the most vehement "Linux is not ready for the desktop yet" arguments come from ingrained Windows users who reason that if they couldn't make the switch, a less-experienced user has no chance. But this is the exact opposite of the truth.

So, to avoid problem #2: Don't assume that being a knowledgeable Windows user means you're a knowledgeable Linux user: When you first start with Linux, you are a novice.

Thursday, September 21, 2006

Windows, Linux, Cars and Lego's (Part 1 of 5)

New Linux users are having some problems making the switch from Windows to Linux. This causes many problems for many people. Many individual issues arise from this single problem.

Problem #1: Linux isn't exactly the same as Windows.

You'd be amazed how many people make this complaint. They come to Linux, expecting to find essentially a free, open-source version of Windows. Quite often, this is what they've been told to expect by over-zealous Linux users. However, it's a paradoxical hope.

The specific reasons why people try Linux vary wildly, but the overall reason boils down to one thing: They hope Linux will be better than Windows. Common yardsticks for measuring success are cost, choice, performance, and security. There are many others. But every Windows user who tries Linux, does so because they hope it will be better than what they've got.

Here lies the problem, it is logically impossible for any thing to be better than any other thing while remaining completely identical to it. A perfect copy may be equal, but it can never surpass. So when you give/gave Linux a try in hopes that it would be better, you were inescapably hoping that it would be different. Too many people ignore this fact, and hold up every difference between the two operating systems (OSes) as a Linux failure.

As a simple example, consider driver upgrades: one typically upgrades a hardware driver on Windows by going to the manufacturer's website and downloading the new driver; whereas in Linux you upgrade the kernel.

This means that a single Windows download & upgrade will give you the newest drivers available for your machine, whereas in Linux you would have to surf to a few sites and download all the upgrades individually. It's a very different process, but it's certainly not a bad one. But many people complain because it's not what they're used to.

Or, as an example you're more likely to relate to, consider Firefox: One of the biggest open-source success stories. A web browser that took the world by storm. Did it achieve this success by being a perfect imitation of IE, the then-most-popular browser?

No. It was successful because it was better than IE, and it was better because it was different. It had tabbed browsing, live bookmarks, built-in search bar, PNG support, ad block extensions, and other wonderful things. The "Find" functionality appeared in a toolbar at the bottom and looked for matches as you typed, turning red when you had no match. IE had no tabs, no RSS (news feeds) functionality, search bars only via third-party extensions, and a find dialogue that required a click on "OK" to start looking and a click on "OK" to clear the "Not found" error message.

A clear and inarguable demonstration of an open-source application achieving success by being better, and being better by being different. Had Firefox been an IE clone, it would have vanished into obscurity. And had Linux been a Windows clone, the same would have happened.

So the solution to problem #1: Remember that where Linux is familiar and the same as what you're used to, it isn't new & improved. Welcome the places where things are different, because only here does it have a chance to shine (And you get to shine to, by trying something new.).

Monday, September 11, 2006

Linux Kernel Delayed By Microsoft's Army of Evil Monkeys

Around the World - Linus Torvalds announced yesterday that the Linux Kernel will be delayed. He blamed the delay on interference from Microsoft's Army of Evil Monkeys. The army has been disrupting the lives of key Linux programmers, and in some cases destroying portions of code. Torvalds himself has been a victim of several Evil Monkey attacks.

Evil MonkeysEvil Monkeys Steve Ballmer denied any involvement by Microsoft in the matter. "We did receive the Army of Evil Monkeys when we purchased evil from Satan, but those monkeys are only temporary employees and are not actual employees of Microsoft. Whatever they do on their own time is their business."

The Department of Justice said, "If this story is accurate, then this is just one more example of how Microsoft is using its monopoly power to stifle competition."

"It has been horrible, horrible," said Linux programmer Andy (last name withheld)., "the evil monkeys were everywhere. Trashing my computer, having monkey business in my bed. I lost several days worth of work."

Internal Microsoft e-mails obtained tell of a secret monkey training camp where the monkeys are trained to seek out and harass Linux programmers. The only comments from Bill Gates have been, "Fly my pretty, fly!"

Saturday, September 09, 2006

Software: It's a Gas

Nathan Myhrvold, the former CTO of Microsoft, is also a bona-fide physicist. He holds physics degress from UCAL and Princeton. He even had a postdoctoral fellowship under the famous Stephen Hawking. Thus, as you might expect, his 1997 ACM keynote presentation, The Next Fifty Years of Software is full of physics and science metaphors.

It starts with Nathan's four Laws of Software:

1. Software is a gas
Software always expands to fit whatever container it is stored in.

2. Software grows until it becomes limited by Moore's Law
The initial growth of software is rapid, like gas expanding, but is inevitably limited by the rate of increase in hardware speed.

3. Software growth makes Moore's Law possible
People buy new hardware because the software requires it.

4. Software is only limited by human ambition and expectation
We'll always find new algorithms, new applications, and new users.

Myhrvold goes on to describe software development as a state of Perpetual Crisis. The size and complexity of software is constantly rising, with no limit in sight. As we develop more advanced software-- and as we develop solutions to manage the ever-increasing complexity of this software-- the benefits of the new software are absorbed by the rising tide of customer expectations.

Software development will never be easy; new software always has to push against the current complexity boundary if it wants to be commercially successful.

This was all written in 1997. Nearly ten years later, are his points still valid? Software is certainly still a gas. Now that we're entering the multi-core era, there is one crucial difference. Historically hardware has gotten more complex because of limitations in the ability of software to scale; now the software needs to get more complex because of limitations in the ability of hardware to scale. The burden of scaling now falls on the software.

Myhrvold then makes an interesting point about the amount of storage required to capture human diversity. If..

* the human Genome is approximately 1 gigabyte of data
* the individual difference between any two humans is 0.25% of their Genome
* we assume a lossless compression rate of 2:1

The individually unique part of the human Genome can be stored in ~1.2 megabytes. Thus, you fit on a 3.5" floppy disk.

In fact, the entirety of human genetic diversity for every living human being could be stored in a 3.7 terabyte drive array. And the entire genetic diversity of every living thing on earth could be stored in roughly the size of the internet circa 2001.

I'm not sure what that means, exactly, but I love the idea that I can fit myself on a 3.5" floppy disk

Saturday, September 02, 2006

Star Trek Next Generation Meets Microsoft

Picard:
Mr. LaForge, have you had any success with your attempts at finding a weakness in the Borg? And Mr. Data, have you been able to access their command pathways?

Geordi:
Yes, Captain. In fact, we found the answer by searching through our archives on late Twentieth-century computing technology.

Geordi presses a key, and a logo appears on the computer screen.

Riker [puzzled]
What the hell is Microsoft?

Data [turns to explain]
Allow me to explain. We will send this program, for some reason called Windows, through the Borg command pathways. Once inside their root command unit, it will begin consuming system resources at an unstoppable rate.

Picard:
But the Borg have the ability to adapt. Won't they alter their processing systems to increase their storage capacity?

Data:
Yes, Captain. But when Windows detects this, it creates a new version of itself known as an upgrade. The use of resources increases exponentially with each iteration. The Borg will not be able to adapt quickly enough. Eventually all of their processing ability will be taken over and none will be available for their normal operational functions.

Picard:
Excellent work. This is even better than that unsolvable geometric shape idea.

. . . . 120 Minutes Later . . . .

Data:
Captain, we have successfully installed the Windows in the Borg's command unit. As expected, it immediately consumed 85% of all available resources. However, we have not received any confirmation of the expected upgrade.

Geordi:
Our scanners have picked up an increase in Borg storage and CPU capacity, but we still have no indication of an upgrade to compensate for their increase.

Picard:
Data, scan the history banks again and determine if there is something we have missed.

Data:
Sir, I believe there is a reason for the failure in the upgrade. Appearently the Borg have circumvented that part of the plan by not sending in their registration cards.

Riker:
Captain, we have no choice. Requesting permission to begin emergency escape sequence 3F!

Geordi: [excited]
Wait, Captain! Their CPU capacity has suddenly dropped to 0% !

Picard:
Data, what do your scanners show?

Data: [studying displays]
Appearently the Borg have found the internal Windows module named Solitaire, and it has used up all available CPU capacity.

Picard:
Lets wait and see how long this Solitaire can reduce their functionality.

. . . . Two Hours Pass . . .

Riker:
Geordi, what is the status of the Borg?

Geordi:
As expected, the Borg are attempting to re-engineer to compensate for increased CPU and storage demands, but each time they successfully increase resources I have setup our closest deep space monitor beacon to transmit more Windows modules from something called the Microsoft Fun-Pack.

Picard:
How much time will that buy us?

Data:
Current Borg solution rates allow me to predict an interest time span of 6 more hours.

Geordi:
Captain, another vessel has entered our sector.

Picard:
Identify.

Data:
It appears to have markings very similar to the Microsoft logo...

[over the speakers]

This is admiral Bill Gates of the Microsoft flagship MONOPOLY. We have positive confirmation of unregistered software in this sector. Surrender all assets and we can avoid any trouble. You have 10 seconds to comply.

Data:
The alien ship has just opened its forward hatches and released thousands of humanoid-shaped objects.

Picard:
Magnify forward viewer on the alien craft!

Riker:
My God, captain! Those are human beings floating straight toward the Borg ship - with no life support suits! How can they survive the tortures of deep space?!

Data:
I dont believe that those are humans, sir. If you will look closer I believe you will see that they are carrying something recognized by twenty-first century man as doeskin leather briefcases, and wearing Armani suits.

Riker and Picard, together [horrified]
Lawyers!!

Geordi:
It can't be. All the Lawyers were rounded up and sent hurtling into the sun in 2017 during the Great Awakening.

Data:
True, but appearently some must have survived.

Riker:
They have surrounded the Borg ship and are covering it with all types of papers.

Data:
I believe that is known in ancient vernacular as red tape. It often proves fatal.

Riker:
They're tearing the Borg to pieces!

Picard:
Turn the monitors off, Data, I cant bear to watch. Even the Borg doesn't deserve such a gruesome death!

Thursday, August 24, 2006

Your Own Apache Web Server.

Having your own Web server goes beyond the need to put your business' information out on the Internet for all to see. While that certainly won't hurt, there are many more ways you can take advantage of such a server.

Whether you are running a department within a large corporation, or your own small business, having access to an HTTP server can quickly improve the way your employees share knowledge.

Groups within an organization of any size generally need to share a great deal of information, even though they may be working toward different goals. One way to accomplish this is to provide groups and individuals with access to an intranet Web server and allow them to publish their own facts and figures. Everyone could share one web server, and have a common user interface to access each others' work. If more space or segregation of information is needed, individual groups could set up their own web server using surplus hardware and Linux.

In another situation, you--the content provider--know exactly what you want, but are unable to find just the right package of features at the right cost. Many ISPs charge extra for even basic logging information. Given the tight margins that all businesses have to operate within these days, occasionally the right move is to set up your own host hardware.

Another reason to set up a Web server is that some Internet-based applications may require performance that only a dedicated server can offer--tuned to your special needs.

It may seem unlikely that you can provide a better service than experienced ISPs, but ISPs are catering to a mass market and tend to charge a lot for special services. Some web applications just don't fit into the general ISP scheme and installing your own web server on a Linux box, could prove to be a cost effective way of getting the Internet services you need.

Making basic documents available is fairly straightforward. First, install a Linux distribution containing Apache. You can check that the server is up by pointing your browser (Mozilla, Konqueror, etc. on the same machine as the server) at http://localhost/. You should also be able to access this remotely with the machine's name. For instance, if the machine's domain name is penguin.org, then the URL http://penguin.org should work. Next look at the server's configuration directory. On SuSE this is /usr/local/http/htdoc/. Look for the directive DocumentRoot in the http.conf or srm.conf files. This will show the server's main document directory. A file (in this case file.html) placed here will appear at the topmost level, such as, http://localhost/file.html

By default the server also looks in users' directories for public HTML directories and makes these available on the web server. For instance, if you have a login code john with a home directory /home/john. Place some files in /home/john/public_html and they will become available at http://localhost/~john/

Next, we will look at a popular method to produce dynamic content based on a web user's input to a form. Normally, web users looking at your site will only see static HTML pages. The web scripting language PHP allows web pages to be built "on-the-fly" according to user input. PHP is very powerful and as programming languages go, is pretty easy to learn.

You will no doubt be aware of PHP scripts and their typical uses for processing forms and serving up dynamic content using databases. To make PHP scripts work, just make sure the it is installed, along with Apache, when you build Linux on your machine. On the server, you will also need to set up a special web directory so you have a place to put the scripts.

Create a "php" directory under your main web server directory (in SuSE 8.0 that's /usr/local/httpd/htdocs). You can also use your ~/public_html directory, if you like. That's what I'll use in my example. In this case it would be /home/rreilly/public_html/php.

Then you can enter the following text for your first php script. Call it inputform.php.

You'll also need an html file to go along with it. Put this file (call it form1.html) in the same directory as your php script.




Call up the form1.html file in your browser (http://localhost/php/form1.html, for example), enter your name and click on "Submit". You should see "Hello World, (your name)" in the browser window.

That's pretty much how PHP scripts work. Nothing complicated.

Web server security, especially with PHP, is another topic that you should investigate. Of course, it's not possible to adequately cover it in this article. Pick up a good book on PHP, if you want to really want start learning the language. I've found Larry Ullman's Visual Quickstart Guide "PHP For The World Wide Web" to be an easy to read and very useful basic text. Then look for some current how-to articles on the Web about security and PHP to fill in the security gaps.

Once you start getting some traffic on your web site you will be asking yourself questions. What files are people getting? Which area of the site is the most popular? What are the total number of megabytes we transferred last month?

To answer questions of this type you need to look at your logfiles. The server generates at least two logfiles: you can tell it to split up the data into more. There is always an 'error' log and an 'access' log, which are located in the /var/log/httpd directory.

The error log records attempts to get files on the server that fail. For instance if a user makes a typing mistake then the misspelled URL will show up in the error log.

The access log is a list of the URLs that were successfully retrieved. Both logs contain dates, number of bytes transferred and some information on where the request was made from. There is a powerful program for doing this under Linux and other UNIX-derived systems. The program is called analog. The simplest way to use analog is to install it as a package and then type:

analog >report.html

Look at report.html with a web browser, and then play around with analog. This program can be configured to extract information in every conceivable way from the server's log files.

Apache is a reasonably fast server. It can saturate a 10 Mb/s line using only a low end Pentium under normal conditions. But it is possible to tweak a little more performance out of it. Here are some things to try:

* In the file http.conf, change the value of MaxRequestsPerChild to 10000
* Add +FollowSymlinks to all your directory sections

Available RAM

Admittedly, this is a no-brainer.

Adding RAM to your machine can have a major effect. RAM is thousands of times faster than even the best hard disk. Because of this, the Linux system uses RAM to cache recently opened files. Apache will then be able to service requests faster. So even without altering any Apache config directives, after you add more RAM to your Linux box, it will be faster.

We have just scratched the surface for using the Apache web server to distribute information via web browsers. If you want to know more take a look at the excellent documentation that comes with Apache. How far you go is limited only by your imagination and time. Putting together a couple of small web servers in your company is an excellent way to learn the technology.

Tuesday, August 01, 2006

Has Linux patching surpassed Mac and Windows?

This may seem like a shock, but is it possible that the Linux patching has surpassed the Mac and Windows operating systems? Recent vulnerabilities in Flash and Firefox that can affect multiple operating systems highlight a weakness in the Mac and Windows auto-update process because they're primarily focused on patching Apple and Microsoft specific issues.

A notification system on third party vulnerabilities would be better than nothing. Most modern Linux distributions on the other hand like Redhat, SuSE and Ubuntu have automatic update mechanisms that patch across the entire spectrum of software since Linux by its very nature is made up of a collection of applications from different sources.

Most regular users don't really think about the patching process and can't possibly keep up with all the security advisories. If we take this particular vulnerability report for a critical flaw in Macromedia Flash, I would bet that the average computer user still hasn't and won't patch this vulnerability until some mechanism forces them to update it.

The Windows and Mac update mechanism will not bother with this particular vulnerability, but Redhat has already released a patch as a part of regular Linux update process. Microsoft has released patches for Macromedia Flash in the past but only because it was the version bundled with Microsoft Internet Explorer. Windows update will not address this particular flash vulnerability which technically isn't Microsoft's fault but it's still a very serious problem for Windows users that can lead to complete system compromise.

Microsoft has made some effort to consolidate the patch process for all Microsoft products with their Microsoft Update site, but this only addresses part of the problem for most Windows users. I'm not necessarily blaming Microsoft and Apple for not dealing with vulnerabilities from third party software vendors since they can't be legally held responsible for someone else's software, but the major Linux distributions have already made the effort to consolidate the update process. At the very least, it's an opportunity for Microsoft and Apple to make life easier for their users.

Perhaps what is needed is a centralized location for approved third party vendors to provide their latest critical updates within the Windows and Mac update systems which should at the very least include common software such as Macromedia flash and maybe even Mozilla Firefox. Then let the users opt in or out of third party patches within the regular auto-update mechanism. Even a notification system on third party vulnerabilities would be better than nothing. Without this, the average Windows and Mac user will simply leave the door wide open on third party applications for hackers to exploit.

Tuesday, July 25, 2006

(OSS)

Open Source Software (OSS) is provided with a license that gives the end user the right to use it freely for private or commercial use. You also have the right to inspect and even modify the underlying source code. You can give away or sell the original version you received or one with your modification, provided that you then in turn pass on the modified source code so that others can benefit from the changes you have made. This last clause protects the developer's work from unfair exploitation by others, while allowing the source code to be released to the community. You are not required to pay royalties to previous developers, but you are still permitted to charge money for the sale of OSS. This disc may have been given to you by a friend; or sold to you for a small fee, and both are permitted.

If you have no interest in source code, you may ask why the availability of this matters. One answer is that the release of source allows external observers to inspect the true functioning of the program, which means that you can be confident that the program treats your private data with respect. A real problem with proprietary software can be that your data is locked in to a software's proprietary file format, which means that you may eventually be forced to upgrade to newer versions of that software to retain access to your data. This does not happen with OSS, because when the source code for opening and saving files is available, a third party can easily write an import filter for the next generation of software, ensuring that your data will always be available.

Finally, the release of source code has in some cases spawned large communities of volunteer developers who have in turn provided the world with highly useful, and entirely free software such as Linux, OpenOffice, and Mozilla. These are then available free of charge to schools or anyone else who may not have a large budget available for software. So, you can see that the freedom of software is important for everyone, not just software developers.

Sunday, July 16, 2006

Firefox Popularity

Firefox, rose to 7.4 percent, up 5 percentage points from May. And, this is why: Firefox is stable and has proven to be a viable alternative to its archrival, Internet Explorer.

When considering how it handles downloads, the absence of ActiveX, the total lack of Firefox users complaining about excessive spyware infestations and even the fact that the browser has allowed for such great extensions to be created by motivated Firefox users is an exciting achievement.

Another side of it likely comes from the grassroots end of the web browser itself. We need to first consider that people don't just like this web browser, they are in love with it. As we have seen in other cases, when a large enough group of people become motivated about something, grassroots media is not all that far behind.

This might very well explain the success behind the Spread Firefox campaign. It's viral based on the video content and locating motivated producers has proven pretty easy based on its community focus What strikes me as totally amazing is that Firefox has in many ways succeeded in breathing life into the open source movement.

Firefox is not bloated. Both IE and Netscape Navigator are quite bloated. This by itself likely presented enough of a challenge on people running machines that may not have done all that well with running such a bloated program.

Firefox allows and encourages user created add-ons. Open source or not, Firefox really opened the doors and allowed for extensions whereas others do not.

Firefox has been made accessible on Linux, Windows and the Mac platforms from the early days of the browser. At no time were people being told what special circumstances needed to happen in order to use their product. Hardcore users know that Firefox has been about choice from the very beginning.

Another item that has begun to show its head is the "based on Firefox" world. This includes, but is not limited to, the Flock browser, and of course, the Democracy media player. By hedging their bets with Firefox browser code, projects such as these have seen some fair success of their own.

It is my belief that over time, Firefox will become less about the browser itself and more about how it has made an unsafe surfing environment a lot less scary thanks to their common sense design.

If you haven't tried Firefox out yet, just click on the Firefox banner below. So, go-ahead and give it a try, take it for a spin, kick the tires and let me know what you think.

Thursday, July 06, 2006

A Little Humor

Did you ever go to google to try to find a site you found last week but you can't remember what you typed in to find it? So you get in this habit of setting bookmarks but then you get like a ga-jillion bookmarks and you still can't find it.

Google has this new database service where you can upload anything you want and they will store it and make it searchable. So, I'm uploading all my bookmarks to the google database...