Archive for the ‘Uncategorized’ Category

FFT in an SQL Query

without comments

I just came across this, and thought I’d share it with you whilst I’m working on a couple of things and don’t have time to post properly.

The Fast Fourier Transform, implemented in an SQL query. This guy must be absolutely insane. Kudos to him!

http://www.adellera.it/investigations/nocoug_challenge/index.html

Written by Griff

July 19th, 2011 at 12:23 pm

Posted in Uncategorized

Tagged with ,

Trollscripts

without comments

Thanks to AppleScript, an office with multiple Mac users can be a prankster’s dream. We recently infuriated a co-worker for the best part of a week, using only 3 lines of code, which I’m about to share with you. First, some ground work:

  • You’ll need the user’s computer password (if they lock their Mac). Wait until they’re off sick or out of the office, and call them to say you need something off their computer. Or, if someone has knowledge of your co-worker’s password, sweet-talk them into giving it to you.
  • Whilst you’ve got access to their computer, go to System Preferences -> Sharing, and make sure “Remote Apple Events” are turned on. Make a note of their computer’s address at the top, as in the screengrab below.

System PreferencesNow you’ve laid the groundwork, it’s time to have fun. Open up the “AppleScript Editor” on your computer, and paste in the code below.

tell application "Chrome" of machine "eppc://user@computer-name.local"
	open location "http://emuspin.com"
end tell

(Here’s a direct link to the file)

Obviously, replace “user” with the username of your co-worker, and “computer-name” with their computer’s address. You can also change the URL to whatever you like, and if they don’t have Chrome installed be sure to swap that value for Safari. Hitting “Run” in the AppleScript Editor should prompt you for their password, and then open that page in a new tab of their browser. Repeat as much as is deemed necessary. We found it particularly funny convincing our co-worker that it was voice activated – every time they said “Emuspin” we would open http://emuspin.com on their computer. The possibilities are endless!

Enjoy!

Written by Griff

July 2nd, 2011 at 2:49 am

Posted in Uncategorized

Tagged with ,

PHP?

without comments

After today’s Daily WTF, I discovered this:

griff:~ $ php -a
Interactive mode enabled

<?php
var_dump("php" == 0);
var_dump("php" == true);
var_dump(0 == true);
?>
bool(true)
bool(true)
bool(false)

PHP’s type casting is fantastic, isn’t it.

Written by Griff

June 6th, 2011 at 6:12 am

Posted in Uncategorized

Tagged with

Introducing Setlist

without comments

Note: Setlist has been taken down for a while.

Today I’m launching a new web application called Setlist. Setlist is a designed to help bands organise the pool of songs they play into setlists, and then use those setlists to promote themselves. Professional cover bands, for example, can add all of their songs to their profile, and then create example setlists. These can be set to either public or private, so the band could publish their example setlists for potential clients to see the kind of music they play.

It was built out of a desire to better organise the songs my own band are playing. We often found that we would forget one or two songs at a practice, or when constructing a setlist. The ability to collaborate on our song pool and setlists, especially given we are geographically separated, will be a big help.

Interested? Try it out for free at http://setlistapp.com – I’d love to hear any feedback you have

Written by Griff

May 29th, 2011 at 9:09 am

Posted in Uncategorized

Soapbox: Native vs Web-Based Applications

without comments

As you’re probably aware, I develop mainly for the web. I love developing Web Applications – the technologies are great, it’s easy to use a blend of technologies, deployment is simple and they can provide a fantastic user experience. However, I also do quite a bit of native development in Objective-C and Cocoa, which I also love – the applications are quick, they fit in to your OS environment, and you can take advantage of really low-level APIs for threading etc. There are hundreds of debates on the web where web developers and native developers try and convince each other that their technique is best: this isn’t one of those debates.

This post was inspired by a talk at devnest this past Tuesday, where someone gave a presentation on developing mobile applications with jQuery Mobile. It was very interesting – I think jQuery Mobile is a fantastic framework, and it really simplifies the process of turning your web application into something that people can use on-the-go with their mobile devices. However, this person then introduced a piece of software called PhoneGap, which allows you to take an application you’ve developed in HTML/CSS/JS, offers you access to the low-level APIs, and lets you deploy it across multiple platforms as a native application.

Don’t get me wrong, jQuery Mobile looks great and works really well – but put it alongside a native application on an iPhone, for instance, and suddenly you see that the jQuery Mobile app actually is slow as a pig and looks out-of-place. That’s the sort of user experience I’d expect from a web app, but I’d expect a load more from a native application, especially if I’d paid money for it.

At work, I’ve been doing a load of research into different technologies and how we could utilise them in our roadmap. One thing I’m continually pushing for is using the best tool for the job. If it turns out that PHP is the best solution, great, but if it turns out that Python is the best solution, and you don’t know Python, you better get hold of some manuals and start learning. If you want to develop a mobile application, the device’s native language is the best solution. If you want to deploy across multiple platforms, and don’t need access to the device’s APIs, then develop a web app. If you do need access to the APIs, you’ve got a lot of work to do.

Written by Griff

March 5th, 2011 at 3:44 am

Commuter Sunrise

without comments

Pretty soon I’ll be giving up my daily Leamington Spa to London commute (more on that in a later blog post), so I thought I’d share this picture I took at the station this morning to show that it does have some nice moments.

Written by Griff

February 25th, 2011 at 5:52 am

Posted in Uncategorized

Clock of Clocks

without comments

Clock of Clocks

On a recent trip to London my girlfriend and I visited the Saatchi Gallery (superb gallery, you must go if you’re in the area), where I was mesmerised by a piece in their store called “The Clock Clock” by humans since 1982. Check out this video of it, it’s amazing. I thought that it would make a really cool little HTML5 experiment, so I gave it a go.You can view it here, but you’d do well to fire up the latest version of Chrome, Safari or Firefox first.

I’ve reached out to humans since 1982 to see what they think of it, but haven’t heard anything back yet.

Enjoy!

http://clock.imaginaryroots.co.uk/

Written by Griff

February 9th, 2011 at 2:46 am

Posted in Uncategorized

Tagged with , , ,

Joining the idio team

without comments

idioIt was announced last week that the company I work for, thrudigital, had been acquired by idio, a company we’d had a close relationship with for some time. As a result, I, along with the rest of thrudigital, will be joining the idio development team as their “London office”. Primarily, my work for idio will focus on their platform, which deals with content aggregation, analytics, personalisation and distribution, and making improvements to help it scale. Very exciting stuff, so look out for some scalability related topics on here in the near future!

Written by Griff

February 5th, 2011 at 5:14 am

Posted in Uncategorized

Tagged with , ,

CakePHP routing with slugs and actions

without comments

Here’s a quick link to a post I put up on the thrudigital blog the other day, regarding a little technique I came up with to allow CakePHP to disambiguate between slugs and controller actions in routes. You can check the post out here. Enjoy!

Written by Griff

January 20th, 2011 at 1:21 pm

Posted in Uncategorized

Getting the most of PHP’s date() and strftime() functions

without comments

I posted on our company blog today about a CakePHP helper I wrote which allows you to make the most of the PHP date() and strftime() methods in one function. You can check out the blog post here, or grab the source code on Github.

Written by Griff

January 7th, 2011 at 8:33 am

Posted in Uncategorized