Shakespeare, 'Hamlet', Hot 3 Programming Post in today

Hot.1 MapQuest inches toward modernity

In talking to Mark Law, the new VP of product development for AOL's MapQuest, I was surprised to learn how powerful the service still is. To my mind the formerly leading mapping system is a trailing contender against Google, Yahoo, Microsoft, and Ask.com, but apparently MapQuest is still in the game as a leading Web site, with 48 million monthly visitors to the site, not to mention the users of the service who see it embedded on partner sites. The new MapQuest puts a map on the destination page, as well as a better address entry box.Law walked me through updates to the service that will be rolling out as an optional beta test to the site's users on Tuesday. In a nutshell, the changes are evolutionary and to my mind required if the app to stay relevant. But the MapQuest team has to be careful with its updates, since so many general users of the service are accustomed to its somewhat old-fashioned interface and market-trailing features. Of his users, Law says simply, "They don't want to see a lot of change."
More: http://news.cnet.com/8301-17939_109-10025491-2.html



Hot.2 Improve Your Development Lifestyle

My friend JP has always said that man (and woman) was not meant to sit behind a desk 8+ hours a day. We were meant to do physically laborious tasks like pillage, plunder, and conquer. Although I’m a lover not a fighter, I understand what he means. I personally have always struggled with my weight being as heavy as 300 lbs to as low as 190 lbs. My pants have been as large as 44” waist to as low as 32”. It’s a constant battle to stay healthy, especially in the U.S.A. where everything can and will be super-sized. Although I love development and the challenges it brings, I do not love the lifestyle it promotes. Developers are usually convinced and persuaded to drink lots of coffee, energy drinks, and sugary snacks to stay in programming Zen. Along with bad snacks you have the long night development crams where managers lure you with pizza, and early morning deployments with incentives of donuts. Take a look around your development environment and see how many people are wearing pants that are too tight, or count the number of bellies pouring over the belt. So what do you do to improve the developer lifestyle, well it’s quite easy… on paper. It takes a lot of hard work and discipline.
More: http://monstersgotmy.net/post/2008/08/25/Improve-Your-Development-Lifestyle.aspx

Hot.3 Dealing with programmers who are different and disagree

Generally, we are very tolerant and understanding. We appreciate to work with other people, listen and accept their ideas. Especially it is easy with people who completely agree with us. As for people who don’t… How could we appreciate people who disagree with your bright ideas, have own opposite opinion and don’t want to happily follow you? We can fight them, lure them and even force them to agree. There are many persuasion techniques, psychological tricks and political games that could make them to convert to your side. But should we always convert them? This post is devoted to the hard and ungrateful job of appreciating people who think, feel and behave differently.
More: http://softwarecreation.org/2008/dealing-with-programmers-who-are-different-and-disagree/
...

Java technology on the client with applets, Swing, and JavaFX has had limited success.

ActionScript 3 for Java Programmers
Posted by on Aug 25, 2008 05:08 AM
http://www.infoq.com/articles/actionscript-java

Community Java Topics Rich Internet Apps, Rich Client / Desktop Tags Flex, ActionScript
Let’s face it: The client has not been a friendly place for Java programmers. Java technology on the client with applets, Swing, and JavaFX has had limited success. JavaScript, despite its name, is almost nothing like the Java language. And Adobe Flash—well, it’s just like JavaScript. Or is it? It might have been the case that Flash was like JavaScript a couple of years ago, but with the advent of ActionScript 3, a lot has changed. And I think you’ll find a lot to like.

RelatedVendorContent
Guide to Calculating ROI with Terracotta Open Source JVM Clustering

The Agile Business Analyst: Skills and Techniques needed for Agile

Introducing application infrastructure virtualization and WebSphere Virtual Enterprise

Scale your applications without punishing your database

Spring App Platform, Java Concurrency/Multicore, Eclipse Mylyn and more @ QCon SF Nov 19-21
First, ActionScript—the programming language for Adobe Flex and Flash—is now strongly typed. It also has first-class object orientation, including classes and interfaces. It has extras that you won’t find in Java—notably, get and set functions for properties and a language extension called ECMAScript for XML (E4X), which turns any XML document into objects that you can reference with dot operators, just like regular objects.

This article takes you through the basics of ActionScript 3 and shows how it compares with the Java environment you’re used to. By the end, you should have given up any preconceptions you may have had about ActionScript and have some interest in playing with it. One of the great things about Flex, Flash, and ActionScript is that they’re available at no cost. Simply download Adobe Flex Builder 3 to get started. Flex Builder, which is a sophisticated integrated development environment (IDE), is not a free application, but the Flex Software Development Kit (SDK) that it uses to build Flash applications is.

A word of warning to language purists out there reading this article: I’m not a language guru, so I might gloss over some language details. I’m also not trying to present everything in ActionScript 3 in this article. If that’s what you’re after, many good books on ActionScript 3 are available. What I can do is give you a feel for the language. Here goes.

Classes and interfaces
Just as with Java, everything is really an object in ActionScript 3. There are a few primitive types like integers, but beyond that everything is an object. Similarly, like Java, there are namespaces and packages, like com.jherrington.animals, which would mean company / jack herrington / animal classes, in this case. You can put classes into the default namespace, but it’s better to control your namespace.

To define a class, you use the class keyword, just as with Java. Here’s an example:

package com.jherrington.animals { public class Animal { public function Animal() { } } }
In this case, I'm defining an Animal class with a constructor that currently does nothing.

I can add a few member variables and refine the constructor quite easily, as shown here:

package com.jherrington.animals { public class Animal { public var name:String = ""; private var age:int = 0; private function Animal( _name:String, _age:int = 30 ) { name = _name; age = _age; } } }
Here, I'm defining that an Animal object has two member variables; name, which is a public string, and age, which is a private integer. (Apparently, animals are shy about their age.) The constructor takes one or two values: either the name alone or the name and an age. You can provide default values for arguments by adding them in the function declaration.

What you notice about this code is that the typing is inverted from Java. In Java, the type comes first; in ActionScript, it comes second. This is because strong typing is an add-on to ActionScript. So to support older, non-typed code, the type comes after the variable name.

Let's extend the example by adding a few methods:

package com.jherrington.animals { import flash.geom.Point; public class Animal { public var name:String = ""; private var age:int = 0; private var location:Point = new Point(0,0); public function Animal( _name:String, _age:int = 30 ) { name = _name; age = _age; } public function moveTo( x:int, y:int ) : void { location.x = x; location.y = y; } public function getLocation( ) : Point { return location; } } }
As you can see here, I've added another private member variable, location, of type Point, which I've imported from Flash's geometry package. And I've added two methods that work with the location: moveTo, which moves the animal, and getLocation, which returns the current location.

Now, that's kind of the Java way to get and set a value. The ActionScript way to do it is a lot cleaner, as you can see in this code:

package com.jherrington.animals{ import flash.geom.Point; public class Animal { public var name:String = ""; private var age:int = 0; private var myLocation:Point = new Point(0,0); public function Animal( _name:String, _age:int = 30 ) { name = _name; age = _age; } public function set location( pt:Point ) : void { myLocation = pt; } public function get location( ) : Point { return myLocation; } } }
Here, I'm using get and set functions that are invoked when the client code gets or sets the value of the member variable location. To the client, the location variable looks just like a regular member variable. But you can set whatever code you like to respond to the member variable setting and handle the get of the variable, as well.

How can you make use of this? You can add an event that is triggered when the location changes. Check that out in this code:

package com.jherrington.animals{ import flash.events.Event; import flash.events.EventDispatcher; import flash.geom.Point; public class Animal extends EventDispatcher { public var name:String = ""; private var age:int = 0; private var myLocation:Point = new Point(0,0); public function Animal( _name:String, _age:int = 30 ) name = _name; age = _age; } public function set location ( pt:Point ) : void { myLocation = pt; dispatchEvent( new Event( Event.CHANGE ) ); } public function get location( ) : Point { return myLocation; } } }
Now, I'm specifying that the Animal class is an event dispatcher- that is, an object from which clients can listen for events. I then dispatch a new event when the location changes.

Here is the client code that creates an animal, sets itself up to watch for change events, then changes its location:

var a:Animal = new Animal(); a.addEventListener(Event.CHANGE, function( event:Event ) : void { trace( "The animal has moved!" ); } ); a.location = new Point( 10, 20 );
This code brings up a trace message when the animal has moved. You can define any type of messages you want in ActionScript. Most of the classes are EventDispatchers and have events for which you can add listeners.

Interfaces
Just like Java, the ActionScript 3 language supports builder interfaces and implementing them with classes. The interface shown below is an example of what we might make from the Animal class:

package com.jherrington.animals { import flash.geom.Point; public interface IAnimal { function get name() : String; function set name( n:String ) : void; function get location() : Point; function set location( pt:Point ) : void; } }
In this case, I'm defining two member variables for the interface that I can both set and get. Yes, you can define methods and member variables in ActionScript interfaces. How cool is that?

To implement the interface, I've made some changes to the Animal class. You can see that in the code below:

