the corner office

a blog, by Colin Pretorius

Lead us not into personal responsibility

There was a documentary on Panorama this evening about a potential sub-prime mortgage crisis in the UK (*). I don't find the doomsday predictions very persuasive, but I don't doubt that the property and financial markets could take a bit of a beating, and to be honest, a bit of sanity in the property market wouldn't be an entirely bad thing for people like us who're not (yet) on the property ladder.

As always though, it didn't take long for me to get a little fractious at the tack the documentary was taking.

I don't for one second disagree that irresponsible and dishonest lenders should be taken to task and vilified if they're acting unethically, and prosecuted if they're breaking the law, but why was there absolutely no focus on the culpability of borrowers themselves? I'm not talking about hard-working people whose only crime was not being financially literate and being too trusting of lenders who lied to them about repayments and the like, but the reporter very sympathetically interviewed one woman who lied about her income and financial situation at the encouragement of her broker. While the broker's company deservedly came in for naming and shaming, this stupid and dishonest woman, who chose to remain anonymous, probably because she could (and should) get nailed for fraud, got portrayed as an unfortunate victim!

It boggles the mind.

(*) For South African readers: sub-prime mortgages have nothing to do with the South African notion of the prime overdraft rate. Instead, they're basically mortgages granted to people who're a poor credit risk and who don't qualify for credit from normal lenders.

{2007.10.08 23:08}

A fine result

I average about 1 sports-related post a year, this is 2007 taken care of. It's about Formula 1, which I take a passing interest in since the missus is an F1 nutter.

I don't really have anything against Lewis Hamilton, but you won't see me crying if he loses. It's nothing personal, but since he rose to fame Formula 1 TV coverage has turned into The Lewis Hamilton Show, and the bias and blind devotion is all too much. Hamilton defies team orders and screws over his teammate and he's a maverick hero with a winner's mentality. Alonso follows orders and conveniently screws over Hamilton and he's a bad loser and rotten sportsman, and oh yeah, he steals candy from little babies and kicks puppies. I have no doubt that the Spanish media fawn as ridiculously over Alonso, but I don't watch Spanish coverage, so I don't really care about that.

There's also the spying thing. There's no doubt that Lewis is a brilliant driver, and would probably be deserving of the championship. But not this year. Maybe I'm just not paying attention, but how do two drivers whose team got kicked out of the constructor's championship for cheating, get to race the same unfairly-advantaged cars and have a legitimate claim to the championship?

Go Kimi!

{2007.10.07 21:34}

Whoosh...

How many hours in the day? Not enough.

How many Algorithms assignment questions to get through before the end of next week? Too many.

Chances of making it? I thrive on adversity.

Number of times I've said I'll be diligent and not have to rush things at the very end? Sob.

Hours of sleep I'm going to forfeit the next week? I'll sleep when I'm dead.

How cute is Leo when he's kipping in his Grobag? Infinitely!

{2007.10.03 23:39}

Toes

One might accept that toes are very useful things in the biological scheme of things, but they feel like a net loss to me. No sooner do I reach a state of good pedal well-being, than I stub yet another toe on something around the flat. I seem to spend my life perpetually limping. Bah.

{2007.09.30 22:38}

Metal and Matisse

I've never been a fan of Java's Metal look and feel. I use a few Java apps at work, and they look rather slick. This is because I use Windows at work. The Windows look and feel isn't too bad. I'm learning that the same doesn't apply to Linux.

On Linux systems, you have two non-Metal LAFs to choose from: GTK+ and Motif. Motif is the GUI granddaddy. Motif is old skool. It has that Unixey feel to it, but using it as a GUI theme circa 2007? Just not happening.

The alternative is the GTK+ LAF. It's not bulletproof. I tried it out with a JDesktopPane, and the JInternalFrames are totally broken. The internal window title bar gets hard-positioned at the bottom of the page, nowhere near the actual window, and the min/max icons are far too small. All in all, unusable for an MDI app.

