February 09, 2010

Do I really need to know Java to teach Programming?

I recently applied for a part time teaching positon at a local community college in my area. Part of the job description which I assume was written by an HR person states the job requirements include “technical instruction on topics including object-oriented programming and web-based scripting languages, specifically Java, Dreamweaver and Flash.” While this description is a little confusing they are no doubt looking for someone to teach web development. While I feel that I’m qualified enough to teach HTML,CSS, and PHP, I do wonder if my lack of mastery of the Java programing langage will prevent me from landing this job?

If I were to sit down in the interview today I would argue the point that programming fundamentals are the same across all programing language and that once a student learns how to program, then they can more easily adapt to many different programing languages. The fact that Java is so widely used for it’s ability to run on most platforms helps establish it as one of the languages of choice, if a student is planning on making a career out of programming, and thus this is why Java is thought in schools. To me Java is a cumbersome and arcane language, and my experience with it has thought me that it is more trouble than it is worth if you are using it to learn how to program. This can be easily illustrated with the following “Hello World” example.

// Hello World in Java
 
class HelloWorld {
  static public void main( String args[] ) {
    System.out.println( "Hello World!" );
  }
}

As a comparison here is an example in Python, which I believe is a better language than Java to teach programming fundamentals.

# Hello World in Python
print "Hello World"

Now this isn’t really a fair example so lets look at a program that uses recursion. First the Java example of the The Towers Of Hanoi:

class hanoi
{
  public static void main (String args[])
  {
    if (args.length != 1) {
      System.err.println("error: a single integer argument needed");
      System.exit(1);
    }
    Integer N = new Integer(args[0]);
    H_dohanoi(N.intValue(), 3, 1, 2);
    System.exit(0);
  }
 
  static void H_dohanoi(int n, int t, int f, int u)
  {
    if (n > 0) {
      H_dohanoi(n-1, u, f, t);
      H_moveit(f, t);
      H_dohanoi(n-1, t, u, f);
    }
  }
 
  static void H_moveit(int from, int to)
  {
    System.out.print("move ");
    System.out.print(from);
    System.out.print(" --> ");
    System.out.println(to);
  }
}

And now the Python version:

import sys 
 
def disk_number():
    n = sys.argv[1]
    return int(n)
 
def hanoi(n, a = "A", b = "B", c = "C"):
    if n == 0:
        return
    hanoi(n-1,a,c,b)
    print a, '->', c
    hanoi(n-1,b,a,c)
 
def main():
    n = disk_number()
    hanoi(n)
 
if __name__ == "__main__":
  main()

Now both of these programs do the same thing. They are run from the command line and and take a argument of the number of disk to be moved (The Java program checks to see if an argument is given, but other than that both programs are about the same). Both of these programs preform the recursive function calls almost identically, the only noticeable difference is the clutter in the Java program just to print out the results.

If you can eliminate the unnecessary clutter from the programing language the fundamentals begin to stand out. Once the fundamentals are in place you can begin to learn any programing language you want.

Related posts:

  1. Fighting the Flu with Python
  2. Hello world!

February 08, 2010

Build 424: Functions and Array Operators
Kynetx Logo

The latest build of the Kynetx Rule Language (KRL) provides a significant upgrade in capability with the addition of functions. We've also added some new array operators that take advantage of functions to make using arrays easier.

KRL supports functions as first-class objects in the expression language. KRL supports only anonymous functions, but they can be given names by binding them to a variable in a declaration. Here's an example:

pre {
  add5 = function(x) {
           x + 5
         };
}

Functions are evaluated statically (e.g. the environment they are defined in, not the environment they are executed in determines the binding of free-variables) and can be recursive. Here's an example of a recursive function in KRL:

pre {
  fact = function(n) {
            (n <= 0) => 1
                      | n * fact(n-1)
         }
}

Functions are declared using the keyword function and contain optional declarations followed by a single expression that returns the result of the function when executed. To see this, consider the following example which uses Newton's method to calculate square roots (taken from Section 1.1.8 of Structure and Interpretation of Computer Programs):

sqrt = function(x) {
    average = function(x,y) { (x + y) / 2 };
    good_enough = function(guess, x) {
       v = (guess * guess) - x;
       v < 0.01 && v > -0.01
    };
    improve = function(guess, x) {
       average(guess, (x / guess))
    }
    sqrt_iter = function(guess, x) {
       good_enough(guess, x) => guess
                              | sqrt_iter(improve(guess,x), x)
    };
    sqrt_iter(1.0, x)
}

Functions can return functions as values and functions can be passed as the arguments to other functions and operators in KRL. The following example defined a generalized summation function that sums the numbers from a to b incrementing using inc and applying the function f to each term:

sum = function(f, a, next, b) {
  (a > b) => 0
           | f(a) + sum(f, next(a), inc, b)
};
inc = function(x) { x + 1 };
cube = function(x) { x * x * x };
sum_cubes = function(a, b) {
  sum(cube, a, inc, b)
}

We could define a function that creates incrementor functions. When given a number, it returns a function that increments by that value:

inc_generator = function(n) { function(x){ x + n } };
inc = inc_generator(1);
inc_by_2 = inc_generator(2);
inc_by_25 = inc_generator(25);

Being able to write functions adds significant power. More so with some of the other languages changes we have in mind for the next few months.

Weve also added several new array operators in recent builds. Most notably, array references now work as follows:

a = [1,4,3,6,5];
b = a[1]

This would bind the value 4 to the variable b. Note that array references only work for arrays of one-dimension, so c[1][2] is not allowed (presuming c is an array of arrays).

In addition, there are a number of new operators available for arrays. The following array operators are now available (in addition to length which has been previously available):

  • sort - sorts the array. With no argument, sorting is done in ascending order. The argument "reverse" causes sorting to happen in descending order. The argument can also be a function that takes two argument and returns a boolean value which will be used as the comparison function for the sort.
  • filter - filters an array, producing a new array. The operator takes a function argument that takes a single parameter and returns a boolean value. The return array contains elements for which the function returns true.
  • map - modfies an array from mapping a function to each member of the array. The operator takes a function argument that takes a single parameter and returns any value. The array returned from map is the result of applying the function to each member of the original array in turn, collecting the results into a new array.
  • head - returns the first element of an array without modifying the array.
  • tail - returns an array that is identical to the orginal array except without the first member.

You could use these like so:

pre {
  f = function(x) { x  4 };
  g = function(y) { y * 2 };
  a = [1,4,3,6,5];

  b = a.sort(); // returns [1,3,4,5,6]
  c = a.filter(f); // returns [1,3]
  d = a.head(); // d has the value 1
  e = a.map(g); // e has the value [2,8,6,12,10]
}

Operators are fairly easy to add and handy to have, so if you have ideas for other operators, on arrays, strings, and so on, just let us know.

Tags:

Talking to Qt Threads

I wrote about multi-threading in Qt a while back, and how to use QThread to wrap a blocking function call “lock free”. Today we’ll talk about how to pass data into your thread. This approach can be used, for example, to tell your QThread to stop.

pre { font-size: 10pt; border: 2px solid #016; padding: 5px; color: white; background: #333; }

There are two ways to use QThread, with and without an event loop, and the preferred method for talking to a QThread depends on which of them you use.

Way 1: Without an event loop

When you’re not using an event loop, the thread’s run() method often looks like this:

void MyThread::run()
{
    forever
    {
        // Do some stuff
    }
}

Since this method does not use an event loop, there is no way to deliver a signal to your thread. So if you want to pass data into the thread, you have to use a good old fashioned mutex. Let’s look at an example showing you how to stop your thread:

void MyThread::run()
{
    forever
    {
        {
            // "mutex" and "stopRequested" are member
            // variables of MyThread:
            QMutexLocker locker(&mutex);
            if(stopRequested)
                return;
        }

        // Do some stuff
    }
}

void MyThread::stop()
{
    QMutexLocker locker(&mutex);
    stopRequested = true;
}

In this case, we have to check the stopRequested variable in a timely manner in our thread’s run() method. The longer you run between checks, the longer it will take your thread to actually stop.

Outside observers can use the finished() signal to know when your thread is actually done. So if you are in a QMainWindow, for example, and a closeEvent() happens, you can ignore the event, call MyThread::stop(), and then when the QThread::finished() signal arrives, you can actually close the window.

The downside is that the stop() call will actually block while it tries to acquire the mutex. Given the way this code is written, the blocking will probably be very short, but hey, I hate blocking. Let’s see if we can dig up a better way to do this.

Way 2: With an event loop

If you have an event loop, you can use Qt’s meta-objects to talk to your thread. Let’s look at the same example as before, only this time with no locking or blocking.

void MyThread::MyThread()
{
    moveToThread(this);
}

void MyThread::run()
{
    QTimer *timer = new QTimer();
    connect(timer, SIGNAL(timeout()),
        this, SLOT(doSomething()));
    timer->start(0);

    exec(); // starts the event loop, and doesn't
            // return until it is told to quit()
}

void MyThread::stop()
{
    if(currentThread() != this)
    {
        // The caller is running in a
        // different thread, so use Qt to
        // call stop() later, on our own thread:
        QMetaObject::invokeMethod(this, "stop",
                        Qt::QueuedConnection);
    }
    else
    {
        // Now the call has arrived from our
        // own thread, yay! We can safely
        // shut down our event loop.
        quit();
    }
}

Look mom! No locks! Now we have killed our thread, safely and gracefully. There is no chance of blocking, and we learned something about QMetaObject.

A couple items to note:

  • The doSomething() method is left as an exercise for the reader, but be careful about the QTimer interval. I used 0, which means it will be firing almost constantly.
  • The stop() method must be a slot in MyThread (and not just a regular method) or else invokeMethod() will return false and not actually re-invoke stop() for you.
  • You can pass arguments to your thread this way, but it requires a bit more fun with QMetaObject::invokeMethod().
  • You can reduce this whole thing to a magical macro that you could put at the top of your stop() method, saving you from having to write if(currentThread() == this) at the top of every method. Hint: use the __FUNCTION__ macro.
  • To run this example code, you’ll need to #include these files: QThread, QTimer, QMetaObject, QMutexLocker, and QMutex
  • To call quit(), it may not actually be necessary to be running on the same QThread (it works for me without the QMetaObject), but this will be required when you start passing in data to your thread. Without it, your program could do unpredictable naughty things. I can’t find anything in the docs about whether quit() is thread safe.

I’ve found this QMetaObject approach the most effective and easiest way to pass data to QThreads safely, without blocking and without locks.

Happy threading!

February 07, 2010

My New Home

I have talked about buying undertakingyou.com for a long time. Finally did a couple of weeks ago, and I must say, it is actually really nice to have the new stuff. Wordpress is great, although I probably don’t have to try hard to convince you of that. The migration from blogger was pretty smooth. Although all tags were converted to categories and I had to recreate them all.

Other new things are my new URL is being hosted on xmission’s new Stackable service. It is pretty cool and I will blog about that another time.

The theme on the site will be a work in progress. If you have any suggestions please comment and let me know.

Linux NIC teaming recommendations
Introduction

In my job as a network engineer, I am constantly looking for ways to increase the availability of the network. This is especially true in the data center, where services are expected to always be available. One of the ways to increase the network availability of a server is by using multiple network interfaces. This technique has many different names, but I am just going to call it NIC teaming.

Purpose of NIC Teaming

NIC teaming increases network availability by removing single-points-of-failure (SPOF). These SPOFs are components that will cause a service outage if they become unavailable. If we consider a single network connection from your server to your switch, we can identify quite a few SPOFs:
  1. Server NIC failure
  2. Network cable failure (such as being cut or unplugged)
  3. Network switch failure (such as a planned firmware upgrade or unplanned outage)
Methods of NIC Teaming

The reason I am writing this blog is to help people understand the different options for NIC teaming. If you search the Internet (like I did), you will be hard pressed to find a standard NIC teaming setup that works across all operating systems. You may not be able to find a listing of pros/cons and requirements of each NIC teaming strategy.

In order to fully understand the NIC teaming options available in Linux, please read the official Linux Bonding How To. I am only going to cover two of these options, which are the two that I am going to recommend.

Adaptive Load Balancing (ALB)

The first recommended NIC teaming strategy is called "Adaptive Load Balancing" (ALB). This is specified in Linux by using bonding mode = 6.
"Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation."
When you use ALB, you should plug each NIC into a different switch. This removes all three SPOF mentioned above. Additionally, it provides a basic level of load-balancing. I highly recommend using ALB for NIC teaming, because it offers the most advantages without requiring special configuration on the network switch.

IEEE 802.3ad Dynamic link aggregation" (LACP)

The second recommended NIC teaming strategy is called "IEEE 802.3ad Dynamic link aggregation" (LACP). This is specified in Linux by using bonding mode = 4.

When you use LACP, you are required to plug all NICs into the same switch. You should only use LACP if you have an internally redundant switch, usually in the form of modular cards or a proprietary stack of switches. Additionally, you are also required to configure the switchports to use LACP. Once you have met all the requirements, you will have a great network connection. LACP can have the same fault-tolerence as ALB, and it has a better load-balancing than ALB.

Summary

Most people should use ALB (mode=6) for NIC teaming their Linux server because it is the simplest method to achieve fault-tolerance and load balancing. If you require higher bandwidth, and you have an internally redundant switch, and you can configure your switchports to use LACP, then you should use LACP (mode=4) for NIC teaming.

Here are a few links on how to configure NIC teaming in Ubuntu Linux:

HowTo do Ethernet Bonding on Ubuntu – Properly

UbuntuLTSP Trunking

Caveat: I am a network engineer, and not a server engineer. It is my goal for everyone to increase their server's network availability with this knowledge. If you have an opinion on this topic, please share it in the comments. Thanks!

February 06, 2010

200 lumen per Watt Efficacy barrier broken
This is great news:
Cree has demonstrated 208 lumens per watt efficacy (luminous efficiency) in a laboratory LED. I can hardly wait to see these in full production. Still a long way to go for low-cost volume manufacturing, but it's nice to see such great progress in the last few years.
Redirectionless OAuth Credentials Exchange
Image representing Twitter as depicted in Crun...

Image via CrunchBase

Am I missing something here? Twitter is working with select partners to test what is variously being called OAuth delegation or browserless OAuth credentials exchange method (not sure why browserless since it's not about the browser, it's about the redirection).

The bottom line is that in an effort to be more user friendly, this removes the redirection to the Twitter site where you authoirize access by letting the third-party site (the site being delegated to) collect and then pass along the user's username and password to get the OAuth credentials. Abraham Williams captured the POST headers from Seesmic Look and they clearly contain the username and password.

I don't see how this can be a step forward in secure third-party access to APIs like Twitter. Once users start being allowed--even required--to (again) enter usernames and passwords into third-party sites, they'll be ripe for phishing attacks. Maybe I'm misunderstanding this based on the scetchy information available, but it looks phishy to me.

Tags: oauth identity security

February 05, 2010

Looking for Alpha Testers for Eduglu, a new Drupal Install Profile for Higher Education

I've been working on a social learning site based on Drupal for the past two years as a student at Brigham Young University and am now working towards readying it for its maiden release into the world as a full-fledged Drupal install profile.

My goal with Eduglu is to:
a) Provide a superb out-of-the-box social learning engine to help departments, clubs, classrooms, and other campus groups communicate, collaborate, and learn with one another.
b) Support a social learning platform which individual universities and Drupal shops can integrate with existing tools and services and use to build custom tools supporting specific learning practices.

Or in simpler terms, Eduglu = robust social learning engine + pluggable educational tools.

For Drupalers, Eduglu is built on the same stack of modules as Open Atrium; Organic Groups, Spaces, Context, and Features.

I'm also working to start a company to provide commercial support and hosting for Eduglu.

