Front Porch

Jaq spent a bit of time this weekend (while I was at the Greenhill Road Touch Fields) emptying out the planter boxes on the front porch, sealing the post that supports the roof, and then we filled the gaps with concrete. Then, we planted some plants! A heap of Snake Plants (Sansevieria trifasciata)__, and a couple of Agave (Agave attenuata). They were all plants we had from the old house, and they look great.

Dsc00008-2 Dsc00009 Dsc00014-1 Dsc00012

State Touch Trials

This weekend was the SASSSA/TouchSA Touch trials. I coach the 15s Girls’ team, and we had a great turnout again. More than 40 girls, with most of those of an extremely high standard. We’ve selected a squad of 20 girls who I’ll train over the next month or so, before choosing my final team of 14 and shadows. I’m looking forward to the trip to Darwin in mid-September…

Notification from AppleScript Studio

Christoph asked me for some advice on how to get notification on iTunes track changes in a comment, I said I would write a bit of a tutorial on how I got it to work. First thing was to create an AppleScript Studio program - you will need to have the Developer Tools installed for this. Now, open the main.m file. It should look something like the following:

    #import <mach-o/dyld.h>
        
    extern int _NSApplicationMain_(int argc, const char *argv[]);
        
    int main(int argc, const char *argv[])
    {
        if (NSIsSymbolNameDefined("_ASKInitialize"))
        {
        NSSymbol *symbol = NSLookupAndBindSymbol("_ASKInitialize");
        if (symbol)
        {
        void (*initializeASKFunc)(void) = NSAddressOfSymbol(symbol);
            if (initializeASKFunc)
        {
        initializeASKFunc();
        }
        }
        }
        
    return _NSApplicationMain_(argc, argv);
    }

The file needs to have the following elements. At the start, the following imports are required:

    #import <Foundation/NSDistributedNotificationCenter.h>
    #import <Foundation/NSString.h>
    #import <AppKit/NSAppleScriptExtensions.h>

This should be all of the imports that are required - although I also had stdio.h for a while for testing. After the declaration of the NSApplicationMain, I put the following in:

    @interface iTunesConnection : NSObject
     - (id) init;
    @end
    
    @implementation iTunesConnection
     - (id) init {
        NSDistributedNotificationCenter *nc = [NSDistributedNotificationCenter defaultCenter];
        [nc addObserver:self
               selector:@selector(updateNow:)
                   name:@"com.apple.iTunes.playerInfo"
                 object:nil];
    
        return self;
    }
    
     - (void) updateNow:(NSNotification *)notification {
        NSString *updateScript = [NSString stringWithFormat:@"tell application \nend tell"];
        NSAppleScript *as = [[[NSAppleScript alloc] initWithSource:updateScript] autorelease];
        [as executeAndReturnError:nil];
    }    
    @end

Copy and paste the stuff above - there is some that goes over the line in my browser, but it’s all there if you drag out the selection. You may need to change a couple of things depending on what you want to do. For instance, the @"tell application \nend tell" section needs to be the applescript code that is run whenever a new iTunes track is started, or iTunes is paused. You could fit the entire application into this place, but what I did was have a hidden button that this script “presses”, triggering the update process. Finally, I added the following declaration just after the first brace in the main function declaration:

    iTunesConnection *connection;
    connection = [[iTunesConnection **alloc**] init];

This gets everything running. I would suggest putting the following into the applescript string to test it and see that it works:

    @"tell application \"Finder\"\ndisplay dialog \"iTunes Changed\"\nend tell"

You need to have \" whenever your script would have a ", and \n wherever it would have a newline.

RSS icons as CSS code.

