Friday, January 12, 2007

Nanotechnology

An ant carries a one millimetre square microchip in its mandibles, illustrating the work that is being done in nanotechnology.
Photo: Reuters



Nanotechnology is the science of manipulating matter on an atomic or molecular scale. So what, you might say. Well, it's going to change the world.

Nanotechnology offers tremendous potential benefits in medicine, materials and manufacturing.

It is hard to fathom just how small the nanoscale is - if the one-millimetre interval on your ruler was scaled up in size to a kilometre, the nano range would be equal to the width of your hand or smaller. At this scale you can, in theory, build things out of individual atoms. It is seriously tiny.

But smaller, as scientists have discovered, also means faster, cheaper and lighter. Nanotechnology will pave the way for a host of products, some already with us, that will transform our world. And, as alluded to in Crichton’s novel "Prey" (one of my favourites), there are concerns over the safety of nanotechnology though its advocates argue that such dangers will never occur anywhere other than in the realm of science fiction.

Applications:

Glass has been coated with nano-structured wax particles to create self-cleaning windows. Nanoglass can also be designed to better trap heat.

Sunscreen is another example. Zinc cream is a very visible white coating, unlike a nano-zinc cream in which the zinc particles are so small you can’t see them. It’s more effective, too.

Mercedez-Benz have built cars with nanotech scratchproof finish.

Japanese researchers are using nanotech "buckytubes" that will allow high-resolution, flat-panel television.

Energy is another field ripe for nanotech takeover.

Flat panel lights, where there are walls of light to replace light bulbs.

In the future, we will be drinking desalinated water purified through nanofilters; nanowiring may be fine enough to connect severed nerves in an injured spine, restoring partial movement for quadraplegics and paraplegics; biosensors with nanodetectors will protect cities from gas or viral attack. In defence, soldiers will wear T-shirt-weight material that can stop a bullet; nano-engineered explosives will be vastly more powerful; lightweight tanks will have superstrong nanoarmour.

Some people believe we may go further and build "nanomachines" fully autonomous, self-replicating devices able to build endless copies of themselves out of molecules and atoms from normal materials. Hence the talk of "nanobots" zipping around our bloodstream, as in the film Fantastic Voyage, curing diseases. Or a swarm of nanobots repairing the ozone layer, or cleaning up oil slicks, or attacking an invading army.

But Crichton’s book warns about a swarm of out-of-control nanobots replicating themselves exponentially and posing a threat to mankind.

However, in order to create machines of that size, you’ve got a problem with self-repair. There’s very few atoms involved in some of the features at that level and they tend to break up very readily. They’re very fragile.

Beyond Microsoft

Why being anti-Microsoft is about more than geek chic

So you have technically savvy friends. One in particular, let’s call him -- Niles, is an avid Linux fan. He preaches to you about its superior security; its lack of viruses; its strength in the server market. He talks about OpenOffice, Firefox, The Gimp, and a myriad of other applications that can surely replace your commonly used Windows applications.

And he’s mostly right.

Your other friend, let’s call him -- Andre, is a Mac fan. He has what occasionally seems to be an unhealthy, perhaps psychotic love of his platform. Andre also talks about OS X’s lack of viruses, its ease of use, and its ability to “just get things done.”

He’s also right.

So why is it no one cares? The average Mac or Linux geek oftentimes doesn’t understand: why after being bombarded with viruses, spyware, crashes, and generally unintuitive, overpriced software does the average Windows user never consider a change?

There’s a number of reasons for that. Linux still requires a bit of technical know-how, though it has made steps toward user-friendliness over the years; and until recently Macs have been viewed by many as simply too expensive. One can debate the validity of both of these arguments, or point to other causes; we can even discuss the psychology of abuse, and how some Windows users are just too scared to explore greener pastures, however that’s not this article’s concern.

The real question is this: as an enlightened user of an alternative operating system, how can you go beyond evangelizing its technical merits, and instead make people see life beyond Microsoft? The answer is a simple one that, as individuals obsessed with our computers, we often forget: there is a humanistic side to computing, one that has unfortunately been corrupted by a Microsoft hegemony. What I propose in this article are three points of attack when attempting to sway an individual away from digital slavery.

Humanistic: Computers as renascence tools

Even preceding OS X, Mac users have had something in common with their open-source comrades in the Linux and BSD communities: creativity. When one thinks of Linux, images of an individual working in an art studio, or editing a film do not immediately come to mind. However, Linux and BSD users exhibit a different kind of creativity, of equally important value. Indeed, many who have embraced Linux have done so out of a desire to be in control of their operating systems, to the extent of being able to manipulate its code at even the lowest levels. Additionally, the open source community promotes project development both independently and collaboratively, producing projects that frequently answer the cries of users for applications that the corporate world would otherwise never create.

