Ben Poole

“It is a very sad thing that nowadays there is so little useless information.”

Weblog by month (April 2003)

On preventing spam

Periodically, we hear about a supposed software breakthrough which will end the daily deluge of unsolicited commercial email many of us receive. Occasionally, some of the innovations actually do a pretty good job...
Still, they're not perfect...

The definitive solution, by the Irate Scotsman. Now that's what I like to see: clear thinking, a simple idea, and what is more, something that will get results!


An 'interesting' point of view

Just been checking out Ray Davies' weblog in which he writes about last night's Domino beers in London:

I decided to join the group for a beer. As predicted it was hard work and just strengthens my view that programmers don't like sharing!

Eh? Programmers don't like sharing? How on earth does anyone come by that view? Setting aside other minor (!) things like the existence of copious amounts of shareware, freeware and open source code, has the explosion of programmer-oriented weblogs in the last few years — with the reams of code and downloads that go with them — completely passed Ray by? As far as Notes and Domino are concerned, I'm also curious as to how anyone could visit sites like Notestips or nsftools and still come to such a conclusion. Bizarre.


Re-design update

By jiminy, this new template is so much cleaner... I'm even getting Domino to do more of the HTML gruntwork. Er, within reason. At this early stage, much of the stuff I've coded thus far is solely in the back-end. I needed to re-jig how the site works in terms of things like blogrolls and including resources in weblog entries. Why? Because I'm doing more and more stuff from the Mac client, and as we all know, there ain't no Designer for the Mac. So, I'm having to stop my laziness ("Ah, I'll just edit the design one more time") and really think about day-to-day requirements. So that's good. I'll also sort out the sorry state of my commenting code. What a hack that all is...

Moving on, there are a few things I'm glad I finally coded into the referrer routines:

  • I parse out the common search engine referrers, and trap the requests they're slinging my way
  • I now have configurable IP address and referrer blocking (this used to be hard-coded)
  • I've optimised the referrer logging code — it's a wee bit faster now, even though it's doing a little more

I suppose I'd better beef up the web interface when I come to polish off the user interface, but 'blogging from the Notes client means I can do all sorts of things so much more easily than on the web. A couple of examples: (1) I can link to other sites with one click and; (2) I can attach images and parse out their dimensions for programmatic URL generation. Not to mention ad hoc agent creation and general document tweaking. Now, much of the fancy UI stuff can be done with enough time and hacking on my DHTML. But I don't want to spend too much time on that to be honest.

It's probably just as well that my 'blog templates don't become public property eh!


Re-design!

I've started working on v3 of this site. I have a pile of things I want to implement and / or improve, and seeing as it's been nearly six months since v2 went live, I reckon we're due a change.

Rather than tweaking the current design, I'm working on a whole new template, which makes for better design decisions I find. The last thing I want is to get bogged down in the "old way of doing things." Taking an existing design as a prototype, and building from scratch means that every design decision is re-evaluated, and the developer is forced to look again at what it is (s)he is trying to achieve.

Gah, I never go for the quick route eh... [smiley BigGrin]

The challenge of course is to maintain links and so forth. This isn't too bad with Domino when you consider things like multiple design elements aliases combined with server-side re-directs. Also, I'm working on a new comments system that doesn't rely on Javascript or pop-ups (Mike will be pleased). I'm going for a slightly different approach to the norm, which in turn means my views have to be a little more "intelligent", and that's where things have gotten somewhat tricky. I want to test the query string for certain things, and computed @formula within a view column is not really the place to do this.

Hmmm... It's all good fun! Once I have that cracked, the re-design should proceed pretty quickly. Watch this space!


If Lorenzo can do it...

With all this talk about fitting 'blogging into one's life, I think everyone should check out this news story:

BBC News: Blog from the top of the world.

If Lorenzo Gariano can do it, then so can I!


Great tunes

I was listening to Kate Bush's brilliant album, Hounds of Love this evening, which is a piece of music I love. The tunes are fantastic, the playing is incredible (special nods to the late, great Alan Murphy and the wonderful Eberhard Weber), and the whole "theme" of the album delights me. If you're not familiar with Kate's stuff, it's well worth checking out. I've been a fan since I was six!

Just remember: whenever things hot up in the Domino world, step away from the computer. Relax, cook some food, and listen to some good music...
[smiley wink]


Recently noticed in OS X

OS X is constantly surprising me with nifty wee features that bely an enormous attention to detail that I love. For example, this evening I've been downloading OpenOffice and the OS X downloads page at the site lists a load of HTTP and FTP links. Clicking on an FTP link within Safari doesn't open that page in the browser though, it mounts a "virtual drive" on one's desktop. Browsing and downloading from that drive is then done by the OS — all one has to do is double-click the drive icon, find the requisite file, then copy it / treat it like any other OS-level file. Nice.

IE in Windoze does something similar, with the option to browse ftp:// URLs as if they are volumes mounted within Windows Explorer. It works well — albeit agonisingly slowly even on a high-speed network — but needless to say, I prefer the Mac approach... [smiley wink]

Someone else who's been spotting wee things like this is Steven Garrity who is writing as a long time Windoze user trying out OS X. My thanks to Volker for this interesting link.

Continuing the Apple theme, congratulations are due to Brent Simmons, creator of NetNewsWire. He's won the inaugural Mac OS X Innovators Contest. Well deserved. A great piece of software.


