Skip to content
Peter M Howard (Contact Options) ::

Peter Howard is Wintermute, mythologist

The site of a film student and geek from Sydney, Australia. Most of the content on the site is arranged under ?bits, which you can navigate by post, month, or category. You may want to subscribe to the Atom feed.

wintermute :: bits

September2005

You are currently viewing bits entries by month. You can browse through months by time, or click on a directLink or category to switch to individual entries.

« August2005 :: October2005 »

Search Terms half-working

Some more search terms; first the bizarre: “medieval photos of people” (that gets top points; I hope they found some eventually!), “advance quantitative method coding” (what’s that?)

But also some signs that the search engines are getting the hang of my site; people found me looking for: “peter howard photos” (though maybe not what they expected), “wintermute” (again, probably unexpected), “the difference between local and foreign movie” and “french films vs american film industry” (my ‘first impressions’ article on that topic).

let's go out tonight

Amarok screenshot :: playing Craig Armstrong's Rise

Amarok tells me I’ve played this CD 26 times in the two days I’ve had it. And that I last played this song nearly an hour ago (the length of the album). I’ve basically had it on non-stop the last couple days.

Craig Armstrong’s The Space Between Us is beautiful… A little old now, but I’ve kept my eye out for his work ever since Moulin Rouge; found this CD going relatively cheap. It could be described as ‘orchestral’; in many ways it’s like Rob Dougan’s softer stuff (family will know what I’m talking about ‘cause I played the CD all the time!). And the CD is one of those ones that remind you why we still buy CDs instead of downloading individual songs — amazingly constructed. Track 7 of 12 is Balcony Scene (from Romeo and Juliet), a song I’d not normally listen to, but it cuts the album in half brilliantly, before the climactic Rise. Then it calms down again — the final 7 or 8 minutes of the album not a lot happens, sounds waft in and out as the piano plays.

Converting Relative to Absolute links in PHP (preg_replace)

It took a while, but I managed to get my head around the Regex syntax to change relative links (in href or src attributes) to absolute ones (which I had to do for the RSS feed)… Requires the following line (in PHP):

$str=preg_replace('#(href|src)="([^:"]*)("|(?:(?:%20|\s|\+)[^"]*"))#','$1="http://wintermute.com.au/$2$3',$str);

Explanations, from left to right:

  • the preg_replace function returns a string (in this case; it could also return an array), I already had the contents I wanted in $str, and am returning back to it
  • preg_replace takes three arguments: find,replace,item
  • The find string appears complicated: it is housed between the ‘# … #’; Where there are characters outside of brackets it matches those exactly
  • Inside parentheses it finds a match and records it, the first match comes through as item $1, then $2, &c; (?:…) finds the match but doesn’t return an item
  • (href|src) means I’m searching for the href or src attribute, both of which often contain relative URIs
  • ([^:”]*) means I want to match any character that ISN’T a colon or a quotemark; I use the colon as it is always present in absolute URIs, which will fail the match at this stage and be passed over
  • The final bit gets messy, as on my site I have some relative links that use the colon; they only occur as part of a ‘postdate’, which I know contains a %20 or a space (or a +) prior to the timestamp. The pipe (|) acts as an ‘or’, so I’m checking for either a closing quote, or the presence of a space followed by any number of characters and a final closing quote. This allows any relative links to match even if (and as long as) there is a colon (after the space)
  • The second argument recomposes the component parts of the relative URI, argument $1 replaces the href|src part, then I string the website address; $2 is the midsection, leading up to either the final quote or a space; $3 is either the final quote or the space and the rest of the URI, including any stray colons and the final quote

It took me a while to find any information like this on the internet so I’m posting this hint here. There’s plenty on REGEX (a search on regex syntax will pick up lots), but I struggled to find anything on rewriting links in this context… It was also made more difficult by the timestamps using colons, but though ugly, the solution works elegantly.

Update: I’m seeing this entry get a lot of search engine hits, so in order that it might be a little more useful, I’m going to add some simplified code.

Still read the above section as it helps to get an idea of what’s going on, BUT, if you know that the relative link you’re rewriting has NO colons (:) in it, there’s a simpler piece of code you can use:

