Archive for May, 2008

Java is now malware?

Friday, May 16th, 2008

JRE update wants to install unwanted junk, by default

Yep, as of this morning, I consider Java as malware. Having put up with the JRE updater being used as an advertising platform for some time now, the final nail in the coffin came this morning with JRE 6 Update 5. This attempts to install a stinking “Yahoo! Toolbar for Firefox/Mozilla”, and while there’s a checkbox to turn it off, it’s enabled by default.

As far as I’m concerned, this is totally unacceptable and Java and Sun just went down an awful long way in my estimation.

How to incur technical debt

Saturday, May 10th, 2008

I guess you’re worried that when your project has no bugs, or when maintenance becomes too easy, someone is going to start wondering what they’re paying you for. What you need is technical debt. Here my top 10 ways to sneak some into your codebase. As well as plenty of future bugs, this will ensure that any maintenance or expansion tasks take as long as possible.

  1. Create lots of overloaded versions of the same function. Only use one.
  2. Copy and paste code. For bonus points, change the pasted versions slightly.
  3. Leave chunks of commented out code (”Green Code”) lying around.
  4. Don’t use existing core logic. Reimplement it within the user interface using your own strange methodology. Make sure it behaves subtly differently. No need to check that, it will.
  5. Check several unrelated changes in at once. Only mention one in the check-in comment.
  6. Never use 5 lines of code where 50 will do.
  7. Never use 50 lines of code where several classes that almost resemble a GOF pattern you misunderstood will do.
  8. Invent your own naming conventions.
  9. Never fix a bug - hide it. For example, deal with null reference problems by simply sticking an if-not-null around the offending code. This saves you having to look for the real source of the problem, and also ensures the bug will come round again in a more subtle and interesting manner.
  10. Leaving out documentation is too obvious. Much better to document it, but make sure the code doesn’t do what the documentation claims.

Sunshine

Saturday, May 10th, 2008

Probably the best apple tree in the world

Finally sunshine is upon us. This means gardening, and during the week the ability to work in the garden, at least when it’s possible to angle the laptop away from the sun so the screen is still visible. The orchard is a mass of blossom at the moment. The apple tree pictured right is probably the best apple tree in the world. When they’re ready, which will be around mid-September, they’re enormous, deep red, and pink in the middle. The picture below is a close-up of the blossom from the same tree, hacked about with using qtpfsgui to make it look arty farty. For once I’m quite pleased with the results.

(more…)

Puppy Fighting

Monday, May 5th, 2008

Kiko (she has a name now) took her first trip to Suffolk to meet Meg, a real Border Collie. They spent the entire weekend wrestling in the garden, leading to another gratuitous set of doggy pictures…