I found a few sites around that give instructions on how to use CSS code to create those classy RSS icons. Using CSS is good for a couple of reasons - if you decide to change the style you only need to do it once, even if the code was used in a post, or page, not just a template. Secondly, some people live some of their life behind crappy corporate firewalls that block images from certain sources, and people using text-only browsers, or using text-to-speech features, will still be able to view what it was you intended them to see. This is what I have in my stylesheet:

    .rss
    {
        color:#FFFFFF;
        background-color:#FF6600;
        border-color:#FF6600;
        border-style:outset;
        text-decoration:none;
        margin:2em 0em 0em 0em;
        padding:0em 0.5em 0em 0.5em;
        border-width:1px;
        font-family:Arial;
        font-size:0.8em;
    }
    .rss:hover
    {
        background-color:#FF9900;
    }
    .rss:active
    {
        border-style:inset;
    }

Then, whenever or wherever you have a link that needs to look like an RSS button, just use class="rss" inside the a tag, and it will look classy! It is also possible to format a whole paragraph using a p tag with the class="rss". If it doesn’t work, then it’s likely that another CSS statement is vying with the class tag for precedence - for instance if your links are inside the sidebar, as part of a list, then the list, sidebar and a tags from the CSS may take precedence. In my case, removing the links from the list item (leaving them in the unordered list to keep positioning) fixed the problem. Note: I was originally using #rss in the stylesheet, and id="rss" in the pages, but should have been using .rss and class="rss" to be more compatible. The one I was using is intended that each tag appears only once in a document, I think.

More PostSecret Gems.

PostSecret. Gotta Love It. Absent

The Lord's Prayer

If you’ve been to church, you probably heard the Lord’s Prayer. If you go every week (I don’t, something about having to believe in God keeps me away), it might be beginning to sound like a broken record. Brokenrecord Okay, poor joke. I found this on the way to school yesterday morning, and it made me laugh. Perry Como is actually quite a good artist, other than in this case… Magic Moments • The Look Of Love: The Burt Bacharach CollectionPerry Como

I'm a CSS Star! (Almost)

I’ve played around with CSS for the last couple of hours, and have finally got my RSS/RDF links to be rendered like icons (with a border and so on). It took me ages to figure it out, but I was only able to change the background colour, until I removed the <li> tags from the links - that was overriding the ability to change border and text colour. I then spent a couple more hours trying to make the same thing happen for the Search and Post Comment buttons, before discovering that Safari, and Camino, don’t support changing the look of form buttons. And I’m not going to bear using IE to test it under…I’ll live with the images I’ve made (for now). What would be cool is to make all of the elements of Connections work in CSS - like the top and bottom bits of the sidebar boxes, and so forth. Well, the bits than can be made by CSS, anyway.

Fighting Cats

Stupid cats fightin’ outside our window again. Seems to be happening most nights now. I went outside, and they were literally right outside the bedroom window. If it gets to be a problem, I may have to kill them. Seriously, when I went out with the torch, they just stopped, mid fight, like schoolkids. And walked away. “We weren’t doing anything, sir.” (I’ve disabled Trackbacks & Pingbacks on this post, it has been getting hammered lately.)

Revenge of the Sith

