• Home

CodingExperiments.com

$ sudo make money

Search

Category:

  • Apple Inc.
  • Facts
  • Fun
  • Google
  • Google Android
  • Ideas
  • Internet
  • Linux
  • Microsoft
  • Programming
  • Rants
  • Security
  • Uncategorized
  • web 2.0

Archives:

  • April 2010
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007

Pages

  • About
  • About
    • The Authors
  • Commenting your code
  • How to Write Papers with Groff
  • ModCMS Anti-Spam Component Set
  • ModCMS Technical Specifications
  • Regular Expressions Guessing Game
  • Saving code directly to a web server
  • The (Almost) Perfect PHP 404 Page

Meta:

  • RSS
  • Comments RSS

Awesomeness tracker

CodingExperiments at Blogged View blog authority
Free Page Rank Tool

How Running Ubuntu off of an SDHC Card Stopped My Nightmares

April 7th, 2010 by Rishabh Mishra

(Update: Made some small clarifications)

Do you want to hear about my nightmares?

Of course you don’t, but I will begin anyway.

One horrifying fictional vision that has kept me up at night was where my netbook’s hard drive broke down because I attempted to use it on a bumpy bus ride. Scary indeed. The idea of abusing technology makes me cringe.

So the next night, I dreamed that my netbook had a solid state drive. Things felt good, until I realized that my wallet was completely empty, and the drive was completely full.

This reflects the dilemma that I had–solid state drives are more durable on bumpy buses, but cost more and store less. What I wanted is large capacity plus the classic SSD durability.

The solution I came up with? I purchased a 16 GB class 6 SDHC card, stuffed it into the SDHC card slot into the side of the netbook, and installed Ubuntu to it.

The home directory partition remains on the traditional hard drive–unmounted most of the time. But the most frequently used files of the home directory, such as configuration files, remain on the SD card. I can be fully functional without ever using my hard drive.

The pros? I have a pretty cheap storage medium that acts like an SSD, yet still have the ability to summon the storage capacity of a 120 GB hard drive when the drive is not in danger of being accidentally damaged on a bus ride–all without carrying any external drives. The SDHC card doesn’t count as one because it should never be disconnected, considering it is an operating system.

The cons? The SD card is not a true SSD, so it is somewhat slower and is not likely to last as long. Still, I hope that the cost savings are going to outweigh the reduced lifetime.

A quick Google search shows that I’m not completely insane, and that others have also been thinking of swapping out SSDs for cheaper SD cards, but perhaps you would be a better judge of my own insanity.

Though, at least the nightmares are gone now. :)

Posted in Ideas | View Comments

The Butterfly Effect

April 4th, 2010 by Rishabh Mishra

Somewhat recently, I got bored and decided to write a fictional story. Given that I’ve posted nothing on this blog since last August, I decided I had to break the silence with something.

Last night, I talked to God. The strange—yet somewhat predictable—thing was that God is exactly like me. God explained to me that He and I are clones because my universe was designed to be a replica of His. God, like me, is a computer engineer at BitTech—the largest supercomputer conglomerate in the world. Well, he is a computer engineer at his universe’s BitTech—which is exactly the same as the one in my universe. BitTech is well known for attracting the world’s best engineers by giving away lavish perks—including a small amount of CPU time on some of BitTech’s most powerful computer clusters.

After doing some research, the God version of me found out that the CPU time allotted to him, plus some cheap hard drive space, was barely enough to create a simulation of the entire universe he lived in. In fact, he wasn’t the first to do it—other replicas of his universe had been created. It was not too difficult—astronomy had advanced to the point where the details of the Big Bang were known. A new generation of computers had helped simplify the laws of quantum mechanics and unify it with Einstein’s theories. All the buildings blocks were in place, and others had succeeded in putting them together.

But God’s simulated universe was not a research project—it was the plaything of one of the world’s top engineers. The calculations did not always run as fast as the universes run by well-funded institutions, but that was not a problem. Time was relative.

The main problem with God’s setup of the universe was why he came down to talk to me. God had a warning. His algorithms were not perfect. While both His universe and my universe were identical at the point of the Big Bang, imperfections in His algorithm meant that differences soon popped up in my universe. Energy existed in places where there was none in his universe. But God saw this and attempted to perfect the algorithms. Unfortunately, he was unable to. The best solution that he could come up with was to optimize the algorithms to place the anomalies far away from Earth, so what he considered to be the most interesting part of the universe would be completely unaffected—and thus completely identical.

But I am also a world-class computer engineer. I saw right away that this solution would not be perfect. God nodded and said that after so many billions of years, the anomalies were finally going to affect Earth. There was simply nothing that He could do about it. God said that he had ran the simulation on fast-forward, and said that the miniscule differences in the amount of energy near our planet would ultimately have a powerful effect on human history. Our planet was doomed.

