Explaining a simple argument

I had a conversation today, where the other party disagreed with me about the following text which I saw in Madden 09:

“The Bengals have played the Steelers more than any other team in the NFL”.

My assertion was that the statement was ambiguous and did not make sense as you could not figure out which team played the other team the most in their own history.

My interpretation of the statement was:

  • The Bengals could have played the Steelers more than any other team in Bengals history
  • The Steelers could have played the Bengals more than any other team in Steelers history

Also Wikipedia appeared to have the correct statement: “the Bengals have met the Steelers more than anyone else in their own history”, which was not ambiguous to me.

Please comment on this as they are having a hard time believing my argument, and if I am wrong I would love to know.

The Startling Lack of Innovation

Recently I have been thinking about the void of innovation of the last few generations. In a nutshell, it seems that we hit the pause button somewhere around the late 80’s. I have been in search of some sort of inspiration or hope, but have seldom found an answer as to what has happened.

I recently went on my honeymoon to Chicago, a fantastic city. We went to the top of the Sears / Willis tower, and looked at the view. It was funny how the tallest building in the United States was build in 1973. It was a great flight to Chicago, riding on the Boeing 737 that was designed in the early 60s. Prior to my generation, every 10 years or so there was an entire new set of music that some loved, and some wanted to forget. Now the decades since the 90s just blend together.

Did we reach an apex, or simply a cultural shift? I highly doubt we are pressing the limits of human comprehension, as even the most skilled / difficult fields are very simple once a few hours in understanding are applied. At some point we lost our way, but it wasn’t just the USA. England, China, Russia are all along on the ride with us, seldomly producing actual innovation.

Remember AIDS, cancer, and the common cold? They are all still here, and despite years of supposed research, we struggle for any answer, solution, or even mitigation strategy. How is the car you drive? Almost any engine in use today was designed fundamentally at or before the turn of the century. Hybrid cars? A joke in their current state (just jam a bunch of lithium ion batteries in there, also developed in the 70s).

I would love it if people could comment on innovations, and what they see that is amazing or that is in development that can inspire. Where do we go from here?

