A Mighty Muffin

Feeling a little bit peckish this afternoon, I decided to try out one of the Texan Muffins that someone at work had previously bought. Rightly named a Texan Muffin, the top of this not-so-little treat fit almost quite perfectly into the palm of my hand (yes, it was that big).

My expectations were set quite low as the place of purchase (Nifty’s) is well known for its cheap and not-so-top-notch-quality food. However, considering that I paid $3 for this almost meal-sized muffin, I was quite impressed. The variety of muffins available is certainly not as great as many other places (anyone in the city – go to Cafe Modena), but has been, by far, the best muffin I have bought since working in the Milton area.

I decided to go for the Chocolate muffin over the Apple and Cinnamon one (come on, I was feeling indulgent!) and was delighted to find it an excellent choice. The first mouthful was enough to convince me that its baker really knew what they were doing because its texture was perfectly cake-like. The best indicator of a well-made muffin is that the crumb is of a cake-like consistency opposed to a more rubbery bread-like one. The latter type of muffin is an indication that its baker over-beat the muffin mix, developing levels of gluten in the flour that should be reserved for bread or pastry dough.

Generics Misnomer

Why did the latest JDK have to go and copy C# and name their language feature Generics when it looks like this:

List<string> notSoGenericListOfStrings = getInitialListOfStrings();

I hope it’s not just because the implementation happens to lose all of that compile time information, making each strongly typed element the lovely generic java.lang.Object. After reading the reasoning behind its implementation and appreciating some of its motivators, I’m sure it will be all the more be interesting resolving any Reflection or AOP bugs in the future.

Can The Spam

Yesterday morning my blog was flooded with a huge amount of spam (about 40+ in about an hour). I think that the use of any popular blog software (be it WordPress, Movable Type, Blogger) will make you an easy prey for spammers. I know of a couple of people that rolled their own software and haven’t had any spam issues. I have only had one incident of spam since my blog was first made public, but it’s definitely something that I don’t like.

Here’s my list anti-spam initiatives that I intend to take, depending on how bad I feel my spam threshold is being violated:

  1. WordPress Comment Moderation – The latest version (at least available from CVS) includes a comment moderation facility (like MT’s blacklist plugin). This can help you block known aggressors but still requires you to approve/delete each of comment.
  2. Change the name of the page being spammed – As of yesterday, I have renamed the standard wordpress comments page to something else. If this keeps spammers at bay for a while, I’ll be quite happy with that. If they seem to keep up with the changes (am I really worth the effort guys?), I might write a cron script or something to change the name daily.
  3. Change the name of the fields that are posted – Requiring a little more tweaking of the actual code (yay opensource!), I next intend to change the name of the parameters that are submitted, hopefully rendering spammer’s scripts somewhat useless.
  4. Port the security code (SCODE plugin) from MT to WordPress – If it comes down to it, I’m willing to plunge my head straight into PHP just to prevent spam.
  5. Adopt a Bayesian Filter – Brett mentioned this seemed to work quite well on some blogs but requires a bit of training. I hope not to have to get to this point.

I haven’t thought about how I can prevent spams from TrackBack URIs just yet, but I’ll cross that bridge when I come to it. If anyone has any other ideas, I’d love to hear about them, just to add to my arsenal (or should that be my canning factory?).

Update 23 Nov:
After reaching the second threshold in my anti-spam checklist, a simple check of the logs informs me that 176 spam comments have been blocked!

Sasha’s Involver Tour @ The Family

Involver Just got home from a big night at The Family watching DJ Sasha mix up a huge, almost four-hour set. This fantastic gig was part of a Global Underground tour promoting his latest album, Involver.

Sasha needs no introduction to most people, on par with people like John Digweed, whom he has collaborated with before in the Northern Exposure series of albums. His set, which began a little bit past midnight, was accompanied by a laser show that was truly spectacular. I was thankful that Family was not as crowded as I thought it might be and the crowd was pretty friendly as usual. A great night/morning that ends with some much needed sleep!

An Appreciation of the Why

I think that the reason that most people get hired into the company I work for is that they continually pursue the why or the how behind the way that things work. For most of our projects, the most difficult ones tend to translate into the driving forces behind the people or processes, because in comparison, the technical problems are so much easier to solve!

It’s funny how learning a little bit more about the history of something or someone makes you think of them in a totally different way…

Consequences Of Living On The Edge

We’ve been lucky enough on my current project to move to the latest and greatest Java Software Development Kit (J2SE 1.5). It’s one of those small things that we seem to have a fair (though not total) amount of control over. I think (though I am keen to hear otherwise) that it is the only project in our company who has moved onto this platform in production. I shudder of thinking back to my previous project where we were constrained to Java 1.1.8!

Our team has been developing and testing on the new platform for the last few weeks to ensure that our code remains operational and stable. Here are a few things that we had to do in order to upgrade and you might like to consider if you plan on working with the latest version:

  • Upgrade your IDE – We use the best java IDE as our main development front end. I was previously running an old 3.5 version, and had to upgrade to the newer 4.2 version for support of new language features like Generics. I was glad that we were forced to move only after 4.2 was available because other developers had found many bugs in 4.0.
  • Ensure integration test coverage is high – This project relies on a smaller number of libraries in comparison to my previous project, but our high level of integration tests ensured all of the functions our code exercised worked, or at least we found out what did not. For example, our version of the BeanUtils library didn’t handle some of the things we used it for very well.
  • Test your toolkit – As I mentioned earlier in a previous post, coding style on our project is enforced by a tool called Checkstyle. The latest release does not cope well with the new lexical changes to a Java file so we had to build one based the latest source in their repository (thanks to opensource software!).
  • Exercise new features naturally – Our IDE allows us to configure at what level SDK (1.3, 1.4, 5.0) we would like our syntax to be validated against, and although we were supposed to keep it at 1.4 because the latest version of Checkstyle could still not parse all the new constructs, I accidentally left mine at 5.0. A fellow developer later discovered I had committed some code that exercised Autoboxing without even realising it. Such a nice language improvement (now if only Checkstyle wouldn’t die over the new for-each construct)!

Update Nov 8:

We use YDoc to generate UML diagrams in our javadoc (and to make our Business Analysts happy). YDoc is built with a heavy dependency on JDK1.4.2’s Standard Doclet (that was refactored in the latest JDK). This means that although we can generate standard javadoc, our nice UML diagrams no longer appear. I’ve sent an email to the company (as I have no idea where to find technical support on their site) and now we wait…

Best Of Groove Armada

About two months ago, I saw that Groove Armada were coming to perform at The Arena. Having caught the two DJs at Summerfieldayze earlier this year, I was keen to see the entire ensemble perform but baulked at the hefty $75+ ticket. So I’m sure you can understand my unusually spontaneous behaviour when I found out that they announced a second show (the last one before leaving Australia) for a comparatively meagre (*cough*, *cough*) $50! I, of course, just had to go.

Read more “Best Of Groove Armada”

Optimising Java Regular Expressions

Yesterday I had a bit of interesting work performancing tuning some code for our project’s current iteration. The code that required optimisation basically filtered some results in memory based on a set of user-specified criteria. The criteria contained a variety of different datatypes (boolean, numeric and string) and my suspicions were confirmed after a bit of simplistic profiling that the biggest consumer of computation time was the string pattern matching that was being performed.

So here are a few tips for optimising Regular Expression usage in the Java langauge: Read more “Optimising Java Regular Expressions”