But we're not there yet. My plan is to make the first beta release by Drupalcon where I'll be presenting more about Eduglu. But to be ready by then, I need alpha testers. If you're interested in becoming an alpha tester, please contact me. I'll be preparing an initial release over the next couple of weeks.

Also, if you do Drupal consulting in higher education, I'd love to work with you. Please contact me and let's discuss how we can work together.

Lastly, if you're an educator working in higher ed, I'd love to talk to you as well. Especially people working at online or virtual colleges and community colleges. If there's an educational tool you've dreamed of having -- or tried building and failed -- contact me and tell me about it and I might just build it for you.

And if you're not in one of the above three groups but know someone who is -- please connect me with those people.

I'll be doing a bit of travel in a couple of weeks. I'll be in Boston February 17th-20th, New York February 22-23 and Washington DC on the 24th-25th. If you're in one of those cities and want to meet and talk Drupal/higher education, let's get in touch!

Thanks all! It's going to be an exciting ride and I'm looking forward to it.

Subscription Models are Chic
Image representing Dave McClure as depicted in...

Image via CrunchBase

A recent blog post by Dave McClure, the investor in charge of the Founders Fund seed investment program makes the assertion that "subscription models are the new black" and we've lost a decade of innovation by people living off the table scraps of Google's $10B pay-per-click ad system. (Warning: the blog post is pretty raw.)

In a seeming non-sequiter, he moves on to talking about passwords. But pay attention, because what he's really doing is talking about friction in subscription models and the friction that they inpose. I think it's interesting that the iPhone app store, for example, still requires that I type a password when I purchase an app on my iPhone given that they have a good identification based on the device. Of course, what they're doing is using the password for authorization. Making sure it's me who's purchasing the app.

Tags: subscription revenue kynetx identity

[USN-894-1] Linux kernel vulnerabilities

The following security announcement applies to linux-image. If you have linux-image installed, please see below for details on the vulnerability and instructions on patching your system:

ATTENTION: Due to an unavoidable ABI change (except for Ubuntu 6.06)
the kernel updates have been given a new version number, which requires
you to recompile and reinstall all third party kernel modules you
might have installed. If you use linux-restricted-modules, you have to
update that package as well to get modules which work with the new kernel
version. Unless you manually uninstalled the standard kernel metapackages
(e.g. linux-generic, linux-server, linux-powerpc), a standard system
upgrade will automatically perform this as well.

Details follow:

Amerigo Wang and Eric Sesterhenn discovered that the HFS and ext4
filesystems did not correctly check certain disk structures. If a user
were tricked into mounting a specially crafted filesystem, a remote
attacker could crash the system or gain root privileges. (CVE-2009-4020,
CVE-2009-4308)

It was discovered that FUSE did not correctly check certain requests.
A local attacker with access to FUSE mounts could exploit this to
crash the system or possibly gain root privileges.  Ubuntu 9.10 was not
affected. (CVE-2009-4021)

It was discovered that KVM did not correctly decode certain guest
instructions.  A local attacker in a guest could exploit this to
trigger high scheduling latency in the host, leading to a denial of
service.  Ubuntu 6.06 was not affected. (CVE-2009-4031)

It was discovered that the OHCI fireware driver did not correctly
handle certain ioctls.  A local attacker could exploit this to crash
the system, or possibly gain root privileges.  Ubuntu 6.06 was not
affected. (CVE-2009-4138)

Tavis Ormandy discovered that the kernel did not correctly handle
O_ASYNC on locked files.  A local attacker could exploit this to gain
root privileges.  Only Ubuntu 9.04 and 9.10 were affected. (CVE-2009-4141)

Neil Horman and Eugene Teo discovered that the e1000 and e1000e
network drivers did not correctly check the size of Ethernet frames.
An attacker on the local network could send specially crafted traffic
to bypass packet filters, crash the system, or possibly gain root
privileges. (CVE-2009-4536, CVE-2009-4538)

It was discovered that “print-fatal-signals” reporting could show
arbitrary kernel memory contents.  A local attacker could exploit
this, leading to a loss of privacy.  By default this is disabled in
Ubuntu and did not affect Ubuntu 6.06. (CVE-2010-0003)

Olli Jarva and Tuomo Untinen discovered that IPv6 did not correctly
handle jumbo frames.  A remote attacker could exploit this to crash the
system, leading to a denial of service.  Only Ubuntu 9.04 and 9.10 were
affected. (CVE-2010-0006)

Florian Westphal discovered that bridging netfilter rules could be
modified by unprivileged users.  A local attacker could disrupt network
traffic, leading to a denial of service. (CVE-2010-0007)

Al Viro discovered that certain mremap operations could leak kernel
memory.  A local attacker could exploit this to consume all available
memory, leading to a denial of service. (CVE-2010-0291)

The above security vulnerabilities apply to the following Ubuntu releases:

  • Ubuntu 6.06 LTS
  • Ubuntu 8.04 LTS
  • Ubuntu 8.10
  • Ubuntu 9.04
  • Ubuntu 9.10

If you are have this utility installed on your Ubuntu system you’ll need to apply the security update to be protected. Please follow the steps below to ensure your system is properly patched:

Apply Updates

To apply the updates run the following command(s) within your Terminal:

sudo aptitude update
sudo aptitude safe-upgrade

After a standard system upgrade you need to reboot your computer to effect the necessary changes.


February 04, 2010

How to Change Your Default Firefox Home Page : Ubuntu Beginners

This article is part of a series entitled “Ubuntu Beginners”, which which walks new users through basic Desktop and Command Line usage. This article will detail how to change the default Firefox home page. As outlined in a previous post: Ubuntu 10.04 to Change Default Search Provider, the default search provider (and home page) in Ubuntu 10.04 will be changing from Google to Yahoo!. This article will outline how to revert that change, or define an alternate preferred search provider.

Change Firefox Home Page

In order to change the preferred home page in Firefox, you’ll need to navigate to the Preferences menu. This can be found, within Firefox, at Edit > Preferences. If you’re migrating from the Windows platform, you’ll notice a difference here. Instead of Tools > Preferences, it is found at Edit > Proferences. The screenshot below demonstrates this location:

Firefox > Edit > Preferences

Firefox > Edit > Preferences

This will open the Firefox Preferences utility, which allows you to customize a wide range of Firefox settings. The primary setting that we’re looking for is the Home Page. In the default installation in Ubuntu 9.10, the Home Page is set to: chrome://ubufox/content/startpage.html. In future versions the Home Page will be set to Yahoo!. To update your Home Page, simply change the URL defined. The second screenshot below demonstrates defining Google as the preferred Home Page.

Firefox Preferences

Firefox Preferences

Firefox Preferences - Home Page : Google

Firefox Preferences - Home Page : Google

The change is minor between the two screenshots, but it does make a big difference. A users Home Page is the launching point for all Internet activity. It can allow you to quickly access your favorites sites, or provide you with tools you need. The change from Google to Yahoo! has been a controversial one, but one of the main benefits of Open Source Software is the ability to choose and customize. Changing your default Home Page and Search Provider simple.


The Skill of Making Habits

Each New Year, people around the world make their resolutions. While I’m not big into making new year resolutions, I thought I would give it a shot. Well, one month later, I was only really successful at one of the goals. I’ve stopped drinking coke completely, and my overall sugary drink consumption has drastically dropped. Instead of several cokes a day, it more of a root beer once or twice a week. However, my other major goal of working out every morning was a total flop.

Then I started to think about how people make changes in their lives. When I just focused on not drinking coke, it wasn’t easy, but totally possible. They say it takes about 21 days to form a habit. So instead of listing out a dozen goals at the beginning of the year, why not tackle a new one each month? Focus on one habit you want to create or change, spend the first 21 days creating it, and the remainder of the month keeping it. By the time the new month rolls around, your new habit is set and ready to go, and time to tackle a new habit.

One reason I believe setting one goal per month is typically one goal requires multiple changes. With giving up coke, I had to figure out what to replace it with. That means I had to keep our Brita pitcher full of water, which I had to make sure we had enough filters. When night time server emergencies occurred, or I had to drive late in the night, how could I get some caffeine?

So February I’ve made the goal to work out at least four times a week, hopefully five. That required me to get up earlier in the morning, which in turn means I had to go to bed earlier. I made sure I knew where my workout DVDs were at, that I pulled the weights out, and I had my workout clothes ready. That way, when my alarm went off, I could get up and go work out.

I can say, this week, I’ve worked out 3 days and tomorrow will make a fourth. Its not easy, but taking one habit at a time makes it totally possible. So from now on, each month, I’m going to tackle one habit. I have a theory, that the ability to make and change habits is an actual skill. Maybe down the road I’ll be able to make two, or even three habits a month. I’ll keep posting updates with how things are going.

For March, I think I’m going make it a habit to bring my lunch to work each day, which will help me eat healthier and save some money. My suggestion to anyone who wants to make some changes in their life, take it one habit at a time each month.

Related posts:

  1. Dear 2010 – My Plans for Next Year Update: I started to write this post on the 31st,...
  2. Project Management & Entrepreneurship My dear friend Eric Ping pointed out I only had...

Related posts brought to you by Yet Another Related Posts Plugin.

narnia 2: whatever the title is

So, I watched the second Narnia movie tonight (whatever the name is .. I thought the book went by the name the Silver Chair, but maybe that was the third one.  I don't remember.  Anyway .. ), and it was really good!  I was more than pleasantly surprised.

I had put off watching it for a looong time, pretty much completely until a friend recommended it in passing and I was like "Hmm, it's on Netflix Watch it Now, meaning it's probably not that great, so I'll go watch it."  Yah.  Don't ever expect me to explain my logic to you.

I was really excited when the first one came out, and I was sorely disappointed by how much I thought it didn't live up to the book.  I thought it was good, but I was really bothered by the fact that the "epic" battle scene at the end was seriously less than 5 minutes long, and I don't think you ever saw *one* person do anything battlerific.

The second one, though, was awesome.  Probably about half the movie was one big battle or another one, and well done for the most part.  I especially liked the duel.  Oh yah, spoiler alerts.  Whoops.

The movie was interesting, though.  I don't remember the book *at all*, so that could be why I enjoyed it a bit more.  I thought there was a lot of interesting touches.  There was just one thing that kept nagging me a bit, though.  I kept thinking that, no matter how good the movie was, it seems like they focused on making it a spectacle movie more than a really good story.  It wasn't poorly done, but it wasn't excellent, either.  I often wonder why movies with really gripping stories and dialogue are so few and far apart.  This one went both ways.  At times it had some class and grit and character all its own, and then at other times it took things a little less seriously.  I suppose that's not too bad considering it's a film for kids, and I have to say that, overall, they did a really good job.  I think that the sequel was far better done than the first -- although I will admit it's been a *long* time since I saw the original Narnia, and I should probably give it a nod again.

First Person Video on a Shoestring

Today my friend Cliff showed me his first-person video R/C airplane:

This thing has every feature imaginable, which means it packs a lot of wires:

Here’s a video tour of all its features, which include the following:

  • Auto fly-home if control is lost (uses GPS)
  • Heads up video display of altitude, heading, and pitch
  • RF beacon if the plane is lost
  • Auto stabilization using FMA co-pilot
  • Data logger providing an audible report of battery life and other stats
  • VR goggles for watching the action
  • Pan and tilt camera, controllable from the radio
  • High-power transmitter (he’s flown a mile away on FPV)

promises and deliverables

I was thinking about my earlier blog post about my ideas for the new packages site I'm still working on, and I realized that to a lot of people it must seem like I sure promise a lot of stuff, but then never get around to really completing it.  I wanted to address that a bit, since I imagine that at times I'm either confusing or frustrating some people.

First of all, I get a lot of ideas to do a lot of projects.  There's lots of cool stuff I want to do, and I have a hard time saying to myself "I have enough projects already in the works to finish, better not start another one," but I do anyway.  I tend to quickly overload myself sometimes that way, which can be bad for everything.  However, one thing I'm getting more strict on is only picking up projects that I'm sure I want to complete, that I'll see through until the end.  I very rarely, if ever, completely drop a project that I've started.  I will tend to put them on hold for a while -- sometimes years -- but I'll eventually revisit the idea (heck, the packages website is a perfect example of that).

I have a ton of projects I'm "working on," though.  So many, that I'm honestly afraid to write them all down for fear of being totally overwhelmed by the responsibility I put on myself for them.  I do, however, plan on getting them all done, and they circle around in my head on a regular basis, and often times I think of ways to integrate two projects (for example, adding an option to search gentoo planet(s) from the packages site).  I get a lot of interesting ideas all the time, but I really have to be careful not to overextend myself.

One thing I've been trying to do recently (as in the past year) is slowly shutter off some of the support I've been providing for the Gentoo tree directly, and ebuilds / herds I've in the past taken close care of.  It occurred to me way back when that it'd be a more efficient use of my time if I built out some project websites (like the packages one) rather than trawling the tree looking for ebuilds to fix, bump and repair (for example).  Not that I mind doing that, mind you, in fact I find it rather relaxing at times, but what's happened is that I've overextended my responsibilities again, and I'm trying to cut back.  Basically, my thought is that while I want to still work on Gentoo for a while, I don't want to make a career out of it.

Oddly enough, though, part of the reason I'm doing these community projects is so that I can more efficiently do other ones.  For example, at times I like to go through the multimedia packages and just check them to make sure we aren't missing version bumps, and go fix small bugs that I can take care of and just little stuff that isn't really important (in a sense of package popularity) but still relevant to a few users.  Those are fun.  But it'd make my life easier if I could more quickly track what has been neglected, more easily see what available version bumps are available (I still wanna hook into GnomeFiles and track their changes, for example), and stuff like that.  A lot of the tree-fixing stuff in Gentoo development is just monotonous, which is why it's hard to find volunteers to do it.  There's a good chunk of it that is just boring work!  And I'd like to help streamline that a bit.  That's one of my big goals.

With that goal in mind, a huge reason for doing the packages site was just so I can have a simple interface to get all the information I need, and finally a standardized set of data for categories, packages and versions.  That's mostly done, or at least the framework is, so now I can get going on the *really* cool stuff.  What I've done so far is really just the tip of the iceberg.

Anyway, I didn't wanna talk about just the packages site.  There's lots of other stuff I have going on.  It's interesting, even to me, to see which ones I'll want to juggle at a time.  I switch between them on a regular basis.  Sometimes I'll be working on the packages site, then my DVD ripper, then my scriptures stuff, then I'll work on theology ebuilds, then sound ones, then I'll look after ALSA, then mplayer, then I'll go back to tweaking MythVideo a bit, and round and round and round it goes.  I'm always working on *some* project, that's for sure.  It might do me some good to try and get a bit more organized, but I don't even do a good job of keeping track of bugs in my own projects.  I just track them internally for the most part.

So, I apologize for the epic behind status that I'm always in.  I'm starting to recognize more and more how much I'm holding people up on some projects, so I'm doing my best to gracefully exit those areas so someone else can come in and take over.  I'm still fumbling a bit at the best way to do that, but at this point in my life I have at least recognized the few areas that I'm sure I'm not passionate about anymore, and shouldn't be lazing around just pretending to commit once in a while -- of which, there are actually really few.  In fact, I can only think of one off the top of my head.

One thing that might be cool that I just thought of -- have a status indicator on my blog or something that displays the current project I'm working on.  That'd be fun. :)   Sounds like work, though.  I'm gonna go watch a movie.

February 03, 2010

How to Change the Ubuntu Theme : Ubuntu Beginners

This article is part of a series entitled “Ubuntu Beginners” which walks new users through basic Desktop and Command Line usage. This article will detail how to change and customize your Ubuntu look by managing your themes. This article includes step-by-step instructions as well as screenshots, and is specific only to GNOME.