As for Matisse4MyEclipse, some more likes and dislikes:

  • positioning items using Matisse is a lot easier than coding up a layout. As you position items in the form, Matisse gives you guidelines suggesting optimal spacing. Nice and easy.
  • the Visual Studio-like property browser for GUI components is nifty. Again, a helluva lot easier to scan through a list of properties and tweak something, compared to having to dig around in API documentation and hard-code the setting.
  • did I mention that I really don't like Metal? Even with swing.properties being set, I still get the Metal theme when using Matisse4MyEclipse in Eclipse. I haven't dug around too much, but even if I do get it fixed, it's a schlep.
  • speaking of which, I learned that the Java 6-related warnings I get when opening form editors, do matter on Windows. On Windows, I can't open context menus at all. Works fine on Linux though.
  • it's possible to open multiple instances of a Matisse properties window/dialog. Every time you click on the source ('...') button, the dialog opens again. They should either be properly modal or even better, just revert focus whenever re-selected.

On a related note, Swing doesn't have a date picker either. There are a number of free components you can use, but it's not the same. Even SWT has one now, even if it's not the greatest. I know the argument is often that there's no way to have consistent date selection controls across all platforms, let alone one, but even a Java-specific one that looks good and works well would be better than nothing.

{2007.09.26 00:47}

Democracy, UK style

Isn't it a bit unfair that the incumbent PM gets to decide when to hold a general election? Ahead in the opinion polls? Call an election! I wonder whether the electorate ever stops to wonder whether the government being in a hurry to hold an election means they know something that everyone else doesn't.

Not that it matters to me, really. To this pleb, the Tories and Labour don't differ that much. I think it's a sign of a mature democracy: the main parties have some rhetorical differences to capitalise on historical loyalties, but they're all essentially centrists, and everyone's happy with that. Basically one crowd gets to be 'it' for a while, and the other lot hang around and moan a lot, to keep the first lot honest. Then when the public gets tired of the incumbents or if they screw up really badly, then they get hoofed and the other side gets to be 'it' for a while, and the process repeats.

{2007.09.23 23:59}

Autumn

It's supposed to be bad etiquette or something and you're not supposed to blog about how you haven't blogged in ages. But if I didn't blog about not blogging then I wouldn't even be blogging this. The real world combined with the usual October-is-looming assignment rush is keeping me busy.

Do you think that in 10 years' time we'll look back and be embarassed about how we used blogging as a verb?

I think Monday can be taken to be the end of summer. Until now temperatures have been fairly mild, but then Monday arrived. I popped downstairs to take out the rubbish and recycling, and realised that outdoors and shorts and t-shirts are no longer an option.

The thing is, I'm quite looking forward to winter. The winter/summer sunrise/sunset variation in South Africa is about 2 hours, so last year when we arrived in the UK, the whole sunset at 3PM business really threw me. I was ready for bed every night by suppertime. I got used to it though, and it was an equally odd adjustment when the sun took to setting after 10 in the evening. Got used to that pretty quickly too! Now that it's getting darker earlier again, I'm looking forward to living in perpetual gloom for a few months. In a few years' time I might whinge just like the locals, but for now the seasons are real seasons, and they don't fsck around. That's pretty cool.

{2007.09.21 00:30}

Matisse4MyEclipse first impressions

This week's been a bit busy, but I finally got to sit down and tinker with Matisse4MyEclipse for a bit. Just briefly, a bit of Good, Bad and Ugly.

  • The ugly: well, jarring is perhaps a fairer statement. While it's integrated into Eclipse, and the Matisse perspective and views work just like a normal Eclipse plug-in, and while there are some SWT-based components, Matisse is a Swing-based application, with lots of Swing-looking menus and controls.

  • The bad: not much really, but there are some rough edges. I'm running Java 6 now, and when I open a form I get prompted with a warning that Java 6 isn't fully supported by Matisse4MyEclipse. This happens every time I open a form, which is a bit much. Having said that, I haven't encountered any Java 6 issues yet. Another odd thing is that you can open multiple instances of the same form. I'm not sure if that's a bug or a feature.

  • The good: this is a helluva lot quicker and easier than hand-coding a UI. I haven't done anything fancy yet, and I haven't taken much time to peek into the internals, but so far, I like it.

{2007.09.07 22:04}

Cool stuff!

After my last blog post about Eclipse RCP development, which included me commenting that MyEclipse offers Matisse for Pro subscribers, I got an email from Jens Eckels, marketing director of Genuitec, the company behind MyEclipse, offering to upgrade my license if I was willing to try Matisse4MyEclipse and blog about my experiences, good or bad.