Before we go down a road to the obvious, I don’t believe that Operating Systems are fundamentally different than 20 years ago. My Windows 7 and Linux of today are definitely not 20 years improved (we still use the same tcp / ip protocols (developed yet again in the 60s / 70s), same languages / paradigms (most of which developed in the 60s / 70s) etc. My computer today does little that my 8086 couldn’t do, and is terribly inefficient at doing so. I really don’t count most anything webpage based as an innovation, as it is such low hanging fruit (even google) that I can’t bring myself to include it in with the previously mentioned technologies.

A thousand passwords

In this day and age of the internet, we have more content and interaction than ever before. This access generally comes with a price: everything requires a username and password. How does a mere mortal remember their credentials to login to thousands of websites? More importantly, I am not always on the same computer, how do I access my passwords from all of them?

The long term solution would be to see 100% adoption of OpenID. Inevitably many sites will always be behind the curve, so until that day comes, I recommend Revelation.

Revelation is an easy to use, secure and lightweight password manager for Linux. It is written in GTK so those running the GNOME desktop (the default for Ubuntu) will be right at home. You can have several different folders to help organize your passwords, and define actions based on the type of password being stored.

A picture is worth a thousand words, so here is a screenshot of Revelation in action:
revelation

What makes this great is that all of your passwords are stored encrypted. This means if someone takes your computer, without your master password your passwords would be useless. This also means we can store our password using Ubuntu One or Dropbox.

If you are curious about Dropbox I wrote a post with screenshots showing exactly how it works. Simply save your Revelation password file there, and all of your systems that have Dropbox will now have access to those passwords (once you unlock it for that session of course).

Under the preferences window in Revelation you can also adjust your default password size (when you use Revelation you simply randomly generate a new password for each website) for as long as you need, with the longer the better.

If you are running Ubuntu, you can install Revelation by clicking Applications -> Ubuntu Software Center and searching for Revelation. If you would prefer the command line version:

# sudo apt-get install revelation

There are many alternatives out there, but if you are running Linux and just need a simple, no-hassle password manager Revelation is worth five minutes to try it out.

Tags: , ,

Installing Play Framework on OpenBSD 4.6

OpenBSD
OpenBSD is a free, reliable and secure operating system. From a configuration standpoint it is both minimal and simple, which is great for those who want to get started quickly. For the purposes of this tutorial, it is assumed the user has already installed OpenBSD. If not, check out openbsd101.com for guides on installation etc.

Play Framework
The Play Framework is a java based web programming system, that includes the enterprise features of java with the methodology of Ruby on Rails or Django. You can view an introductory screencast at their website which shows just how easy and powerful it is.

Allow your user to sudo
Since this blog is aggregated on many Ubuntu sites, we will use the sudo facility to run commands instead of root. To enable sudo the same way Ubuntu does:

  1. su – # Get root
  2. visudo
  3. Uncomment the line “%wheel ALL=(ALL) SETENV: ALL”

Install packages
For the play framework the launch scripts are in python. Zsh is installed for a better shell, and vim is installed for a full featured editor.

export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/4.6/packages/i386/
sudo pkg_add zsh jre-1.7.0.00b59p0 wget python-2.6.2p0 vim-7.2.190p1-no_x11 unzip
sudo ln -sf /usr/local/bin/python2.6 /usr/bin/python
sudo ln -sf /usr/local/bin/python2.6-config /usr/bin/python-config
sudo ln -sf /usr/local/bin/pydoc2.6  /usr/bin/pydoc

Install Play Framework

cd /usr/local
sudo wget http://download.playframework.org/releases/play-1.0.zip
sudo unzip play-1.0.zip

Start your project

cd /var
sudo /usr/local/play-1.0/play new ourappname
sudo chown -R ourusername ourappname
cd ourappname
# Set java home -- you can set this permanently in /etc/login.conf or in a startup script
export JAVA_HOME="/usr/local/jre-1.7.0/"
/usr/local/play-1.0/play run

Done
Your test app is now listening on port 9000 of the systems IP. That is all there is to it. Make sure to check out the excellent documentation available for the Play Framework.

play

Tags: , ,

Python and real time graphical analysis

I have a camera which has a motor attached which I can rotate using a serial cable. I figured it would be fun to have this camera analyze the webcam shots and turn in any direction there was motion. I pulled out python and pygame, and created a prototype. Unfortunately, I can’t make python go very fast. I made two test cases, 1 in C and 1 in python, to figure out if it would be worthwhile to rewrite it:

array-speed-test.c

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>

void compare_arrays(int **screen1, int **screen2)
{
    int x;
    int y;
    int diff;
    int mult;

    for(x = 0; x < 1920; x++) {
        for(y = 0; y < 1080; y++)
        {
            mult = screen1[x][y] * screen2[x][y];
            diff = abs(screen1[x][y] - screen2[x][y]);
        }
    }
}

int main(int argc, char **argv)
{
    srand(time(NULL));
    printf("Generating arrays...\n");
    int **screen1;
    int **screen2;
    int i = 0;
    int j = 0;
    struct timeval now;
    struct timeval end;
    int usecs_passed;

    screen1 = malloc(1920 * sizeof(int *));
    screen2 = malloc(1920 * sizeof(int *));
    for(i = 0; i < 1920; i++)
    {
        screen1[i] = malloc(1080 * sizeof(int));
        screen2[i] = malloc(1080 * sizeof(int));
    }

    for(i = 0; i < 1920; i++)
    {
        for(j = 0; j < 1080; j++)
        {
            screen1[i][j] = rand() % 255;
            screen2[i][j] = rand() % 255;
        }
    }

    printf("Comparing arrays...\n");

    gettimeofday(&now, NULL);
    compare_arrays(screen1, screen2);
    gettimeofday(&end, NULL);

    usecs_passed = end.tv_usec - now.tv_usec;

    printf("Time passed: %dms\n", (usecs_passed / 1000));
    for(i = 0; i < 1920; i++)
    {
        free(screen1[i]);
        free(screen2[i]);
    }

    return 0;
}

And my python code:

array-speed-test.py

#!/usr/bin/python
import random
import time
from math import fabs

def generateArray():
    array_to_gen = [None] * 1920
    for i in range(0, 1920):
        array_to_gen[i] = [None] * 1080

    for x in range(0,1920):
        for y in range(0, 1080):
            array_to_gen[x][y] = random.randrange(0,255)

    return array_to_gen

def compareArrays(screen1, screen2):
    for x in range(0, 1920):
        for y in range(0, 1080):
            diff = fabs(screen1[x][y] - screen2[x][y])
            combo = screen1[x][y] * screen2[x][y]

if __name__ == "__main__":
    print "Generating arrays..."
    screen1 = generateArray()
    screen2 = generateArray()

    print "Created two screens.  Comparing..."
    startTime = time.time()
    compareArrays(screen1, screen2)
    print "Time taken: " + str((time.time() - startTime) * 1000) + "ms"

So far, the C program runs in 25ms, while the python program consistently takes 1100ms. Might have to ditch python for real time analysis, unless someone wants to point out how I am doing this completely wrong (I am assuming the comments will be use Numpy?)

Tags: , ,

Fedora 12 default package install policy

Just a quick note, if you don’t like Fedora 12’s policy, you probably don’t understand how systems today currently work.

This is much more secure, and you are able to disable it. If you are using systems in public, then there is much more you need to disable such as removable media automounting etc, and would not use default settings anyway.

The current way of throwing blanket root access out for any system change is inherently less secure, their change aims to only allow signed package and that 1 specific action to occur.

Yes you could make a collision, but if you can’t trust your package sources, you can’t trust your system as a whole, so the entire idea is moot.

Tags: , ,

5 Things I Have Learned About Corporations

When I was younger I would email successful people and ask how they got where they were, and how I could get there. Now I get paid to work with / on Linux, and figured I would share a few things. Age is a funny thing, and as much as I thought I knew when I was 18, 10 years later gives you a much better perspective.

  1. You can’t be a expert in every field
    My whole life I have been a “computer scientist”. That meant I ran pretty much every operating system, and tried to program in as many languages possible. However, in the professional world, your advice outside of your realm is seldomly used or even asked for. Even if it is technically correct, team x does not want to have team y telling them how to do their job. Swallow it up, not everything will go the way you want it.
  2. Communication is more important than technical expertise
    If you look through the ranks of a corporation, you will notice that seldomly does the most technicially proficient employee ever even get to the ‘C’ level (CTO, CIO etc). In smaller companies, being the expert is important because everything is riding on you. When your company has thousands of employees, communicating efficiently is worth much more. Learn how to talk to non-technical people.
  3. Your manager is always right
    Never be a martyr for a specific technical feature. If your company needs something done a specific way, and you are against it, politely state your position. If they are not interested, do it their way. If the manager was wrong, they will take heat for it. However, if you make a big issue about it, your manager is still the one at the end of the day who evaluates you on your performance review.
  4. Appearance matters
    You are selling a complete package to a corporation. It is important that your outward appearance is in line with the position you are going for. If there are two applicants of similar skill levels, the one who interviews that is well dressed and clean will get that position. First impressions count, especially during interviews.
  5. Everyone has their reasons
    No matter how bad you think a choice or decision was, everyone had a reason for doing it. They thought it out, they presented it, and weighed the factors that matter to them. It is very easy to point out how dumb you think something is, but likely you don’t have all the facts of the entire scenario. If you do have all the facts, calling them out on it won’t fix anything and will likely create resentment.

Tags: ,

Economics

If you were kind enough to argue with me on economics from my previous posts, http://www.aaronsw.com/weblog/keynes has a great piece on Keyne’s system, and how it applies to our current situation. Great read, and echos my previous blog posts in a more eloquent way.

Tags:

Ohio Linux Fest

I will be at Ohio Linux Fest all day Saturday, hope to see a lot of Ubuntu people there!

I am looking forward to “Python for Linux System Administration”, “Linux Boot Process”, “Introduction to GNOME 3.0″, “The Ubuntu Kernel”, “Understanding Debian” and “Building a Community Around Your Project”.

Should be a good time, official schedule is: http://www.ohiolinux.org/schedule.html

Tags: , ,

SLES / SLED 10 with Intel 965 Graphics

If you need to update your installation to work with Intel graphics, there is an RPM you can install that will likely resolve your issues:

http://download.opensuse.org/repositories/home:/mhopf:/hp/SLE_10/i586/intel-i810-xorg-x11-6.9.0.2-8.1.i586.rpm

Install that, then run Sax or edit xorg.conf, and make sure to pick the i810 driver. (This post is in response to the number of forum posts on this subject offering no solutions)

Tags: , , , ,