package com.jherrington.animals { import flash.events.Event; import flash.events.EventDispatcher; import flash.geom.Point; public class Animal extends EventDispatcher implements IAnimal { private var myName:String = ""; public function get name() : String { return myName; } public function set name( n:String ) : void { myName = n; dispatchEvent( new Event( Event.CHANGE ) ); } private var myLocation:Point = new Point(0,0); public function set location ( pt:Point ) : void { myLocation = pt; dispatchEvent( new Event( Event.CHANGE ) ); } public function get location( ) : Point { return myLocation; } public function Animal( _name:String ) { name = _name; } } }
Of course, I can add variables and methods specific to this class or implement other interfaces in addition to the IAnimal interface. As with Java, however, I can only inherit from one base class.

Statics and constants
ActionScript 3 supports both constants and static member variables as well as static methods. Constants are easy to define, as you can see in the code below:

public const MINIMUM_AGE:int = 0; public const MAXIMUM_AGE:int = 2000;
Constants can be of any type you like, but they have to be defined at compile time. They can also be protected or private if you want to scope them that way.

To demonstrate a static function, I show a factory method in the Animal class:

public static function buildAnimal( n:String ) : IAnimal { return new Animal( n ); }
Another way to use static method is in a Singleton pattern. Below is an example of a Singleton factory class for the Animal class:

package com.jherrington.animals { public class AnimalFactory { private static var _factory:AnimalFactory = new AnimalFactory(); public static function get instance() : AnimalFactory { return _factory; } public function build( n:String ) : Animal { return new Animal( n ); } } }
To invoke it, I use the instance member variable to get the single factory object:

private var b:Animal = AnimalFactory.instance.build( "Russell" );
This uses the Singleton factory object to create a new animal with the name Russell.

Inheritance
To demonstrate inheritance, I show three interfaces and classes. The first interface is the IAnimal class I showed before. The second is the Animal class, and the third is a derived class called Dog that overrides a method.

The interface, IAnimal, is shown below:

public interface IAnimal { function get name() : String; function set name( n:String ) : void; function move( x:int, y:int ) : void; }
I've simplified it a bit by taking it back to just a name member variable and a move() method. The first implementation of the interface is the Animal class:

public class Animal extends EventDispatcher implements IAnimal { private var myName:String = ""; public function get name() : String { return myName; } public function set name( n:String ) : void { myName = n; dispatchEvent( new Event( Event.CHANGE ) ); } public function Animal( _name:String ) { name = _name; } public virtual function move( x:int, y:int ) : void { } }
Then, the Dog class builds on the Animal class by having its own constructor and an override of the move() method:

public class Dog extends Animal { public function Dog(_name:String) { super(_name); } public override function move( x:int, y:int ) : void { trace( 'Moving to '+x+', '+y ); } }
This is a lot like Java code, so you should feel really at home in implementing your object-oriented designs in ActionScript.

Operators and conditionals
Operators in ActionScript are exactly the same as what you find in Java. Similarly, math and Boolean operators are the same:

var a:int = 5; var b:int = 6; var c:int = a * b; c *= 10; var d:Boolean = ( c > 10 ); var e:int = d ? 10 : 20;
These examples show a few of the different operators. The only difference in these examples between ActionScript and Java is the syntax for defining the variables.

Like operators, conditionals work exactly the same between the two languages-for example:

if ( a > 10 ) { trace( 'low' ); } else if ( a > 20 ) { trace( 'high' ); } else { threw new Exception( "Strange value" ); }
shows both the conditional syntax and how you can throw exceptions. Exception handling is exactly the same in Java. You can define your own exception types or just use the standard Exception class.

The try, catch, and finally syntax is shown in the example below:

try { location = new Point( -10, 10 ); } catch( Exception e ) { trace( e.toString() ); } finally { location = null; }
This code tries to set the location and traces out the error if a problem occurs. In any case, the location will be set to null at the end.

Iterators
ActionScript 3 doesn't have strongly typed containers, but it's still easy to work with arrays and hash tables. Here is an example of using a for loop to iterate an array:

var values:Array = new [ 1, 2, 5 ]; for( var i:int = 0; i < values.length; i++ ) trace( values[i] );
But this isn't really the way you want to iterate an array in ActionScript. The best way is to use the for each syntax, as shown in the next sample:

var values:Array = new [ 1, 2, 5 ]; for each ( var i:int in values ) trace( i );
This code iterates through each element in the array and sets the value of i to each element along the way.

To create a hash table, you use the basic Object type in ActionScript:

var params:Object = { first:'Jack', last:'Herrington' }; for( var key:String in params ) trace( key+' = '+params[key] );
ActionScript's origins in JavaScript mean that the base object type is a slots-based container that you can easily use as a hash table.

Regular expressions
Regular expressions are baked right into the base syntax for ActionScript. For example, this code:

if ( name.search( /jack/i ) ) { trace('hello jack'); }
performs a simple check on a string.

This code uses a regular expression to perform a split operation:

var values:String = "1,2,3"; for each( var val:String in values.split(/,/) ) { trace( val ); }
Whether you should have regular expressions embedded in the core syntax is debatable. The architects of Java obviously thought these expressions should go in an external library. But I think that they are useful enough that they should be integrated as they are in ActionScript.

E4X
XML is used widely enough that ActionScript has support for it built right into the language syntax. If you're an XML junkie, you are going to love this. Check it out:

var myData:XML = Jack Oso Sadie ; for each ( var name:XML in myData..name ) { trace( name.toString() ); }
This code defines an XML document, then searches it and prints out all the tags.

This next bit of code also gets tags but only tags that are specified with a type of dog.

var myData:XML = Jack Oso Sadie ; for each ( var name:XML in myData..name.(@type='dog') ) { trace( name.toString() ); }
The @ syntax is similar to XPath and XSLT. It's used to specify that we are looking at attributes and not XML elements.

E4X is a fantastic addition to the language. It turns XML parsing from a chore into a delight. Web services can even be returned in E4X format for easy parsing.

Conclusion
Adobe has made some extraordinary strides with ActionScript. It's a far more sophisticated language than most people give it credit for. I think you'll find that what Adobe has done is taken some of the lessons learned from what is right and wrong about Java and incorporated them into their development of the ActionScript 3 language. You'll be very happy with the result.

For more information
For more on the similarities between ActionScript and Java syntax, read Yakov Fain's article, "Comparing the syntax of Java 5 and ActionScript 3" (JDJ, November 12, 2006).
A Java-to-ActionScript converter is available for download from Open Source Flash that allows you to use Java rather than ActionScript to create Flash content.
For a list of resources to help you migrate between ActionScript, Flex, Java, and JavaScript development, see RIAdobe's comparison list.
Flex.org is your source for all things Adobe Flex.

China takes lead in Linux education

Since the Chinese government began supporting domestic open source communities in 2005, hundreds of thousands of young people in the world's most populous country have become a part of the open source world.

With the help of the government-supported Leadership of Open Source University Promotion Alliance (LUPA), Zhejiang Technology Institute of Economy (ZJTIE) founded its Linux Training & Examination Center in 2006. The center started out offering a simple 48-hour course; upon completion, students received a Linux operator certificate or a Linux network administrator certificate or both. According to ZJTIE, 1,500 students in the last two years have passed the examination. However, those students who wanted to learn more had to learn by themselves.

Now, however, LUPA offers nine Linux certificates, including certificates for software engineers, C programming language engineers, and LAMP system engineers. In response to a requirement from China's Ministry of Education, LUPA published 11 new Linux textbooks in July. The Ministry hopes that these textbooks will help Chinese students learn more advanced Linux technologies.

Rising employment
Some Chinese schools believe that Linux education has helped students gain employment. According to ZJTIE, 90% of the students in its Economic Information Department received the LUPA certificates in 2006; as a result, employment rose to the highest the school has seen. This may be a result of the booming open source market in China. According to CCID Consulting, the sale of Chinese open source software increased 17.1%, while sales of Linux increased 20.2% in 2007.

As Linux accounts for 66.5% of China's open source market (according to a 2007 survey from CCID Consulting), open source education has been focused mostly on Linux. However, its success has encouraged ZJTIE to expand its teaching and certification. In March 2008, ZJTIE worked with LUPA to expand its education system from Linux to the whole open source industry.

According to LUPA, more than 300 Chinese universities and colleges have joined its system. Open source technology has become a required course in many of these schools. Although the total number of students who have been trained for open source technologies is not available yet, Zhang Jianhua, chairman of LUPA, estimates that LUPA will train 100,000 students in Linux per year.

Beyond the classroom
Besides developing open source courses, government-supported communities also regularly hold activities such as open source conferences, speeches, contests, festivals, and campus marches to attract students to learn more about the culture, history, ideas, and technologies of the open source industry. At the same time, open source communities without government support have brought many young Chinese to the open source world by offering free open source information, translation of open source articles from other countries, and forums for open source technologies communication.

Thanks in part to promotion by these communities, open source has become a powerful idea among Chinese programmers. In a survey by PHPChina in June 2007, 32.6% of PHP professionals said that they chose PHP mostly because it's open source, and 64.8% of interviewees who would start to learn PHP believed that "open source is the strong point of PHP." The same survey also showed that more than three quarters of the Chinese PHP professionals learned something from or received information through domestic PHP communities.