It was the Butterfly Effect. Small changes on our planet over time accumulating and making our world unrecognizable. The immeasurably tiny amount of energy was just enough to cause radical changes in human thinking—even drive us to a nuclear holocaust. He said that we would never know what caused the disaster, because would not have realized that the anomalies were there.

Thus, rather than watch Earth destroy itself, God said that He would euthanize our universe. Delete it from his filesystem, and prevent our humanity from ever feeling the misery that the imperfect algorithms would ever cause us. I nodded quietly. I understood. I told myself that I should have foreseen this.

After all, I had just deleted my own universe simulation the day before for the exact same reason.

Posted in Fun | View Comments

Prediction: Android Gains Strength against iPhone in Late 2009 to 2010

August 7th, 2009 by Rishabh Mishra

Introduction

Android is not doing as well as I wanted it to. I was hoping that the Linux-based mobile operating system would leave the folks at Apple shaking in their boots.

At the time of this writing, it isn’t like that. There are two major Android phones released in the United States; the HTC Dream (T-Mobile G1) and the HTC Magic (T-Mobile myTouch 3G).

Reviewers have had disappointing things to say about the HTC Dream, citing issues with the dimensions, battery life, speed, the camera, the “Leno chin”, and so forth. But especially, many considered the physical looks of the phone to be depressing.

“The original T-Mobile G1 was an ugly phone, a boxy clunker with a jutting chin…” –InfoSync

Now, I own an HTC Dream, and it doesn’t seem that bad to me. The battery life is fine, the phone is good looking enough, easy to type on, and Android is a pretty awesome operating system. However, the world does not seem to agree with me. If they did, Android would certainly be a lot more popular.

However, I believe that there is good fortune in the future of the Android platform, and potentially bad news for the iPhone, for two very important reasons that are outlined below.

Moar Android phones!

See, Google states there will be a whopping eighteen new Android phones coming out by the end of 2009. With the amount of promotion that involves releasing eighteen smartphones, consumers are sure to notice.

But the figure of “18 to 20 devices” only covers phones whose manufacturers have notified Google about the production. There could be even more Android phones coming down the pipeline. And even then, Android is coming to more things than smartphones. For example, there are rumors that Android will rejuvenate the Sony Walkman brand, though Android on other things won’t really take away marketshare from other players in the smartphone market.

With the market relatively flooded with Android phones (there really is only one iPhone, that is superseded by a newer model on a regular basis), consumers should be able to find a phone that suits them. For example, I decided against waiting for future Android phones because I really liked the G1′s physical keyboard (and that I needed a phone immediately).

A picture of an HTC Dream with the physical keyboard shown. Original photo on Flickr taken by romainguy.

But if you do not like physical keyboards, then the HTC Magic/T-Mobile myTouch 3G or HTC Hero might be more appealing to you. See how people that like physical keyboards, and people that don’t both can find an appealing Android phone?

More freedom than the App Store

And the sheer number of Android phones is not the only advantage that Android will gain against the iPhone; there is the strict iPhone app store and the relatively lenient situation involving Android apps.

With the well-publicized App Store rejection of Google Voice and related applications, people are getting a bit restless about how Apple controls the iPhone App Store. Hey, even the United States Federal Communications Commission is getting into the issue. That’s gotta mean something, right?

In contrast, while the official Android Market may be censored by the carrier, one can download any Android application file (extension .apk) from the Internet and use it.

The above picture shows the settings panel that allows you to set permissions to install any downloaded .apk file.

Now, what I think will happen is the large number of Android phones being released plus disenchantment with the iPhone app store may result in developers, and then consumers taking an interest in the Android platform.

Potential issues

This is a prediction, not a prophecy. I am not completely sure that events will transpire like I think that they will.

For example, there is potential that Apple could keep more people to the iPhone if they change their App Store policies. Regardless, though, I think that the massive number of Android phones and other devices released still ought to do considerable damage to the iPhone.

And I didn’t even mention how Palm’s WebOS, Symbian, Windows Mobile, etc. even play into this. On top of that, I only gave two reasons why Android could gain significant strength over the iPhone.

So am I right? Am I just another one of those darn Free Software advocates that wish for the iPhone’s popularity to decline? Discuss.

Posted in Google Android | View Comments

Four Must-Do's for Giving CDs to Potential New Linux Users

July 25th, 2009 by Rishabh Mishra

So you’re a Linux enthusiast. You love Linux, and wish to spread the love to other computer users. “How exactly can I ensure that they be happy Linux users?” you ask yourself when thinking about people that are about to convert to Linux.

Well, there are serveral things that one must do to ensure that the newbie Linux user will have a smooth computing experience.

1) Make sure it’s a CD–and a LiveCD

