Mike Schaeffer's Weblog
Sun, 27 Feb 2005
Jef Raskin
Reading Slashdot today, I heard that Jef Raskin has passed away from cancer. If you don't know who Jef is, it's safe to say that you have been influenced by his ideas if you're reading this blog.

Dr. Raskin was one of the first human interface experts to contribute to and be involved in the Apple Macintosh. computer. While it's true that the design took a different direction from some of his initial ideas, he played a major role in defining the user interface ethic of the Macintosh, and consequently basically every other major computer interface.

After leaving Apple, Jef went on to continue his ideas with the SwyftCard and Canon Cat. The best articulation I've seen of his ideas regarding interface design is in his book, The Humane Interface. He has also put a great deal of his work on his personal website.

This is a sad day, indeed.

reddit this! Digg Me!

[/tech/general] permanent link

Tue, 22 Feb 2005
Larry Osterman on Concurrency
Larry Osterman has been running a nice series of posts on issues related to thread synchronization and concurrncy related issues. It's been full of useful tips and tricks, I particularly like part 2, Avoiding the Issue. That's a technique that's worked well for me in the multithreaded systems I've worked on. Of course, if you're writing SQL Server, etc. I'm sure you can't take nearly as simple an approach.

reddit this! Digg Me!

[/tech/general] permanent link

Blosxom, Annotated
Frank Hecker, in an effort to teach himself more about Blosxom has done a cool thing. He has taken the source for Blosxom and annotated it with extra comments to describe what it's doing each step of the way. I don't know if I'll ever use the knowledge to hack Blosxom, but it's still good reading.

reddit this! Digg Me!

[/tech/this_blog] permanent link

Programming Well: Embrace Idempotence, Part 1
There's a good definition of the word idempotent over on Dictinoary.com. In a nutshell, the word is used to describe mathematical functions that satisfy the relationship f(x)=f(f(x)): functions for which repeated applications produce the same result as the first. For functions that satisfy this condition, you can rest assured that you can apply the function as many times as you like, get the expected result, and not screw anything up if you apply it more times than you absolutely need. This turns out to be a useful concept for people developing software systems.

One of the most common examples of this is in C-style include files. It's common practice to write code like this, to guard against multiple inclusions:

#ifndef __HEADER_FILE_GUARD
#define __HEADER_FILE_GUARD

// ... declarations go here...

#endif __HEADER_FILE_GUARD


This idiomatic C code protects the include file against multiple inclusions. Include files with this style of guard can be included as many times as you like with no ill effect.

The benefit to this is that it basically changes the meaning of the code #include <foo.h> from "Include these declarations" to "Ensure that these declarations have been made". That's a much safer kind of statement to make since it delgates the whole issue of multiple inclusions to a simple piece of automated logic.

Of course, this is pretty commonplace. More is to come...

reddit this! Digg Me!

[/tech/programming/idempotence] permanent link

Wed, 16 Feb 2005
The Portland Pattern Repository
A year or two ago, I started noticing a disproportionate number of my programming queries on Google ended up at www.c2.com. A little exploration showed the web server to be the host of the Portland Pattern Repository, the original Wiki, and dedicated to software engineering related topics (for the most part). The site is highly worth spending some time reading.

reddit this! Digg Me!

[/tech/general] permanent link