I wasn't sure whether to accept the offer at first, because I was pretty much set on using SWT and JFace, but it didn't take me long to decide that it would be pretty silly to look a gift Matisse in the mouth, so to speak. What I really want is an easy way to whip up GUIs in Java, and Matisse is supposed to be the best way to do that. So in the next day or two, once I've had a chance to install it, I'll be giving Matisse a try and writing about what I think of it.

Thanks Jens!

{2007.08.31 23:16}

Thoughts on Eclipse RCP development

So, what's Eclipse RCP like for building applications? My first observation is that client development is quite markedly different from web development. The difference manifests in a few ways - how you implement a true MVC pattern, how you interact with a data layer, the amount of coding you do to get bits together, the richer widget set, the more fine-grained interaction a user has with the application (not just submit-process-return like with web apps). Those are pros and cons, often at the same time. It's all just different.

I do have two gripes with SWT and JFace. First, while the APIs are powerful, they are also a little too powerful. Even with the bits of development I've done, I found myself whipping up all sorts of utility and wrapper classes to simplify the controls I was working with. The learning curve is steep, and while you can do a great deal more interface-wise, the downside is that there is often a lot of repetition and boilerplate code required to do simple things.

The second gripe is that JFace in particular tends to be a bit schizophrenic. Sometimes you can hard-code the links between parts of an interface, sometimes you use plug-in extension points to hook things together. Again, it's powerful and flexible, but harder to get to grips with.

I also think that JFace in particular is hampered by having a strong IDE heritage. One of the earliest issues I ran into was the distinction between editors and views. Can't mix 'em? Why not? The workbench is geared towards having a window with lots of little views and screen areas. What about good old-fashioned MDI? I know some MDI designs are butt-ugly, but a happier middle ground, perhaps?

One shortcoming that Eclipse has is the lack of a good visual editor. Netbeans' Matisse editor is highly regarded; you can get Matisse for Eclipse if you've got a MyEclipse pro license (I don't). I've never tried it, but it would be a welcome change from manually slinging controls into a GridLayout. Eclipse's Visual Editor project dwindled in the past year, never made it to the Europa release, and to date, it seems you still have to jump through some hoops to get it working. I haven't tried - to be honest, I can't be bothered with going to the trouble of getting it installed, only to possibly find that it's a sub-par tool that barely works and takes too long to master. Maybe that's not the case, and I'm sure it'll change, but I just don't think it's worth the investment in time right now.

As for plug-in development itself, I'm in two minds.

Plug-ins give you two things: modularity and extensibility. Extensibility is great - it allows you to write a plug-in and load it as part of your IDE. You can share your plug-ins with other users. You could provide different pieces of functionality to different users across an organisation. Etc etc. Plug-ins rock from that perspective (no pun intended).

In terms of just providing modularity... I'm not so sure. It makes sense when you have something as large and complicated as an IDE. When you're just throwing together a small desktop app? I don't know if the effort is worth it. Eclipse's ability to link plain old Java projects together is an incredibly powerful way to modularise your code, as it is. It's simple to use, intuitive, and it just works. Plug-ins are more complicated. Add a new package to a utility project, and you have to remember to export that package. You have to remember to add a new plug-in to your dependency list when you run our app. You have a whole new set of class-loading issues. You can't refer to JAR files elsewhere on your file system. You can't share icons and resources across bundles. Admittedly, these are mostly dev-time issues, which a good deployment system would mitigate. But it does make development more tedious.

Those are mostly the gripes, though. For all of the short-comings, it's been a refreshing change from the web model, and as I get more comfortable with it, I find myself becoming more productive. Rich and thick clients still beat web clients, in my books.

The coolest thing about Eclipse, though, is the fact that it's open-source. For the first time, I've truly understood the power of being to look on the other side of an API call, and see what's actually happening. Some of Eclipse's innards are truly complex and beyond the ken of mere mortals, but a great many other parts are basically just more Java code, virtually indistinguishable from what you're writing; the kind of stuff you see and maintain on a daily basis. Not only does this transparency help you to understand what you're doing and how best to use the tools, but it's also one of the fastest ways to improve your craft. What better way to get good at what you're doing, than to have easy access to a few million lines of code showing you how the pros do it?

{2007.08.28 23:04}

« Older | Newer »