Changing The Theme

Ubuntu comes pre-installed with a number of Desktop themes. The default is called “Human”, and is what defines the characteristic Ubuntu earth-tone colors. Some users love the default theme and others don’t like it at all. The primary complaint that I’ve heard is that it is “too brown”. If you’d like to change your theme, follow the steps below.

To change your theme, you need to navigate to System > Preferences > Appearance, as outlined in the screenshot below:

System > Preferences > Appearance

System > Preferences > Appearance

This will launch the GNOME Appearance utility, which will default to a list of installed themes. You can easily change your theme in real-time by simply selecting a new theme from the list. The default installed themes are:

  • Clearlooks
  • Dark Room
  • Dust
  • Dust Sand
  • High Contrast Inverse
  • High Contrast Large Print Inverse
  • Human
  • Human-Clearlooks
  • New Wave
Appearence :: Theme

Appearence :: Theme

On a default installation of Ubuntu 9.10, you should have nine default themes installed to choose from. The screenshot below displays more from the list above.

Appearance :: Theme (cont.)

Appearance :: Theme (cont.)

You can instantly change your theme by selecting one of the listed themes within the window. The next two screenshots show the Dust and Dust Sand themes after being selected.

Appearance :: Dust Theme

Appearance :: Dust Theme

Appearance : Dust Sand Theme

Appearance : Dust Sand Theme

In a future article I will outline additional theme customizations, including Backgrounds, Fonts, Interface, and Visual Effects. Until then, why not try a few different themes and see how well you like them. Remember, if you want to put the theme back where it started, simply select “Human” from the list.


some thoughts on php and oop