Do not give them a DVD, USB key, or a printed bit of paper containing a large mass of 1′s and 0′s for them to install Linux with. Make sure it’s a CD. Why?

DVDs are bad in case the computer they want to install it on does not have DVD reading capabilities. Remember, Linux has the reputation of running on older computers like a champ. Don’t ruin that ability with a DVD.

USB keys are bad because they often require configuring the BIOS to make the USB key bootable. If you are giving Linux to non-technical users, you definitely want to make sure that they do not need to fiddle around with the BIOS.

Direct installation CDs are bad because it does not let the user test out his or her hardware to see whether or not it is supported by default. It may be the case that the user is not interested in a whole lot of configuration, and does not want to install Linux if it does not have perfect out-of-the-box support for his or her hardware.

Also, don’t just point the new user to an ISO that they have to download and then burn. Many new users do not know how to burn ISOs, and may not have the software that is capable of burning them.

2) Put all the necessary information about the CD on the CD

Don’t give the users a separate sheet of paper, a URL, or some other reference to find out information specific to the type of Linux that you are giving them. They might lose or forget the reference that you give them. To solve this, put all the necessary information straight on the CD.

Information that you should definitely put on the CD include:

  • Name of Linux distribution. It’s definitely not enough just to label the CD as Linux.
  • Version (and if applicable, version codename) of the distribution on the CD.
  • Architecture–so they do not attempt to run an x86 LiveCD on an old PPC Mac.
  • A place to get more information. I prefer to give my email address for this purpose for the following reasons:
    • If I give them a forum, mailing list, IRC channel, etc. to contact, they may be treated unkindly by trollish Linux users.
    • I know about the CD that I gave them, and they have probably already told me what kind of computer that they are going to run this on. If you give Linux CDs to lots of people, you might need to find some way to manage this information outside of your brain.
    • They do not have to sign up for an account for a forum or IRC serve

If you give your email address to the new Linux user, that does not mean that you have to spend days debugging their system should it encounter problems. You can just reply back with some useful links or Google search terms that they might find useful if they need your help.

3) Show them how to boot and use the CD

Given that most LiveCDs have the ability to install themselves on the disk, and potentially wiping out the entire drive; it is very important for the user to know which options will install Linux, and which options will not install Linux.

Of course, it is very difficult to unknowingly erase data using a Linux LiveCD. The main issue is the user’s potential fear that there may be data loss due to use of the LiveCD. That potential fear may prevent the user from using Linux.

However, if the user is given a quick tutorial on how to not erase a hard drive, then the user can proceed with confidence.

4) Make the distribution and architecture choice based on what they need

Don’t just give them any CD you have lying around. If they plan to run Linux on an older computer, the latest AMD64 Kubuntu might be a poor choice.

Talk with them about what kind of computer they want to run Linux on, and explain to them how you narrow down the Linux distribution choices to find the one that should work the best for them.

—–

These tips, if followed, should reduce the chances that the Linux newbie should have significant troubles. Got more tips? Tell us in the comments below.

Posted in Uncategorized | View Comments

Five Reasons FriendFeed Has Made Reading Personal Blogs Interesting

July 17th, 2009 by Rishabh Mishra

I don’t like personal blogs.

No offense to people that do have blogs chronicling their lives, but I do not have the time or motivation to read personal blogs, even personal blogs that are written by my friends.

I probably wouldn’t even be able to maintain interest in reading the personal blog of a person that has a life more interesting than a James Bond movie. (Of course, I mean–such an autobiography would probably do better as a book or movie. Especially a movie.)

These above statements are assuming that FriendFeed, Twitter, and Facebook are not personal blogs for the users that use them. But assuming that those three social networks are personal blogging platforms, then my tune has to change–especially because of FriendFeed.

For the rest of this post, I will focus on the advancements that FriendFeed has brought to the personal blog; advancements that enable me to tolerate personal blogs.

1) Posts that are shorter, but not too short

Click on the above image to see it at full-size.

FriendFeed posts, by far, are shorter than long essays about one’s life. FriendFeed comments do have the capacity for quite long posts, but people generally keep FriendFeed messages short.

On the flip side, FriendFeed does not demand that an individual’s posts be insanely short–like Twitter posts. The advantage a decent message length is that one does not have to resort to hard-to-read shorthand  (“goin 2 library”–a very simple example) to get a message to fit in a brutally short character limit.

2) Hiding functionality

The problem with personal blogs is that if I read your blog, you decide what I see. This means that I either scroll through content that I may not like, or just not read the blog at all.

FriendFeed has a little “Hide” link next to entries. I can even use the “Hide” functionality to wipe out vast swaths of content.

To summarize, not only can I avoid seeing one of an individual’s tweets again–I can avoid seeing all of them again!

3) Lists

