All posts in Code

It’s been a long time since I released an update to the JavaScript Image Cropper UI (for reference v1.2.0 was released on 30th Oct 2006!).

However it is still going strong and a couple of things prompted me to release this update to bring it to v1.2.1.

The first thing was Tom Hirashima (sorry Tom, wasn’t sure if you have a site you want me to link to) sent me an email last week with an update to the code to allow it to work with the latest versions of Prototype & out of the box ( & 1.8.2 respectively). Although the last time I tried the cropper with the latest versions of them both it worked fine, you just had to change the bundles that included, Tom has made some further changes. This is a good thing as for the past couple of years I’ve pretty much been out of the prototype & loop having moved to MooTools and now jQuery (which I hated at first, but that’s another story).

The second thing was that the cropper was mentioned (and my how old does this site design look to me now) in the latest (and as usual excellent) Railscast, Cropping Images.

As a part of integrating Tom’s changes I decided to tackle a load of bugs from the bug list to try and reduce the list so I can keep on top of it better going forward (a long list of open bugs is never conducive to getting any of them fixed).
Continue reading this entry »

I was asked a question a while back over IM. The question and my subsequent answer made me think about my coding style, decision making process and evolution over the years and I decided that I would share those thoughts with you (aren’t you lucky).
Continue reading this entry »

I’ve been doing quite a bit of unit testing on the Flex part of our new product lately and this has led me to fix a few issues and add some improvements to my FlexUnit Test Runner, I’ve been running with these fixes and improvements for a couple of weeks and finally took some time out yesterday evening to package them up so I could release them.

The key changes are:

  • Release has two downloads – one compiled to Flex 2.0.1 and one to Flex 3 – as it appears changes to Flex internals meant you couldn’t use the Flex 2.0.1 compiled swc in a Flex 3 project.
  • Fixed: Issue where error thrown when no test results selected.
  • Fixed: Issue where resizing columns could cause the itemRenderer for the status to display horizontal scrollbar.
  • Added: Ability to choose whether to display test results live or wait until all tests complete (as displaying them live results in slower execution of tests, as it’s constantly updating the UI) – this is saved as a preference.
  • Added: Ability to toggle display of the class path for the test case – this is saved as a preference.
  • Added: Test result details now extract Expected & Was from message string for failures and display in a manner that is easier to compare.
  • Changed: Test details now displayed on change rather than click event, to allow keyboard navigation of test results.

Head over to the FlexUnit Test Runner code page for all the downloads and to see the updated demo.

Sorry for the rather pointless post, I’ve just finished ensuring our test coverage is up to scratch on our project (as I mentioned in the last post). This means that I can get on with the next stage.

Which also means we’re one step closer to releasing it.

Which also means I’m one step closer to being able to tell you all about it, ohhhhh it’s so exciting!

I’ve had a list of changes and updates to apply to the JavaScript Image Cropper for quite a while now and I have been thinking of these in a lot more detail recently. There are lots of changes that I plan to make that would bring the cropper up to V2 level and ensure that it remains a viable cropping solution for the future.
Continue reading this entry »

The FlexUnit Custom Test Runner is a customised FlexUnit test runner which aims to improve the presentation and ease of use of running FlexUnit tests.

I have used unit testing in a few different languages, so obviously when I started using Flex I wanted to start off on the right foot by using unit testing from the outset. However after a couple of days using the base runner which is provided with FlexUnit I found myself spending a lot more time than I thought I should just looking for the details of the problem in the flex runner.

So as usual I attempted to make something that would work a little better for my requirements, see the FlexUnit Custom Test Runner code page find the full details and the download. As usual any comments should be made on the code page.

Towards the end of last week I spent quite a lot of time working with customisations of the ComboBox in Flex 2 for work, and it was really beginning to bug me how when I typed to select an item, the selection was only ever the first item that matched the letter I was typing. Having had it become second nature, since it’s a feature of my browser of choice Firefox, that I can type the beginning of a word to jump to an option (e.g. "United K" to jump to "United Kingdom" in a list of countries) I now really missed it when using Flex.

I didn’t have time to look at a work around during work hours as it really isn’t a feature that is needed of our product, just something that annoyed me. So I decided that I would quickly knock a solution together at the weekend and then write up a short post of how it was done, in case other people wanted to find out how to do it.

However it didn’t quite work out that way.

After a few frustrating hours I managed to get a fully working solution which I thought I’d share. You can read on for the story behind the component, or you can head straight to the FoxyComboBox code page to view the results.
Continue reading this entry »

Code: MXML GeSHi Language File

3 comments, join the discussion.

While just writing my first post about Flex which required some code examples in MXML, I found that currently GeSHi (Generic Syntax Highlighter) doesn’t have a MXML language file, and I couldn’t find one when I did a few searches.

So using the XML language file as a base I quickly knocked one together.

CFStatShot watching multiple Coldfusion servers
I’m releasing a Yahoo Widget that I created a long time ago and have been meaning to release for quite a while too.

The story all begins when I took over the Coldfusion platform support for, I started to find myself spending a bit of time watching cfstat on the servers to get a feel for the current status of the machines. As we had multiple servers (then 4, now 6) and only being able to get to cfstat directly on the machine, this was not really practicable.

What I really wanted was a little desktop application that could give me the headlines of cfstat for as many servers as we had, all in an easy to digest format, the result is the CFStatShot Yahoo Desktop Widget.

Pseudo Code Insult

2 comments, join the discussion.

A recent tradition in our inter-office messenger chat has been to talk in pseudo-code, usually just because it makes a statement a lot more funnier. Yes it's a little (ok, a lot) geeky.

Today I received this message:

  1. if( time() == $dave->getBirthday() ) {
  2.     $dave->setAge( $dave->getAge() + 1 );
  4.     if( $dave->getAge()> $michael->getAge() ) {
  5.         michael->laugh();
  6.         die($laughing);
  7.     }
  8. }

I think someone's trying to say I'm old.