The rapid growth of China's open source expertise has yet to result in much contribution to the development of the global open source industry. This may be because young Chinese people are still novices in the open source industry, or it may be due to the fact that they have to work more than 60 hours a week to fight for their new jobs and have no time to work on open source projects for the time being. However, as the open source education system improves and as more young people become open source veterans, the global open source community will benefit from China's presence.

5 Anti-Linux Sites You Must Follow!

Ever since I read Jeremy Allison’s blog post about why we need to hear criticisms from people who dislikes Linux, I have been thinking a lot about what he said and how it hits very close to my own philosophy about life: In order to improve, you need to be open to criticisms; even from your enemies. One of the (many) things that most people dislike about Microsoft is that they don’t have any real communication between the developers and the users; so when you discover a bug or have opinions about a feature that can be improved or added, there is no real easy way to directly (or indirectly) communicate with a developer. However, recently they have showed some improvement by opening up blogs for IE8 beta and Windows 7, where product developers actively communicate with users. So why should we turn a blind eye towards Linux critics?

Here are some of the popular sites who are active critics of linux:

1) Why Linux Sucks: They are not really anti-linux, they just hate linux. :)

Quoting:

“This site’s purpose is to bring to light a lot of issues that Linux users run into that they shouldn’t run into: Issues that occur for both experienced and new Linux users. It also focuses somewhat on issues that severely need attention in order for the Linux Desktop (GNOME, KDE, etc) to become as much as it can be.

We are not against Linux - quite the contrary! - but we are over the misinformation, lies and downright idiocy that surrounds and impedes the progress of a lot of Linux’s Desktops, Applications and Subsystems.”


2) Linux Hater’s Blog: The subject of Allison’s blog post. This is a very active blog, with comments ranging from several hundred per post; most of the comments are back and forth arguments about who is right and who is wrong. The comments are rightfully named as “flames”. Most interesting of all, he has a shop selling anti-linux shirts and coffee cup. :)



Click for larger View

3) Promoting Linux: This is probably a parody site. But if you want some good laugh, this is the site for you :). Some quotes from the site:

“I tried Linux and it burned me. Badly. Now I use Windows because “it just works.”

“The freedom to write our own device drivers and recompile the kernel is no freedom at all.”

“WE kNoW WhO YOU aRe. WE ArE GoInG To kILL yOU!” — Linux Kernel Team

4) LinSux: A Forum devoted to linux suckiness. :). 92 members so far…

5) Jerry Lee Cooper: Ok this hasn’t been updated for while, but this blog, titled: “Gems from the net guru”, is full of posts on how linux sux and windows rocks. For total awesomeness (and good laughs), skip the first couple of posts and read the rests.

Ok this is all I could come up with. With all the windows hating sites out there, linux haters have a lot of catching up to do…

If you liked this article, please share it on del.icio.us, StumbleUpon or Digg. I’d appreciate it. :)

Will Netbooks Pave the Way for Linux?

As we all know by now, netbooks are the latest craze in the computing world. Small notebooks, perfect for on the go, and relatively cheap. The interesting thing is that these netbooks are often offered with Linux pre-installed instead of Windows, and this prompts many to believe that it is the netbook niche where Linux will gain its first solid foothold among the general populace. "It does a lot to level the playing field. In fact, Linux looks to be quick out of the gate," said Jay Lyman, analyst with the 451 Group. However - is that really happening?


Personally, I am not so convinced that the netbook market will be a Linux stronghold. This isn't due to Linux not being ready or anything - in fact, for a netbook, Linux is 'readier' than Windows, if you ask me. As I explained in the review of the Acer Aspire One, it can run a full Linux installation with Compiz Fusion running smoothly, playing Flash and video files without a single hitch. Windows XP, on the other hand, would need more RAM, special tweaks to make it work properly on the solid state drive, and you won't get a hardware accelerated desktop.

It is not the readiness that makes me doubt the stronghold assertion. What does make me doubt is opening my eyes and looking at the reality of the internets. What are the most popular threads on netbook community websites? What requests are most often made? Which blog posts get the most comments? Which howtos and guides are read the most?

Exactly, the ones that detail how to install Windows XP on netbooks that ship with Linux (and threads that detail with issues concerning XP after installation). Like this one. Or this one. Or this one. Oh, and over here. And so on, and so forth.

I stumbled upon all of these while finding ways to wreck my One doing research for the One review, and it quickly dawned on me. A lot of people keep saying that Microsoft's sales figures are misleading since you never know how many PCs pre-installed with Windows are in fact turned into Linux machines (or Vista into XP). I think the situation in the netbook market is the exact opposite: I firmly believe that many, many of the Linux netbooks are in fact turned into Windows XP netbooks. In other words, it is hard to say just how many netbooks are out there running Linux.

In case you are wondering - yes, my One still runs Linux, and will continue to do so. I mean, fat32 just to get acceptable performance out of the SSD drive? And no wobbly windows? You must be kidding me.

New to Linux? Make sure you bookmark these

New users in the Linux/Unix land are often confused and overwhelmed by the marked differences between the OS they come from and Linux. It takes some time gettting used to the new environment and the new way of doing things. Now while you are at it, take a look at these websites that are there to help you make the smooth transition, these provide extensive documentation to step-by-step howtos, and also community support.

Now while there are scores of material worthy of a mention, in the internet, I list the ones that every new user must bookmark (or atleast take a look at).


Distrowatch.com


Here, you can find reviews and news about the most popular Linux/Unix distributions as well the new ones that just came in. Regularly updated upon each new version release of the distributions and also ranks them based on page views. Overall, this is the place to be in if you are trying to find a new distro to try out.

The Linux Documentation Project


This site contains tons of materials to get you started or help you if you get stuck in the middle. From HowTos, guides, manpages, to Linux Gazette, an online magazine, this site is so full of information that its almost overwhelming in itself.

The Gentoo Wiki


While the name might indicate that its specifically for the gentoo users, its not. The guides and howtos here can be related to most of the distributions with minor modifications like the actual download process involving the package managers, etc. Here one can find guides for a broad range of topic covering almost all aspect of Linux, from kernel configurations to wine and cedega, the gentoo wiki is for all linux users, irrespective of the choice of distribution.

The Ubuntuforums


Once again I mention something attached to a particular distribution. However, ubuntuforums, as all of its members knows, isn't just a place for ubuntu users. The sub forums in the other OS sections exists as well, although the real charm is the sheer number of people active here and the awesome community section. Nice place to get to know fellow linux users while engaging in some non-technical chat. Offcourse, you can also take a peep and find yourself comfortable in the programming section solving challenges. Its just a fun place to be here, even for the non-ubuntu users.


Linux Manpages


As the name suggests this site is dedicated to the manpages. No distraction at all as you dive into man to find that lost option or switch. Specially beneficial for the ones who dislikes reading from the terminal. The ability to search and click also adds charm to the whole man page reading thing.


Other than these, you may also register to the forum or mailing lists of the distro you are using. IRCs are again a good place for support and discussion. Thats it fellows, read the FAQs, learn how to google and soon you will have a wealth of information at your disposal to make computing fun and comfortable.

Would Linux help Adobe pummel Microsoft?

Columnist John Dvorak thinks that Adobe Systems has a Microsoft problem and that Linux provides a clear solution:

Adobe could port its Creative Suite...to Linux as a shot across Redmond's bow. Then the company should embrace Linux in-house and develop a complete, optimized Linux OS designed to run a high-performance version of its Creative Suite on Linux optimized for Adobe products, to be sold as a bootable bundle for multicore-workstation hardware.

The idea is to produce a near-dedicated Adobe computer designed to use all the power of the newest chips to run the Adobe software under Linux. Having complete control of a high-powered OS would make all of the performance-demanding Adobe software run rings around any other implementation, if engineered correctly. It would become the viable desktop alternative to both the PC and the Mac.

It's not a bad idea, though I'm not sure the world is ready to move to single-purpose PCs, at least not those that focus on creative applications to the exclusion of e-mail, Web browsing, etc.

Yes, Dvorak notes that all of these applications can be had on the Linux desktop. Applications like Firefox work as well on Linux as on the Mac or Windows. But I think I'd take Dvorak's suggestion one step further: perhaps Adobe should band together with Google (or Yahoo) in a desktop partnership to bring the best of the Web and creativity applications together. Adobe and Google may butt heads in some areas, but they are the respective leaders in their markets and could find compelling reasons to work together to unseat Microsoft.

His vision of an Adobe-centric Linux desktop has potential, but it has a much better chance of succeeding if it managed to marry Adobe to a great Web brand like Google. Google has an equal interest in tying its bits down into a desktop, and Linux provides an ideal, open platform.

XBMC's Linux port lacks impressive features

Linux has no shortage of audio and video players, but if you want to devote you whole system to multimedia use, you need the XBMC (formerly Xbox Media Center). Although initially designed for the Xbox gaming console, XBMC has been ported to other platforms. The alpha version of the Linux port of XBMC that I use is quite usable, especially for video playback, despite the fact that not all XBMC features have yet been ported.

XBMC began life as the Xbox Media Player with its first open source release in 2002 before growing into an all-in-one media center app in 2004. The developers began porting the media center to Linux only last year. Currently precompiled binaries are available for various Ubuntu releases. If you don't use Ubuntu, you can also compile XBMC from source.