Follow up to why oh why

Many thanks to everyone who took the time to pass on tips re Shell and wot-not, following my Why oh why post a wee while back. I thought I#8217;d post a brief update, and link to Julian#8217;s excellent ShellExecute tip. I#8217;m linking to this more because I was interested to see a Lotusscript implementation of a Win32 function I hadn't considered before, namely FindExecutable. Now, that could well be of use!

Like I said in my original post, I went down the COM route, if only to get some more experience coding stuff with that. I stand by my comments with regards the need for a version number when activating a PowerPoint object though — that’s nuts!

Anyway, my thanks to one and all. This #8217;blogging lark is quite good innit?


Christoph confesses

Christoph Arras.

LOL! Very good. Well, I've "nicked" stuff... and had stuff "nicked". It's what it's all about, and it's the best way to learn, whatever it is you're coding.


Off

Saw Coldplay tonight: great band, and superb live. Now, I'm off for a few days to recharge and get away from 'pooters! Back soon...


Why oh why

Gah! Rant time. Yesterday, I found myself in the position of having to detach some PowerPoint files from a document to a specific location on users’ hard drives, then have the code fire these documents up. Stage 1, the user’s home directory in Win2k / Win XP was easy. I dug out a wee API function (called GetUserName funnily enough) and Bob was my uncle in creating the path in which to detach the files. So far, so good. Stage (2): how best to launch the files? I tried Shell to no avail. I was trying to fire up PowerPoint, but also provide it with the path to the specific file. Now in Windows, you’d just use Run and type in something like:

powerpnt.exe c:\your path goes here\file.pps

No joy with Shell though. For one thing, it didn’t like an exe without an absolute path — fair enough — and for another I just could not pass in the file I wanted to open for love nor money. I was quoting and bracing here there and everywhere. Nope, couldn’t do it.

I was just considering querying the registry to get a definite location for the exe when, ding! I figured I’d use COM instead. Shell was never the ideal choice, as our users could have PowerPoint installed in different locations (especially with our mixed environment). However, COM doesn’t care about the physical location of the exe. “Splendid,” I thought, “all I have to do is something like this:”

Set appPP = CreateObject("PowerPoint.Application")

Oh no, not so simple. You can’t have a generic object like “PowerPoint”. It has to have version with it (“Application.Powerpoint.9” for Office 2000, “Application.Powerpoint.10” for Office XP I worked out). How pants is that? Instantiating an Excel application object (for example) doesn’t require this. So, my code works, but it has to test for the version of PowerPoint installed, thus:

' // Assume Office 2000 is the default
Dim appPP As Variant
Set appPP = CreateObject("PowerPoint.Application.9")
...
' // Raises an automation error in Office XP
If Err = 208 Then
   Set appPP = CreateObject("PowerPoint.Application.10")
   Resume Next
End If

Urgh. What a crappy implementation. Anyone else come up with nicer ways of doing stuff like this they could share? OK, so the solution presented here works fine in our environment, but... it offends my aesthetic sensibilities!

Further reading: Follow up to why oh why.


Newer 'blogs and knowledge tools

As well as the old favourites, I'm thoroughly enjoying a few of the newer 'blogs in the block. Specifically:

The daily visiting list is pretty darn long now, and I expect that's the same for many of you too. The recent discussion concerning weblogs as knowledge tools is also intriguing, and makes perfect sense to me. Weblogs are simple. And that's what makes them work IMHO.

For example, at work, I'm currently evaluating and tiding up some of the team's day-to-day tools: code libraries, and what-have-you. A common theme of the most-used repositories and applications is that of simplicity. A few categories, a meaningful subject, and let the search engine do the rest — be it Domino or something else. When someone's on leave, they have to leave holiday notes. When we deliver on a complex app, we have to document it. Developer 'blogs can do this, and they're quick 'n' easy in terms of posting... how useful is that!

Update: Check out Justin's recent posts about this kind of stuff too. So far he's managed to get Ed's attention with his talk of a personal Discovery Server along the lines of ZOË.


Coding at home...

... can be great. Here I am in the study. Raining and grey outside, warm and bright inside. I have iTunes blasting away, and there have been some cracking tunes on thus far. Let's see now: currently on the playlist is Stevie Wonder's classic album Songs In The Key Of Life. It's amazing. I've also had some Iona playing, whom I love, and Peter Gabriel is up next. Splendid. I do like choons in the background whilst programming.

Of course, one of the other advantages of being at home 1-2 days a week is that I get to see plenty of the boys. To take a small example, my wife and I have just watched the younger bean get a chair from his playroom, and try and pinch some mini Easter eggs off the mantlepiece. His face when we caught him was a picture.

Ah, these small things make coding Java agents in R5 so much less painful.


Java agent freezes Notes / Domino 6.0.1

Here's the security bulletin. It apparently relates to a known bug in the Sun JDK (#4811913 (login required)).

Via Erik's Weblog


Is it really only a year?

Wow. One year ago today, Notestips was born. It seems like Mike's site has been around for ages (I mean that in a good way!): he's always got something interesting to say, and his articles more often than not really push the boundaries for Domino developers everywhere. I still think he's wrong about pop-up comments windows though... [smiley PokeTongue]

Here's to a whole lot more stuff from Notestips!