Let’s say that I want to keep track of all of my friends that live in a certain region, belong to a certain organization, or otherwise can somehow be categorized into one larger entity. FriendFeed’s lists allow me to mix all of their feeds into one page–while keeping their feeds separate from others.

Not only that, I can use the “Best of the day” feature in FriendFeed lists to make sure that I do not miss the FriendFeed posts that have attracted the most attention from other users.

4) Different user interfaces through the API

FriendFeed’s API means that developers can create their own custom user interfaces for the website. For example, I have previously covered on this blog the NoiseRiver interface for FriendFeed.

In addition, there is Benjamin Golub’s fftogo application–bringing FriendFeed to mobile phone browsers. Golub’s creation does not use Javascript at all, because many mobile phone browsers support it poorly. Phones w web browsers, such as the iPhone and Android browsers, can use the non-API-powered user interface at http://friendfeed.com/iphone.

RSS also enables such user interfaces, but the same RSS feed reader doesn’t usually provide all these interfaces and the opportunity to create more*. In addition, the different user interfaces sync instantly–simply given that all the user interfaces (third-party or not) rely on the same database at FriendFeed. I can add a subscription in the main interface, and expect to see that subscription’s post in fftogo.

*Google Reader comes close, though.

5) Saved Searches

Click on the above image to view it full-size.

The “hiding” functionality is good and all–but it isn’t very precise. I can hide a friend’s Twitter posts, but I can’t hide his Twitter posts that contain certain keywords–such as “iphone.”

FriendFeed saved searches is designed to fix that. One can use the advanced search interface–or type in search operators him or herself–to create complex views that exclude and include certain things.


So what happens when you take the above five reasons and add them together? You end up wtih a very powerful RSS reader that actually transforms personal blogging.

How powerful?

Well, powerful enough to convince a busy Unix geek like me to maintain a personal blog.

Posted in Internet, web 2.0 | View Comments

From Frankenstein to the Singularity: The Story of Artificial Intelligence — Part One

June 2nd, 2009 by Rishabh Mishra

This is the first in a series describing the past, present, and future of artificial intelligence. Check back to find more posts.

When asked about the meaning of life, digital physics pioneer Edward Fredkin responded, “I think our mission is to create artificial intelligence. It’s the next step in evolution” (Wright 80). Artificial intelligence, defined by Princeton’s Wordnet is, “the branch of computer science that deal with writing computer programs that can solve problems creatively” (“Princeton University,” par. 1). Fredkin apparently thinks that artificial intelligence is in our future, but what about our past and present? The general concept of making sentient machines has been around for thousands of years, and studying it reflects on who we are as sentient beings. The short, yet paradoxically long, history of artificial intelligence, or AI, can be divided into three main parts: artificial intelligence before the electromagnetic computer, the birth of artificial intelligence (officially 1956), and more recent developments in the field.

First, due to relatively undeveloped technology in the field of computing for most of human history, concepts in artificial intelligence were generally first found in literature and folk tales. In the AI Magazine article, “A (Very) Brief History of Artificial Intelligence,” Bruce G. Buchanan writes “Philosophers have floated the possibility of intelligent machines as a literary device to help us define what it means to be human” (53). One literary example is Mary Shelley’s original story of Dr. Frankenstein’s monster. The story illustrates a fictional form of artificial intelligence. The creation of Dr. Victor Frankenstein displays a variety of sentient—even human—behavior. For example, the monster feels misery and even requests that his creator build him a soul mate (McCorduck 20). In addition, there were a variety of literary works that included the concept of intelligent machines. Jean-Paul Richter’s obscure story, “The Death of an Angel,” inspired E.T.A. Hoffman’s, “The Sandman,” the latter being a story with robotic female characters. Hoffman’s work also inspired other individuals (15). The concepts of artificial intelligence have been around for hundreds of years before the field received its name.

But regardless of how primitive the technology was before the modern computing age, there was at least one notable attempt to create a machine that theoretically could achieve intelligence. For example, the Analytical Engine was a machine thought of by Charles Babbage in the nineteenth century. The idea behind the Engine was that it could be programmed to solve any possible logical or computational problem, possibly even including those that would give the machine sentience. Unfortunately, due to the state of technology at the time, Babbage failed to complete an implementation of the machine (Kurzweil 165-6). Of course, not all of the academic attempts that would have brought society closer to intelligent creations were actual machines. Approximately at the same time as Babbage, mathematician George Boole was attempting to figure out the governing rules of thought, and to express thought in symbols. Boole’s laws of thought eventually contributed to the rise of the modern computer (Gardner 142-3). Before Boole was the scientist Gottfried Wilhelm Leibniz. During the late 1600′s and early 1700′s, he theorized about creating an algebra of thought, which he described as a calculus ratiocinator. Scientists would be able to clearly and rationally communicate with each other, and theoretically communicate with calculating machines too. Hundreds of years later, modern artificial intelligence researchers were interested by the problems that Leibniz worked on (McCorduck 33). Scientists have always been attempting to make the field of artificial intelligence jump from a fantasy to a reality. Therefore, there have been many very serious scientific attempts to get closer to an artificial intelligence, but only very recently have researchers have had much luck.