In the Mac world, creativity takes a different path. Out of the box OS X practically dares its users to just create something, whether it’s a short film in iMovie, a photographic portfolio in iPhoto, or a musical piece in Garageband. Subsequently, Mac users tend to be more eager to delve into the world of participatory media; the recent podcasting phenomena has emerged, largely, from the Mac crowd; the infamous “Truth About the IPod” video was created in iMovie, on a Macintosh, and distributed in Quicktime format.

However Linux and OS X encourage creativity in more subliminal ways. Neither operating system taunts the user with wizards, pop-ups, marketing, or grammar suggestions. While writing this article in Apple’s Pages I was not once asked if I’d like help writing it; a dancing paperclip never appeared, nor was I harassed by a GUI that looked as if it were designed by Playskool. Windows trains its users to be moronic, telling them that it’s okay to remain helpless in front of their machines, continuously relying on the assistance of a geek friend, or outsourced tech-support in Bangalore. It’s the beginning of a long relationship -- an abusive relationship, one that the user believes is perfectly normal, especially since his friends all experience similar problems with their machines.

This condition is not coincidental, and it’s largely the result of an operating system designed from the ground up with a primarily corporate perspective, where there is no concern for individual expression, but an emphasis on cutting corners, reducing costs, and releasing a product on schedule. The result is a stale, uninspiring, grayish Microsoft world. Big brother in 2005 is no longer IBM, but Microsoft, and the primary objective is to keep you locked in.

Political: A cry against digital imperialism