Joel is Right
Jon Galloway recently posted a set of six counterarguments to Joel Spolsky's assertation that Computer Science college students should not learn C. I take issue with all six of Jon's arguments, but my core arguments boil down to these two points:

  • An understanding of C, and the issues it raises, is essential to programming well in higher level environments.
  • Interesting and useful work is still being done in C.

    Now, speaking to Jon's particular issues

    1. It's not a skill you'll use in most of the software development jobs you'd want to have

    ...here are the kind of things you might use C for these days - writing some kind of device driver, maintaining extremely old applications, embeded development on very limited hardware, or maybe writing an operating system or compiler or something. I guess you could like hack away on the Linux (or is that GNU-Linux) kernel....

    Having done this work for seven years (and enough of IT-style work to know the difference), this is some of the most interesting stuff you can do with a computer science education. In C, I've developed two programming languages, an object oriented framework for distributed real-time process control applications, a bunch of objects using that framework, and yes, my share of device drivers and RTOS extensions. It's been interesing and deep technical work, despite the fact that is was wrapped in a plain, C wrapper.

    "...Consider this though - you're not really going to be solving any new problems...."

    Not much commercial software work involves solving truly new technical problemss. If you really want that, pick a problem to solve, get your Ph.D. and enter a research environment.

    Otherwise, there are still plenty of interesting systems to build and lots of deep thinking to do in commercial software development, Some of those jobs require C. Even more of those jobs require a mastery of the skills that C requires you to have and develop.

    "...If you want to do web development, database development, desktop applications - you know, stuff you can talk about at a party - you're probably not going to be working in C....

    This is a wierd argument... I'm not sure why this is stuff that's more suitable for small talk at a party than any other programming work. All of it seems equally bad, actually. In any event, do you really want to choose your career (>=40 hours a week for years) based on what plays well at a party?

    2. It can give you a false sense of control

    "...Worse still is that it can make you think that programming is about telling the computer what to do with its registers and memory. ..."

    At it's core, that is exactly what programming is about: telling a computer how to accomplish useful tasks in a language/vocabulary it can understand (i.e. bits/bytes, registers, memory, etc.). It's nice to build abstractions atop that so we don't have to think about moving bytes around, but if those abstractions ever leak, you will have to know why to effectively deliver software.

    3. It can teach you to get in the way

    "... If all you learned from C is that you are the boss, you will most certainly write code that plays poorly with others..."

    This is probably true, particularly if you treat other languages like they were C.

    The power of learning C is that it forces you to take control. To programm effectively in C, you have to understand how higher level constructs like strings, objects, processes, etc. map down to the basic concepts supported You have to explicitly think about every memory allocation, where the storage is allocated, and whem the memory gets freed. You have to think about when values are passed by reference, and by value. Compared to Java and C#, you have to think about a lot of things that, in the modern world, seem like low-level trivia.

    This is the whole point. Even if you never touch C again, the language you do end up using has to solve exactly these problems. And it likely does it, via some mechanism like garbage collection, that imposes its own costs and constraints. If you don't understand these low-level mechanisms, and the constraints they impose, you can't be considered a fluent programmer in whatever language you use. This is true for the same reason that, when I went to school, around 1994, I had to learn Motorola 68000 assembler code. I've never written 68K assembler commercially, but that coursework made it crystal clear what various high level language constructions cost.

    4. It can make it hard for you to love famework based development

    "...To be productive as a programmer these days, you either need to be learning to get the most out of existing frameworks or helping to build tomorrow's frameworks. ..."

    It's possible to build frameworks in C, as well as to use them. One of Jon's framework examples, Gtk, is written in C. The Gimp is an example of an application that is written in C, and based on GTK. There are plenty of other examples of C-based framework development.

    5. It can teach you philosophies which will prevent you from really understanding modern programming

    It teaches the philosophies on which modern programming is built. BAsically all modern OS's are built in C, at the core. Basically all commercial run-time environments are built in C, at the core. Lower-level still, modern CPU's and ISA's evolved in a time when C was king, and are well suited to running compiled C code.

    6. It can teach you divert your problems from the real challenges of software engineering

    "...The point is, today's software development environment is dynamic, evolving, and extremely challenging. If you're going to be of help, you need to do something more productive with your time than learn a 20 year old language..."

    If you're going to be of help, you can do things more productive with your time than encouraging people not to learn about the core aspects of their profession.

    I'll be the first to admit that you can get away with never programming professionally in C, but your programming will ultimately suffer for not knowing it.



    reddit this! Digg Me!
  • [/tech/general] permanent link

    Wed, 09 Feb 2005
    ./blosxom.cgi: 444 lines, 16674 characters.
    I've spent a little time doing some things to tweak Bloxsom so that it fits better into my website. So far, I've:

  • Changed the html flavour to refer to my CSS file and use it correctly.
  • Set up a simple hierarchy of post topics.
  • Gotten static rendering working (as a test, it's not in use now.)

    None of this is all that earth shattering, but it was all trivial to do in Bloxsom. For a one-file, 16K Perl script, Bloxsom brings a lot to the table.

    Next on the adgenda is getting a web form set up for posting and hopefully editing blog posts, and then setting up a web-based way to upload images into the blog. My current workflow for posting to the blog involves two levels of nested SSH logins and the use of vi. *shudder*.

    reddit this! Digg Me!

  • [/tech/this_blog] permanent link

    Tue, 08 Feb 2005
    A couple Lisp/Programming Language Blogs
    One interest of mine is programming languages, and more specifically, Lisp and Scheme. Lately, the blogosphere has produced a couple interesting blogs that tie to this interest:

  • Lambda the Ultimate
  • Planet Lisp

    Planet Lisp aggregates a bunch of Lisp-related blogs, while LtU is more general and more of a discussion site.

    Related, I came to LtU via Eric Lippert's Blog over on Weblogs @ASP.Net. Eric is a developer at Microsoft who's done a lot of work on Windows scripting and the Windows script languages.

    reddit this! Digg Me!

  • [/tech/lisp] permanent link

    vCalc
    vCalc is the other side project I have going on right now. It's a simple RPN style calculator written for Win32. Underlying vCalc is a Scheme interpreter that I talk about a little here. The ultimate goal for vCalc is to have a calculator that can be easily extended with Scheme functions, in addition to the keystroke sequences you might expect. As it turns out, there are a lot of interesting problems that crop up trying to make this work right. I hope to blog more on this in the future.

    Like Noisemaker, vCalc is shareware available through IceGiant.



    reddit this! Digg Me!

    [/tech/ectworks/vcalc] permanent link

    Noisemaker
    One of my side projects is a little tool called Noisemaker. NoiseMaker is a utility that runs in the background and generates white noise over the computer's speakers to mask out distractions like the TV, phone, annoying co-workers, etc... If you need it, you need it badly...

    It's available as a shareware program at Icegiant Software

    reddit this! Digg Me!

    [/tech/ectworks/noisemaker] permanent link

    First Post
    Welcome to my little blog. This is the first post.

    It took a while, but I decided to base the thing on Blosxom. Nice and simple...

    reddit this! Digg Me!

    [] permanent link