In the next section of this series, the history of artificial intelligence will get more spicy as the invention of the modern computer will be covered.

(Want the cited sources? Find them here.)

Posted in Facts | View Comments

"Why Is It Special?" And Seven More Questions the Non-Technical Windows User Has about Linux

May 16th, 2009 by Rishabh Mishra

Your common, non-technical Windows user has most likely not heard anything more than a cursory mention about Linux. They have questions about Linux that are not always answered easily. Many experienced Linux users are not able to answer questions that interested Windows users have in a manner that the latter party can easily grasp. This post is written to hopefully instruct Linux enthusiasts on how to explain Linux to nontechnical users.

Question 1: Why is Linux so special compared to Windows or Mac?

How to answer: If you’re being asked this question, you or somebody else has probably been over-exaggerating the awesomeness of Linux when speaking to the inquirer. However, to answer this, simply explain that people all around the world have come together to create a wonderful computing experience that can be legally downloaded for free; they’re giving it away.

Question 2: This whole open-source thing sounds like Wikipedia, and Wikipedia is full of vandalism. Is Linux safe?

How to answer: Explain that in Wikipedia, you can make changes without the permission of anybody; people come look at your change later. To make a change to the official Linux kernel, one has to discuss the change for quite a while in advance. Remember to tell them that one can make unofficial Linux-based kernels, and the most popular unofficial kernels (such as those available in Debian, SuSE, or Red Hat) are also somewhat protective of the changes that can be made.

In addition, I advise you to not defend Wikipedia, because that is another battle.

Question 3: Windows works fine; why should I switch?

How to answer: This is somewhat dangerous territory. The best answer is telling them that they don’t have to switch. After all, maybe Windows really is the operating system that they should be using. But don’t forget to remind them about Linux’s security.

Question 4: If I install Linux on my computer that has Windows, I’m not actually saving any money. Why do I install Linux, then?

How to answer: Tell them of the security benefits. Explain that, in the world of online banking, security is something that should especially be worried about.

In addition, you can point them to various places where they can purchase a Linux computer if they are in the market for a new machine. For example, you can point out Dell’s Ubuntu line.

Question 5: What is the easiest way I can try out Linux?

How to answer: The below list describes, from easiest to most difficult, ways to try out the Linux desktop, or something that feels like a Linux desktop.

  1. Install Windows-equivalents of popular Linux desktop applications, such as:
    • GIMP
    • Pidgin
    • Geany
    • Inkscape
    • Firefox
    • OpenOffice

    Remember to tell them that this isn’t actually Linux, but it feels like it.

  2. Wubi — A tool to run Ubuntu from within Windows.
  3. A live CD. Remember to tell them that the live CD does not change their Windows installation, as the above two options do. This is generally more difficult if the user burns his or her own live CD. If the user is capable of getting or buying a live CD from you, or another party. Canonical, for example, will ship you a free Ubuntu CD–though it may take you a long while to receive it.
  4. Installing a popular Linux distribution for themselves.

Question 6: How do I choose a distribution of Linux? There are so many!

How to answer: Every true Linux enthusiast has got complex feelings about various distributions. In the past, I have written a post about this issue, and have told enthusiasts to just recommend Ubuntu. I don’t say to recommend Ubuntu for technical reasons, but to recommend it for support, marketing, and other non-technical reasons. I admit my opinion is controversial, but simply recommending Ubuntu makes the sea of distributions somewhat less intimidating.

Question 7: How do I choose a desktop environment? There are so many!

How to answer: This is a bit tricky. What desktop environment I recommend really depends on my mood, the time of day, and what /dev/urandom outputs.

Right now, I believe Xfce has an excellent future for being the newbie user’s Linux desktop. Xubuntu is an Ubuntu spin-off that provides the Xfce desktop.

Question 8: Why do you talk about Linux so much?

How to answer: This is probably another sign that you should scale back on your Linux discussions. Choose a simple expression to capture why you like Linux so much. A personal favorite of mine is that I want to, “share the love.”

Posted in Linux | View Comments

State of the GNU/Linux Desktop 2009 Part 3/4: Infrastructural Enhancements

May 12th, 2009 by i80and

Again, apologies for the much delayed posting.  Finals together with the sluggishness of my backup computer made me unable to write this until now.

For those who don’t remember, we are in the middle of a series on what interesting developments and capabilities are ongoing within the Free Desktop to improve its fitness for both personal and enterprise usage.

Infrastructural Enhancements

This category of purely under-the-hood work is not immediately obvious and thus is often under-appreciated, but yields many useful improvements to the Free Desktop.