We went and saw Revenge of the Sith last night, at the Capri Cinema, on Goodwood Road. I’ll begin by saying how cool that building is! Built in 1940, most of it is still the original, or near to it, and I love it. A shame I can’t say the same about the film. To be fair, about one minute into the film, I was already hating it, but that was because of the dickhead sitting about 3 seats across from me. Before the movie had even started, he was laughing a stupid, high pitched, inane laugh at things that weren’t funny. Initially, I thought “hey, this guy has just had his mate tell him a really funny joke”, as it was in one of the little ads at the start that weren’t remotely funny. Then, when the movie began, and he laughed at everything (like each time young jedi were called “younglings”). It made me uncomfortable, and also made me not want to laugh at anything in the film, for fear of being like him. You should be allowed to kill people for this sort of thing. (I must say, at one stage I turned to Jaq and said “Maybe he’s retarded”. But retarded people aren’t this bad…) So the film began, and like many people have said, it was pretty slow. Sure, the initial battle scene was intense, but it was kind of repetitive. The original trilogy had short combat scenes, sandwiched between sections of real plot and character development. Oh, and real acting, too. None of this wooden bullshit that Hayden Christiansen seems to only be capable of. Maybe it’s just too hard to act in front of a blue screen. My biggest hassle (and I saw it coming, as soon as they had R2-D2 and C-3PO in Episode 1) was the need to prepare everything for A New Hope. Tying up all of the little loose ends so that it flowed seamlessly from one movie to the next. Except it didn’t.

  • R2-D2 obviously still knew about who everyone was - didn’t he ever try to tell C-3PO anything? (Or maybe just Threepio can’t listen…)
  • Can’t R2-D2 still fly? This one had come up on other websites, but I’m sure Captain Antilles would have treated him pretty well.
  • Obi-Wan about Leia from her moment of birth. How convenient he forgot about her until Return of the Jedi.
  • The Death Star took, what 18 years to build? How long did it take them to build number 2? Two years? I guess all of the tradesmen who built it figured out shortcuts on how to make it faster the second time around.
  • Leia somehow remembers what her mother looked like: “My real Mother that is. She died when I was very young.” Yes, Leia, she couldn’t have died when you were much younger, else you would surely have died too. Fact: Babies can’t focus properly, let alone see and recognise, let alone form memories. I think maybe Leia was a victim of some Psychoanalyst, and created some false memories. Was she assaulted by her father too?

And I think that Anakin took out all of the Jedi way to quickly. My thoughts oh how it should have gone: (Just put the Episode 1 Music on to get me in the mood).

Anakin discovers that Palpatine is Darth Sidious. He tells Mace Windu, who believes he is capable of defeating Sidious, so tries to do it alone. (Like the film). Anakin bursts in, and kills Windu, like in the film, but he and Sidious do not tell anyone, nor does “Order 66” get transmitted. Instead, Sidious uses his power over Anakin to get him to kill other Jedi on the sly. While still remaining on the Jedi Council, and pretending to be good.

This goes on for some time (years?), as the war continues, and the number of the Jedi fall. Some tricky work by Sidious and Vader make the populace turn against the Jedi, and then they are called traitors. The Council is exiled, many more Jedi killed in the resulting months. Anakin flees with the Jedi, at Sidious’s insistence, so they can still find the Jedi.

Finally, it all comes to a head, and Anakin takes on Obi-Wan, resulting in his disfigurement. I didn’t mind the bit about how he thought he had killed Padme. But, make it so Obi-Wan doesn’t know about the birth of the twins, only Luke. Obi-Wan thinks he has killed Anakin, but figures out that he is Vader, and hides Luke on Tatooine, knowing that Vader is unlikely to go back there.

Oh, and I’ll take my time machine and go back and remake Episodes 1 & 2, and remove any reference to the droids, or anyone other than Obi-Wan, Yoda, Vader and the Emperor from the original trilogy. No Chewbacca, no Captain Antilles, I guess we’d better have the Lars’ family though. Fuck me George Lucas, why didn’t you include Han Solo’s father in this movie? From what I’d read about the Star Wars universe, the defeat of the Jedi took some time to occur, not overnight. And having them in exile makes it easier for some of them (Obi-Wan, Yoda, perhaps some others?) to slip through Vader’s initial net. There is no reason that Jedi are not still being hunted until just before A New Hope. Actually, I did have a thought for my NaNoWriMo novel this year - a rewrite of Episode 3. The more I think of it, I might rewrite all of the new trilogy. Yeah! Star Wars the way I want it to be. (And maybe I’ll finish my NaNoWriMo novel this time…)

Images other than inline.

000 0020 Is it possible to have images not inline in ecto - that is, spanning more than one line? In short, no. To do it like this page is, you’ll need to hand edit the HTML code (which almost removes the beauty of ecto), and put in a table. Just placing the photo and text inside a <table>, and <tr>, but with the image in one <td>, and the text in another <td> will do it. Update: A better method can be found at Using CSS to replace Tables.