XBMC main interface. Click to enlarge.
Like a typical media center XBMC can display images and play audio and video content from various internal and external sources. XBMC is skinnable, and the default Project Mayhem III theme is very slick. The XBMC interface is divided into five menu items for accessing Programs, Pictures, Videos, Music, and Weather. The Programs entry is for accessing Xbox programs and isn't applicable in the non-Xbox ported environments. The Weather entry points to a customizable weather station. You can program three locations for which XBMC tracks weather conditions and predictions from weather.com. The other menu entries are for accessing the three media types.

At the bottom of the main interface there are buttons that lead you to the XBMC settings page and the built-in file manager. From the settings page you can tweak general XBMC settings like the skin and default colors, as well as settings for picture, video, and audio playback.

One of the most important features in a comprehensive application like XBMC is navigation, and the app scores high in this department. You can control the whole app from the mouse alone, as I did. There's a consistent click behavior -- left-click to enter a menu and right-click to step back -- helpful on-screen controls to navigate media, and an on-screen keyboard when you need one to search for media.

With XBMC you can play media that's on your local disk on a variety of partition types, including such popular ones as NTFS, FAT, and ext3, as well as removable devices like USB disks. You can also play media from over your local network; XBMC can stream files from Windows machines on the intranet via Samba. It also packs a file manager for moving files and folders across partitions and from other machines on the local network to the one running XMBC. XBMC can also display videos in a variety of widescreen and HDTV resolutions if your machine can support these.

Player capabilities
The picture viewer support most common image formats, including BMP, JPG/JPEG, GIF, PNG, TIF/TIFF, TGA, and PCX. It can even be used as a comic reader to read comics in CBR/CBZ format. XBMC can also read and display EXIF data from images and use it to auto-rotate images. It has an inbuilt slideshow application that not only display images under a folder but also traverse inside subfolders and display images recursively. Instead of just running through images, during slideshow, XBMC uses pan and zoom effects to move around images, and can do both sequential and random plays through the images.

XBMC CD ripping. Click to enlarge.
For playing audio, XBMC relies on its own audio player, called Psycho-acoustic Audio Player. PAPlayer had no trouble playing every audio file I threw at it, including files in WAV, MP3, Ogg, WMA, RealPlayer, AC3, AAC, FLAC, MIDI, and Audio CD formats. The media center also has a built-in music library function that scans your music collection and stores ID3 tag information like artist, album, and genre, which can be used to filter the collection. You can queue music items, add them to your favorites list, or play them randomly with "Party mode." XBMC can play music from the local hard disk as well as from other computers on the intranet via Samba.

One of the most irritating thing about the XBMC Linux port is the lack of music on-screen display (OSD) controls. The only way to stop an audio file or an audio track is to wait till XBMC plays out the playlist. There's also an audio ripper for ripping audio tracks and complete audio CDs, but it rips them into oblivion; I couldn't find the tracks in the specified destination directory or anywhere else on the disk.

Video playback is handled by XBMC's video player, called DVDPlayer. It flawlessly played the Video CD, DVD, MPEG2, MPEG4, WMV, QuickTime, Real, and Flash files that I had on my local disk and from over the network. Like the audio player component, the video player has a video library feature. The video library gathers information about a video from external Web sites like IMDB and TV.com via scrapers. Once it has the information, you can browse your videos by genre, title, year, actors, and directors. The DVDPlayer has a nifty little OSD for navigating the videos as well as enabling and disabling subtitles.

Missing quite a lot
Searching movies by actor. Click to enlarge.
There are a couple of features that are yet to be ported to XBMC on Linux. XBMC supports scripts, and some of the common ones for things like playing music and fetching weather forecasts are already bundled. I tried the browser script that's designed to help one browse pictures, videos, and audio available on any Web site, as well as the ABC TV script, which streams video content from Australia's ABC network, but couldn't get either of them to work. Both scripts crashed XBMC with a "segmentation fault" error.

One of the most popular features of XBMC on other platforms is Internet streaming. XBMC-TV maintains a list of streams that you can download and feed to XBMC. But no matter what stream I tried playing, it buffered for a while but eventually failed to play.

On other hardware XBMC can be controlled from over the network via a built-in Web server, but this feature hasn't yet been ported to the Linux version. Neither has the built-in FTP server that serves as another mechanism for transferring files to the computer running XBMC.

Wrap-up
XBMC media center is a capable media center application. Even the feature-incomplete Linux port is better and more comprehensive than a standalone media player, but it could still use some more features. I'd especially like to see OSD controls for the music player as well as the Web interface.

Today, XBMC is still best for people who own an Xbox. If you want a full-featured media center for your Linux desktop, consider an application like LinuxMCE that has TV tuner support and home automation controls.

Anatomy of the Linux slab allocator

Dynamic memory management

The goal of memory management is to provide a method by which memory can be dynamically shared amongst a variety of users for a variety of purposes. The memory management method should do both of the following:

Minimize the amount of time required to manage the memory
Maximize the available memory for general usage (minimize management overhead)
Memory management is ultimately a zero-sum game of tradeoffs. You can develop an algorithm that uses little memory for management but takes more time to manage the available memory. You can also develop an algorithm that efficiently manages memory but uses a bit more memory. In the end, the requirements for the particular application drive the balance of the tradeoffs.

Early memory managers used a heap-based allocation strategy. In this method, a large block of memory (called the heap) is used to provide memory for user-defined purposes. When users need a block of memory, they make a request for a given size. The heap manager looks at the available memory (using a particular algorithm) and returns the block. Some of the algorithms used in this search are the first-fit (the first block encountered in the heap that satisfies the request), and the best-fit (the best block in the heap that satisfies the request). When the users are finished with the memory, they return it to the heap.

