Skip to content

24 ways to impress your friends

Vote up?

Ross Bruniges

Thanks for all the comments guys.

In regard to open sourcing as the initial code was developed on agency time I unfortunately aren’t allowed to however some friends and I are looking to re-write and address a few of the issues I currently have with it and that will be open-sourced and on github!

Currently it’s in a very incomplete state as we try and re-factor the API (potentially removing the need for JSON based tests) but as we head into Christmas time I’ll be getting more time to work on it and hoping to get it running along quicker.

Follow the project at http://github.com/rossbruniges/os_sleuth and if you want to contribute I’d be very happy indeed :)

@Mathias – good points both. Due to the comment formatting I can’t be 100% what you’re suggesting but personally I just find the syntax a bit nicer using .length.
Have to remember that jQuery will always return a jQuery object regardless of if it matches the selector or not so the .length is needed to check that it both returns something and what it returns isn’t empty.

The second point is just a little bit of code creep. The version I created at LBi first checks to see if jQuery is included and if not loads it into the page. Inserting the stylesheet is one of this things it does before loading the library so therefore needs to work without it which is why the more verbose syntax is used. It’s by no means essential.

@Russell – it’s true that you could spend ages writing JSON tests but I’ve not found that when using it on my projects. You can kinda guess what things the external teams could get wrong and provide the tests for that.

Where it will save time is with off-shore development teams – those who are maybe at work when you’re at home asleep. If you can provide them hints at their errors they won’t need to wait for you to be in the office to start fixing them.

Some things will always go wrong and certainly to catch every single potential problem could be counter productive but if you pick your battles it should prove useful (it has been for me). I’m aware it might not be helpful in all situations though.