As a youth in the 1980s I remember drooling over a number of different platforms, that, as a Commodore user, I felt were all equally interesting. From Atari STs, Amigas, Macs, Apple ][’s, to IBM compatibles I never really envisioned the monolithic computer world we live in today. Who would have thought that the Amiga, with its awesome multimedia capabilities, would have been beat by a beige box and a DOS prompt?

Yet that’s the case, and with closer analysis, it’s really quite frightening. The proliferation of Windows has resulted in a widened acceptance of proprietary protocols and file formats, and an obsessive campaign of patenting, that if legally pursued, could hinder a number of both open and closed source projects that attempt cross-platform integration. Not to mention, the monopolistic standardization of Windows on 90% of the world’s desktops has created an incredibly easy target, generating catastrophic meltdowns each time a thirteen year old virus programmer decides showcase his latest work.

Widespread use of the Internet beyond government and educational institutions has made Microsoft’s reign all the more terrifying. With a tight grip on the desktop market, Windows is in a unique position of dictating, and in fact, completely disregarding agreed upon standards, a predicament web developers are all too familiar with when their pages appear wonderfully in every browser -- except Internet Explorer.

The Internet has made truly participatory approaches to media creation a reality; there are no gatekeepers, and site visits are determined by the content’s public value, and/or one’s ability to promote it. Recent news stories initially broken by bloggers have highlighted the medium’s potential. Yet, let us remember that corporate America, which Microsoft is a part of, firmly controls what is news and what is not, and is unwilling to forfeit its domination anytime soon. One can hopefully see where this is leading. Microsoft’s blatant disrespect of standards, and continuous attempts at propagating closed formats and protocols is an attempt to hinder the free exchange of information. Free media is generally not the friend of corporate America, and Gates’ vision of a PC on every desktop is hardly philanthropic.

Economic: An appeal to the wallet

Microsoft has generally turned a blind eye to piracy, because piracy -- whether they like to admit it or not, has been their friend. With free options such as OpenOffice and Linux available, the incentive to run Windows or Office -- Microsoft’s two biggest products, is decreasing rapidly every day. Consumer lock-in is key. If the average consumer is initially unwilling to pay outrageous fees for software, he or she will be after the superiority of the Word document has been subconsciously engraved into their mind, despite the truthfulness of such a claim.

The economic dimension of Microsoft’s hegemony is even more troubling in developing nations, where a meager $5 USD license for Windows could seem expensive, never mind $150. Adoption of Linux, and regionally specific development becomes incredibly attractive in these situations. Naturally, Microsoft is there to make sure that doesn’t happen, and the lock-in cycle continues.
Here is an example. A young undergraduate majoring in computer science has a strong interest in Linux; he works furiously with his country’s user group toward the localization of key apps. Microsoft steps in, and offers the young man a paid scholarship for graduate studies in the US, and possibly future employment as a Microsoft representative in his region. At this point, he has to make a choice: help his nation become technologically independent, or instead peddle overpriced solutions to various government institutions throughout his country; with the added title of “Dr.” in front of his name, courtesy of Microsoft, his word starts to carry some weight. And so instead of investing critical funds in hardware, or internal software development, this country begins to waste thousands, perhaps millions of dollars in licensing fees, in addition to the inherent cost of maintenance required to keep a Windows network healthy.

A trip to the so-called third-world is not necessary to witness Microsoft’s educational lock-in tactics, just visit any number of computer science departments in the United States bought out and wowed by MS marketing. Instead of learning the basics of computing in their introductory computing classes, students learn about the start menu, control panel, and scanning their documents for viruses; instead of learning how computers work, in a manner applicable regardless of platform, students simply memorize patterns and a series of motions. And when those patterns and motions are different than expected, their world comes crumbling down. The solution? Trash their $300 PC and buy another one, which will just malfunction a few months later. Or perhaps the more sophisticated will pursue a reinstallation, after which they can expect to endure hours of downloading Windows updates, and a series of reboots.

So, where do you want to go today? If you’re a Windows user, you’ll need a tow truck before answering that question.

Now what?

Hopefully this article has provided you with some talking points, or perhaps activated a few mental relationships that you were unaware of. Remember these points while repairing your friend or family member’s machine. If necessary, gently sway them away from Microsoft products. Introduce them to Firefox, OpenOffice, and The Gimp -- all of which have Windows versions. If you’re a Mac user, prepare a short demo showing them how to not only accomplish their usual tasks in OS X, but do so more efficiently. The average computer user needs more incentive to switch than a replacement of equal quality; he or she needs something superior. More is at stake here than the continued use of a mediocre operating system; a binary culture is no better than a monolithic one. Multiple platforms, all utilizing agreed upon standards, open protocols, and file formats are key in conquering a digital oligarchy.

Teach the bourgeois, and rock the boulevard . . .

[By bedouin on Ubuntu Forums]

Wednesday, December 27, 2006

A Java Program in Unicode

Here is one of my favourite Java programs - written entirely in Unicode. Who says you need to declare a class or even have any Java keywords?!

/*
\u0050\u0076\u0064\u004c\u0020\u0031\u0020\u0041\u0070\u0072\u0039\u0036
\u002a\u002f\u0020\u0063\u006c\u0061\u0073\u0073\u0020\u0068\u0020\u007b
\u0020\u0020\u0070\u0075\u0062\u006c\u0069\u0063\u0020\u0020\u0020\u0020
\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0020\u0076\u006f\u0069\u0064
\u006d\u0061\u0069\u006e\u0028\u0020\u0053\u0074\u0072\u0069\u006e\u0067
\u005b\u005d\u0061\u0029\u0020\u007b\u0053\u0079\u0073\u0074\u0065\u006d
\u002e\u006f\u0075\u0074\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e
\u0028\u0022\u0048\u0069\u0021\u0022\u0029\u003b\u007d\u007d\u002f\u002a
*/

Save as h.java, compile and run!

Monday, December 18, 2006

Program Without Class Keyword

Here is how you can write a standalone Java program WITHOUT a class keyword:

enum E{
X;{
System.out.println("Hello World");
System.exit(0);
}
}

Here is how you can write a standalone Java program WITHOUT a main method:

class Hello{
static{
System.out.println("Hello World");
System.exit(0);
}
}

To avoid the "Could not find main method" exception, the System.exit(0); statement is used which terminates the program after printing out Hello World.

Update (1/1/2013): These examples work on older versions of Java but not on Java 6 and above.

Wednesday, December 06, 2006

Linux - CPU, Memory and Version

Find out which version of SuSE you are running:
more /etc/SuSE-release

SUSE LINUX Enterprise Server 9 (i586)
VERSION = 9
PATCHLEVEL = 2

Find out how much Memory you have:
more /proc/meminfo

MemTotal: 8141344 kB
MemFree: 1983696 kB
Buffers: 74736 kB
Cached: 258836 kB
SwapCached: 2581836 kB
Active: 5485116 kB
Inactive: 444240 kB
HighTotal: 7299036 kB
HighFree: 1408888 kB
LowTotal: 842308 kB
LowFree: 574808 kB
SwapTotal: 9437144 kB
SwapFree: 5436028 kB
Dirty: 244 kB
Writeback: 0 kB
Mapped: 5571044 kB
Slab: 75912 kB
Committed_AS: 5085896 kB
PageTables: 28032 kB
VmallocTotal: 112632 kB
VmallocUsed: 9720 kB
VmallocChunk: 102640 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 2048 kB

Find out how much processor power you have:

I have a dual core 2.2 GHz machine.
more /proc/cpuinfo

processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 33
model name : AMD Opteron(tm) Processor 275
stepping : 2
cpu MHz : 2204.865
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8...
bogomips : 4325.37

processor : 1
vendor_id : AuthenticAMD
cpu family : 15
model : 33
model name : AMD Opteron(tm) Processor 275
stepping : 2
cpu MHz : 2204.865
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8...
bogomips : 4325.37

processor : 2
vendor_id : AuthenticAMD
cpu family : 15
model : 33
model name : AMD Opteron(tm) Processor 275
stepping : 2
cpu MHz : 2204.865
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8...
bogomips : 4407.29

processor : 3
vendor_id : AuthenticAMD
cpu family : 15
model : 33
model name : AMD Opteron(tm) Processor 275
stepping : 2
cpu MHz : 2204.865
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8...
bogomips : 4390.91