The fundamental problem with this heap-based allocation strategy is fragmentation. As blocks of memory are allocated, they are returned in different orders and at different times. This tends to leave holes in the heap requiring more time to efficiently manage the free memory. This algorithm tends to be memory efficient (allocating what's necessary) but requires more time to manage the heap.

Another approach, called buddy memory allocation, is a faster memory technique that divides memory into power-of-2 partitions and attempts to allocate memory requests using a best-fit approach. When memory is freed by the user, the buddy block is checked to see if any of its contiguous neighbors have also been freed. If so, the blocks are combined to minimize fragmentation. This algorithm tends to be a bit more time efficient but can waste memory due to the best-fit approach.

This article focuses on Linux kernel memory management and, in particular, the mechanisms provided through slab allocation.

The slab cache

The slab allocator used in Linux is based on an algorithm first introduced by Jeff Bonwick for the SunOS operating system. Jeff's allocator revolves around object caching. Within a kernel, a considerable amount of memory is allocated for a finite set of objects such as file descriptors and other common structures. Jeff found that the amount of time required to initialize a regular object in the kernel exceeded the amount of time required to allocate and deallocate it. His conclusion was that instead of freeing the memory back to a global pool, he would have the memory remain initialized for its intended purpose. For example, if memory is being allocated for a mutex, the mutex initialization function (mutex_init) need only be performed once when the memory is first allocated for the mutex. Subsequent allocations of the memory need not perform the initialization because it's already in the desired state from the previous deallocation and call to the deconstructor.

The Linux slab allocator uses these ideas and others to build a memory allocator that is efficient in both space and time.

Figure 1 illustrates the high-level organization of the slab structures. At the highest level is the cache_chain, which is a linked list of the slab caches. This is useful for best-fit algorithms that look for a cache that most closely fits the size of the desired allocation (iterating the list). Each element of the cache_chain is a kmem_cache structure reference (called a cache). This defines a pool of objects of a given size to manage.


Figure 1. The major structures of the slab allocator


Each cache contains a list of slabs, which are contiguous blocks of memory (typically pages). Three slabs exist:

slabs_full
Slabs that are fully allocated.
slabs_partial
Slabs that are partially allocated.
slabs_empty
Slabs that are empty, or no objects allocated.
Note that the slabs on the slabs_empty list are prime candidates for reaping. This is the process by which the memory used by slabs is provided back to the operating system for other uses.

Each slab in the slab list is a contiguous block of memory (one or more contiguous pages) that is divided into objects. These objects are the fundamental elements that are allocated and deallocated from the particular cache. Note that the slab is the smallest allocation to the slab allocator, so if it needs to grow, this is the minimum by which it will grow. Typically, numerous objects are allocated per slab.

As objects are allocated and deallocated from a slab, the individual slab can move between the slab lists. For example, when all objects are consumed in a slab, it moves from the slabs_partial list to the slabs_full list. When a slab is full and an object is deallocated, it moves from the slabs_full list to the slabs_partial list. When all objects are deallocated, it moves from the slabs_partial list to the slabs_empty list.

Motivation behind the slab

The slab cache allocator provides a number of benefits over traditional memory management schemes. First, kernels commonly rely on the allocation of small objects that are allocated numerous times over the lifetime of the system. The slab cache allocator provides this through the caching of similarly sized objects, thus avoiding the fragmentation problems that commonly occur. The slab allocator also supports the initialization of common objects, thus avoiding the need to repeatedly initialize an object for the same purpose. Finally, the slab allocator supports hardware cache alignment and coloring, which allows objects in different caches to occupy the same cache lines for increased cache utilization and better performance.




Back to top




API functions

Now on to the application program interface (API) for creating new slab caches, adding memory to the caches, destroying the caches, as well as the functions to allocate and deallocate objects from them.

The first step is to create your slab cache structure, which you can create statically as:

struct struct kmem_cache *my_cachep;


Linux source for the slab cache
You can find the slab cache source in ./linux/mm/slab.c. The kmem_cache structure is also defined in ./linux/mm/slab.c. The discussion in this article focuses on the current implementation in the 2.6.21 Linux kernel.

This reference is then used by the other slab cache functions for creation, deletion, allocation, and so on. The kmem_cache structure contains the per-central processing unit (CPU) data, a set of tunables (accessible through the proc file system), statistics, and necessary elements to manage the slab cache.

kmem_cache_create

Kernel function kmem_cache_create is used to create a new cache. This is commonly performed at kernel init time or when a kernel module is first loaded. Its prototype is defined as:

struct kmem_cache *
kmem_cache_create( const char *name, size_t size, size_t align,
unsigned long flags;
void (*ctor)(void*, struct kmem_cache *, unsigned long),
void (*dtor)(void*, struct kmem_cache *, unsigned long));



The name argument defines the name of the cache, which is used by the proc file system (in /proc/slabinfo) to identify this cache. The size argument specifies the size of the objects that should be created for this cache, with the align argument defining the required alignment for each object. The flags argument specifies options to enable for the cache. These flags are shown in Table 1.


Table 1. Partial list of options for kmem_cache_create (as specified in flags)
Option Description
SLAB_RED_ZONE Insert markers at header and trailer of the object to support checking of buffer overruns.
SLAB_POISON Fill a slab with a known pattern to allow monitoring of objects in the cache (objects owned by the cache, but modified externally).
SLAB_HWCACHE_ALIGN Specify that the objects in this cache must be aligned to the hardware cachline.


The ctor and dtor arguments define an optional object constructor and deconstructor. The constructor and deconstructor are callback functions provided by the user. When a new object is allocated from the cache, it can be initialized through the constructor.

After the cache is created, its reference is returned by the kmem_cache_create function. Note that this function allocates no memory to the cache. Instead, when attempts are made to allocate objects from the cache (when it's initially empty), memory is allocated to it through a refill operation. This same operation is used to add memory to the cache when all its objects are consumed.

kmem_cache_destroy

Kernel function kmem_cache_destroy is used to destroy a cache. This call is performed by kernel modules when they are unloaded. The cache must be empty before this function is called.

void kmem_cache_destroy( struct kmem_cache *cachep );



kmem_cache_alloc

To allocate an object from a named cache, the kmem_cache_alloc function is used. The caller provides the cache from which to allocate an object and a set of flags:

void kmem_cache_alloc( struct kmem_cache *cachep, gfp_t flags );



This function returns an object from the cache. Note that if the cache is currently empty, this function may invoke cache_alloc_refill to add memory to the cache. The flag options for kmem_cache_alloc are the same as those for kmalloc. Table 2 provides a partial list of the flag options.


Table 2. Flag options for the kmem_cache_alloc and kmalloc kernel functions
Flag Description
GFP_USER Allocate memory for a User (this call may sleep).
GFP_KERNEL Allocate memory from kernel RAM (this call may sleep).
GFP_ATOMIC Force no-sleep on this call (useful for interrupt handlers).
GFP_HIGHUSER Allocate from high memory.

Slab allocation for NUMA
For Non-Uniform Memory Access (NUMA) architectures, the allocation function for a specified node is kmem_cache_alloc_node.

kmem_cache_zalloc

The kernel function kmem_cache_zalloc is similar to kmem_cache_alloc, except that it performs a memset of the object to clear it out prior to returning the object to the caller.

kmem_cache_free

To free an object back to the slab, the kmem_cache_free is used. The caller provides the cache reference and the object to be freed.

void kmem_cache_free( struct kmem_cache *cachep, void *objp );



kmalloc and kfree

The most common memory management functions in the kernel are the kmalloc and kfree functions. The prototypes for these functions are defined as:

void *kmalloc( size_t size, int flags );
void kfree( const void *objp );



Note that in kmalloc the only arguments are the requested size of the object to allocate and a set of flags (see the partial list in Table 2). But kmalloc and kfree use the slab cache just like the previously-defined functions. Instead of naming a specific slab cache from which to allocate an object, the kmalloc function iterates through the available caches looking for one that can satisfy its size constraint. When found, an object is allocated (using __kmem_cache_alloc). To free an object with kfree, the cache from which the object was allocated is determined with a call to virt_to_cache. This function returns the cache reference that is then used in a call to __cache_free to release the object.

Generic object allocation
Internally in the slab source, a function named kmem_find_general_cachep is provided that performs a cache search looking for a slab cache that best fits the necessary object size.

Other miscellaneous functions

The slab cache API provides a number of other useful functions. The kmem_cache_size function returns the size of the objects that are managed by this cache. You can also retrieve the name of a given cache (as defined at cache creation time) through a call to kmem_cache_name. A cache can be shrunk by releasing free slabs in the cache. This can be accomplished with a call to kmem_cache_shrink. Note that this action (called reaping) is performed automatically on a periodic basis by the kernel (through kswapd).

unsigned int kmem_cache_size( struct kmem_cache *cachep );
const char *kmem_cache_name( struct kmem_cache *cachep );
int kmem_cache_shrink( struct kmem_cache *cachep );





Back to top




Example use of the slab cache

The following code snippets demonstrate the creation of a new slab cache, allocating and deallocating objects from the cache, and then destroying the cache. To begin, a kmem_cache object must be defined and then initialized (see Listing 1). This particular cache contains 32-byte objects and is hardware-cache aligned (as defined by the flags argument SLAB_HWCACHE_ALIGN).


Listing 1. Creating a new slab cache

static struct kmem_cache *my_cachep;

static void init_my_cache( void )
{

my_cachep = kmem_cache_create(
"my_cache", /* Name */
32, /* Object Size */
0, /* Alignment */
SLAB_HWCACHE_ALIGN, /* Flags */
NULL, NULL ); /* Constructor/Deconstructor */

return;
}



With your slab cache allocated, you can now allocate an object from it. Listing 2 provides an example of allocating and deallocating an object from the cache. It also demonstrates two of the miscellaneous functions.


Listing 2. Allocating and deallocating objects

int slab_test( void )
{
void *object;

printk( "Cache name is %s\n", kmem_cache_name( my_cachep ) );
printk( "Cache object size is %d\n", kmem_cache_size( my_cachep ) );

object = kmem_cache_alloc( my_cachep, GFP_KERNEL );

if (object) {

kmem_cache_free( my_cachep, object );

}

return 0;
}



Finally, Listing 3 is an example of destroying a slab cache. The caller must ensure that no attempts to allocate objects from the cache are performed during the destroy operation.


Listing 3. Destroying a slab cache

static void remove_my_cache( void )
{

if (my_cachep) kmem_cache_destroy( my_cachep );

return;
}





Back to top




Proc interface to the slab

The proc file system provides a simple way to monitor all slab caches that are active in the system. This file, called /proc/slabinfo, provides detailed information about all slab caches in addition to providing a few tunables that are accessible from user space. The current version of slabinfo provides a header so that the output is a bit more readable. For each slab cache in the system, the number of objects, number of active objects, and the object size is provided (in addition to the objects and pages per slab). A set of tunables and slab data are also provided.

To tune a particular slab cache, simply echo the slab cache name and the three tunable parameters as a string to the /proc/slabinfo file. The following example illustrates how to increase the limit and batchcount while leaving the shared factor as is (format is "cache name limit batchcount shared factor"):

# echo "my_cache 128 64 8" > /proc/slabinfo



The limit field indicates the maximum number of objects that will be cached for each CPU. The batchcount field is the maximum number of global cache objects that will be transferred to the per-CPU cache when it becomes empty. The shared parameter indicates the sharing behavior for Symmetric MultiProcessing (SMP) systems.

Note that you must have superuser privileges to tune parameters in the proc file system for a slab cache.




Back to top




The SLOB allocator

For small embedded systems, a slab emulation layer exists called the SLOB. This slab replacement is advantageous in small embedded Linux systems, but while it conserves up to 512KB of memory, it suffers from fragmentation and poor scaling. When CONFIG_SLAB is disabled, the kernel falls back to this SLOB allocator. See the Resources section for more details.




Back to top




Going further

The source code for the slab cache allocator is actually one of the more readable aspects of the Linux kernel. Outside of the indirection that exists in the function calls, the source is intuitive and, in general, well commented. If you'd like to know more about the slab cache allocator, I suggest that you start there as it's the most up-to-date documentation on the mechanism. The Resources section below offers a number of sources that describe the slab cache allocator, but unfortunately all of them are out of date given the current 2.6 implementation.

If it's animation or special effects, it's Linux

When I was a kid, I used to make crude little animated cartoons in my notebooks using the flipbook technique. Walt Disney had nothing to worry about. I was awful even by the 3rd grade standards of White Pine elementary. Today, I could be great, because almost all top animation and special effects artists are Linux users.

My colleague Eric Lai discovered recently that while top animation and FX (special effects) programs are run on Macs and some of them, like RenderMan Pro Server are being ported to Windows, it's on Linux clusters that the really serious movie and television visual effects are created. As Robin Rowe writes at LinuxMovies.org, "In the film industry, Linux has won. It's running on practically all servers and desktops used for feature animation and visual effects."

Rowe's not just being a Linux booster. It's the Gospel truth. The animation and FX for Indiana Jones and the Kingdom of the Crystal Skull; Star Wars: The Clone Wars; WALL-E; 300; The Golden Compass; Harry Potter and the Order of the Phoenix; and I Am Legend, to name but a few recent movies, were all created using Pixar's RenderMan and Autodesk Maya running on Linux clusters.

The really short version for why this is so comes down to Linux clustering enables you to put massive computational firepower into rendering 2D and 3D images. It's ironic. While getting the most out of NVIDIA and ATI graphic cards on a Linux desktop is still a pain and there's always some trouble dealing with proprietary video formats on Linux, the top animated and FX-heavy videos usually have their start on Linux systems.

Specifically, most photo-realistic special effects are created with programs using Pixar's RISpec (RenderMan Interface Specification) compliant programs. RISpec is an extremely detailed open-standard set of APIs (application program interfaces) for 3D graphics rendering programs. To be more precise, RISpec isn't quite an open standard. While Pixar, the animation giant owned by Disney, has published the specifications for all to use, and no longer even requires a no-charge license to create a RISpec-compliant rendering program, Pixar doesn't go out of its way to specify exactly how developers can, or can't use RISpec.

That said, there are open-source RISpec-compliant programs like Pixie and other rendering programs such as Blender, which can be used as a source for RISpec software. Pixar's RenderMan software suite itself, while it relies on Linux in most animation and FX shops, is unlikely ever to be open-sourced.

So, while you can't point to animation and special effects software as a major win for open-source software, there is absolutely no doubt that every time you gasp at a breath-taking escape by Indy or grin at a particularly clever visual bit of fun in Ratatouille, you're appreciating the power of Linux.

I wonder if I could get a few million or pre-production money for The New Adventures of StickMan? Nah. I better stick to writing rather than try moving to animation.

Canonical Joins The Linux Foundation

The Linux Foundation, the nonprofit organization dedicated to accelerating the growth of Linux, today announced that Canonical has become a member of the Foundation.

Canonical is the commercial sponsor of Ubuntu, a popular version of the Linux operating system, and supports a wide range of other open source projects including Bazaar, Storm and Upstart. Ubuntu has become a popular choice for the server and desktop as well as for the rapidly emerging areas of netbooks and mobile Internet devices.
Matt Zimmerman is the CTO of the Ubuntu project in Canonical, chairs the Ubuntu Technical Board and leads all engineering efforts for the distribution.

“The Linux Foundation occupies a critical, non-commercial function in the use and popularization of Linux around the world. We’ve always seen the Linux Foundation’s value and are pleased to now become an official member and support its activities. We look forward to working with them to continue the march of Linux in all areas of computing,” said Matt Zimmerman, Ubuntu program manager and CTO, Canonical.

Ubuntu community members have been active participants in a variety of workgroups at the Foundation, including the Linux Standard Base, Desktop Architects and Driver Backporting groups. With Canonical’s support, user interests for both commercial and community versions of Ubuntu will be represented.

“Canonical is an important new member for the Linux Foundation,” said Jim Zemlin, executive director of The Linux Foundation. “Matt and his team have created an exciting distribution that has taken the world by storm. They have rallied the cause of cross-industry, cross-community collaboration for years. We are extremely pleased to work even more closely with Canonical as we push Linux to the next stage of growth.”

About the Linux Foundation
The Linux Foundation is a nonprofit consortium dedicated to fostering the growth of Linux. Founded in 2007, the Linux Foundation sponsors the work of Linux creator Linus Torvalds and is supported by leading Linux and open source companies and developers from around the world. The Linux Foundation promotes, protects and standardizes Linux by providing unified resources and services needed for open source to successfully compete with closed platforms. For more information, please visit www.linux-foundation.org.

NimbleX 2008 !

NimbleX, a Slackware-based distribution, advertises itself as "the new wave of Linux." However, what is appealing in NimbleX -- its speed and small footprint and the resulting selection of alternative software choices -- will likely strike veteran GNU/Linux users as being very old school. By contrast, its limitations -- too little attention to such aspects as the installer, packaging, and security -- seem all too modern, being reminiscent of other distros intent on commercialization or emulating Windows, even though NimbleX is a community distribution and largely a labor of love for Romanian developer Bogdan Radulescu.

NimbleX's recent 2008 edition is available in three CD images. The first is 200MB in size and is the one that users are steered to by the organization of the NimbleX site (and the one I used for this review). The others are 100 and 69MB. The site boasts that, when started from the hard drive, the smallest of these images results in what "is most likely the fastest distro with KDE" -- a credible claim, given that NimbleX is based on Slackware and is optimized for speed as much as compactness.

You can also generate a live CD via the Internet using Custom NimbleX, a feature that Linux.com previously reviewed. When you select the packages you want, a custom .ISO image is saved for a limited time for you to download. Since the regular installer gives no choice of packages, you may prefer to take the extra step of using Custom NimbleX, especially if you plan multiple installations.

Installation
Whichever image you choose, you can install NimbleX to a hard drive or USB device from the live CD desktop. The largest version gives you the option of booting to the KDE Display Manager log in manager or directly into KDE. The only difference is that, if you boot to KDM, you have the option of choosing which graphical interface to choose, and need the default root password from the download page. Alternatively, you can save time by starting the installer directly, although the live CD is one of the fastest of its kind.

The installer starts with a warning that it is "a work in progress," which is something you will have no trouble observing. Confusingly, it gives you the option of installing either to a hard drive that already contains either GNU/Linux or Windows, or to a USB device. To use the first option, you must already have the partitions ready to receive NimbleX -- an inconvenience that I haven't seen for at least eight years in an installer. Moreover, at first glance, the installer seems to have no option for installing to a blank hard drive or overwriting one. However, experimentation soon reveals that the proper option in such cases is to choose the USB device option.

To make matters even more confusing, you need to choose SYSLINUX as your boot manager, because the GRUB option is broken. The install also concludes by asking if you want to save your system data to the hard drive, suggesting that "this will make NimbleX almost unbreakable." Presumably, the resulting nimble.data file is for recovery purposes, but since it can vary from 100 to 1,200 megabytes, some advice might be useful here.

The main advantage of the installer is that, like the rest of NimbleX, it is optimized for speed. Unfortunately, it gains this speed by minimizing options, including not giving you any choice of what software to install. Clearly, too, it needs to reword and explain what options it does offer. Fortunately, if you do run into problems, the whole process is so quick -- less than 10 minutes -- that the inconvenience of redoing the install is minimal.

Desktop and selection of software
NimbleX boots to a silver gray wallpaper that looks as though it were borrowed from a poster for the X-Men movies. Experienced users will have no trouble observing that it is based on KDE 3.5.9, despite the fact that the latest release appeared only a couple of weeks before KDE 4.1 debuted.

Click to enlarge
Like all the Slackware-based distributions I have tried, NimbleX offers an extremely responsive desktop -- one of the reasons that it is especially suited to a live CD or USB drive, and one noticeable enough to make you quickly forget the miniature ordeal of the installer.

Another notable feature of NimbleX is its unusual choice of software. The 200MB CD image offers, in addition to KDE, a dozen window managers. Most of them, such as IceWM and OpenBox, are lightweight, although the larger Enlightenment is also an option. Noticeably missing, though, are GNOME and Xfce, no doubt sacrificed to the effort to make sure NimbleX is small and lives up to its name.

Similarly, the desktop software available is limited, and, at times, highly individualistic. OpenOffice.org is not included; instead, KOffice is provided for an office suite. In much the same way, the major graphics programs are represented only by the GIMP, with Karbon, Krita, Inkscape, and Scribus unavailable. The distinct impression is that office productivity and graphics work are not a priority for the NimbleX team, although what the distribution does offer in these areas is more than adequate for many users.

Exploring the menus, you can also find a number of unusual choices, such as the Rox-Filer file manager, the Kooldock floating panel, and Yakuake Quake-style terminal emulator, to say nothing of slightly less unorthodox choices such as the Dillo Web browser. So far as any criteria are detectable behind the available software, the selection seems designed to be lightweight, and to provide a limited range of alternative software wherever possible. Perhaps the default panel icons tell the story: They are a console, the Konqueror and Firefox Web browsers, the XMMS audio player, and the MPlayer media player.

Newer users might chafe at the omission of many standard programs, but more advanced users may find NimbleX's selection of software a welcome change from the huge installation footprints of the leading distros. Besides keeping NimbleX small and quick, the selection is a reminder that many often-overlooked alternatives are available in free and open source software.

Software installation and security
If you are interested in trying NimbleX and wary of Slackware's reputation for difficult software installation, you may be relieved to learn that NimbleX uses slapt at the command line and Gslapt on the desktop for package management. As their names suggest, these applications are designed to bring the functionality of Debian's apt-get to Slackware-based distributions, including the automatic resolution of dependencies. As is often the case with such applications, the command-line version is easier to use once you know the basic commands, because the desktop one seems to require constant resizing of panes and flipping from tab to tab if you want to use it efficiently.

The only trouble is, dependency-resolving software is only as good as the packages and repositories that support it, and, in NimbleX's case, both are rather weak. Not only is the package selection limited to fewer than 500 packages -- all KDE or non-desktop-specific -- but, in several cases, such as Bluefish and Krusader, packages were either uninstallable or unusable because they required unavailable libraries. The NimbleX team needs to pay more attention to packaging.

The same is true of security. Although NimbleX installs with ClamAV and the Guarddog firewall,it completely neglects basic precautions. Not only is a user account not created during installation, but you can log into an installed desktop without even entering the default root password -- which, in any case, is displayed on the distribution's download page. Experienced users will know to correct these arrangements immediately, but for any distribution to permit such sloppy security settings seems irresponsible.

Mixed results
NimbleX leaves me of two minds. On one hand, I appreciate its clear direction, even if making speed and a small footprint seems old-fashioned and even unnecessary at a time when terabyte hard drives are starting to become common. When so many distributions are paying little or no attention to these matters, such priorities are refreshing -- especially when they result in enhanced performance. Computer users may have long ago ceased to need to coax every last bit of speed from their machines to get acceptable performance, but the efficiency of NimbleX is still something that many can appreciate.

On the other hand, considering the deficiencies in the installer, packages, and security, I get the impression that NimbleX has focused so closely on its major goals that it has overlooked some of the basics of producing a distribution.

Now that the new version is out the door, with any luck NimbleX developers can focus on fixing these other matters. If they can do so, then NimbleX may still become a distribution worth recommending. But, until that happens, any recommendation needs to be heavily qualified.

Linux popularity across the globe

The Linux landscape is constantly changing and has a strong community of both developers and users. But where is Linux the most popular, and where are the different Linux distributions the most popular?

To try to answer these questions, we have looked at data from Google with the highly useful Insights for Search, which gave us a number of interesting and often surprising results.

Aside from just looking at Linux itself, we have included eight common Linux distributions in this survey: Ubuntu, OpenSUSE, Fedora, Debian, Red Hat, Mandriva, Slackware and Gentoo.

(We use both Ubuntu and Red Hat here at Pingdom, so of course we had to include those two!)

How we determined popularity
To have a way to judge popularity, we have looked at where a specific search term is most popular, i.e. how likely it is for someone in a region (country or state) to search for that specific term, for example “Linux” or “Ubuntu”. Google calls this “regional interest”.

If a high proportion of the searches in a country are for the term “Linux”, this should also indicate that Linux is popular in that country, or at least that there is a high interest in Linux.

Linux popularity globally
On a global level, the interest in Linux seems to be the strongest in India, Cuba and Russia, followed by the Czech Republic and Indonesia (and Bangladesh, which has the same regional interest level as Indonesia). The first Western country when looking at regional popularity is Germany which is the 10th country in regards to search popularity for Linux.



Linux popularity in the United States
In the United States, interest appears significantly stronger in Utah and California than the rest of the country. California’s high position is understandable, considering it is the home of Silicon Valley, but we are not sure why the interest for Linux is even higher in Utah. Perhaps some of our readers might shed some light on this?



You can dig deeper into Google’s search statistics for Linux here.

Global popularity of the different Linux distributions
As mentioned in the introduction, we looked at eight common distributions: Ubuntu, OpenSUSE, Fedora, Debian, Red Hat, Mandriva, Slackware and Gentoo.

Some interesting observations
Ubuntu is most popular in Italy and Cuba.
OpenSUSE is most popular in Russia and the Czech Republic.
Red Hat is most popular in Bangladesh and Nepal.
Debian is most popular in Cuba.
Cuba is in the top five (interest-wise) of three of the eight distributions in this survey.
Indonesia is in the top five of four of the distributions.
Russia and the Czech Republic are in the top five of five of the distributions.
The United States is not in the top five of any of the distributions.
Note again that when we say “popular” here, we mean how popular the search term is. After all, this is based on Google search data.

It might also be worth pointing out that the results are normalized, so the size of each region is removed as a factor. In other words, everything is in proportion to the size of the region (the total number of searches in that region, we assume). That means that larger regions are not favored over small, as would be the case otherwise.

Now on to the results for the individual Linux distributions.

Ubuntu


Countries with highest interest in Ubuntu:

Italy
Cuba
Indonesia
Norway
Czech Republic
Dig deeper into Google’s search statistics for Ubuntu here.

OpenSUSE


Countries with highest interest in OpenSUSE:

Russia
Czech Republic
Moldova
Germany
Indonesia
Dig deeper into Google’s search statistics for OpenSUSE here.

Fedora


Countries with highest interest in Fedora:

Sri Lanka
Bangladesh
India
Nepal
Zimbabwe
Dig deeper into Google’s search statistics for Fedora here.

Debian


Countries with highest interest in Debian:

Cuba
Czech Republic
Germany
Belarus
Russia
Dig deeper into Google’s search statistics for Debian here.

Red Hat


Countries with highest interest in Red Hat:

Bangladesh
Nepal
Sri Lanka
India
Cuba
Dig deeper into Google’s search statistics for Red Hat here.

Mandriva


Countries with highest interest in Mandriva:

Russia
Czech Republic
Poland
France
Indonesia
Dig deeper into Google’s search statistics for Mandriva here.

Slackware


Countries with highest interest in Slackware:

Bulgaria
Indonesia
Brazil
Russia
Poland
Dig deeper into Google’s search statistics for Slackware here.

Gentoo


Countries with highest interest in Gentoo:

Russia
Czech Republic
Belarus
Moldova
Estonia
Dig deeper into Google’s search statistics for Gentoo here.

Conclusion
Linux has a lot of distributions (though Ubuntu is currently dominating the scene according to Distrowatch), but although we only included eight of those distributions it seems clear that many of them are favored by very different regions of the world. In other words, the distribution of the distributions (pardon the pun) is far from uniform.

In general, Linux seems to have a stronger popularity in the East than in the West, with some exceptions (like Cuba). This is perhaps not surprising, considering that it is free software and many of the countries where Linux is most popular have a relatively low income per capita compared to most countries in the West. Or perhaps there is just a stronger focus on free software and Open Source in these regions.

This could also indicate a weaker standing for Windows in the East.

We would love to hear your opinion on the results, especially from Linux users living in the countries mentioned in this survey. Let us know what you think in the comments!

5 Great Alternative Linux Music Players

Amarok, Rhythmbox and Banshee are a few of the popular music players in Linux. They are great in features and have received plenty of good reviews. But what is unknown to many is that there are a lot of other music players for Linux which are also great in features, but are hidden in some corners of the world.

If you are willing to try something out of the box, here are 5 great alternative music players that you can use in your Linux desktop.

1. Audacious


If you love Winamp for its small, simple and skinnable interface, then you will love Audacious for sure. Audacious is a fork of Beep Media Player and XMMS. It is small, lightweight and fully skinnable. It supports both Winamp and XMMS skin. This means that you can now port your favorite Winamp skin over and make Audacious looks exactly the same.

Behind the simple interface, there are options for you to configure your playlist, visualization, sound effects, mouse shortcut and also to install the various plugins to improve its functionality. If you are a loyal fan of Winamp, or just want something that does not take up the whole of your desktop space, then Audacious is definitely the best choice.

2. Listen Music player


At first glance, ‘Listen Music Player’ looks just like Rhythmbox, but after a using it for a while you will find it is actually better than Rhythmbox. The interface is split into three views. The panel on the extreme left is the play control and playlist. At the bottom of the left pane is the ‘dynamic’ option where you can make your player ’smarter’ by configuring it to remove played tracks and append new tracks to the playlist. The middle panel is the navigation menu while the right panel displays the necessary information.

Listen Music Player integrates well with last.fm, ShoutCast, and can retrieve lyrics for the playing track. You can even check up the current track’s information on Wikipedia, right within the player itself.

All in all, this is a great music player with plenty of useful features.

3. Quod Libet


Other than playing music, Quod Libet has a simple interface that only shows what you want to see. It has a clean interface, yet able to display the required information all in one place. At any point of time, you can choose from the ‘View’ option to get it to show either your playlist, album list, filesystem or internet radio.

It is also integrated with Ex falso, a program that allows you to add, edit and organize your MP3 metadata, to help you better manage your MP3’s. Quod Libet is not as feature-rich as Amarok or Banshee, but if you are looking for a music player where you can organize the music your way, then Quod Libet is the one for you.

4. Songbird


Songbird is a music player and a web browser. It is also a web media stream player. I hope I didn’t get you confused, but that is really what Songbird is. Built with codes from Firefox and VLC, Songbird is a desktop music player with web browsing capabilities. Like Firefox, it supports tabbed browsing and add-ons. When you chance upon any sites with media content, it will automatically list the media files in a separate pane for easy download and/or streaming.

It is also compatible with most, or all of VLC’s features, which makes it a versatile audio/video player that can play almost every file format you throw at it.

Overall, its web browsing capabilities and its abilities to play a wide range of file formats easily makes it one of the best, if not the best media player around.

5. Decibel Audio Player


When compared to powerhouses such as Amarok, Decibel Audio Player is really a decimal of it. The basic install of Decibel does not come with anything. Yes, you heard me right, I really mean anything. It doesn’t support any visualization, album artwork, radio streaming, podcast or anything else. It does in fact do only one thing: play music. It is very useful if you just want to play your music and not be bothered or distracted by any other miscellaneous stuff.

Do you have any other favourite music players for Linux not mentioned here? Drop the link to them in the comments and tell us why you like them!

9 Linux Myths Debunked

If you enjoyed this article, then I would recommend to also read The 7 Habits of Highly Effective Linux Users and Etymology of A Distro. Enjoy!

When it comes to Linux there are 3 4 kinds of people, those who never heard of it, those who love it, those who are afraid of it, and those who hate it and spread falsities about it. I don’t really care about the first, they probably aren’t really technologically literate anyways, as long as they have E-mail they are content. While the third group is the result of the actions of the fourth. Let’s hit two birds with one stone shall we?

1-Linux is More Secure Because it Has A Smaller User Base
It is widely argued that Linux is more secure than Windows just because Windows is more popular, so hackers and virus coders tend to focus on the more popular platform. Actually, this is just one side of the story There are so many other things running for Linux security-wise that totally dispels this myth.

First of all, let’s face it, YOU are the weakest link in any OS. The user is the one that wreaks havoc to any OS, with ignorance or miscalculated decisions. Linux users are generally more savvy than the Windows or Mac users out there. We don’t just click on files promising us the latest Hollywood diva nude pictures. Besides, it’s normal practice that Linux users don’t run their systems as root, which is not the case with Windows, this drastically brings down the vulnerability of any system. The question now, will this be the case if Linux gains popularity and more adoption? I don’t really know, but if Linux commanded more than 90% of the market, I believe this argument would be totally false.

Linux with it’s Unix roots is built as a Network Operating System (NOS) and now advancing slowly as a Desktop OS (DOS? ironically). This simple fact helped Linux carry on the legacy of network security model of server/client-user with limited permissions. Whilst an OS like Windows was originally built as a single-user Desktop OS advancing into a NOS and adding security layers on the go.

Finally, just the fact that Linux is Open Source means that more eyeballs can see bugs and vulnerabilities making it easier to patch. Any coder in his/her mom’s basement could issue a fix for the community. It doesn’t need a big fat layer of corporate bureaucracy to issue a fix! Granted that the corporation gives the security flaw enough attention.

2-Installing Applications on Linux is Hard
Well this might have been true in the early days of Linux, but currently it can’t be farther from the truth. As a Linux user, what do I have to do to install an app? Let’s assume I want to this in a a GUI only environment (some get turned off by the mere mention of a command line, for some reason beyond me.) All I have to do is launch the graphical frontend of my package manager (think of it a big ass repository of applications stored on a server some where), then search for the app in mind. Hell if you don’t know the exact name of the application just search for the function! For example if you want to install a Gmail alerter, just type “google” or “gmail”, a plethora of apps will appear, then tick on the one you like and click ok. The package manager will automatically download the required files from the Internet and install it, and place it in your menu!

On the other hand, if you want to install an app on Windows what will you do? Generally you will head to Google and search for the required app or function, swim through hundreds if not thousands of results, randomly choose one which might or might not have what you want. If it does you will be probably asked for a valid email or enter a captcha, then download the file. The file might be huge and if you don’t have a download manager you might lose all what you downloaded because your wireless abruptly decided to disconnect. There are 101 scenarios! If all goes well you double click on the app, click next next, tick on “I Agree”, a couple more nexts and you have the app. Which turns out to be a stripped down trial version, that added a couple of more apps that you didn’t ask for on your desktop and changed a few of your system settings!

Which is easier again?

3-Linux is A Nightmare to Install
Back in 2005 when I first started my Linux adventure, I got my hand on 5 SUSE cd’s from a Linux Format magazine. Back then I was on XP, I initially wanted to back up my files before I take the plunge just in case. When I looked at the huge amount of files, I got lazy and somewhat careless, and decided just to install SUSE without backing up. 2 hours later I had a magical dual boot system (the whole concept of dual boot was alien to me back then) and all my files were intact!

Why am I telling you this story? Because I think one part of the intimidation of installing Linux is the belief that it might destroy files and end up on an OS that might thats not appealing (hey we are humble to realize it’s not for everyone ) All I am saying it’s piss easy! If I was able to do it with no prior knowledge of Linux then you can too! It just needs some common sense. Trust me!

And if you don’t trust me (I understand you don’t really know me do you?) Why don’t you dabble with Linux using virtualization?

Anyways the whole installation process has been tuned over the years. Distros like SUSE, Ubuntu, and Fedora, are so easy to install it would literally take around 30 minutes to get it up and ready. With almost all the apps a default PC should have. Thing like an Office suite, media player, PDF reader, chat clients…etc Can you really say the same about YOUR system?

4-The Linux Interface is Ugly and Unattractive
Well it depends on the definition of “attractive” doesn’t it? A command line only OS might be a turn off for most people but bliss for some. An interface with wobbly windows, rotating cubes, spherical desktop, fireworks, rain, snow…etc is bliss to a lot and a resource hog to some.

Well Linux provides you both and everything in between! And in a million and one styles!

You can install Compiz, which gives you rotating cubes for different desktops, wobbly windows, animated window behavior just to name a few. You can install Enlightenment, which provides you a sleek looking desktop that you have never seen before. KDE4 is a scene to behold! Anyways I think a picture is worth a thousand words, here judge by yourself:





In fact you can actually make Linux like whatever you want, you can make it even look like Apple or Windows! The sky is the limit

5-There Are No Games on Linux
Actually I am not really a PC gamer, I tend to keep my gaming activities on consoles, but I once installed Football Manager under Linux, worked perfectly.

Seriously, just yesterday I walked into my brother’s room, and found a collection of PC games on the floor. Me knowing that he uses Linux exclusively, I raised an eyebrow and asked “under Linux?”. He replied positively, “without a hitch!”

Today, there are literally 100’s of games that work under Linux, true they haven’t been ported, but Wine (a program that allows Windows programs to run under Linux) has taken care of that. Just looking at the top 10 list of apps working under Wine, one finds quite a lot of them are games. And a lot of them are VERY popular! Wine could also help in a lot of other games too! You can also purchase Cedega which depends on Wine but makes the experience much more user-friendly. There is a lot of help out there, you just need to open your eyes a bit! And if all fails, virtualization could be a last resort!



One could still argue that there are no Linux games, as all that this means that there are no native Linux games. Right? Not really, there are loads of native Open Source Linux games, I can’t really vouch for them, but from the screen shots they do seem cool. Here have a glimpse.

6-Linux Doesn’t Come Preinstalled Like Windows
Whoa! You have been contaminated with a big dose of FUD! Actually Linux comes preinstalled from a lot of different vendors. Some are international brands like Dell and Lenovo. There are also some specialized Linux vendors like System76 or EmprorLinux.

Asus also have created a new trend. Fitting Linux in a new niche market, the Ultra Mobile PC market with the Eee PC. HP, Aspire, MSI, among others are fitting these UMPC’s with Linux.

7-There is No Support for Linux
If you purchased your Linux system from a vendor, then there will probably some kind of support. A quick check on System76 or EmprorLinux would verify that. Also if you bought a distribution from Red Hat or Novell then you will also get support as part of the package.

However in reality, a lot of Linux users are mavericks, they get their support from the Linux community. The Linux community is very supportive (at least that is my experience). The Internet is riddled with forums, guides, howtos, blogs, IRC rooms… etc that would offer anybody an extraordinary amount of help. I don’t think that any other operating system has this kind of community. I am sure when it comes to community other proprietary operating systems do envy us!

8-Linux Doesn’t Have Good Hardware Support
Sometime ago, I blogged about how I suffered to get an HP printer to work on Windows. Long story short, after around 2 hours of trying to get an HP printer to work on XP, I gave up and plugged into an Ubuntu Linux Eee PC, it got recognized in 30 seconds! There are thousands of stories similar to this, just a quick Google would confirm that. Here is an example.

What people fail to realize that in the case of their Windows preinstalled PC’s, they “just works” because the vendors have already done all the work for them. It would be a totally different ball game if these PC’s had no OS on them. Windows wouldn’t come out all that superior, I would even wager that Linux would probably do a better job.

Actually I think that we are at a point where I can say that Linux would work more than 90% of hardware out there! Could Windows or Apple claim that? I don’t know, I stopped being a Windows power user for quite sometime. But what I remember is that a webcam I purchased in 2004 wasn’t “digitally verified” (or something like that) by XP, despite the fact that XP has been around for years!

9-There is No Office Software, or Software At All for Linux
Huh? Under which rock have you been living under in the past decade? Actually there is more Office software for Linux than Windows and Apple combined. It does 95% of what Microsoft Office can do and you don’t need to loose an arm and a leg to get it, its FREE! And let’s face it, most of us don’t really use Microsoft Office to it’s full potential. So why should I pay 100% for only 10% features I need?

As for the rest of software, rest assured that there is replacement for everything you need. And in a lot of cases these apps get the job done in better ways than their propietary counterparts. And before you say: “Photoshop”, you won’t drag me into this conversation, if you are not content with Gimp, you still can get Photoshop on Linux, so please let’s not get into that.

Bonus: Linux is For Geeks!
Ahh, nevermind not really gonna try to refute this one, though I tried to convince people that Linux is sexy, didn’t really do a good job at it! But hey geek is good