I’ve noticed a few times that my Ubuntu VM, running in Parallels, suddenly goes slow.

First time round I was totally confused and re-booted the VM (I access it via SSH), that didn’t work, and was also really slow. So I shut it down and then I noticed when I returned to Parallels to stop the VM that a dialog box was waiting for me (telling me there was an update or something). It turned out that this was the issue. It seems to happen to me for any dialog box as just now I’ve had the same issue when there is a dialog box asking if I want the VM to connect to a USB device.

Seems silly to me that this should slow down the VM, but just thought I’d mention it.

I've just started using Observers in a Rails application I'm creating and found out that in order to have them picked up by rails you have to manually register the Observers within your environment.rb file, like so:

RUBY:
  1. config.active_record.observers = :my_observer

I like to have as much coverage for any code I write in Rails, such as associations I've created, validation rules etc. I'm not testing the validation itself (Rails' tests have that covered) what I'm testing is that I've actually applied the validation rule.

So I figured that I should do the same for the Observers which should be registered. I couldn't find any references to anyone else doing this so after a little bit of digging I've come up with the following approach for use with RSpec:
Continue reading this entry »

A couple of weeks ago in the hope of getting my hands on an iPhone 3G on release day, which is another (long) story, I called my current phone company to get a PAC code to transfer my number. I've been thinking of changing phone companies for a while now mainly due to the fact that I've been on the exact same call plan for over 5 7 years and have never really been offered anything by the company.
Continue reading this entry »

I've previously highlighted the geekery that is using pseudo-code for non code related activities (in my case an IM insult) and just though I'd share this lovely example from Null is Love:

RUBY:
  1. piper = Baby.new(:name => 'Piper',
  2.                  :born => '2008-06-09 18:22:00 EDT',
  3.                  :weight => {:lbs => 6, :oz => 8},
  4.                  :length => {:inches => 21.25})
  5.  
  6. skoglunds.children <<piper
  7.  
  8. piper.daily do |p|
  9.   8.times do
  10.     p.eat
  11.     p.poop
  12.     p.sleep
  13.   end
  14. end

Lunar photograph, one of the first using my new telescopeI have just come in from another night of playing with the best present I have ever received, a telescope.

It's something I've wanted for a while, but never desperately enough that I've done any serious research or examining of the options, or even looked in a telescope shop. However my girlfriend on the other hand must have done quite a bit of research as the telescope she got me for my birthday is not a cheap entry level small telescope, it's actually quite a large and 'proper' telescope (with all sorts of stuff on the mount that I have no idea what it does at the moment) and it's amazing.
Continue reading this entry »

Having spent most of Saturday trying to get files to upload from a Flex application to a Rails backend, fighting against both Flex and Rails all the way, I thought I'd collect together some of the things that have helped me work through this in the hope that others don't have to spend quite as long battling through this. Note however that these are not necessarily best pratices, more a collection of tips that helped me in my situation, there are probably better ways to do some or all of the things that I'll be writing about - and if you know of any improvements/alternatives I'd love to hear about them.
Continue reading this entry »

I've just made some improvements to how I plan to maintain the resources for the JavaScript Image Cropper UI (this is part of my plans for the V2 phase) this evening, which are as follows:
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.

I've just about given up adding comments to blogs as about 80% of the ones I've made recently haven't appeared on the post after I've submitted them.

If you've got spam filters and they're catching comments then inform the users that their comment has been identified as possible spam, if you've got moderation on comments then inform the users.

I don't know how many times I've submitted a comment twice as it hasn't appeared the first time (and usually never does the second time either) just to make sure that it's not a cookie issue -- as in my RSS reader I don't have cookies enabled.

So the long and short of it, is that if for any reason a comment will not appear as soon as the user has submitted it then inform the users that you've got their comment and the reason it hasn't appeared. If you're just returning the existing page without their comment you're going to frustrate people (I can't be the only person this annoys).

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!