Archive for the ‘Code’ Category

Microsoft still doesn’t get open source

Friday, May 30th, 2008

Ray Ozzie – Microsofts’ new head technologist, says open source is more disruptive to Microsoft’s business than Google:

He’s right about that, but wrong about everything else. It’s shocking that people at Microsoft are still so clueless about the open source economy.

Ray states that open source developers don’t have to answer to share holders like Google employees are. He’s wrong – most open source software is developed by employees of IBM, Red Hat, Novell, etc. – all publicly held companies.

He also impies open-source development is wasteful because there’s no way to pay developers for it. I seem to recall getting a regular paycheck for the last couple of years. BTW, Ray can send me a extra check any time.

These misconceptions are born out of the myth of open-source being done by unpaid geeks in their parents’ basements. The best way to think about open source in business is as co-operation between corporations to share development costs. It’s nothing more, and nothing less.

Microsoft Helps Kids Learn about IP Law

Thursday, February 14th, 2008

Microsoft has sponsored MyBytes.com – a site to teach kids about IP law. Ostensibly it’s a site for letting those youngsters trade ring tones and the like, but really its mission is to spell out the dangers of stealing IP, pointing out that you can go to jail, etc.

The really funny part – when you sign up, you have to agree to a TOU that gives Microsoft rights to distribute your submissions. In other words, “Don’t steal from us, let us take your stuff for free instead!”

Very educational, assuming they teach kids to read the TOU before agreeing.

A fun fact: My internet startup was the original owner of the mybytes.com domain,and we built a virtual community site for college students. This was dead by late 2000, and it looks like the domain has had various squatters own it since then.

More via Slashdot

A PC My Mom Could Use?

Wednesday, November 28th, 2007

My mom has run PCs nearly as long as they’ve been around. She worked as an administrator during the transition from stenography and typing to the first desktop computers in the 80’s. You would think that as we approach the 30 year mark, she’d have a computer that was vastly improved over the ones she started with. Sadly, the her latest computer is essentially useless to her.

Sure, her new computer is a couple orders of magnitude faster (in computer terms), and bigger (in computer terms), and it does stuff with sound and video not possible in the 80s. But none of this is usable in the plainest sense.

On to the specifics. Her last computer was about five years old, a Dell running Windows XP. After it’s unsuccessful battle a couple of years ago with the cancer of spyware and malware, I rebuilt the system
with a new disk and install of Windows XP. I had uninstalled Internet Explorer, and replaced it with Firefox. I set up Thunderbird as her mailer. This strategy kept it mostly free of infection. But she got a Zune (another usability nightmare for another post), and the Zune application was the last straw, so we ordered her a new Dell desktop.

We specified Windows XP as the OS, not Vista. The hardware is really nice, but came loaded with all manner of crapware. On first boot, dialog after dialog appear with dire consequences depicted in red ink about allowing/disallowing things and updating subscriptions. My first task setting it up was to get the old system accessable via Windows Networking. This is essentially impossible with the “anti-virus” and “firewall” crapware the new machine came with. So I uninstalled every last red-text shouting piece of crapware on the thing, and finally, it was working, and I could transfer data across the machines.

There is no way my mom could have done this herself. Keep in mind, she’s not a new computer user. How any non-professional uses these machines is beyond me, and a miracle of human perseverance. My first computer was a Mac SE (1987-ish), and I’m certain this process would have been nearly painless then, though a bit more limited (no LAN!). I’d have rather had my mom buy a new Mac, and kind of wish I’d pushed her in that direction, though modern Macs are much more complicated then they were 20 years ago.

So, are personal computers really useful? It seems to me, that they work pretty well for novice users. My mom’s new Dell with Windows XP would not have been too bad with out the file transfer issues and such that a new user would not have faced. And expert users get annoyed and post about it, but can get the machine into a useful state. It’s the intermediate users that are completely lost – they need to step outside the new-user scenareos, but the OS is too complex to support this without extensive experience and training.

Finally, Microsoft has painted itself into a corner, but shipping a vulnerable OS that requires separate security software, then building a monopoly such that they can never fix it with out running afoul of anti-trust issues. It must suck to be them (and their customers).

Personal Data Archive

Wednesday, October 24th, 2007

My data is organized pretty much like my physical property: poorly. I have various current data across a handful of computers and this server. I have numerous backup media floating around the house. So, I have this idea to fix it: Create a universal directory hierachy for all my personal data, then use technology to manage copies and archival. I need to design the hierachy, then use tools to implement it, with rsync my likely choice.

Here’s my wish list/requirements:

1) The hierarchy should support syncing useful subsets of data onto individual computers.
2) The data includes all types of electronic media my photo library, DV home movies, music projects, purchased music, files, e-mail archives.
3) Current size of the archive is roughly 100GB – I expect it to double every few years.
4) Important access paths: by creation/modification date, by file type, by application, by role (work, hobbyist, dad, household financer).
5) I should be able to automate backups via cron and rsync and related tools, daily deltas to redundant hard disks, monthly deltas to optical media.