So, I was working on Znurt this morning (I woke up unusually early, and didn't wanna go back to sleep).  I'm getting close to opening the codebase, but before doing that, there's some really obvious glaring deficiencies that I want to clean up first.

The big thing I've been working on with the packages site now is making it more efficient.  The first step in that has been gathering some data on how often certain things are being called to see where optimizations are most needed.  So, the other day, I added a counter to the constructor of each class that would just tally each time the class was instantiated, and then I'd dump out the counter at the end of an import run.

One thing that surprised me is how often one particular class was being called -- PortageTree.  It's a really simple class, and all it does is set down some really simple variables that aren't going to change at all once they are declared, such as the location of the portage tree and it's metadata cache on the filesystem.  Pretty much used across the board on a lot of other classes that need to know the filesystem location of files (PortageCategory, PortagePackage, etc.).

Well, being still pretty new and fuzzy to the OOP approach, I thought it made sense to just extend the PortageTree class on PortageCategory and call the parent constructor to get the variables set.  That ended up in that class being created a huge magnitude of times,  all for the same pretty much unchanging variables.

So, I switched it this morning to use a singleton instance instead, so the class is only being created once and referenced thousands of times each import.  Much nicer already.

It's stuff like that that makes me wish I knew more about OOP.  I am studying it on and off, but there's still some concepts that I just can't wrap my brain around at times, like exceptions.  In my procedurally-attuned programming frame of mind, every time someone explains them to me, I think ... "Well, if something *breaks* why don't you just work with the return codes and work around that?"  So, yah.  Some stuff is still lost on me.  I'm trying to figure it out though.  Maybe it's one of those things that doesn't make sense so much when you apply it to PHP and it's general usage of websites.  A lot of the stuff I read about, I think how it would make much more sense if it were an actual application running.

Anyway.

On a totally different note, one thing I want to look at getting into the packages website is tracking a changelog of all the package's keywording history.  Right now, the import process is pretty simple -- if the content of the ebuild has changed, then the old one is marked for removal and an entirely new ebuild record is created in the database.  The reason for that is because that is far easier to do than it would be to examine all the myriad of data that is associated with one ebuild, track the changes, and then flag those.  Instead, I just dump the old one and treat the new one as a completely new record.

There's a tradeoff in the compromise, though, because instead of tracking ebuild modifications, I have to do all this coding to flag packages and ebuilds that things have changed and to treat them as an update instead of a new one.  That was tricky to get setup right, and getting that stuff in there in fact was one of the main things that pushed the initial launch back.  It was just one of those things that I couldn't run into the bugs until I started actually doing  a sequence of import runs, since they wouldn't show up until then anyway.

But, I'd like to start at least tracking the ebuild keyword status changes.  The reason is because that is really valuable data that can provide an excellent set of reports.  For instance, we can see which categories / packages / herds are getting ignored historically as far as stabilization.  Plus you can do cool stuff like import results from a statistics tracker as far as what people have installed, and you can start to see where maybe the tree could use a little more love.  And, it would help contributors who want to help out, but are overwhelmed by the enormity of bugs and packages and issues that need to be addressed.  I could see it being helpful saying, "here's an area that is suffering from neglect *and* is popular."  That would be cool.  And that's my goal.  In fact, that's *been* my goal for years.  I'm just now getting to the point where it's becoming possible, though.

Fun stuff.  I gotta hone my coding skills as I go, though.

PHP HipHop – What It Means

HipHop_logo_white There has been a lot of speculation about PHP, Facebook, and a big announcement. Over the last few weeks, several predominate PHP community members were invited to the Facebook offices to check something out. Facebook asked the PHP members, as Ben Ramsey put it, to “make a gentleman’s agreement that I wouldn’t talk until FB is ready.”

Well, Facebook has made their announcement, and it is called HipHop. Here is an excerpt:

Today I’m excited to share the project a small team of amazing people and I have been working on for the past two years; HipHop for PHP. With HipHop we’ve reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page. Less CPU means fewer servers, which means less overhead. This project has had a tremendous impact on Facebook. We feel the Web at large can benefit from HipHop, so we are releasing it as open source this evening in hope that it brings a new focus toward scaling large complex websites with PHP. While HipHop has shown us incredible results, it’s certainly not complete and you should be comfortable with beta software before trying it out.

HipHop for PHP isn’t technically a compiler itself. Rather it is a source code transformer. HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features — such as eval() — in exchange for improved performance. HipHop includes a code transformer, a reimplementation of PHP’s runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.

Marco Tabini has a nice summary on what PHP need to know about HipHop. However, people I’ve talked to have had several opinions on HipHop, ranging from pure delight to doubts to indifference. Personally I think this is a great thing for PHP, and I’ll tell you why.

HipHop will enabled business to pick a web scripting language and use it from start-up to internet-giant. While HipHop isn’t the first tool used to speed up PHP, such as APC, Memcached, and others; it is more of a current reminder: PHP is serious about the web. For people already using PHP, this is just a nice feature. For those who aren’t using PHP, it shows that it is a very strong candidate.

I’ve worked in a non LAMP shop before. To non-PHP people, it has the stigma, regardless of actual performance, of being hard to scale. It is a “scripted language”, and in the Java / .NET world where I was working, it was looked at as being an absurd choice. Now, PHP can make a strong case of being able to mature with your application and scale appropriately.

One fear that I have as a Project Manager, and anyone has who decided on the technology that they will implement, is “picking the wrong team.” During my .NET days, Microsoft’s team announced a new technology for .NET applications. It showed a lot of promise and simplified some things that were a pain in .NET. Our team adopted the new technology and ran with it. It wasn’t perfect, but we liked it. Less than a year later, Microsoft announced that it would be moving the project to a drastically different team, which basically meant “there wasn’t enough adoption, so we’re putting this project on the back burner.” The new team was basically to maintain the code forward, but not develop new features.

What happened is we invested on this new technology, and we saw the potential it would have in the future. We lost our investment, since that future potential would never be realized. Now our projects had this new technology embedded in many spots. Re-writing those places would take a great deal of time. From a Project Manager perspective, it was a poor choice.

For PHP, the emergence of HipHop, a concept that is working across thousands of production servers, it sends a strong message to the web development community as a whole. Not only is PHP widely adopted, flexible yet powerful, and easy to implement. PHP is competitive, and is continually evolving to adapt to web developer’s needs. It is a safe bet for many projects, and it isn’t going anywhere but up.

Will I be implementing HipHop right now? Probably not. Ilia Alshanetsky has a very healthy reality check on what HipHop is for. But the bottom line is I don’t need what HipHop is offering yet. I can see very great uses in the future for Dating DNA’s compatibility generation, as well as certain pieces of other PHP projects that could use a serious performance boost. But for now, my Blog will not be HipHoping along. I’m excited for not only what HipHop does, but what it’s greater underlining meaning as a whole with PHP.

Related posts:

  1. So You Want To Be A Web Developer? <tangent> This last week I’ve been talking with my brother...
  2. Speaking: Utah Open Source Conference 2009 I will be speaking this year at the Utah Open...
  3. My 2009 Technology Recap Its been two years now that I’ve been a more...

Related posts brought to you by Yet Another Related Posts Plugin.

From 70 to 90% energy savings for walkway lighting

I don't have all the details yet, but the information I received from a systems integrator in Canada indicates a big improvement in energy savings by using a wireless control network. The integrator installed new lights along a walkway at (or near) one of the Olympic venues there, and by using LED fixtures (not sure what type of light was replaced, probably some type of HID) they saved 70% or so on energy consumption. I suspect that, in terms of total light emitted, the new fixtures don't put out as much light overall, but they only put light exactly where it's needed. If I'm guessing correctly, this will also reduce wasted light spilling into the sky ("light pollution").

The kicker is when they added some new controls that I worked on. The lights were all powered by a single wiring circuit under ground. The whole circuit is controlled by a single light sensor or timer, so all the lights come on at one time and stay on all night long. The LED dimmer we provided behaves differently, however, and always turns on to 50% brightness (25% energy usage because the eye perceives brightness on "square root of energy" curve). The integrator put motion detectors on each light pole and connected them to our controller. With the additional energy saved when nobody is around, I'm told the energy savings (compared to the original lights) went up to over 90%. That's a lot of kWh each year.

Here's where it gets interesting: we set up all the controllers to self-associate into a pseudo-mesh network. Instead of each motion detector turning it's own light up to 100% when people walk by, the message is automatically repeated along the string of poles, turning all the lights up. After 5 minutes (with no motion at any pole) the lights all dim back down slowly.

It's a little departure from the way we usually build wireless control systems. Typically we want each dimmer to respond to just a few battery-free wireless control switches or maybe one or two solar-powered occupancy sensors. In this case, however, it needs to be more of a free-for-all, where any control point can stimulate a response from all other participants in the system.
They have a fight, Standards Win

Like anyone at all involved in the business of making websites work, I’ve witnessed and participated in a number of intense debates this week regarding the future of Flash. Apple’s iPad will not be supporting Flash, and many have speculated that this is the beginning of the end for Flash. Others argue that Flash is going nowhere, saying that Adobe could turn the tables and destroy Apple in a heartbeat, simply by refusing to release new CS products for Mac. There are several excellent articles on both sides of the issue, but Jefferey Zeldman says it best:

“Lack of Flash in the iPad (and before that, in the iPhone) is a win for accessible, standards-based design. Not because Flash is bad, but because the increasing popularity of devices that don’t support Flash is going to force recalcitrant web developers to build the semantic HTML layer first.”

When Apple and Adobe fight, standards win. Sing that now to the tune of Particle Man by They Might Be Giants (and forget, like I did, about that hater Triangle Man always winning everything). Like the ubiquitous Particle Man, standards -should- be everywhere. Thanks to iPad, standards may finally begin to find the priority they should have had with every designer all along.

Developers will still use Flash, but they’ll have to use standards for their foundation. Without meaningful markup, a Flash site is just a castle in the clouds. Not everyone is capable of finding their way there.

Apple didn’t create this problem. Flash-only sites have been alienating audiences for more than a decade now. iPad will simply increase the number affected, and in the process will hopefully inspire these developers to come down to earth. Once their site does its job regardless of platform particulars, they can build from there as much as they’d like. Getting there might be a rough ride for the plugin-centric, but in the end the web just might be be a more stable place, and that benefits everyone.

Video: Josh Tolley at UTOSC 2009 – Fun With SQL

Most developers find database interaction painful at some level; many dread it outright. What developer hasn’t spent hours digging through documentation, Google, or the nearest colleague, trying to work out how to write a particular query, only to find out two days too late that some obscure syntax would have made it easy? This talk aims to introduce the attendee to SQL idioms and constructs that can save weeks of debugging, free up hours of coding, and shave precious minutes and seconds from application runtimes.

Josh Tolley participates actively in the PostgreSQL project and works as a PostgreSQL administrator for hire with End Point Corporation. On the rare occasions that the Utah Database Users Group, or UDBUG, happens to do anything, he’s likely somewhat responsible for it. He also enjoys gardening, cooking, and trying to learn electronics without hurting himself.

February 02, 2010

An Education Syllogism
  1. Schools exist to prepare students to thrive in the environment where they live.
  2. The environment we live in has changed significantly in the past fifty years from a mechanistic to an electronic world.
  3. Therefore, schools must change their methods for how they prepare students from mechanistic preparation (fixed length/content courses, categorized knowledge) to electronic preparation (pattern recognition, rhizomic learning).
How to Change the Ubuntu Screensaver : Ubuntu Beginners

This article is part of a series entitled “Ubuntu Beginners”, which walks new users through basic Desktop and Command Line usage. This article will detail how to change the Ubuntu screensaver, using the graphical interface. Included below are GNOME, and KDE.

Change Screensaver – GNOME

Ubuntu’s default screensaver is a blank screen, activated after five minutes of inactivity. If you’d like to change the screensaver, the inactivity timeout, or other settings, you can find out how below. I’ve included screenshots for navigating to, managing and updating your screensaver in Ubuntu.

Launching Screensaver Preferences

Launching Screensaver Preferences

You can now change your preferences in the Screensaver Preferences utility. This allows you to change the screensaver, update the idle timeout, lock or don’t lock the screen, etc.

Screensaver Preferences

Screensaver Preferences

Finally, update the settings to reflect your preferences. Select a different screensaver from the list on the left, update the idle time, or lock the screen when the screensaver is active.

Floating Ubuntu - Screensaver Preferences

Floating Ubuntu - Screensaver Preferences

Change Screensaver – KDE

The screensaver settings in KDE are contained within the System Settings utility. You can launch this tool by clicking the Kickoff menu (bottom-left, on your bottom taskbar) and selecting System Settings.

System Settings

System Settings

From here you’ll want to select the ‘Desktop’ option. Screensaver preferences are held under the general Desktop settings.

Desktop Settings

Desktop Settings

The Desktop settings will then allow you to change the screensaver preferences. You’ll need to select ‘Screensaver’ from the list of options on the left side.

Screensaver

Screensaver

Conclusion

Updating the screensaver preferences in either of these major Desktop environments is a piece of cake. Simply navigate to the screensaver utility, select the screensaver of your choice and you’re set! Both of these environments also allow for security preferences, such as locking the screen when the screensaver is activated and requiring a password to unlock.


The iPad Impressions: Limits, or Rethink?

For the last couple of days I have been reading a lot about the iPad.  As one author said, there’s nothing like Steve Jobs to get people talking about new technology.  Whether good or bad, it’s been a huge talking point.

As far as I can decipher the arguments online, it comes down to two different points:

  1. Apple is crazy because they have an underpowered Netbook that doesn’t even have a full OS on it, and they are going to lose a lot of money.  This is the worst idea in the history of computing, so don’t even think about buying one.
  2. Apple is light years head of the rest of the computing world, and everyone just needs to accept that the future is here.  If you can’t accept that, you should hide under your rock of old technology and let the new light of reason shine.

The problem I have with both arguments is that neither have been really objective in their assessment.  Both approached the release based on high hopes, and their own colored glasses.  They have generally based their reviews on past computer experiences, management, and tools, and as such their expectations were colored.  And I freely admit, I was one of them. 

Then I read this article on PC World (of all places) about how the iPad isn’t a third device, but a new way of simplifying the computing experience.  It put things in perspective for me, things that I have been thinking about, and trying to formulate.

The main complaints I have heard is that there isn’t enough hardware to "do the job".  What job is it you need to do in a mobile environment that requires so much hardware?  Are you editing video?  Can you do that accurately with a netbook, and render it?  I don’t think there is enough power there, so you would need a Laptop, am I right?  Even then, often times a desktop would give you the best experience, because that is where real power and speed comes. 

Another argument I hear is that it doesn’t have a full OS, so you can’t multitask.  There is some room for argument here, but how much multitasking do you really do while on the go?  Those of you who have Android phones, do you really run more than app at a time?  I know you can, but how often do you?  I’m not asking to be mean, I’m really interested in what the numbers would be.  I know there are times I would like to have Skype running in the background while I run another app on my iPod Touch. 

But an interesting answer to the Multitasking argument, and the underpowered OS, etc, is this article on 9to5Mac about a Citrix client available for the iPad.  That’s right, they were able to easily turn the iPad into a thin client.  And the resolution is high enough that it will work, unlike a Netbook. 

Another argument I hear is the lack of applications that people want.  What is it you want to accomplish?  Have you searched through the App store to see if there is an App that will let you accomplish your goal?  What about a free app that will work?  I’m impressed with the huge breath of content there, and I’m looking forward to the many iPad specific apps that will show. 

So what is the iPad to me?  It’s hard to describe, because each app makes it something else.  In that case, it is a real computer, because it will do what I want it to do, and with a simplicity that will keep me coming back to it, and relegating my desktop for more intense computing needs.  I can write code in a text editor if necessary, access a secure shell client to get into a larger server (like my desktop at home), copy the files there, and run the code.  I have, essentially, a true client computer that becomes a portal to any number of more powerful computers for more intensive tasks. 

I can easily see the iPad becoming a part of my life as a computing portal, instead of just an eBook reader, or just an Email reader, or just a Web browser.  With VNC, Citrix clients, and other such apps being made for the device, I see real potential here.  And I’m still waiting to hear if Blizzard will make a Warcraft app.  ^_^

SLLUG Daytime: Vim 101 and Beyond

Well, it’s that time of month again, time to come to BetaLoftSLC, eat some lunch (brown bagging is encouraged) and listen to a good technical talk.  This month, we have Mr. Adam Barrett, a Senior Software Developer at SOS Staffing in Salt Lake City, who will be taking some time to talk with us about Vim.  Here is a little snippet from Adam:

Vim 101 and Beyond

Vim is the editor of choice for many developers and power users. It’s a “modal” text editor based on the vi editor written by Bill Joy in the 1970s for a version of UNIX. It inherits the key bindings of vi, but also adds a great deal of functionality and extensibility that are missing from the original vi. This session will cover the beginnings (101) and the first set of intermediate (201) modes and commands for vim.

If you would like to join us, just head on down via train, car (parking is free on the street for two hours just east and west of BetaLoftSLC), walk or bike to:

WHEN

Wednesday, February 10, 2010
11:30am-1:00pm

WHERE

BetaLoft SLC
357 W 200 S #201
Salt Lake City, Utah
Map

Come learn some tips and tricks about Vim.  We hope to see you all there.

Cheers,

Clint

Google Apps Dropping IE 6

This morning I found this email in my inbox. I use Google Apps to host my email and calendars, which works really slick and is fabulous. Here is the email:

Dear Google Apps admin,​

In order to continue to improve our products and deliver more sophisticated features and performance, we are harnessing some of the latest improvements in web browser technology. This includes faster JavaScript processing and new standards like HTML5. As a result, over the course of 2010, we will be phasing out support for Microsoft Internet Explorer 6.0 ​as well as other older browsers that are not supported by their own manufacturers.

We plan to begin phasing out support of these older browsers on the Google Docs suite and the Google Sites editor on March 1, 2010. After that point, certain functionality within these applications may have higher latency and may not work correctly in these older browsers. Later in 2010, we will start to phase out support for these browsers for Google Mail and Google Calendar.

Google Apps will continue to support Internet Explorer 7.0 and above, Firefox 3.0 and above, Google Chrome 4.0 and above, and Safari 3.0 and above.

Starting this week, users on these older browsers will see a message in Google Docs and the Google Sites editor explaining this change and asking them to upgrade their browser. We will also alert you again closer to March 1 to remind you of this change.

In 2009, the Google Apps team delivered more than 100 improvements to enhance your product experience. We are aiming to beat that in 2010 and continue to deliver the best and most innovative collaboration products for businesses.

Thank you for your continued support!

Sincerely,

The Google Apps team

For all Web Developers around the world, we should all be rejoicing! Having a large internet giant telling its consumers to “drop IE 6″ and other older browsers will make all our lives easy. I remember while working on a very large site, we used PNG images sparely for some background images. The deadline was extremely tight, but we were (barely) on schedule. Out of the blue I get an email forwarded to me from the marketing director for the client, and it went something like this:

Why are all the backgrounds looking nothing like the mock? Its all a funny blue.

Of course, the Marketing Director had IE 6. Whats worse, is that he was working for a very large computer technology business. We had to drop everything and apply ugly IE 6 hacks to enable PNG support. At the time, I tried explaining that the browser he was using was released while I was still in highschool, but he didn’t understand. Hopefully now the big internet giants will start telling people “Get off IE 6.” Once people adapt better browsers, the more we can do with the web.

Related posts:

  1. Google Wave Jargon I got my new Google Wave Demo Account. It is...
  2. My iPhone Has Hindered My Email What!? What is this that I speak of? My very...

Related posts brought to you by Yet Another Related Posts Plugin.

Irssi’s /channel, /network, /server and /connect – What It Means

I have found, that since using Irssi, many people like to edit the config directly. This is a natural instinct that we have as hackers in general. Because configs are stored in plain text, such as our shell RC files, Apache configs and many more, we just intuitively reach for our editor, and start hacking away. Unfortunately, the Irssi config is anything but clean. It uses a noisy syntax that makes it easy to make mistakes, and as a result, lose settings in Irssi, or have a broken Irssi entirely.

When I used to teach system administrators for a living, I gave them the mantra that if you have a tool that can modify a config file, use the tool. The tool has most likely been tested for bugs, and will generate syntactically correct configs. Humans are error-prone, so editing a config by hand means setting yourself up for error and pain. For Irssi, the developers have put in rather extensive commands that can modify everything in the config directly, and there’s even an exhaustive documentation support structure behind those commands. So, there should be no reason to edit the Irssi config by hand.

To show this, in irssi, go to the status window, and type “/help”:

/help
05:29 Irssi commands:
05:29 accept     disconnect  lastlog  op        script     unquery
05:29 action     echo        layout   oper      scrollback unsilence
05:29 admin      eval        links    otr       server     upgrade
05:29 alias      exec        list     part      servlist   uping
05:29 away       flushbuffer load     ping      set        uptime
05:29 ban        foreach     log      query     sethost    userhost
05:29 beep       format      lusers   quit      silence    ver
05:29 bind       hash        map      quote     squery     version
05:29 cat        help        me       rawlog    squit      voice
05:29 cd         hilight     mircdcc  recode    stats      wait
05:29 channel    ignore      mode     reconnect statusbar  wall
05:29 clear      info        motd     redraw    time       wallops
05:29 completion invite      msg      rehash    toggle     who
05:29 connect    ircnet      names    reload    topic      whois
05:29 ctcp       ison        nctcp    resize    trace      whowas
05:29 cycle      join        netsplit restart   ts         window
05:29 dcc        kick        network  rmreconns unalias
05:29 dehilight  kickban     nick     rmrejoins unban
05:29 deop       kill        note     rping     unignore
05:29 devoice    knock       notice   save      unload
05:29 die        knockout    notify   sconnect  unnotify   

So, long story short, don’t edit the config. Use the commands, and learn the help system. With that out of the way, let’s begin.

I’ve encountered many who are using Irssi that don’t understand how a few key commands relate with each other and how to tie them in. So, I would like to cover those commands here, namely: /channel, /network, /server and /connect. Hopefully, by the end of this post, not only will you be comfortable enough with the commands I’ve taught you about, but you’ll be comfortable enough to use the built-in documentation should you be stuck.

/network
The first command to learn is /network, because all the rest of the commands take advantage of it. So, we’ll start there. /network is used for defining some client-specific settings you want to apply when connecting to a server. These settings can include username, real name, nickname, usermodes and other goodies. Running “/help network” can show you everything it supports:

05:32 NETWORK ADD [-nick <nick>] [-user <user>] [-realname <name>] [-host <host>] [-autosendcmd <cmd>] [-querychans <count>] [-whois <count>] [-msgs <count>] [-kicks <count>] [-modes <count>] [-cmdspeed <ms>] [-cmdmax <count>] <name>
05:32 NETWORK REMOVE <network>
05:32
05:32      -kicks: Maximum number of nicks in one /KICK command
05:32      -msgs: Maximum number of nicks in one /MSG command
05:32      -modes: Maximum number of mode changes in one /MODE command
05:32      -whois: Maximum number of nicks in one /WHOIS command
05:32      -cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
05:32      -cmdmax: Same as /SET cmds_max_at_once, see section 3.1
05:32      -nick, -user, -realname: Specify what nick/user/name to use
05:32      -host: Specify what host name to use, if you have multiple
05:32      -usermode: Specify what usermode to use on this network
05:32      -autosendcmd: Command to send after connecting to a server
05:32
05:32 With -autosendcmd argument you can automatically run any commands after connecting to network. This is useful for automatically identifying yourself to NickServ, for example
05:32
05:32 Shows and changes the settings of defined IRC networks.
05:32
05:32 See also: CONNECT
05:32
05:32 Irssi commands:
05:32 network add network list network remove 

So, let’s go ahead an define some networks. I personally connect to several networks simultaneously, all of which have different usermodes, and some which I need to provide authentication to when connecting. So, let’s say I wish to define client-specific connections to Freenode, OFTC and bitlbee. Let’s look at what to add. Oh, by the way, every command and option provided by Irssi can be tab-completed. Worth knowing to save some typing.

/network add -user 88 -realname eightyeight -nick eightyeight -usermode +iw freenode
/network add -user 88 -realname eightyeight -nick eightyeight -usermode +w oftc
/network add -user aaron -realname "Aaron Toponce" -nick aaron -autosendcmd "say identify password" bitlbee

As you can see, each network line is different. I’m using the same username, real name and nick for “freenode” and “oftc”, but different ones for “bitlbee”. I’ve specified different user modes with “freenode” and “oftc” where I haven’t provided any with “bitlbee”. Further, with “bitlbee”, I’m sending an identify command to the server when I connect. As you can probably imagine, this gives me great flexibility on how I want my client to interact with different servers.

Running “/network list” should show you the three servers you just added:

/network list
05:48 Networks:
05:48 freenode: nick: eightyeight, username: 88, realname: eightyeight, usermode: +iw
05:48 bitlbee: nick: aaron, username: 88, realname: Aaron Toponce, autosendcmd: say identify password
05:48 oftc: nick: eightyeight, username: 88, realname: eightyeight, usermode: +w

If you’ve just installed Irssi, you will likely find many networks already defined, including OFTC. If this is the case, and you want to make some adjustments to the OFTC definition, go ahead and provide those in the “/network add” command, and those options will be appended, provided the network name is the same. If you wish to remove any of the networks, then as you learned in the help doc, “/network remove name” is the syntax for that.

It’s important to note that at this stage of the game, any of the commands you enter in Irssi are only used for the current running session. If you wish to keep the settings persistent, then you will need to save it to disk (your config). You can do this with the “/save” command. I would recommend saving often when manipulating Irssi. Further, if for some reason you make a mistake in the command you’re typing, and you wish to revert back to the previous “/save” command, then you can use “/reload” for this purpsoe. “/reload” will read the config, and load the settings it finds there, ignoring any previous settings you’ve defined without saving.

/channel
Now with our networks defined for our client settings, let’s define some channels to visit when we connect to these networks. So, in the status window, what does “/help channel” show?

05:56 CHANNEL LIST
05:56 CHANNEL ADD [-auto | -noauto] [-bots <masks>] [-botcmd <command>] <channel> <network> [<password>]
05:56 CHANNEL REMOVE <channel> <network>
05:56
05:56 Irssi can automatically join to specified channels in specified IRC networks. It can also automatically send the password when manually joining to channel without specifying the password.
05:56
05:56 /CHANNEL ADD [-auto | -noauto] [-bots <masks>] [-botcmd <command>]
05:56              <channel> <network> [<password>]
05:56
05:56 With -bots and -botcmd arguments you can automatically send commands to someone in channel. This is useful for automatically getting ops for channels, for example
05:56
05:56 /CHANNEL ADD -auto -bots "*!bot@bothost.org bot*!*@host2.org"
05:56              -botcmd "msg $0 op mypass" #channel ircnet
05:56
05:56 You can also use the -botcmd without -bots argument. The command is then sent whenever you join the channel.
05:56
05:56 If you want to remove some settings from existing channel record, for example bots, just give the -bots "" parameters to it. Password can be removed by setting it to - (or actually, "" works too).
05:56
05:56 You can remove the channels with /CHANNEL REMOVE <channel> <network>
05:56
05:56 /CHANNEL LIST displays list of channels with settings.
05:56
05:56 /CHANNEL without any arguments displays list of channels you have joined. You can also use /CHANNEL to join to channels just as with /JOIN, like /CHANNEL #a.
05:56
05:56 See also: TS, JOIN
05:56
05:56 Irssi commands:
05:56 channel add channel list channel remove 

As you can clearly see with “/channel”, we can define what channels to join, and if any, what bot commands to send to the channel when we join. Each channel we join will be based on the network that we’ve previously defined. So, I could join #ubuntu whenever I connect to the Freenode network and #debian whenever I connect to the OFTC network. As with “/network”, on a fresh install of Irssi, there may already be a couple channels defined. Feel free to keep them in play when using Irssi, or remove them with “/channel remove” as per the syntax in the help doc.

So, let’s define some channels:

/channel add -auto #ubuntu freenode
/channel add -auto #freenode freenode
/channel add -auto #debian oftc
/channel add -auto #bitlbee oftc

Pretty straight forward, right? I’ve added four channels, two on the “freenode” network and two on the “oftc” network. Because Bitlbee doesn’t handle “channels” necessarily the same way IRC servers do, I haven’t defined any channels to join when I connect to Bitlbee. Notice I’m passing the “-auto” switch, so when I join that network, I’ll automatically join those channels. This is entirely optional, and “-noauto” is default if “-auto” isn’t passed.

As with “/network”, you can append settings to each channel listing as needed, as long as the channel name and network name are the same. If you wish to remove some settings, then you’ll need to “/channel remove” and “/channel add” as appropriate. Running “/channel list” should show our progress thus far:

/channel list
06:05 Channel         Network    Password   Settings
06:05 #ubuntu         freenode              autojoin
06:05 #freenode       freenode              autojoin
06:05 #debian         oftc                  autojoin
06:05 #bitlbee        oftc                  autojoin

Again, you should run “/save” when you’ve defined your channels, so next time you start Irssi, your settings won’t be lost.

One last related note about your channels. For me, I get very used to the location, or layout, of my channels. When I lose my running Irssi connection, for whatever reason, nothing is more frustrating than the channels being in a different order than previous. Fortunately, I’m not the only one that this annoys, so the developers have provided “/layout save” as a way to keep my sanity. “/layout save” will save the location order of your channel windows, so should you join a channel again, it will go to the same location as it was in previously. However, as with every other command in Irssi, this will only save it to your currently running session in RAM. If you wish to keep it persistent, you must issue “/save” for the next time you start Irssi.

/server
At this point, we’re ready to connect. We have all the details out of the way, and we could easily just connect to Freenode or OFTC. However, we may want to pass some server-side options to the networks, such as connecting via SSL. So, before covering “/connect”, let’s get “/server” out of the way, as it’s the last command in this post that does any saving to disk, then we’ll play with “/connect”. As is verbatim in this post, let us pull up the help doc:

06:24 SERVER [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>] [-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>] [-noproxy] [-network <network>] [-host <hostname>] [-rawlog <file>] [+]<address>|<chatnet> [<port> [<password>
             [<nick>]]]
06:24 SERVER PURGE [<target>]
06:24 SERVER REMOVE <address> [<port>]
06:24 SERVER ADD [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>] [-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>] [-auto | -noauto] [-network <network>] [-host <hostname>] [-cmdspeed <ms>] [-cmdmax <count>] [-port
                 <port>] <address> [<port> [<password>]]
06:24 SERVER LIST
06:24
06:24      -4, -6: specify explicitly whether to use IPv4 or IPv6 address
06:24      -ssl: use SSL when connecting
06:24      -ssl_cert: The SSL client certificate file (implies -ssl)
06:24      -ssl_pkey: The SSL client private key (if not included in the certificate file)
06:24      -ssl_verify: Verify servers SSL certificate
06:24      -ssl_cafile: File with list of CA certificates (implies -ssl_verify)
06:24      -ssl_capath: Directory with CA certificates (implies -ssl_verify)
06:24      -noproxy: Ignore the global proxy configuration for this server
06:24      -auto: Automatically connect to server at startup
06:24      -noauto: Don't connect to server at startup (default)
06:24      -network: Specify what IRC network this server belongs to
06:24      -ircnet: Same as -network. Deprecated. Do not use
06:24      -host: Specify what host name to use, if you have multiple
06:24      -!: don't autojoin channels
06:24      -cmdspeed: Same as /SET cmd_queue_speed, see section 3.1
06:24      -cmdmax: Same as /SET cmds_max_at_once, see section 3.1
06:24      -port: Use this only to edit the port number of an existing server,
06:24             for new servers use the <port> argument
06:24
06:24 /SERVER disconnects the server in active window and connects to the new one. It will take the same arguments as /CONNECT. If you prefix the address with the + character, Irssi won't disconnect the active server, and it will create a
      new window where the server is connected (ie. /window new hide; /connect address)
06:24
06:24 /SERVER without any arguments displays the list of connected
06:24         servers.
06:24
06:24 /SERVER REMOVE <address> [<port>]
06:24
06:24 /SERVER LIST
06:24
06:24 /SERVER PURGE [<target>]
06:24
06:24 Clears the server send queue. Useful if, for example, you accidentally paste lots of text to a channel.
06:24
06:24 See also: CONNECT, DISCONNECT, RECONNECT, RMRECONNS
06:24
06:24 Irssi commands:
06:24 server add server connect server list server purge server remove 

As should be obvious, this help doc is rather verbose. There are a lot of options that you can send server-side, such as using IPV4 or IPV6, connecting via SSL, changing the connecting port, and a myriad of other options. Let’s pick on just a few, and I’ll let you examine the rest.

Just the other day, I posted on how to connect to Freenode using SSL, and yesterday I covered connecting to OFTC in a similar manner. Let’s take those “/server” strings, along with one for Bitlbee to define how I wish to connect to these servers. As with the previous commands, the syntax is “/server add”, as the help doc mentions:

/server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network freenode irc.freenode.net 7000
/server add -auto -ssl -ssl_cert ~/.irssi/certs/nick.pem -ssl_verify -ssl_cafile /etc/ssl/certs/spi-cacert-2008.pem -network oftc irc.oftc.net 6697
/server add -auto -network bitlbee localhost

As you can see, I’m using SSL for the Freenode and OFTC connections, but not for bitlbee. Further, I’m specifying “-ssl_cert” with OFTC to present my self-signed certificate to NickServ, which I’m not doing to the others and I’m using a specific CA certificate to verify the OFTC SSL cert, whereas with Freenode, I’m specifying a whole CA path, and letting it choose the appropriate CA certificate for verification. Lastly, with all three connections, I’m automatically connecting to the networks, so when I launch up Irssi, it begins connecting right away. Because there are channels with “-auto” added to them, when the server connection is successful, I’ll join those channels right away, and my session will be ready to go without any interaction from me.

If I wish to see the listing of servers I just added “/server list”, as per the documentation, will show me that list. Again, on a fresh install, there may be more servers than what we have added here, and you can keep them in play, or remove them as needed. If OFTC is already defined in the server list, then you can make changes to the listing as long as the port number, network name, and server url are the same. If there are settings you wish to remove, then you’ll need to “/server remove” and re-add as appropriate.

So, what does our listing show us:

/server list
06:50 Server               Port  Network    Settings
06:50 irc.freenode.net     7000  freenode   autoconnect, ssl, ssl_verify, ssl_capath: /etc/ssl/certs
06:50 irc.oftc.net         6697  oftc       autoconnect, ssl, ssl_cert: ~/.irssi/certs/nick.pem, ssl_verify, ssl_cafile: /etc/ssl/certs/spi-cacert-2008.pem
06:50 localhost            6667  bitlbee    autoconnect

As you can quickly see, where we specified ports for Freenode and OFTC, we didn’t for Bitlbee, so the default IRC port 6667 was added. Of course, don’t forget to “/save”, so you don’t lose your work up to this point.

A cautious word about “/server”. “/server” is used for defining server connections, not for connecting to servers themselves. However, it can connect you to a server should you say something of the effect to “/server irc.mozilla.org”. If you did this, it will disconnect you from your current connections, and ONLY connect to you irc.mozilla.org. This is an unfortunate side-effect that many first time Irssi users discover. The proper method for connecting to irc.mozilla.org is to use “/connect irc.mozilla.org”, as we’ll discuss below.

/connect
Our last command that I plan on covering in this post. With our networks defined and our servers and channels configured, we could easily at this point connect to Freenode, and all of our settings that we’ve set at this point would be applied, which means it will save us SERIOUS amounts of typing in the future, provided you don’t keep setting up Irssi over and over. Let’s first look at the help doc, as we did with the other commands, then we’ll see how simple our life is from here on out.

/help connect
06:58 CONNECT [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>] [-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>] [-noproxy] [-network <network>] [-host <hostname>] [-rawlog <file>] <address>|<chatnet> [<port> [<password>
              [<nick>]]]
06:58
06:58      -4, -6: specify explicitly whether to use IPv4 or IPv6 address
06:58      -ssl: use SSL when connecting
06:58      -ssl_cert: The SSL client certificate file (implies -ssl)
06:58      -ssl_pkey: The SSL client private key (if not included in the certificate file)
06:58      -ssl_verify: Verify servers SSL certificate
06:58      -ssl_cafile: File with list of CA certificates (implies -ssl_verify)
06:58      -ssl_capath: Directory with CA certificates (implies -ssl_verify)
06:58      -network: the network this connection belongs to
06:58      -ircnet: Same as -network. Deprecated. Do not use.
06:58      -host: the host
06:58      -!: don't autojoin channels
06:58      -rawlog: immediately open rawlog after connected
06:58
06:58 This command makes irssi to connect to specified server. Current connections are kept and a new one is created.
06:58
06:58 See also: SERVER, DISCONNECT, RMRECONNS, SCONNECT

Obviously, “/connect” is verbose, but not as verbose as “/server”. Further, the first thing to note about “/connect” is there is nothing to save. This command just takes the settings you’ve already defined for your networks, and applies them in to the connection string. However, should you not have a defined network or server to connect to, such as maybe connecting to irc.mozilla.org, you can use many of the settings in “/server” here, such as IPV4, IPV6, SSL and so on. So, say I’m wishing to test an IPV6 connection to irc.mozilla.org, I could issue something like the following:

/connect -6 irc.mozilla.org

That’s it! If it succeeds, then maybe I can add it to my server list with “/server add”, as discussed above and “/save” to the config. Maybe I want to test SSL over IPV6 on that network on a specific port. I could do this. Further, because I’ve already defined my networks, I can say something like:

/connect freenode

In this case, I’ll apply all the network settings AND server settings for the “freenode” connection. This keeps me from typing it over and over every time I wish to connect. Further, the network names themselves can be tab completed! Oh, how this makes life much more enjoyable!

At the end of the help document, you’ll notice a couple of additional commands. Namely “/disconnect” and “/rmreconns”. If you’re finished with a network, and wish to disconnect, then “/disconnect” would be what you want. For example, maybe you’re satisfied with your testing of IPV6 over SSL on irc.mozilla.org. Then, from your status window, you will need to tell Irssi that this is the connection you wish to disconnect. To do this, “^x” (control-x) will switch you servers until you reach the right one. Then, when you’ve switched to the right server you could issue:

/disconnect

Further, maybe a “/connect” isn’t working. Maybe you’re trying to reach a host that is currently down, it’s timing out, or the server on a different port than what you specified. As a result, Irssi won’t be able to connect to your preferred server, but it will keep trying. Eventually, maybe the host will become responsive, and a connection can be made. Maybe not. Regardless, Irssi will keep trying your “/connect” one way or the other. This might be undesirable, so running “/rmreconns” will remove any reconnections that Irssi is attempting to make. As with every other Irssi command, “/disconnect” and “/rmreconns” have a help doc.

Conclusion
So, that’s it. I hope this was helpful. If it was just noise, or much of it was confusing, I hope you walk away from this tutorial with at least two things:

  1. /help
  2. /save

If you can get those two commands deeply cemented in your brain, then you’ll be okay navigating Irssi and learning its ins and outs. Further, while there might be nothing technically wrong with editing the config by hand, Irssi provides powerful, powerful tools that can do it for you keeping the errors out, and the documentation for those tools, while not perfect, is vast and very complete. But, hopefully, you see now the relationship between “/network”, “/server”, “/connect” and “/channel”, and how you can tap into that power to make your Irssi experience more pleasurable.

Baby steps....

After figuring out that I should use linum, I started the lisp code for emacs support for python code coverage from scratch. It felt a little like chaining generators. Write a small function, test it in the scratch window....

pycov

Notice the pretty red, and the *pycov* in the lower right. Code here

skateboarding in winter … um, again

I must be out of my mind.  I went skating again tonight (the second time in a week), even though its like 30 degrees outside.  It's freaking cold, man!  I dunno what came over me, though.  I just really wanted to go skating all of a sudden, so I called up Kevin and we went to Liberty Park and screwed around for a bit in the biting cold.  It was really fun, and I totally sucked at landing anything because I haven't been in at least six months.

Then, tonight, it was equally cold, but I went to Fairmont and was just screwing around.  Good times.  I really wanted to get a picture of the skate park, since it's half covered with snow, but there's enough melted that you can actually go around it in places.  Instead of that, here's a picture of me drawing pictures. :D

I think I learned a good trick though to skating tonight.  Just freaking relax.  I realized the other day that I get totally tense when I'm poised to ollie or shuvit and it's totally working against me.  So, tonight I tried to just relax and try and pop it a couple dozen times no matter how poised or ready I felt.  It wasn't very effective practice, but I did *try* a lot more, so that was good.  I landed one ollie, I think.  Barely.  I'm not sure I really went in the air, actually.  But who cares.  I went out, I had fun, it was worth it. :)