One notable entry here is automatic code parallelization in GCC (the main compiler on Linux) through Graphite, which should lead to significant performance improvements for all programs on computers with multiple processing cores.  Of course, the scope of what can be done is limited due to this sort of conversion requiring a higher-level view of what a block of code is meant to do, but nevertheless this is very much a welcome feature that will keep our beloved compiler in line with the current state of compiler technology.

Filesystems have always been an area of interest for the Free desktop; from the plain-spoken and default ext3 to the fast ReiserFS and SGI XFS, Linux especially has always had a variety of powerful filesystems available for any task. The march of progress has thankfully not left this critical job by the wayside.  ext4, the successor to ext3 featuring much improved performance through more flexible filesystem clustering through extents, and new features such as defragmentation support and checksumming of filesystem journals for increased reliability became stable in Linux 2.6.28.[22][23] Fedora 11 is going to include it included by default, which should come as either a pleasant or a terrifying prospect depending on one’s view on stability.[24] I’d say that I’m psyched, but I’m using it right now on my Arch Linux installation so such a statement would be misleading.

However, by the ext4 project leader’s (Theodore Ts’o) own admission, ext4 is not revolutionary enough.[25] The next major filesystem on the horizon is btrfs, designed to overcome many of the limitations of ext3 and ext4 in filesystem size and administration.[26] Among the interesting features it will bring will be transparent checksumming and compression for files, defragmentation and filesystem checking while the filesystem is mounted, and more sophisticated data striping.  If you’re keen to try it out, it should be included with Fedora 11, but be warned that the filesystem format is not yet stabilized or optimized and thus your data may be prematurely ended.[27]

Security

The infamous security framework soap opera is still going on, of course, with the usual politics and petty bickering within the Linux kernel development community.  Although the free desktop takes much well-deserved pride in its security, the Unix-like user-group-other security model (Discretionary Access Control, or DAC) traditionally used for managing permissions has proven to be both insecure and distinctly un-Unix-like.  Not only was it crafted before any concept of wide networking had really been established, but it also far too permissive and course-grained in its management.  Hence the need for a new security system that builds on top of the traditional model; there are many competing modules alive in the ecosystem, but it remains to be seen which (if any; after all, FLOSS is all about choice) will prevail.  An important thing to be aware of within this realm is the LSM, or the Linux Security Modules; a common Mandatory Access Control (MAC) security framework API within the kernel.

POSIX File Capabilities, while not strictly a security framework, are a minimalistic approach to security available since Linux 2.6.24.  Basically, they use the extended attribute system of modern filesystems such as ext3, ext4, btrfs, etc. to allow a program to do tasks that would traditionally require root permissions.  Far short of being a clone of the classic SETUID bit that forces a program to be run as root (an over-simplification), it instead limits what a program can do to the minimum that is needed.  The implications of this are invasive and far-reaching; for instance, using file capabilities it is no longer necessary to be root in order to burn an optical disk.  LWN as always has a good read on the topic.

SELinux (Security Enhanced Linux) is another security framework, only instead of merely being an extra set of permission bits it is a full-blown MAC solution.  Developed by the National Security Agency in 2000, SELinux was the first major security framework available for Linux and is now used most notably by Red Hat and Fedora.  Although it is generally considered quite secure because it uses an inode-based system instead of filenames (avoiding issues of different restrictions referring to the same file), it is also notorious for being a nightmare to configure.[28]

AppArmor is the main competitor to SELinux, developed originally by Immunix but later released and maintained by Novell after they perchased the former.[29] It is currently used by most notably by OpenSUSE and Ubuntu, presumably due to its ease of configuration compared to SELinux.  However, it is considered less secure due to its reliance on filenames instead of filesystem objects, and thus there has been a great deal of controversy both petty and significant to the point that Linus Torvalds himself has had to step into the fray despite his self-proclaimed disinterest in security frameworks.[28] Like SELinux, it is a MAC security framework using LSM, but unlike it, AppArmor has failed to be merged into the mainline kernel tree due to both technical troubles and political infighting.[29]

SMACK (Simplified Mandatory Access Control Kernel) is a much more recent entry into the security game available since Linux 2.6.25 that promises drastically simpler configuration at the cost of less power and capabilities compared to SELinux.  In addition to eased configuration, it apparently also uses a hybrid approach to the inode/path debate.[30]

Lastly, TOMOYO is the latest entry to this… active… environment of security frameworks.  It is not yet available in a stable kernel release, but should be available in Linux 2.6.30.  Much like AppArmor, it uses pathnames as its basis for handling files, but among other things is designed to be more robust by working around weaknesses in LSM allowing more intellegent handling of file objects.

Posted in Linux, Security | View Comments

State of the GNU/Linux Desktop 2009 Part 2/4: Hardware Support