$str=preg_replace('#(href|src)="([^:"]*)(?:")#','$1="http://wintermute.com.au/$2"',$str);

Of course, if your relative link MAY have colons in it, and you know nothing about their position in the string, both these codes are useless. Further, any quotes (“) in a relative link MUST be encoded or the preg_replace string will stop processing. I have the whole end bit checking for spaces there because I KNOW that a space will occur before any colons in my own relative links. YMMV, and of course, I recommend testing the strings thoroughly before relying on it.

Update: Months later I’ve gone through and fixed my internal URIs to use a ‘+’ instead of a space, which wasn’t entirely proper; I updated the first string accordingly

Site Updates

Managed to recode the site’s PHP backend, and converted to XHTML1.1 while I was at it (and am pretty sure everything validates). There’s not a lot of difference at the frontend, the main thing is the way ?bits are handled.

  • The current ?bits title now appears as the page’s title: good for the browser and even better for search engines
  • ?bits can now be viewed in two main different ways (and further broken down): either by individual post or by a whole month.
  • If you call ?bits or ?bits=category it will display the most recent post, and give you navigation options back and forth through the selected category. Further, fine print at the bottom explains what you’re viewing
  • Update: the RSS feed now gets any links (hrefs or img srcs) with absolute URI info, so if I choose to stick any images in my posts they’ll be viewable in a feed reader too

Also uploaded a page to petermhoward.com/.net (which for now is a cheat and redirects to this site anyway) which contains my current contact details, and hopefully will always do so. The idea is that petermhoward.com is me, wintermute.com.au is this site I do… Check it out for a funky photo

The Game

Interesting article from Matt Baldwin on The Morning News. A series of three entitled Playing the Game. ‘The Game’ is an old social-gaming event, in this case it takes place over 32 hours. It’s an advanced scavenger-hunt, basically a string of puzzles, but with some interesting social elements and alternate reality narrative.

Winter, She Cometh

Sat in my room shivering this evening; then realised I had bare feet and short sleeves… There’ll be no doing that anymore.

Went out last night, closed the curtains just after eight, went out 20 minutes later; it was pitch black; that was unexpected.

Starbucks

After five weeks of travel through places with varying coffee standards, I’ve come to some new realisations about Starbucks. Previously, I would avoid Starbucks as a matter of principle. I’ve by no means become a Starbucks fan, but I’ve certainly modified my objections. It started way back in June, while travelling with family, when Dad stopped for coffee at Starbucks in London — I didn’t approve, but the coffee was drinkable, and as Dad pointed out: they use Fair Trade beans, if that makes things any better. I’m not sure they use FairTrade everywhere, but it’s a big thing in England so that was to be expected. Fast forward and I’m in Paris, haven’t had breakfast, am desperate for a coffee, and stumble across a Starbucks — I surrendered and went in.

But it was on this latest trip that things actually changed. On my last day in Cologne I had many hours to kill, a need for coffee, and was lugging my bags around with me; we hit a Starbucks. We stayed there for a couple of hours, drinking a couple cups of coffee while we were there. Sitting there after an hour, I realised the attraction of Starbucks in a foreign land — you know you’re going to get recognisable, drinkable coffee, you can sit in comfy armchairs all day without, in theory, being thrown out, you can use their clean bathrooms, and they have wifi and newspapers. Germany had been a change after France though, as there were cafés everywhere, and the coffee was quite good. But then I went to Spain, where coffee is at least drinkable, but comes as a standard ‘cafe con leche’, which is the same regardless of whether you’re at a bar or a café. While in the tourist traps in Barcelona, I knew I could rely on Starbucks. And then England. In Salisbury, where the café landscape is like that in Sydney, I drank at the smaller indy cafés, avoiding Starbucks wherever possible. But in the tourist traps in London, all the coffee places are the same — big chains everywhere, so I picked Starbucks.

When I return to Sydney, it’ll be back to the independents, but for now, if I’m in France but away from home, outside of one or two out-of-the-way cafés, it’ll be Starbucks for me.

Think You're Fighting Spam?