The Number Eightyeight

For those who know me, know I use the nickname or alias “eightyeight”. I use it on IRC as my main nick I chat with, I use it on the microblogging service Identi.ca, and I use it elsewhere here and there. There are several reasons why I use this nickname, and I’ll cover those here, but there is one reason that I do NOT support, yet people think that is my reason for picking it. So, finally getting really fed up with people accusing me of views I don’t support, I’m putting up this post. I’ll be pasting it to anyone who asks, provokes or is otherwise curious about my choosing “eightyeight” for my online alias. Don’t take offense. I’m using this as a teaching moment. If you want to learn more than what I post here, there’s a great Wikipedia article on the number 88.

First, the reason I do NOT endorse.

Hitler and Nazism
The letter “H” is the eighth letter of the alphabet in many languages, including German. So, substituting the number 8 directly to a letter of the alphabet results in H. 88 substituted results in “HH”. Apparently, “HH” is short for “Heil Hitler!” in German. So, people who use the number 88 are associating themselves with the Nazi regime and the cause of Hitler, showing their support. I am NOT one of these people! I do not support Hitler, Nazism, antisemitism or anything related to WWII, the Third Reich, etc. I am not a skinhead, I don’t own a Broken Cross, I don’t persecute anyone for their religious beliefs, I don’t hang out in gangs, and I don’t believe the Caucasian “race” is superior to any other. I have nothing to do with this movement, old or new, and people who know me personally, know this is the case. I value life, religious tolerance and racial and social equality. As far as I’m concerned, Adolf Hitler was one of the most, if not the most, immoral and unethical people in the 20th century.

So, if you take one thing out of this, take this: I don’t support Hitler, his regime, his values, nor his sadistic, screwed up way of viewing politics.

Now, the main reason why I chose this nickname.

The Piano
For the uninitiated, there are eightyeight keys on a standard piano, and guess what? I play the piano. I formally started at 6 years old, and had formal and informal training on and off from that point to today. During my early teen years, I found a passion for competing in local, regional and statewide competitions, and participated in them frequently. Not only this, but I played the piano for choir as an accompanist, I played the piano for school musicals, I played the piano in band and orchestra when appropriate, and I play the organ now for my church. I have taught lessons, and still play quite frequently, despite my very busy schedule. When I reached about 16 years old, kids in school started calling me “88″ or “88 keys”. I think this was the result of the Warren Beatty film Dick Tracy that debuted about the same time, and kids who had seen it thought it was an appropriate nickname for me.

Now, not all pianos or keyboards for that matter have eightyeight keys. The Bosendorfer Imperial Grand, a piano that I have yet to play on, has a full 13 octaves, from low C to the high C- an astonishing 97 keys. Organs, while not pianos, have many manuals that can total far more or far less that eightyeight keys. However, it’s generally understood that a standard piano has eightyeight keys, starting from the low A and reaching the high C.

There are other reasons why I like this number.

Asian culture
The word eight implies wealth in Mandarin Chinese, and as a result, symbolizes good luck and fortune. This is quite the drastic difference from neo-nazi culture. In fact, the Asian culture have deep roots in the luck and wealth that the number 8 brings. Many prices in markets, stores and other places will be littered with eights. A price of fruit, for example, might be $1.88 or 88 cents. Further, the Beijing Olympics started on August 8, 2008 (8/8/08) at 8:00pm. Coincidence? I can say as well that 8 has been a lucky number for me, although not necessarily 88.

Aside from playing the piano, I’m also a Mathematician and Computer Scientist. There are some interesting qualities of the number 88 in mathematics. Some of which are listed below:

Palindromic
I have always enjoyed palindromes. I don’t know why, but when I first learned about them in elementary school, I would sit at my desk, and think up as many palindromes as I could. “NOON”, “MOM”, “DAD”, and “TENET” were some of the words I came up with at that age. Then, of course, I would do the same with palindromic numbers as well. 88 was especially cool, because I could write in in the fancy “S” where you drew two rows of three lines, and connected them with diagonals. Remember that? Of course you do. You thought it was cool then too.

Primitive Semiperfect
A semiperfect number in mathematics is where all or some of the factors of the number sum up to the number itself. For example, the factors of the number 6 are 1, 2, 3 and 6. Adding those factors results in 6. Another semiperfect number is 20, where its factors are 1, 2, 4, 5, 10 and 20. 10+5+4+1=20. 88 is semiperfect. Its factors are 1, 2, 4, 8, 11, 22, 44 and 88. 44+22+11+8+2+1=88.

