Archive for October, 2002

TechTV Security…

Thursday, October 31st, 2002

TechTV is a nice channel over here in the US, focused on technical subjects [it was apparantly better in the past, but aren’t they always?]. Its flagshhip show is ‘The ScreenSavers’ which is often pretty good with interesting guests.

This morning’s was a nice blooper though. The wonderful line that “Basic Authentication is how the pro’s do security, and it’s the best way” is painful. Complete lack of mention of the complete lack of security :)

Usually they’re a better quality than that.

Jason Hunter's blog

Thursday, October 31st, 2002

Just noticed that Jason Hunter’s blog appears quite lively. Same for James Duncan Davidson.

Both very interesting. Clicking from Jason’s, I read the licence for his file-upload code. It’s wonderful:

“For a commercial project, permission is granted to use the com.oreilly.servlet.* packages provided that every person on the development team for that project owns a copy of the book Java Servlet Programming (O’Reilly) in its most recent edition.”

How perfect :)

Jason’s blog seems pretty active in terms of comments. I hope he’s enjoying the celebrity lifestyle.

Book list

Thursday, October 31st, 2002

Bob McWhirter has a book list on his site. Or rather a link to his Amazon wishlist. Mike Cannon-Brookes has a ‘currently reading’ [though it’s taking him some time it seems] on his site. These are cool.

I wish the blog had something for this in-built. I’d love to see all the books that people want to get, and are currently reading.

For myself, I’m reading the OReilly JMX book [for a review], 3rd in the Piers Anthony immortiality series, I just picked up my Zope book again [thinking of switching to it from vqWiki] and need to add another fiction book to that list [I like to keep multiple on the run] havnig just finished another Piers Anthony book. It’s nearly Xmas which means it’s nearly book season. Terry Pratchett’s new edition will be out in the UK soon [I only get UK editions, the US covers are pathetic] as will the new Robert Jordan, Terry Goodkind and Raymond Feist. Hopefully anyway. So hardback book time :)

ProxyListener

Thursday, October 31st, 2002

David Petersheim [www.code316.com] gave a talk at our local JUG in Louisville, Kentucky [of which he’s the founder] on Reflection. He’d been messing around with using reflection to get rid of the pain of anonymous Listeners and back to the VB he loves so well [insulting dig]. Jim Birchfield suggested some improvements on David’s approach and I took these and mixed them with some bits I wanted there to get ProxyListener [probably not an original idea I’m sure].

Anyway, ProxyListener allows you to implement Listeners with the following code snippet:

button.addActionListener( (ActionListener)ProxyListener.newInstance(
ActionListener.class, this, “flipColor”
) );

and then have a method of:

public void flipColor() { …

or

public void flipColor(ActionEvent ae) { …

[or a couple of other variants. It’s not fussy.]

The basic point being that a lot of listeners are merely bouncers off to another method somewhere, so why not make life a little easier. It needs more overloading of the newInstance methods, and it would be nice to be able to pass in a Class as a target rather than just an Object [this in the example above].

Take a look at ProxyListener. Take note that it’s JDK 1.3 and above. It’s a natural complement to an early class/blog on Notifier.

Javascript optimisation

Wednesday, October 30th, 2002

Got to spend some time tonight optimising a piece of javascript for a nav-menu on a friend’s e-commerce site [that I host]. I ended up just removing the entire ugly for-loop, changing the initial conditions and it worked fine.

Gotta love it when you can rip the code out, and it still works :) Very satisifying piece of refactoring, and apart from lots of authoring on the laptop, the only thing done tonight.

Class reflection et al

Tuesday, October 29th, 2002

There’s lots of incredibly scary discussions going on at the commons-dev about a new component known currently as Clazz. Yes, terrible name I know.

Commons Lang is gaining a set of reflection helper Utils, but on top of these will be a far more powerful introspection layer in Clazz. Stephen Colebourne [one of the guys behind Lang, the latest Collections stuff and joda.sourceforge.net] is leading the effort with Dmitri Plotnikov, Steve Downey, Juozas Baliuka and Berin Loritsch throwing in a lot of ideas. It blows my mind currently, I hope mainly just because I couldn’t keep up with my email when they started.

What I’ve liked about it so far is that there’s so many people who are interested in it, that many others have joined in, including people who are not committers at Apache/Jakarta yet, and that despite all the debate, they seem to be moving forward at a steady pace.

I hope to add Clazz [maybe even with a better name] to my list of APIs I carry around with me to use anywhere.

Best Language

Tuesday, October 29th, 2002

What’s the best language you ever learnt or used? The one that satisified you the most both in terms of its success at reaching your solution and at the feeling of control and beauty?

Only one that even gets on the board for me is the language of Regular Expressions. The best computing language around. Friedl’s book was a wonder-tome, and I’m still debating over whether I should upgrade. Or maybe I just demand it be on the next company book order.

Docbook HowTo

Tuesday, October 29th, 2002

Quick potted how to get started with DocBook:

1) Grab a docbook reference. I’m using the DocBook book from Norman Walsh [seems quite an authority]. There are newer, online versions but they’re not complete yet. You can also find it at OReilly and other places.

2) Grab Xalan. I went and grabbed the latest stable Xalan. The book warns you against Xalan, but I suspect that is very dated information [indeed, the book is quite dated. So expect to have to pick things up through the occasional surprise].

3) Get yerself a nice set of XSL’s for converting DocBook to other formats. I’m using the stylesheets at the DocBook project at sourceforge.

4) Write your book/article/faq/man-page.

5) Using the instructions at Xalan setup your classpath and run java org.apache.xalan.xslt.Process -IN yourbook.xml -XSL html/docbook.xsl -OUT docbook.html

Docbook

Monday, October 28th, 2002

I’ve been increasingly bored with the idea of learning about another new language [for about 3 years this was not boring to me. I’d read Fortran and Cobol books in the belief they’d have something interesting in them]. The last book I recall reading about a new language was the Ruby book. Since then D, elastiC, Velocity, Jelly have all not really felt like something new and radical that I want to pick up and learn about.

So maybe it’s time I started to go back over the things I’ve always meant to learn more about and use. Like Expect, I read up on the book on this but never had much of a use for it, though in Java I might’ve [actually there is a JExcpect which I think I downloaded, so obviously I never kicked myself into using that either]. Also there is Scheme. They released the classic book online for free for that recently [I know, a language, but also a religion that I’d like to sniff into].

Another is Docbook. I want to write a book, or at least an online resemblance of one. So I need a tool to write it in. I spent about 20 minutes putting together my own custom XML structure and then gave in, went to look on Safari for the DocBook book, couldn’t find it, thought it might be in my free book repository, wasn’t, googled in shock, found where OReilly had released it. So reading through it. Good god it’s huge. So much to yearn. I think I’m drooling.

Moved office

Monday, October 28th, 2002

After many grumbles I’ve moved one of my machines out of the basement up to my wife’s office so we can spend more time in the same room. The fact the basement is damn cold at the moment has nothing to do with it…

So I’ve gone minimalist :) My happy hacker keyboard, in black, is very cool. Bit hard to get used to after an MS natural keyboard. Wireless Logitech mouse, some old Typhoon loud speakers [I like these, no plug, they have an adaptor into the PC], the last PC I put together and a new ViewSonic 15″ LCD. Very nice and fits neatly on the 30 dollar Target tabletop.