the corner office

a blog, by Colin Pretorius

Lulz

I am a bit behind with hip-hop'n'happenin' stuffs on teh Internets. Today colleagues introduced me to the magic of lolcats, a la icanhascheezburger.com.

{2007.07.11 23:29}

SWT DateTime

Eclipse 3.3 has a new feature, a DateTime component, which means you don't need to rely on third-party widgets anymore. I'm quite pleased because I never made the effort to actually understand or use one of the custom widgets normally pointed to in forums and the like, and now I don't need to.

At present it has two shortcomings I dislike: first, it can't act like a drop-down, a-la your average web page, or for that matter, the good old Notes date control. You can either have a date spinner, or a time spinner, or a full date selector, but that's all. I guess you could build a composite that mimics drop-down functionality with a custom dialog, but it'd be better if it was built in.

The second thing I'm not nuts about, is that you can't just give it (or retrieve) a date value: you have to explicitly set or get each component of the date or time. How hard could it be to have a setDate(java.util.Date) method, or, if political API correctness is an issue, a setDate(java.util.GregorianCalender) method?

Nonetheless, a nice addition.

{2007.07.11 23:13}

Europa

Friday was like, waaay auspicious because Eclipse 3.3, aka Europa, was released. I've installed it, but I haven't used it enough to see what's really cool and what's not. I didn't immediately register that it's been a year since I upgraded to Callisto. It's been a year dammit, it's July already, and we're more than halfway through 2007. Sheesh.

Upgrades aren't a biggie for normal Java development, but it's less clean if you're doing Eclipse RCP work, because many of the underlying Eclipse APIs change. The docs say everything's meant to be backwards compatible, and after checking out my icky fledgeling 3.2 RCP projects into a 3.3 workspace, that seems to be the case. Some things have changed or been deprecated though, and I was faced with a raft of compiler warnings, all of which I feel compelled to deal with and fix, because that's just what I'm like. No point in hanging around with 3.2 since 3.3 is now the way of the future though, so I'm upgrading all m'projects before doing anything else.

Speaking of new APIs, the new release means that there are new reference docs. The documentation is part of the help system, which renders the JavaDocs and whatnot via the help browser, but I like putting many of these things on my local web server so I can browse them more easily with a normal web browser. I can never remember where to find them, so this is for posterity: the JavaDocs and extension docs are in the 'reference' directory inside org.eclipse.platform.doc.isv_3.3.0.v20070621.jar, in the plugins directory.

{2007.07.02 23:27}

Bad habits

So Gordon Brown is the new PM. He comes across as all serious and Prime Ministery at first, but I find it impossible to watch him speak. He has a habit of slacking and dropping his jaw after nearly every sentence. It's hard not to be distracted: '... nation' plop go the jowls, 'blah blah prosperity...' plop, 'yadda yadda... frilly underwear' plop. Soon I'm just tensing, waiting for the plop, instead of listening to what he has to say.

Surely if you become the Prime Minister, nay, are in the running to become the Prime Minister, somebody somewhere is responsible for noticing these sorts of things and making sure you stop doing them?

{2007.06.27 23:30}

Weekend away

My in-laws are coming for a visit. My father-in-law came a week early, and we all trekked down to the coast for the weekend for the Goodwood Festival of Speed. Which is to say, I chilled out in a nearby farm cottage and baby-sat the young man while Ronwen and her dad went to Goodwood. Another way to put it is that Leo and I stayed nice and dry and Ronwen and her dad got rained on. We stayed at a place called Brookfield Farm, which I can highly recommend for getaways.

With the bleak weather, we didn't get to do much sight-seeing. We did make our way into Bognor Regis, which is, the signs proclaimed, a 'seaside resort'. Um. Some parts of it were quite pretty and perhaps our short visit didn't allow us to do the place justice. Either way, I did get to see the sea, and saw and set foot on my first ever pebble beach:

pebbles

The pebbles make the most amazing rattling noise as the water moves over them. They're a pain to walk on barefoot, but you can wear shoes or sandals and not have to worry about sand getting in everywhere. I'm more of a walk-along-the-beach person than a suntan-and-volleyball person, so I think I could get to like pebble beaches.

{2007.06.25 22:41}

Erm

I almost forgot I had a blog! We're still keeping busy being New Parents, and Leo, apart from fairly minor periods of disbuggerability, is still positively angelic.