So, what is a primitive semiperfect number? This is a number where it is not divisible by any other smaller semiperfect number. Knowing the factors of 88, you can see this is the case, as the smaller semiperfect numbers in sequential order are: 6, 12, 18, 20, 24, 28, 30, 36, 40, 42, 48, 54, 56, 60, 66, 72, 78, 80 and 84, none of which are a factor of 88. As a result, 88 is primitive semiperfect.

Refactorable
A refactorable number is an integer where the count of its factors is divisible by that integer. For example, 9 is refactorable. It’s factors are 1,3 and 9. There are three factors, and three itself is a factor of 9. Another refactorable number is 40. Its factors are 1, 2, 4, 5, 8, 10, 20 and 40. There are 8 factors of 40, including 40 itself, and 8 is a factor of 40. There are also 8 factors of 88, and guess what? 8 is a factor of 88. 88 is refactorable.

Untouchable
An untouchable number is a positive number that cannot be written as the sum of all the divisors of any other number excluding its greatest factor. For example, the number 4 is not untouchable, because the factors of 9 are 1 and 3 (excluding 9 itself), which sum to 4. 5 however is untouchable, as there is no number where all of the factors add strictly to 5. 88 falls in this category.

Hexadecagonal
Many numbers can be thought of shapes using dots or pebbles arranged in the shape of a polygon. For example, the number 6 is triangular, as six pebbles can be arranged to form an equilateral triangle. 10 is the next triangular number. 9 on the other hand is rectangular, arranging the pebbles in a square. What is hexadecagon? It’s a 16-sided polygon with 16 vertices. So, this means 88 pebbles can be arranged into an equilateral hexadecagon.

Conclusion
I hope you can see that there are many interesting facts about the number 88, including Nazism. 88 has cultural significance in many cultures, of which I only mention two. It has many interesting mathematical properties, and even has astronomical significance. For example, it takes eightyeight days for Mercury to complete its orbit around the Sun. So, now that you’ve read this post, I hope you walk away a bit more informed, a bit more knowledgeable, and less judgmental. 88 is a great number, and I can recognize it for its unique and interesting qualities. Can you?

Defeating the AC_CHECK_HEADER cache

The AC_CHECK_HEADER macro caches its result, so if you want to call it again with a different CPPFLAGS it will just remember the result of the first execution.

If you want to defeat this cache, as I did, this is the pattern:

header=foo.h
cache_var=AS_TR_SH([ac_cv_header_$header])
...
AC_CHECK_HEADER([$header])
...
CPPFLAGS="-I/opt/local/include"
$as_unset $cache_var
AC_CHECK_HEADER([$header])
...

AS_TR_SH does the escaping (giving ac_cv_header_foo_h in this case), $as_unset is the portable way to unset a shell variable in autotools.

Incidentally, if you don’t restore CPPFLAGS to its original user-set value, I will hunt you down and shave your head.

Fedora Activity Days 1-3 – A ‘Frank (aka Francis) the Fedora pwnie’ report

It appears to me that the weekend in Raleigh went rather well.  Even with the difficult weather conditions on Saturday into Sunday morning, I feel the result was a ’smashing’ success!  There were so many things being accomplished that I couldn’t keep track of them all.  I will try to make a fairly complete list of the events of the weekend, and what we accomplished overall.

Friday, January 29 — Day 1

Gathered at Red Hat’s main office, we brainstormed in a manual ‘tag cloud’ kind of way.  Mel had us all take sticky notes, write upon them based upon a few words on the white board and then, stick them to said white board appropriately.  This got our minds going about what a FUDCon or FAD should be, why it was important and the things that could really be improved.  I felt very happy about the amount of ideas that were shared on these sticky notes.  it was quite cathartic to get out the things that always had bugged me or I thought needed improvement in our Events.  I have a few pictures of us doing this process, enjoy them.

After spending about 1.5 hours doing this and discussing it, we broke into separate groups, the FUDCon 2.0 folks (upstairs) and FUDCon Live folks, aka me, Yaakov, and the freeseer folks online (downstairs).  My main target was to get the freeseer application working with completely free software and build the AV Kit from components I had, plus the ones that Mel had purchased for this project.

After getting downstairs with Dennis Gilmore (he was my helper for the first hour), we quickly discovered that one component, the Epiphan vga2usb device, was not working.  After a bit of digging, we also discovered that it had a non-free driver and that it would likely not be easy to find a free driver alternative.  We did, however, attempt to build the binary they provided, but kept getting errors.  More on this later on (or in another post), so stay tuned.

I spent the next few hours trying to get everything else up and running, doing research to find a different alternative for video output from a VGA source to USB input.  heffer joined us on IRC and gave me some good links as to where I might look for a Scan Converter and a easyCAP device.  While a little lower quality, the Linux drivers for it are completely open and free, so I set out with a plan to find one in Raleigh.

At 4pm, Max and I headed out on the town, hunting down several items, including firewire PCMCIA adapters (for our miniDV camera) and the Scan Converter components.  We needed to get a screw driver and some other firewire adapter stuff too, we headed to CompUSA. Though normally I wouldn’t go there, but this CompUSA had actually been converted from a Tiger Direct, so I thought we had a chance.  After about 1.5 hours of failure, we ended up with two firewire cards and some audio cables, we headed off to see Avatar in 3D.

Saturday, January 30 — Day 2

After leaving Avatar, we discovered a nice big blanket of snow had come down in Raleigh.  Just 2-3 inches, and in Utah, we’d think nothing of this, but here it’s quite a bit different.  First off, North Carolina doesn’t seems to have the infrastructure, no plows or ice melt, to really deal with something like this kind of storm.  There were news reports of it on every station, the Governor called for a state of emergency, and I just thought it was odd.  Because of this, it was determined that we would not leave the hotel for Day 2 of the FAD.  Instead, we reserved a room in the hotel and worked from there.  Luckily, the hotels infrastructure, plus the Days Inn next door provided us with our networking needs, while Max stayed at his apartment and called in using Fedora Talk.

My work was to spend as much time with the FreeSeeR folks and do tons and tons of testing of their code, plus provide feedback and gstreamer pipelines to get us closer and closer to our eventual goal.  Thanh had spent a lot of time while we were at Avatar to turn FreeSeeR into an API.  He also altered the code to put the gui into a more sensible tool, with both Qt and Gtk implementations.

About half way through the day, I discovered that I had accidentally left my power adapter for my audio mixer in Max’s car (he was 15 minutes way with no snow and at least 25 with), essentially eliminating my high quality audio testing.  Luckily Chris Tyler had a headset with a microphone and Dennis Gilmore had a webcam we could use because the firewire cards were a bit flaky and kept crashing my kernel.

By the end of the night, with some tweaking by Dennis and I, we had FreeSeeR working with DV input, USB video input, 1/4″ audio input and were able to output to an ogg file with reasonable quality and consistency.  A lot of testing later, and we were able to determine that we still needed to tweak some of the code to provide for a better way to adjust audio and video settings prior to recording.  All in all, the FreeSeeR software is coming along very nicely.  Andrew Ross and Thanh Ha have been doing an amazing job and I really appreciate their help working on getting this working.  The new version of FUDCon Live thanks you as well, because without this, we won’t be able to provide our users with a good quality remote experience.

Sunday, January 31 — Day 3

The sun is shining, but for some reason, the roads are still not that clear.  Several cars are still having difficulty climbing the incline out of the Best Western to the main road, which is now melting, but still very snow covered.  Today, we discover that we’ve met one major part of our goals, the Fedora Pony has been created!!  We must thank Robyn Bergeron for creating, Frank, the Fedora Pwnie.  Now mind you, Francis is really her name, but she’s such a tomboy that, well, you just can’t call her that, she doesn’t enjoy it too much.  So we call her Frank.

In addition to our major goal above of a Pony, the FUDCon Live team has done some amazing work.  Yaakov has been working on the FUDCon Live document with Mel, while I was working with the FreeSeeR guys to get their git repo moved over to fedorahosted.org, which is awesome!  I’ve been given commit and sponsor rights to the repo, so we’ll start getting more developers involved right away.  Have a look at the screenshots of the GUI if you’d like to see what FreeSeeR can do.

Jon Stanley and I discussed the possibility of moving fedorahosted.org over to gitolite, and discovered that Jesse Keating has been experimenting with it himself, so this might be something we can do in the near future.  While we currently appear to use gitosis, gitolite gives us the ability to set ACLs on a particular branch, which then can help keep the master branch cleaner.  To help illustrate this, there’s a very great article on nvie.com which explains a git branching system which can really make development and commits very clean and easy to track.  Gitolite can help with this, so I’m going to be experimenting with it this coming week.

I spent the rest of the day writing up the AV Kit wiki page along with Mel.  I stubbed it out, and she added a big section regarding the modules in the AV Kit.  I then rewrote much of that to cover the two styles of AV Kit we’ll be building over the next month or two.  In fact, I plan to have one complete in time for the Marketing FAD in March, where they can use and test it out.  I really hope to get some good feedback on it and improve FreeSeeR some more using these upcoming events as testing grounds.

Currently, I’m on a plane which I didn’t think would take off tonight, headed home for Salt Lake City.  I’m excited to see my sweetie and get some much needed sleep.  As much as I enjoy hanging out with my Fedora friends and working on projects like this, it really wears me out.  I’m ecstatic at the amount of work we accomplished though, and am very appreciative to Paul, Jon, Chris, Denis, Dave, Mel and Max, plus all the folks online for their hard work this weekend.

FUDCon 2.0 is alive and kicking, FUDCon Live will make it just that much better.  Watch for upcoming posts in the near future regarding FreeSeeR and the Fedora AV Kit and how everything is going to work.

Cheers,

Herlo

February 01, 2010

znurt hosting, bugs, code

I migrated the packages website to a new server this weekend, and so far I'm really glad with the setup. I originally planned on having the whole thing setup in a short time, but I went with a different web server setup this time around. Instead of using lighttpd for the server, I went back to apache, but this time with mod_fastcgi to run PHP. From what I've read, PHP doesn't like threading too much, so running at as CGI instead should avoid any possible headaches. We'll see. So far, the site is far more responsive than everything else I've tried, so I'm happy.

I feel bad about how things have gone so terrible since the initial launch of the site. I really was not ready for the massive load, and my interim solutions were just slow and clunky. Hopefully things should be much happier now.

There's still a lot of silly bugs in the code that I need to fix. I just found another one this morning where the caching is breaking if you change your architecture selection around. Oy. I'd like to get to them, but I've been pretty swamped for time lately, between starting a new job this month and dividing my remaining time doing consulting work for two other companies.

Having a break from it though has been kind of good. I've already thought of a few optimizations that I can throw in there that are kind of like, "well, duh" type stuff I can't believe I didn't think of. For example, one way that I check to see if an ebuild is new is to see if the file mtime has changed. I don't know why it never occurred to me to just read the Manifest file and see if any of the hash sums have changed. That'd save me a lot of time.

I've been poked a few times about getting the code in a live repo somewhere, too. I guess that's coming soon, assuming I can get around to it. Personally, I don't like the idea of doing it when I *know* my code is in some ugly stages, but whatever. I need to learn how to setup a git repo anyway.

Oh yes, that reminds me. I also moved all the Planet Larry stuff onto the same server. Everytime I poke at the site, all I can think about is how much of an overhaul the whole thing needs. I'm totally embarrassed that I haven't even switched over to using Gravatar yet.

My goal is to ditch the planet software and write my own software to pull in the feeds, drop them in a database, and have the whole thing searchable. Then build a user admin section as well so users can manage their feeds themselves, and stop waiting on me. I'm planning on making that my next project, once Znurt gets to a better stage of stability.

Right now, though, I just did some minor tweaks. I got rid of the subdomains, and all the other projects on the site that I let atrophy, so planet is just available now at http://larrythecow.org/

iPad Press

The iPad has garnered tons of attention before, during, and after its release. It was heavily anticipated, eagerly watched, and has created a firestorm of reviews after its announcements that range all over, but are generally whiny in some capacity or other. There is a lot about the iPad that was hoped for and that it is not delivering.  Apple knows that - it also knows something else, and stated it during the keynote, that is usually lost in all of these reviews.

The biggest disconnect is coming in the form of, "this is not what I expected," and extrapolating from "I" to a broader technical market where that may not actually be the case (or skewed toward an overtly vocal minority).  We'll see how the numbers actually play out when models begin shipping in 60 days or so, but chances are those who are complaining about its failings are not actually in the target demographic.

It's all well and good for me to be dismissive about the knee-jerkery of others, but can I back it up?  I hope so.  I'll actually start by borrowing a jab from the product's biggest detractors: it's a basically an over-sized, over-powered smart phone that can't make calls.  This is largely what Apple themselves said during the unveiling (and to which I referred above): they're looking for a product need in between smart phones and laptops:

Smart Phone:

  • Good battery life (compared to laptops)
  • Highly portable
  • Ubiquitous data accessibility
  • Limited computational power
  • Limited local data storage
  • Limited interface