Python Introspection – Finding Subclasses and Creating Instances

Tuesday, March 20th, 2007

I have a system I work on where there’s a base class, called Test, which is subclassed to create specific tests. I’d like this system to be able to find the tests given a directory structure. My idea was to write some code that looked for python modules, imported them, and looked for subclasses.

This turned out to be tricky – and I didn’t find a similar example, so I thought I’d write it up.

Finding the Files
I used os.walk to walk the supplied directory, then used re to filter the result down to python files:

 pythonFile = re.compile("\.py$", re.IGNORECASE)
        for (root,dirs,files) in os.walk(self.testDirectory):
            files = filter(pythonFile.search, files)
            for file in files:

Import the Modules
For each file, I had to update the path, and import the module using the function __import__:

                moduleName = file.split(".")[0]
                sys.path.append(root)
                module = __import__(moduleName)

Find the Test Subclasses
For each module, I needed to look for classes that were subclasses of my Test class, but not the Test class itself. If found, I instantiate the class to get a Test object:

             for thing in dir(module):
                    testClass = getattr(module, thing)
                    if testClass != Test and isinstance(testClass, types.ClassType) and issubclass(testClass, Test):
                        test = testClass()

Given the test object, I can call methods or what ever with it.

iHate you iPhoto

Thursday, January 4th, 2007

I’ve been using iPhoto for a while now, and at first it seemed OK, but the more I try and do with it, the more problems I run into. I think there are some basic lessons about usability and design that come up with iPhoto, and perhaps other OSX applications.

At face value, Apple’s design seems first rate. Things are clear, clean, and general do what you need and expect. But soon problems become apparent, and seemingy insoveable. My theory is that Apple’s design methodology is very strongly based on use-case scenareos. This leads to designs that work well for the intended scenareos, but fall apart out side of these intended use cases.

A contrasting design approach is based on models and tools – a model of the problem space, and a set of general tools for working in the problem space. The downside to models is that specific use cases and/or tasks may be a bit awkward, and it may take a while for users to learn the model, and put together a plan for using the tools.

On to specifics.

I use a Canon digital SLR, and I shoot pictures in RAW format, which postpones decision-making about image handling so that I can edit the pictures, adjusting color temperature, exposure, etc. with out the losses attendant to jpeg formats and lossy compression.

When I connect my camera to the Mac, importing the pictures is easy enough, and they show up in the iPhoto browser. The first problem becomes apparent. iPhoto automatically converts them to JPEG images, messing up color temperature, particularly on indoor shots, and the applies too much compression.

It becomes clear that I need to use an external editor that can handle RAW to JPEG conversion, so I decide to use Photoshop. Out of the gate, there is no clear way to do this in the UI. Some web searches and browsing settings reveal that you can set iPhoto to use an external tool for handling RAW images. This setting had no effect that I could decern. Another setting was to use an external editor for all pictures. This one worked, in that I could double-click an image in iPhoto’s browser,and it would open the photo in Photoshop.

After processing the RAW image (Photoshop’s defaults seemed pretty nice), I need to Save-As to a JPEG, but where to save it to? If I save it into the folder that the RAW image came from. iPhoto can’t see it. It seems (again, via some web searching) that you need to import the JPEGs back into iPhoto.

This seems pretty awkward, but the worst thing is that the imported JPEGs are filed by the date they were imported, NOT the date the picture was taken, and also, the JPEG versions are put in their own “roll”.

Did any of that make sense? No, of course not. Is a picture a file? Is file produced from a picture? What is the model? Why has iPhoto imposed some sort of database metaphore (import/export commands) when the files are stored on the file system? How can tools like Photoshop that are file-based hope to make sense of iPhoto’s database?

It’s clear to me that my use case wasn’t on the list when iPhoto was designed. Even ignoring fiddling around with RAW, the work process would generally be like this:

1) transfer photos from camera to computer

2) review photos, select good ones

3) edit some photos

4) publish photos (to web, or prints, or album, etc)

iPhoto nominally supports this workflow, so long as you don’t use external tools. Basically, iPhoto does not play with other applications.

Why has Apple been around for 20 years developing a general purpose computing appliance, only to conclude this history with the construction of closed applications that use screwy database designs instead of document metaphore and the file system?

If Apple wants to be the standard for easy, accessable media computing, what is the justification for dumbing down applications to a wizard collection only useful to beginners? There is a way to build an application like iPhoto that uses a model for photography and it’s work process, but it should be useful for some range of users – beginners are only beginners in the beginning.
So, I’m dumping iPhoto and going back to – Digikam and GIMP.