I'm still doing some Eclipse tinkering. I had noble intentions of blogging about what I'm doing, as I do it, but progress is fairly slow, and there's very little of interest to blog about. As with anything new, I'm finding it too easy to get sidetracked by minor issues and niggles, instead of focusing on cranking out something useful and getting as broad a swathe of stuff into my brain as possible.

Speaking of which, I had the opportunity recently to do some work with C# and .Net. It was an interesting diversion. I have to admit that C# ain't bad, ain't bad indeed. In some of the few places where it diverges from Java, I found myself liking the way C# does things. The one thing which kills me though, is the Windows convention of SentenceCase method names. blah.doFoo() versus blah.DoFoo()? The latter just looks plain wrong!

Language differences aside, I also found that my experiences with Visual Studio and C# were far more positive than my Visual Studio and C++ experiences have been. Still not as powerful as Eclipse, though. And as nice as the language might be, I still have no desire to hop onto the Microsoft dev treadmill. If I ever feel like a change from Java, I guess there's always Mono!

{2007.06.20 00:32}

Famous

It's nice to live in a town that's famous for something other than murders or suicide or husband-beating or nuffin' (from IOL):

The southern English town of Wallingford in Oxfordshire was named the most Harry Potter-crazy locale in Britain on Tuesday.

The town, which was home to Agatha Christie, pre-ordered more copies of the seventh edition of author JK Rowling's hugely successful Harry Potter series of books per capita than any other in Britain, according to online retailer Amazon.co.uk.

We also realised a week ago that we are subtly famous because the town of Causton of Midsomer Murders fame seems to be set in Wallingford. So that means we are just about the murder capital of the country, after a fashion. Barnaby's turning out to be as bad luck to have around as Jessica Fletcher was.

{2007.06.07 23:04}

Views and editors

JFace encapsulates the underlying SWT toolkit and makes it a lot easier to do certain things. It has its niggles, though. I'm back to fiddling around with two small Eclipse apps, and in both cases the apps use views and editors. Views and editors in Eclipse parlance are sorta kinda conceptually what their names suggest, and are basically 'windows' within a workbench (and actually derive from the same parent class). Editors just have slightly different functionality, including inter alia the notion of being 'saved' or 'unsaved'.

Only problem is, it doesn't seem like you can mix these two types of windows up. You can have areas for views, and they'll stack up in tabbed fashion, and you can have an editor area on your workbench, where all the open editors will stack up in tabs, but never the twain shall meet. I'm not sure if I'm just missing something, but some googling suggested that others have had the same issue, and I'll be buggered if I can find a single example of where both are combined in the same area.

This makes sense for an IDE, where you generally want part of your screen to show a 'view', which is usually a list or tree, and then be able to see your editors at the same time. For views in other applications, screen real estate can be more of an issue. I'm quite partial to the old Lotus Notes way of doing things, where views and editors are all mixed up as separate tabbed windows. I wondered how it was being done in Notes 8, which is basically a big fat Eclipse app, and found a blog entry by one of the Notes developers at IBM who mentioned that all Notes windows are views, not editors. Counter-intuitive it may be, but it's perfectly possible to implement an editor (with normal form controls) as an Eclipse view. You just have to work around not having the special 'editor' features that JFace provides.

I guess that's the only way to do it, but I'd be curious to know whether the clear separation of editors and views is an explicit design decision, and if so why it was taken, or whether it is, as I suspect, just a hangover from Eclipse's IDE heritage.

{2007.06.04 23:17}

Fuxits

Back in the days when I had time for things like blogging, I started following a few Eclipse bloggers. Not long after (re)coining the cool term refuctoring, Steve Northover has used another term I might add to my vocabulary:

Obviously, we have a broken fuxit .... as in, "What the fuxit doing?".

{2007.06.01 00:35}

Woah

You can try to mentally prepare yourself based on your vague preconceptions of what it's going to be like, but there's nothing like a newborn who's found his lungs to introduce you to parenting. (Or a healthy digestive tract, but that's another story). The past few weeks have been a bit of a blur, so apologies and please don't feel snubbed if you've been hoping to hear from me, I have a good excuse :-)

To be honest, Leo's going quite easy on us, and we're slowly starting to feel less like walking zombies. We're enjoying the benign temperament while we can. People warn us that it's likely to change...

{2007.05.28 18:57}

« Older | Newer »