Laptop:

  • Computationally capable
  • Large local data storage
  • Large and capable interface
  • Limited battery
  • Limited portability (they don't work well in all environments)
  • Potential data availability issues (or at least costs)

The concepts of application availability we can largely throw out for now based on the demonstrable market forces in developing applications based on anticipated demand, as shown by app stores (iTunes being the largest, but not the only example).

So the complaints about the iPad seem based around the expectation that it was going to be everything that MacBooks or other notebooks (or even netbooks) are, and somehow fit them into a different form factor.  For the most part, Apple's done that previously in the the MacBook Air: given the constraints they were shooting for (screen size, usability, battery life, and dramatically enhanced portability/nifty form factor) it's an over-powered netboo0k and/or an underpowered notebook: bigger than a netbook, not quite as useful as a full notebook due to its processing and data capacity limitations - I can't comment on the sales figures for the product line because I haven't seen them, but simple economic sense suggests that they haven't penetrated the lower-priced netbook arena where it would be able to compete in features because the price point is set around the same level as full notebooks (which in turn best its own feature set handily).

To the iPad then:

  • Excellent battery life (if the 10-hour figure is to be believed)
  • Good portability
  • Ubiquitous data accessibility (if you go for 3G - if not, you're as constrained as netbooks w/WiFi)
  • Moderate computational power (custom silicone augments the software to almost total hardware acceleration for common operations, which makes things both snappy and gentle on the power-consumption; a good move, overall)
  • Large and capable interface (the usability of the on-screen keyboard in real-world situations has yet to be seen, but the first large scale multi-touch platform lends to new worlds of possibilities)
  • Moderate data storage (unheard of for a smart phone, but underwhelming in notebook standards)

This hits Apple's intended mark squarely: it is between smart phones and netbooks, and addresses the market segment which needs, or could effectively use, just a little more than they get out of a smart phone, but not as much as would make them require a note/net- book.  It is the convergence of the tangents along which both smart phones and netbooks have been evolving, hoping to capture the market segment suggested by that intersection rather than really competing with either and is intended to live along side both.

The smartest move though is a pricing point along the same lines (or vectors, even): this will cost a little bit more than an unlocked smart phone, and a little less than lower-end netbooks, and while I'm confident that deal-hounds will be able to best it on a dollars-for-Xflops in terms of computational capacity (and Xbytes on the reciprocal data figure), that Apple has stepped out into a new territory - it is not yet the Dream Tablet or convergent communications device of sci-fi near future, but it is a competent offering by an established technical competitor with the kind of force that they can bring to bear.  In this new territory everything will be discussed in terms of how it compares to the iPad, which acts as an initial bar and corresponding litmus test.  Other providers will see how this performs and respond either by avoiding or competing, including Apple, whose first forays usually miss the mark in some capacity and require a generation or two of evolution to properly adapt to the also-evolving niche that forms around it (OS X, iPod, and iPhone being excellent examples of iterative improvement).

It's definitely not for everybody, and will take a few releases or at least OS upgrades for them to figure out how to incorporate the feedback that will help to capture and refine the market.  If you don't like it, don't buy one - but quit whining.*

*Except about the camera.  Why on earth does this not have a camera?

How to Rename a File in Ubuntu : Ubuntu Beginners

This article is part of a series entitled “Ubuntu Beginners”, which walks new users through basic Desktop and Command Line usage. This article will detail how to rename files, using both the graphical interface as well as the command line. Included below are GNOME, KDE and command line methods.

Rename Files – Nautilus (GNOME)

If you are using the standard Ubuntu, which uses the GNOME Desktop Environment, the file manager is called Nautilus. Anytime you are browsing files or folders graphically, you are using Nautilus. I’ve included screenshots below displaying the default Home folder, selecting a document, and renaming the document.

This is the default Nautilus view in Ubuntu 9.10, displaying the contents of the home folder. You’ll notice that there are pre-populated directories (folders) for Documents, Downloads, Music, Pictures, etc.

Nautilus - Home Folder

Nautilus - Home Folder

In this next screenshot I’ve selected a document in my Documents folder, and selected the ‘Rename…’ option. This is done by selecting the file, right-clicking the mouse and selecting the ‘Rename…’ option.

Nautilus - Rename File

After selecting the ‘Rename…’ option, the file name will become editable. You can update the text to your preference, and rename your file.

Nautilus - Rename

Nautilus - Rename

Once you’ve updated the file name simply hit the [ENTER] key on your keyboard, or click your mouse anywhere outside of the editable text area. The edit-field will disappear and your file will have been renamed.

Rename Files – Dolphin (KDE)

If you have installed Kubuntu, the KDE-based Ubuntu variant, your file manager is called Dolphin. I’ve included screenshots of Dolphin, as well as the process of renaming files in Dolphin.

This is the default Home folder as displayed by the Dolphin file manager.

Dolphin - Home

Dolphin - Home

In order to rename a file, simply right-click on the file and select the ‘Rename…’ option. You’ll notice that Dolphin also provides a keyboard shortcut to rename using the F2 key. This means, instead of right-clicking and selecting ‘Rename…’ you can simply press F2 after the file has been selected.

Dolphin - Rename File

Lastly, enter the new name of the file into the dialog box and update your changes by hitting the [ENTER] key, or clicking the ‘Rename’ button.

Dolphin - Rename Item

Rename Files – Command Line (Linux)
The method of renaming a file on the command-line is generic to Linux. In other words, this method should apply to any Linux distribution, any version, and any variant.

In Linux, renaming a file is essentially the same as moving a file. Where moving a file is simply moving a file from one location to another, renaming a file is essentially moving the name of the file. The contents remain the same, we’ve simply moved the place where you’d find them–from one name to another.

To rename a file, using the following syntax:

mv welcome-to-ubuntu.doc renamed.doc

A few additional examples:

mv IMGOOO1.JPG release-party-pictures-1.jpg
mv IMGOOO2.JPG release-party-pictures-2.jpg

You get the idea. I understand it can be confusing to use the mv (move) command to rename a file, but you’ll find that you get used to it rather quickly and then not even think about it.

Conclusion
No matter the environment that you’re in, whether in be GNOME, KDE or the command-line, renaming files is simple. Right-click and select ‘Rename…’ is generally standard between graphical environments, and using mv on the command-line will work on all Linux distributions. I hope this beginner tip has been helpful.


February PLUG Meeting: Beginning Arduino
Date: February 10th, 2010
Time: 7:30 PM - 9:30 PM
Location: Omniture (Adobe)


PLUG:

If you have ever wanted to break in to the world of hardware hacking we have a treat for you this month. Arduino is an open hardware platform that lowers the barrier to really advanced embedded system designs. There are several interchangeable attachments (shields) you can add to your Arduino to increase its functionality. The basic board can be powered via USB, and there is an open source IDE available that will run on the most common OS platforms (including Linux). The Arduino platform has gathered a lot of interest from those that are new to the world of embedded programming due to its low cost and ease of use. Any geek worth his salt can get involved with limited time and financial investment.

This month PLUG is pleased to have Matthew Walker and Matt Nelson join forces to give us all an introductory look at Arduino. They will cover what you need to get started, basic circuit design, sensors, and more. Matt and Matt will have some examples of things you might want to get if you're interested in this platform. If you own a *duino please bring it to the meeting and show off your 750 point breadboarded robotics platform. ;-)

A full starter kit (everything you need) costs between $40-$60. While we couldn't get a user group discount from any of the distributors we asked, there is a possibility we can do a group purchase and get a volume discount if there is enough interest.

From Matthew Walker:

I've been a web developer for the last ten years, and I love programming. I have a consulting business, but I'm also employed full time at Marketecture, right across the street from Omniture. My preferred languages are Perl and PHP, but I like acquiring new skills, and have recently started to get into Android and Arduino development.

read more

OFTC, SSL, NickServ and Irssi

I’m on a bit of an IRC kick with the blogging lately, mainly because it seems I’m usually fine tuning my settings, and I like to share what I find. Hopefully, someone finds these posts useful. For today’s post, I’ve picked setting up an SSL connection on OFTC and securely identifying to NickServ when connecting. with Irssi. Before beginning, it should be noted that the instructions for this tutorial can also be found on the OFTC site. I’m merely taking that tutorial, and posting only the Irssi instructions here, more or less. However, if you use another client, you should read over that tutorial instead.

Generating an OpenSSL Certificate
OFTC runs a forked version of hyperion-ircd that they call oftc-hybrid. It’s a patched version of hyperion that Freenode was running on their servers before the switch to ircd-seven. It supports IPV6, SSL, and CertFP with NickServ, that I’ll cover later in this post.

Before connecting to OFTC, we want to generate an OpenSSL certificate. This certificate will be used for authenticating to NickServ, and really isn’t related to setting up an SSL connection to OFTC. However, when you connect, you will be presenting OFTC with the generated certificate, and at that point, you will be able to add it to NickServ, because it’s been presented. If you already have your own personal certificate you want to use, then you can skip this step, and move on to connecting with SSL.

I’m going to assume you have OpenSSL installed. If you’re running any modern Unix-like operating system, such as GNU/Linux or one of the BSDs, chances are very high that it’s been installed by default. If not, install it, and continue with the rest of the post.

In this step, we’re going to generate our own self-signed personal OpenSSL certificate. So, fire up a terminal, type in the command below, and follow the on-screen instructions. The values you put here do not matter to OFTC in the least, so fill them in any way you wish. In my case, I’ll fill in the data for my personal certificate, but you fill in the values as you see fit. Replace “nick.key” and “nick.crt” with your IRC nick that you use for this connection.

cd ~/.irssi
mkdir certs
cd certs
openssl req -nodes -newkey rsa:2048 -keyout nick.key -x509 -days 365 -out nick.crt
Generating a 2048 bit RSA private key
writing new private key to 'nick.key'
-----
Country Name (2 letter code) [US]:US
State or Province Name (full name) [Texas]:Utah
Locality Name (eg, city) [San Antonio]:Ogden
Organization Name (eg, company) [Stealth3]:eightyeight
Organizational Unit Name (eg, section) [ISP]:OFTC
Common Name (eg, YOUR name) []:Aaron Toponce
Email Address []:aaron.toponce@gmail.com

Now, if you look, you’ll have two newly generated files: “nick.key”, which is your private key and “nick.crt” which is your public self-signed certificate. Because “nick.key” is your private key, you want to guard it appropriately. Its permissions should be modified to only be readable (and maybe even writable) by you, and you alone. Also, because we have both the private and public key set, let’s go ahead and combine the files into one PEM file that we’ll present to NickServ when connecting:

cat nick.crt nick.key > nick.pem
chmod 0400 nick.key nick.pem

Connecting with SSL
At this point, we are ready to connect to OFTC, and present our certificate to the server. So, fire up Irssi if you haven’t already:

irssi -!

Now that we’re in Irssi, we want to setup our SSL connections to OFTC. You should have ~/.irssi/certs/nick.pem available to send.

We will need to retrieve the CA certificate for verifying the server certificate. I personally like to put all my CA certificates in my certificates store, and this is where I deviate a little from the tutorial on the OFTC site. OFTC has their certificate signed by Software in the Public Interest, so we’ll need their CA certificate. Fortunately, Debian, Ubuntu, and many other GNU/Linux operating systems provide this certificate for us, so we just need to identify the location of the certificate, and plug that into Irssi. If you don’t have that certificate, refer to the tutorial on the OFTC site for obtaining it and installing it on your system.

So, with Irssi waiting for our command, let’s tell it out to connect to OFTC:

/network add oftc
/server add -auto -ssl -ssl_cert ~/.irssi/certs/nick.pem -ssl_verify -ssl_cafile /etc/ssl/certs/spi-cacert-2008.pem -network oftc irc.oftc.net 6697
/save
/connect oftc

When we successfully connect, we should see that OFTC has accepted our self-signed certificate in the MOTD, and it should also show that we are connected securely to the network with SSL:

16:20 [oftc] Irssi: Looking up irc.oftc.net
16:20 [oftc] Irssi: Connecting to irc.oftc.net [64.62.190.36] port 6697
16:20 [oftc] Irssi: Connection to irc.oftc.net established
16:20 [oftc] [charm.oftc.net]: *** Looking up your hostname...
16:20 [oftc] [charm.oftc.net]: *** Checking Ident
16:20 [oftc] [charm.oftc.net]: *** Found your hostname
16:20 [oftc] [charm.oftc.net]: *** No Ident response
16:20 [oftc] [charm.oftc.net]: *** Connected securely via TLSv1 AES256-SHA-256
16:20 [oftc] [charm.oftc.net]: *** Your client certificate fingerprint is 4A5463CE416649F72818B22945681D28250C1ACA
16:20 [oftc] >>> Welcome to the OFTC Internet Relay Chat Network eightyeight

Sweet! We’re connected securely, and OFTC accepted my client certificate by printing the fingerprint for me. If the fingerprint is not displayed, then OFTC has not accepted my certificate, and I need to review the steps outlined above, or on their site.

Authenticating to NickServ with SSL
From here on out, our connection is secured, and we can enjoy the safety that is encrypted packets. So, at this point, we need to register our nick with NickServ, if we haven’t already. It should be pointed out that Services has a complete help document provided. Messaging “help” to any of the Services bots will give you a break down of the available commands and their syntax. I would highly recommend becoming familiar with how to use the provided documentation.

/msg NickServ help
04:22 [notice(NickServ!services@services.oftc.net)] *** NickServ Help ***
04:22 [notice(NickServ!services@services.oftc.net)] ACCESS: Maintains the nickname ACCESS list.
04:22 [notice(NickServ!services@services.oftc.net)] CERT: Maintains the nickname client certificate list.
04:22 [notice(NickServ!services@services.oftc.net)] DROP: Releases your nickname for use.
04:22 [notice(NickServ!services@services.oftc.net)] ENSLAVE: Enslave a nickname to this master nickname.
04:22 [notice(NickServ!services@services.oftc.net)] HELP: Shows this help.
04:22 [notice(NickServ!services@services.oftc.net)] IDENTIFY: Identify your nickname.
04:22 [notice(NickServ!services@services.oftc.net)] INFO: Get information on a nickname.
04:22 [notice(NickServ!services@services.oftc.net)] LINK: Link this nickname to a master nickname.
04:22 [notice(NickServ!services@services.oftc.net)] LIST: Shows a list of nicknames matching a specified pattern.
04:22 [notice(NickServ!services@services.oftc.net)] RECLAIM: Release your nickname for you to use.
04:22 [notice(NickServ!services@services.oftc.net)] REGAIN: Release your nickname for you to use.
04:22 [notice(NickServ!services@services.oftc.net)] REGISTER: Registers a nickname for your usage.
04:22 [notice(NickServ!services@services.oftc.net)] SENDPASS: Send a password reset request.
04:22 [notice(NickServ!services@services.oftc.net)] SET: Set nickname properties.
04:22 [notice(NickServ!services@services.oftc.net)] STATUS: Shows the identified status of a nickname
04:22 [notice(NickServ!services@services.oftc.net)] UNLINK: Unlink this nickname from a master nickname.
04:22 [notice(NickServ!services@services.oftc.net)] *** End of NickServ Help ***

In this case, we’re interested in registering and then identifying. The syntax for registering is providing your password and email as arguments. Providing the correct email is key, so should you lose your password and you can no longer authenticate with SSL, you can have NickServ email you your password. So, I would recommend putting in a valid email here, and not some throw away string:

/msg nickserv register password username@example.com
/msg nickserv identify password

At this point, our nick is registered and we are identified to NickServ. If the nick you’re wishing to register is already registered, then you’ll either need to pick a different nick, or join #oftc on the network, and see if staff can assign that nick to you. At any event, you must be identified with a valid nick before you can proceed with the next steps.

Now that we are identified to NickServ, we need to add our hostmask to the access list. This is beneficial, so we won’t be asked to identify when we connect, which is what we want. So, we need to find our hostmask. This is simple enough by running a /WHOIS on yourself, and identifying your host string. So, it might be something like this:

/WHOIS eightyeight
04:29 [oftc]      nick  | eightyeight
04:29 [oftc]      host  | ~88@c-12-130-240-233.hsd1.mn.comcast.net
04:29 [oftc]     gecos  | eightyeight
04:29 [oftc]    server  | charm.oftc.net [Freemont, CA, USA]
04:29 [oftc]      info  | user has identified to services
04:29 [oftc]  hostname  | 12.130.240.233
04:29 [oftc]      info  | is connected via SSL (secure link)
04:29 [oftc]      idle  | 0d 0h 1m 48s [signon: Sat Jan 30 16:20:12 2010]

In this case, my host is “~88@c-12-130-240-233.hsd1.mn.comcast.net”. This is what I want to provide to NickServ:

/msg nickserv access add *@c-12-130-240-233.hsd1.mn.comcast.net

Good. Now we’re ready to add our self-signed certificate. Remember, when you connected, in the beginning of the MOTD, your certificate fingerprint was displayed. You will want to copy this output and paste it here. You can also use the “openssl” command to get the fingerprint of your cert, you will just need to remove the colons out of the string when providing it to NickServ. In my case, my fingerprint was 4A5463CE416649F72818B22945681D28250C1ACA, so I’m going to add that. Change the string for your fingerprint:

/msg nickserv cert add 4A5463CE416649F72818B22945681D28250C1ACA

That’s it! At this point, if you were to connect again (you must /disconnect and then /connect. /reconnect doesn’t apply the SSL settings, apparently (BUG?)), you will find that you will automatically identify to NickServ with your cert, and without a password. As you can imagine, this is highly secure. If you are not taking advantage of SSL, then your password can be sniffed on the wire, and your account could be compromised. In this case, we’re neglecting the password, and using public key cryptography instead to authenticate. I don’t know at this point if a MITM attack would be successful. So, bonus.

To see that it has succeeded, when you connect you should see the following at the end of the MOTD:

05:14 [oftc2] >>> You have set user mode +i
05:14 [oftc2] >>> You have set user mode +R
05:14 [oftc2] [notice(NickServ!services@services.oftc.net)] You are connected using SSL and have provided a matching client certificate
05:14 [oftc2] [notice(NickServ!services@services.oftc.net)] for nickname eightyeight. You have been automatically identified.

Wrap-up
Congratulations! You are now connected securely to OFTC via SSL and you have identified to NickServ successfully with your self-signed certificate. The major benefits of this method, is you can ditch any client-side identification scripts, which is always a bonus. Further, your packets are now encrypted between you and the OFTC servers. OFTC also utilizes server-to-server encryption, so if you’re physically connected to a server in the United States, and someone you’re in private message with is physically connected to a server in Europe, not a single plaintext packet is sent on the wire between your client and his (assuming he’s connected via SSL as well).

A final not on SSL connections, is your computer clock that you are running Irssi on needs to be accurate. It would be recommended to use NTP to keep your clock in sync with Internet time servers. If your clock is too far off, you won’t be able to negotiate the OpenSSL handshake, and as a result, not be able to take advantage of the encrypted traffic. Also, OpenSSL certificates need to be valid. If your certificate expires, then you will not be able to present it to the server, and as a result, not be able to authenticate to NickServ. The dates on expiration are up to you, but validity is important. You can see the dates of your certificate with the following command:

openssl x509 -noout -in nick.pem -dates

Enjoy the security.

January 31, 2010

Freenode, SSL and SASL Authentication with Irssi

Last night, Freenode made the migration from hyperion-ircd to a fork of charybdis-ircd they’re calling ircd-seven. There are a few notable changes in the new ircd code that are worth mentioning here that are of benefit to end users and clients. They are the ability to use OpenSSL encryption between client and server and the ability to use SASL authentication for authenticating to Services. Of course, as is standard, I’ll document this with Irssi, but the general rules apply to most IRC clients.

Connecting with SSL
Freenode is listening for SSL connections on ports 7000 and 7070, rather than the standard 6697. I don’t know what the logic here is for that, but does it matter? A port is a port is a port. So, for Irssi, setting this up is rather simple.

/server add -auto -ssl -network freenode irc.freenode.net 7000

Boom! Done.

Now, if you want to verify the Freenode server SSL certificate against a certificate authority (CA), then you’ll need to download the CA certificate from the authority that signed the server certificate. In this case, its Gandi.net, and their CA certificate file can be found here: http://crt.gandi.net/GandiStandardSSLCA.crt. However, using the file in its native DER format for Irssi wasn’t working for me. So, using openssl, I converted the binary DER data file to PEM format, at which the Freenode certificate would properly verify:

cd /usr/share/ca-certificates
mkdir gandi.net
cd gandi.net
wget http://crt.gandi.net/GandiStandardSSLCA.crt
openssl x509 -inform der -outform pem < /usr/share/ca-certificates/gandi.net/GandiStandardSSLCA.crt > GandiStandardSSLCA.pem
ln -s /usr/share/ca-certificates/gandi.net/GandiStandardSSLCA.pem /etc/ssl/certs/GandiStandardSSLCA.pem
With the Gandi.net CA certificate installed in the standard CA certificates store, I modified my server string in Irssi:
/server add -auto -ssl -ssl_cacert /etc/ssl/certs/GandiStandardSSLCA.pem -network freenode irc.freenode.net 7000

Unfortunately, as much as I would like this to work, it doesn't. I kept ending up with this error:

[freenode] Irssi: Connecting to irc.freenode.net [140.211.166.4] port 7070
Irssi: warning Could not verify SSL servers certificate:
Irssi: warning   Subject : /OU=Domain Control Validated/OU=Gandi Standard Wildcard SSL/CN=*.freenode.net
Irssi: warning   Issuer  : /C=FR/O=GANDI SAS/CN=Gandi Standard SSL CA
Irssi: warning   MD5 Fingerprint : F8:40:2C:D9:D6:46:1F:D0:38:5D:ED:21:69:8B:17:C4

Digging deeper, it appears it's failing with:

2 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: unable to get issuer certificate
the issuer certificate could not be found: this occurs if the issuer certificate of an untrusted certificate cannot be found.

After a bit of hacking, and the help with Bazerka in #irssi, we found that my specific version of OpenSSL doesn't like the certificate chain. Because Irssi is using these libraries, it took a bit of mucking about to find enough data points, that you need to be running an extremely recent SVN build of Irssi (there's a bug with some SSL certificate verifications that affect us here), also with OpenSSL version 0.9.8k or later. I am not running either on Debian stable, so am I stuck not being able to verify the certificate Freenode gives me?

Well, not quite. The Gandi certificate is signed by UTN-USEFirst-Hardware, which in turn is signed by AddTrust External Root (if your browser has a CA certificates store, you can visit https://irc.freenode.net:7070, and get the details of the certificate there, or use "openssl s_client" to download it and examine the details). So, if you have the USEFirst and AddTrust CA certificates, then you can verify those instead with older versions of OpenSSL or Irssi, and you'll be golden. So, if you have a CA certificate store, as most GNU/Linux distributions do, you can set the following instead:

/server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network freenode irc.freenode.net 7000

This will succeed, and when connected, you'll see usermode "+Z" meaning you're using a secure connection, and you've properly verified the server certificate Freenode is handing out. Notice the difference with "-ssl_capath" here and "-ssl_cacert" from above. This is key to making this work.

Authenticating with SASL
Okay, after setting up SSL with Freenode, the next task for me was using SASL authentication rather than a server password to authenticate to NickServ. It should be noted that using SASL authentication is entirely optional! You don't have to use this method if you don't want. However, using the SASL authentication script I'm going to point to in a second has one nice feature that might be of interest to you: using Blowfish encryption on your password, and sending that to NickServ, should you not be using an SSL connection at all. If you're not interested in using an SSL connection, at least you can encrypt your password on the wire when authenticating using SASL.

Anyway, setting this up means getting Irssi in shape for SASL. By default. Irssi doesn't support SASL authentication out of the box, so we need a Perl script to make it happen. You can find that Perl script here. After downloading the script, put it in your ~/.irssi/scripts directory, and link against it in the autorun directory. Something like this:

cd ~/.irssi/scripts/
wget http://freenode.net/sasl/cap_sasl.pl
cd autorun
ln -s ../cap_sasl.pl cap_sasl.pl

Now, you just need to load it in Irssi, and setup your username and password for authentication. A word of note here: when setting up SASL authentication, you need to be using your primary nick with NickServ, not any nick that you've linked against, or it will fail. I don't know why this is, but that's the case. So, in my case, my primary nick is "atoponce" and my secondary nick is "eightyeight". I use my secondary nick for all my IRC sessions, but when using the SASL command below, you must use your primary nick. While we're at it, we'll save everything we've done up to this point in the config:

/RUN cap_sasl.pl
/sasl set freenode primary-nick password DH-BLOWFISH
/sasl save
/save

First, if you haven't noticed already, you need some Perl libraries in place before you can run this script, namely Blowfish, DH and BIGNUM. If you're on Debian or Ubuntu, you can install them with:

aptitude install libcrypt-blowfish-perl libcrypt-dh-perl libcrypt-openssl-bignum-perl

Notice, I"m using DH-BLOWFISH in my example. "PLAIN" is also completely valid there for your mechanism. Also, notice I'm using "/sasl save" to save the settings to disk. You'll want this, so should you need to restart Irssi, everything will be in place, and you won't have to go through this procedure again.

If you've followed this tutorial rather closely, when you connect, you should see something like the following at the beginning of the connection:

16:05 [freenode] Irssi: Looking up irc.freenode.net
16:05 [freenode] Irssi: Connecting to irc.freenode.net [140.211.166.4] port 7000
16:05 [freenode] Irssi: Connection to irc.freenode.net established
16:05 [freenode] [niven.freenode.net]: *** Looking up your hostname...
16:05 [freenode] [niven.freenode.net]: *** Checking Ident
16:05 [freenode] [niven.freenode.net]: *** Found your hostname
16:05 [freenode] [niven.freenode.net]: *** No Ident response
16:05 [freenode] Irssi: CLICAP: supported by server: identify-msg multi-prefix sasl
16:05 [freenode] Irssi: CLICAP: requesting: multi-prefix sasl
16:05 [freenode] Irssi: CLICAP: now enabled: multi-prefix sasl
16:05 [freenode] >>> eightyeight!88@oalug/member/pdpc.supporter.monthlybronze.eightyeight atoponce You are now logged in as atoponce.
16:05 [freenode] Irssi: SASL authentication successful
16:05 [freenode] >>> Welcome to the freenode Internet Relay Chat Network eightyeight

You want to see "SASL authentication successful" in the output. If it fails then you will still need to provide your password manually to NickServ. You will likely need to review the steps outline above finding anything you might have missed. Remember, you're authenticating with your primary NickServ nick, not any others linked to it. In the output, you can see I'm authenticating with "atoponce", but using "eightyeight" when I actually connect.

One last work about SASL authentication: you no longer need a server password if you're utilizing this. Before, Freenode supported a server password that you could append to the end of your "/server" string for authentication. Freenode still supports this, although in "username:password" syntax rather than just "password". But, SASL authentication overrides the need for a server password, so you can take that out of your settings. It's not hurting anything if you leave it, but it's not doing anything beneficial either.

Miscellaneous
With all that out of the way, I want to point out one major change that I welcome. That is the ability to join more than 20 channels simultaneously. Previously, with hyperion-ircd, you had to get Freenode staff to grant you usermode "+u" which gave you the ability to sit in more than 20 channels with one connection. If you're an IRC addict like I am, 20 is pretty freaking limiting. However, ircd-seven now supports the ability to connect to 120 simultaneous channels. You can see this in the MOTD output when you connect (emphasis placed):

16:05 [freenode] >>> CHANTYPES=# EXCEPTS INVEX CHANMODES=eIbq,k,flj,CFLMPQScgimnprstz CHANLIMIT=#:120 PREFIX=(ov)@+ MAXLIST=bqeI:100 MODES=4 NETWORK=freenode KNOCK STATUSMSG=@+ CALLERID=g are supported by this server
16:05 [freenode] >>> SAFELIST ELIST=U CASEMAPPING=rfc1459 CHARSET=ascii NICKLEN=16 CHANNELLEN=50 TOPICLEN=390 ETRACE CPRIVMSG CNOTICE DEAF=D MONITOR=100 are supported by this server
16:05 [freenode] >>> FNC TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,PRIVMSG:4,NOTICE:4,ACCEPT:,MONITOR: EXTBAN=$,arx WHOX CLIENTVER=3.0 are supported by this server

Very nice!

So, there you have it. SSL connectivity with SASL authentication and the ability to join up to 120 channels simultaneously on the new IRCD at Freenode. I personally welcome all these changes, and it's nice to see that every IRC server I'm currently connected with provides a secure connection. Call me paranoid, but I'm enjoying SSL.

Accessing Freenode IRC Network via SSL Secure Connection

On Jan 30, 2010 the Freenode IRC network finally activated SSL support. This is something that many have long been waiting for, and I’m glad to finally see it! I have been an IRC user for some years now, the majority of which has been specific to the Freenode network. Historically all data passed to the Freenode network, including username, password and chat messages have been done in the clear. This no longer has to be the case as SSL client support is now available.

In this article I will outline how to configure your IRC client to connect to the Freenode IRC network using SSL client encryption. This article includes instructions for Irssi, Empathy and Pidgin.

Access Freenode via SSL – Irssi

This section outlines how to configure irssi, the command-line IRC client, to connect to freenode via SSL secure connection.

First, you’ll need to ensure you have an updated list of CA root certificates. This can be done by verifying you have the following package installed:

sudo aptitude install ca-certificates

It is likely that this is already installed, but it won’t cause any problems to attempt installation just to make sure.

Once you’ve verified that you have the latest CA root certificates you can connect to Freenode via SSL using the following command:

/connect -ssl_verify -ssl_capath /etc/ssl/certs chat.freenode.net 7000

If you’d like to automatically connect to freenode each time you launch irssi, use the following:

/network add -nick <nick> -realname <realname> freenode

/server add -auto -ssl_verify -ssl_capath /etc/ssl/certs -network freenode chat.freenode.net 7000

/save

Access Freenode via SSL – Empathy (IDLE)

This section outlines how to configure Empathy, the default messaging client in Ubuntu 9.10+, to connect to freenode via SSL secure connection.

You’ll need to verify that you have an updated list of CA root certificates. This can be done by verifying you have the following package installed:

sudo aptitude install ca-certificates

Once you’ve verified that you have the latest CA root certificates, you’ll also need to verify your Empathy configuration. Below is a screenshot for the FreeNode configuration in Empathy. Ensure yours matches the port and SSL activation.

Empathy FreeNode configuration

Empathy FreeNode configuration

Access Freenode via SSL – Pidgin

This section outlines how to configure Pidgin, the default messaging client in older Ubuntu releases, to connect to freenode via SSL secure connection.

You’ll need to verify that you have an updated list of CA root certificates. This can be done by verifying  you have the following package installed:

sudo aptitude install ca-certificates

Once you’ve verified that you have the latest CA root certificates you’ll also need to verify your Pidgin configuration. Below is a screenshot for the IRC configuration in Pidgin. Ensure yours matches by modifying your account.

On the “Basic” tab, the default Server: entry will likely be “irc.ubuntu.com”. Unless you change this to “chat.freenode.net”, you’ll get a warning about not being able to verify the certificate.

Pidgin Basic Configuration

Pidgin Basic Configuration

Next, navigate to the Advanced tab. On this tab you’ll need to change the Port: to 7000 and activate the checkbox for “Use SSL”. When you are finished, save your changes

Pidgin Advanced Configuration

Pidgin Advanced Configuration

Conclusion

Encrypted connections via SSL are important for network security, particularly in the situation where usernames and passwords are being transfered. As end-users we should be aware of improved security options available to us, such as encrypted network connections. If you are an IRC user and haven’t yet made the switch to SSL enabled connections, I’d invite you to take a minute and do so now.

  • No Related Post


January 30, 2010

My Drive Array
A couple of years ago I got ahold of an old ATX computer that I intended to use as a file server. Unfortunately, there were a few problems with it. The biggest problem was that the drive cage for the smaller drives was missing. Smaller problems like an underpowered power supply and limited onboard IDE adapters were fixed with things like a new 600W power supply, and extra IDE expansion cards. As it turns out, Linux had no problem with two onboard adapters and two more cards (two adapters per card). With IDE's master/slave setup, that brought me up to two DVD burners (/dev/scd0 to /dev/scd1) and six hard drives (/dev/hda to /dev/hdf). But the drive cage, that was a problem.

Fortunately, like many American bakers and pastry chefs, I spent a lot of time at the hardware store. And believe it or not, the roofing section at Lowes carries a simple solution: roofing ties. Not TILES, but TIES (no "L"). Behold, the drive array, now connected to my Thinkpad (click to embiggen):



Yes, dear readers, the file server is dead. It seems to have developed memory issues in its old age, leading to its untimely demise. Not Alzheimers, but some form of dementia. A close-up on the array itself:



Sadly, my Thinkpad does not have an external IDE adapter of any kind. But USB to IDE adapters are relatively cheap and easy to find. I can't access every drive at once, but that's not a big deal at the moment.

Lowes has several different sizes of roofing ties, and several different styles. I used two different sizes, both completely flat, but with rows of holes exactly the same width as a standard 3.5" internal drive. One is five holes high and one is three holes high.



If you're going to do this, you'll be buying them in sets of two each. And while you may be tempted to stack three drives in one 3-high roofing tie set, fight the urge! You need airflow between the drives, or they will overheat. I speak from experience. Limit yourself to three drives for the 5-high ties, and only use the 3-high ties for connecting sets of 5-high ties. Look back at photo #2 to see what I mean.

Speaking of heat issues, it's not a bad idea to point a fan at these if you're going to have them all on at once. It's not a big deal with one or two USB-connected drives, but with all six drives that I have in my array, I always had a fan going.