I found a link to ‘SpamPoison’ (.com) while browsing, and found it rather humourous. I’m not going to link to them here and perpetuate the myth, but you can type in their address yourself and take a look. The site claims to be fighting spam, by (and I haven’t tried confirming this yet) redirecting email harvesting robots to junk email lists — based on how a harvesting bot works, scouring a page for links, following them and ferreting away any email addresses for spam lists. But in reality, this site is just Spam itself — by having a wide range of sites all linking to it, it can fool search engine robots and Google Ads (of which it hosts a number) into thinking it’s an authority on ‘spam’.

Home Again

Finally made it home last night — just in time to get some essentials from the supermarket too. The flight wasn’t delayed which was a pleasant surprise (though we sat on the tarmac waiting for takeoff a little, we still got to Paris in time). David dropped me off at Heathrow on the way to work in the morning, meaning I was hours early for my flight (probably could have caught the earlier flight if I’d known it were possible). Sat in a coffee shop for ‘breakfast’, checked my bags in and went for ‘lunch’ in another. Getting out of Charles de Gaulle worked real easily; waited another half an hour for a train to Reims; made it home for dinner. I’d bought a few books a couple days earlier, including a rather trashy thriller-y thing for just this occurence, The Rule of Four, which I knocked off just short of Reims in the train.

So now I’m home after five-and-a-half weeks, I can finally respond to the backlog of emails, and slowly catch up on Perplex City and various blogs. More updates and various photos forthcoming…

A Collection of Holiday Posts, September 2005

This post is a collection of ?bits written over the last couple weeks in my notebook… These are mainly just comments, I also have plenty photos/video and trip reports still to come (probably not till after I return to Reims), and lots of observations about World Youth Day, which I think I’ll write into a new ?bits=wyd category (particularly in the leadup to Sydney’s hosting the July2008 WYD). I’m also going to try cross-reference all my posts for this latest trip, as not all will be in the ?bits=france category, and they may end up a little scattered (which makes me think I should add a ‘related posts’ feature to the ?bits area)

Sept5

Am writing this with the intention to post it once I reach Jenni’s. A Simple matter of selecting the appropriate facts, listed in order of increasing unpleasantness: (Made it / Got lost on the way / Died on the way) to England. The flight was (uneventful / delayed / full of Spanish people). I was mistaken for a European (Spaniard) 1 time(s), and stopped by security 0 time(s) (though every time a security guard moved I assumed I was about to be stopped).

I Done Been Robbed (Sept3)

Returned to the hostel on Saturday evening to discover the room a mess and my bag missing. They had kindly emptied most of my luggage onto the bed, before taking the things the wanted and taking them in the bag. Fortunately I had all valuables and important things on me, so only lost annoying things (though it adds up - around €1000 worth of stuff). Lost some of the strangest things though - a beanie, one glove, my old (Australian) electric shaver (though they left me my Australia-Europe plug adapter!), and all my power cables; rather hilarious really - I spent the night hardly able to keep a straight face - even at the police station!

As a geek/gadget-freak, the loss of power is by far the most annoying thing, followed closely by the loss of a shaver as a guy who likes a clean shave every couple of days. Further, it’s annoying that tomorrow being Sunday it’ll be another day before I can solve those dilemnas… I managed to pick up a replacement power cable for my mobile, so it was working again within a couple days; the video camera cable I’ll replace when I return to France; the Sony PDA’s cable will be tricky as Sony never sold it in Europe and no longer sell it in the States, but I’ve managed to find a cable on a US gadget website that looks like it’ll do the trick — just have to wait a couple weeks before I get any portable music.

Travelling with an Extrovert

New rule: Introverts and Extroverts shouldn’t spend too much time together - the Introvert gets drained by the other’s noisiness, and the Extrovert gets drained by the other’s quietness. It was good to get to Barcelona and spend a few days alone, before catching up with a fellow introvert who knew exactly what I meant…

Falling In Love (August14-22)

Starting to fall in love with Germany, and it’s giving me some perspective after 7 months in France. Being in France (and observing the States) made me realise how well balanced Australia is (for all its faults)… But after only a week I’m loving how Germany’s done re: cultural imperialism — amazing combination of their own culture (even) with American chains everywhere visible. It’s so similar to Australia with the level of Americanisation, but has more of its own culture. (And it was brilliant to finally go to a city with cafés everywhere!)

photos :: recent albums
photos :: random