April 30th, 2009 by i80and

Apologies for the late posting; a mixture of hardware woes and scheduling issues  made getting this post out difficult.

As mentioned in part one of this series, despite the legendary pace of development in the Open Source community, it can be difficult to keep tabs on what is being worked on.  I don’t claim to know about everything, or even most things; I do however enjoy tracking these things in my free time, and would like to share what I know to those who don’t share my passion.

Arguably, multimedia is just a subdivision of hardware support, another area where Free operating systems have suffered from a lack of attention. Luckily, vows of support have been sworn recently from AMD/ATI, and Intel has continued on their legendary campaign of support for Linux. This along with more mundane evolutionary work with corporate support and the diligent work of many kernel hackers has led to a much more usable system with a bright future.

Webcam support has gone through several drastic improvements in the past year starting with the release of Linux 2.6.26 introducing a driver supporting all USB video input devices.[13] This success was built upon with Linux 2.6.27 with the introduction of a driver for another popular device. As a result, most webcams are now supported on Linux.[14]

The Free Software community has long had a love-hate relationship to NVIDIA, loving them for their relatively superior graphics drivers yet hating them for their bugs and refusal to play nice with their philosophical demands. This situation has not changed on NVIDIA’s side of the court, but a small team of Free Software enthusiasts finally threw up their hands and began development of the nouveau project: an attempt to design a fully FLOSS driver for NVIDIA-based graphics chipsets. They have made good progress, and most devices are now supported with full 2D acceleration, with a start on 3D for some devices.[15] Interestingly, their 3D driver development is now entirely done in Gallium3D. It’s worth noting that as mentioned above, NVIDIA has released a video decoding framework called VDPAU.

The situation for ATI has been a complete reversal, however. After AMD bought them out in 2006, they swore to release documentation and fund development for their new devices.[16][17] This resulted in not only such radical developments as same-day Linux support but also the official funding of a new open-source driver, radeonhd. As a result of this, ATI cards are now well-supported both with and without proprietary drivers, even with a video decoding framework called XvBA.

A similar effort has come across from S3 Graphics, the maker of graphics chipsets closely associated with VIA.[18] However, their pledge of Linux support has so far been somewhat unsubstantiated, especially in terms of open-source support. The video decoding acceleration framework they chose to implement for their Chrome 500 driver was Intel’s VA-API.

Broadcom, the extremely popular manufacturer of network equipment, still has patchy support on Linux for their WiFi chipsets. Although there is a driver–b43–in the mainline kernel since Linux 2.6.24 (succeeding the earlier bcm43xx driver), the firmware needed to actually initialize and run the device is not open-source and cannot be distributed.[19][20] As a result, it is impossible to use Broadcom WiFi devices on a fully Free system, and it is even impractical–if not impossible–on many systems. Some distributions such as Ubuntu have an automatic setup system for this, but it’s not guaranteed to work.

On the note of wireless networking, there is a development worth noting although it occurred a while back. A somewhat revolutionary update, it dates way back to Linux 2.6.22, and concerns the complete rewrite of how WiFi is done in Linux by the company DeviceScape.[21] This is a mostly internal change, but allows for cleaner and more rapid wireless driver development. It replaces the much older Wireless-Extensions kernel subsystem developed in 1997 to accomplish a similar goal. Because of this fundamental internal API change, it may be that iwconfig and like utilities introduced with Wireless-Extensions are deprecated and may not work with newer drivers; iw its its replacement.[22][23]

Lastly, support for WiMAX has been added to Linux as of the 2.6.29 release through a set of patches donated by Intel.[24] WiMAX is a new wireless networking standard designed for much higher transmission speeds and range compared to WiFi, and is necessary both as a mobility innovation and as a method of internet delivery.

Posted in Linux | View Comments

State of the GNU/Linux Desktop 2009 Part 1/4: Multimedia

April 29th, 2009 by i80and

Debian GNU/Linux 4.0 contained over 283 million lines of code, and the Linux kernel development mailing list is of such high message density that even Linus Torvalds himself reads only a fraction of the messages that daily flood the development process.[0][1] Unless one wants to spend their entire lives trawling untold hundreds of mailing lists, they cannot keep track of what is being developed.  My intention is to give a summary of what interesting features are being developed in the Free Desktop, especially involving Linux, that I’m aware of to the un-obsessed.  My intention is not to give comprehensive technical reviews, however; only an introduction to each development.

Areas of important development in the overall Free Desktop ecosystem can be broken down into several main areas: multimedia, hardware support, infrastructural enhancements, and usability work, and I intend to cover each of these broad categories in the next couple of days.

To open, multimedia has always been the main weakness of the Free Desktop; from patchy and inconsistent audio stacks to unreliable and sluggish graphics subsystems, this is been a major beef for gamers and enthusiasts alike.

