September 2005 Archives

This Is Why People Hate Unix Zealots

| | Comments (0) | TrackBacks (0)

More insane Interchange nonsense:

> Where can I find documentation for this ?

Doesn't exist. The beauty of Perl is, it's always self-documenting.

So the thing about Perl (for non-perlers) is that it can look really noisy. Even when you write something very straight-forward it has all of these $, @, and % hanging around. It's not pleasant. Because it's really easy to write something completely unintelligible once you've figured out regular expressions (20 points to the person who can tell me what this does: $a ~= /((a*b{33})+c?)?/) and the rest of perl's $a->{'foo'}[0]->{@gargargar} the Perl folks created a nice format called plain old documentation (or pod) that you can use as comments in your code and get a nicely formatted html or pdf document out of it. And if you do it even half-assedly there is at least something to go on.

Well the Interchange folks are so full of themselves that they don't need coherent documentation. They'll just use the code! And if using one hard to parse language wasn't enough they decided to invent their own horrid macro language that is also undocumented.

And so I'm spinning my wheels reading their undocumented system and trying to debug why their new version is not giving me the right answer when it does do the right thing on this other machine running the old version. This is even more difficult since the program gives unusable diagnostics, and requires a human blood sacrifice every tenth transaction.

I just want to get this done and paid.


INT- Kitchen Evening

| | Comments (0) | TrackBacks (0)

Sam pounds head against table.

Shannon: Not going well?

Sam: Whoever wrote this program has lost his soul and it is being tortured by satan.

Shannon: The Pope has issued new rules on exorcism.

Fin


From the Mind of Joss Whedon

| | Comments (0) | TrackBacks (0)

Interview with Joss Whedon who is working on the new Wonder Woman movie. So new he's still writing the script. Also I would like to see Batman take Buffy on as the new Robin. Just sayin'.

http://www.comicbookmovie.com/news/articles/2315.asp


Sparkly

| | Comments (0) | TrackBacks (0)

Shannon got her ring back from the jewelers today. She is sitting at her computer and every so often the glimmer of her ring catches her eyes. Then she moves her hand around and looks at it. It's real cute.


PyBlosxom hurts

| | Comments (0) | TrackBacks (0)

Every once and a while PyBlosxom goes on a bender and the site 500s out. Guess that's what I get for writing plugins that don't check exceptions.

Gar.


Engaged

| | Comments (0) | TrackBacks (0)

Oh yeah, in case you didn't hear I got engaged last Friday. Yay me! Yay Shannon!

RING!

Aren't my hands tender and pretty.


More filtering

| | Comments (0) | TrackBacks (0)

Here's an easy way to turn a two argument bash script into a filter. It needs to be invoked like io_assignment IN $1 $2. The DEFAULT option is for setting what the default behavior is with only one argument. Sticking this into a library is probably recommended (hrm, this may be harder than it sounds as bash doesn't appear to respect variables set in a function in an included file.)

io_assignment () {
    DEFAULT="$1"
    shift
    case "$#" in
      0) IN_FILE="/dev/stdin"
         OUT_FILE="/dev/stdout"
         ;;
      1) case DEFAULT in
             IN) IN_FILE="$1"
                 OUT_FILE="/dev/stdout"
                 ;;
             OUT) IN_FILE="/dev/stdin"
                  OUT_FILE="$1"
                 ;;
         esac
         ;;
      2) IN_FILE="$1"
         OUT_FILE="$2"
         ;;
    esac
}

Also shell seems to be capable of allowing you to write code that needs a million error checks which I have not done.


Filters and Code Repetition

| | Comments (0) | TrackBacks (0)

Some notes for my own, and possibly your, reference:

If you write code that takes an input file and an output file on the command line, you should make it act as a filter taking either - as an input or output file, or just operating in the abscence of these command line arguments. (Obviously some things, I'm thinking cp here, are silly to have as a filter.)

Also if you're using a Makefile for something you shouldn't try to autogenerate whatever the output file name is in your make invoked code. Let make do this since it generally has to anyway to find a target file name.


About this Archive

This page is an archive of entries from September 2005 listed from newest to oldest.

August 2005 is the previous archive.

October 2005 is the next archive.

Find recent content on the main index or look in the archives to find all content.

February 2008

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29  

Pages

Powered by Movable Type 4.1