Gallium3D is a new API- and operating system-independent driver and purely shader-based stack for 3D video subsystems that has been undergoing much work and has been a major hotspot of thought for the free desktop, especially Linux.  It will eventually replace Mesa, the current OpenGL implementation providing 3D acceleration on X.org.  While at first glance it appears to be mainly an under-the-hood change, it does have much relevancy to the end-user.  As well as allowing more rapid support of graphics hardware and less buggy drivers because of a more clean codebase, it will also provide driver-neutral video acceleration.[2] A usable but early version should be part of the Mesa 7.5 release.[3]

On the note of video acceleration, this is also an active area of development.  Xv, or the X-Video Extension, was the classical method of this and is still frequently used.  However, despite (and also because of) its maturity, Xv is hardly ideal as it only accelerates resizing and color manipulation in video and does not concern itself with decoding video.  This makes it mostly worthless for modern video.  XvMC, or the X-Video Motion Compensation Extension, is a later extension that also leverages the graphics card to offload some parts of MPEG-2 decoding.  This is mostly worthless for modern systems, however, as not only are there many bugs with XvMC but also because of its lack of support for more modern video compression systems.[4] Fortunately, the Free Software community has not been idle; Intel’s VA-API, or the Video Acceleration API, is currently the favored player by some.  Not only is it an actively developed library and standard supporting a variety of video decoding tasks in modern codecs such as MPEG-4.  Natively it is only supported by the Intel Poulsbo and several S3 Chrome graphics chipsets, but it can use NVIDIA’s reportedly excellent VDPAU (Video Decode and Presentation API for UNIX) and AMD/ATI’s XvBA (X-Video Bitstream Acceleration) libraries as back-ends allowing any program supporting VA-API to accelerate decoding on most hardware.[5]

Kernel Modesetting is an important feature that has been under development for several years now, and was finally released for Intel graphics chipsets in Linux 2.6.29.[6] “Mode-setting” refers to the act of activating the graphics card on a display with a certain resolution and color mode, and prior to kernel mode-setting this was a complex dance between kernel and userspace that lead to much instability when switching virtual terminals, starting the X.org server, and resuming the system from a state of suspension.  Eventually, kernel mode-setting will also lead to a flicker-free boot process as seen in Fedora Plymouth.

As substandard as the graphics subsystem of the Free Desktop has been historically, the audio stack has been… worse.  The Open Sound System was the historical API for handling audio on all major UNIXes for years, but eventually development went proprietary and the open source version began to suffer from severe dust collection and a lack of modern features such as hardware audio mixing.  Linux 2.6 was therefore released with its own sound API: ALSA (Advanced Linux Sound Architecture).  Unfortunately, ALSA is to this day notoriously messy in both its API and in its documentation.[7] The situation is however convoluted by the frequency of OSS apps forced to use ALSA’s emulation layer.  The end result is… messy and buggy.  PulseAudio is a sound server designed to repair the situation.  The theory is that instead of having applications directly work with the soundcard, requests are routed through PulseAudio allowing not only better application coexistence but also more advanced capabilities such as playing audio across a network.  For a while, its adoption was hampered by high latency, bugs, and incompatibility with all ALSA applications, but it is now the de-facto standard for audio on Linux.[8] However, it is worth noting that OSS has since gone open-source again, and although I have not used it myself, reportedly it is quite superior to ALSA.[9]

Media playback, especially MP3 and DVD playback, has been another area in need of attention for years.  However, recently the situation here has improved in part due to the emergence of GStreamer, a fairly solid and extremely powerful multimedia framework.  Prior to this, xine and MPlayer were the main multimedia frameworks; while good applications in their own right, they tend to be suboptimal for writing new players.  Fluendo was then founded to sell fully legal and licensed multimedia codecs for it, filling an important hole in the Free Desktop ecosystem.  In addition to this, they released an MP3 playback codec for free, and are currently attempting to get the rights to develop a legal DVD playback library.[10][11] Don’t get too excited yet, though; as of 2008, they were still attempting to get it approved by the DVD consortium.[12]

Wayland is, to me, one of the most interesting developments here.  The X.org display server implementing the X11 display protocol is notoriously buggy and heavy compared to what is needed.  Essentially, Wayland is a compositing display server that throws out everything that isn’t needed on a modern system.  This is of course most immediately useful on mobile devices where the overhead incurred by a full-blown X11 server would be impractical, but it also brings a refreshing simplicity to a standard desktop system as well.  Perhaps most interestingly, Wayland also allows running multiple full-blown X11 sessions within a Wayland window.[13]

EDIT: There appears to be a nice write-up of X.org’s recent work here.

Posted in Linux | View Comments

« Previous Entries

 
Wordpress Themes by and Website Templates by Blogcut Blogged Blog Directory Blog Directory - Blogged