Page Content

Deployment 1.9.0

June 25, 2013, 4:12 pm

Another deployment is now underway :) Tate will soon be going social!

On an entirely different note, I've made some good progress in converting my Flash parallax game, Working Title of Twilight, to HTML5. It has definitely been A Long Way Till Morning. Caution to those running Windows, certain PNGs seem to corrupt randomly, perhaps too big??

Microsites Module

March 14, 2013, 5:15 pm

Rollback :( All due to Solr and it's damnable Reindexing! So close... I really wanted to get this code finally released.

Microsites Module

March 14, 2013, 11:25 am

Ok, just about to deploy Microsites to the Live Tate site :S -- don't fail me now coding skills :)

Microsites Module

March 1, 2013, 7:32 pm

Just put the finishing touches to the next deployment for the Tate website. It's a bespoke module that automagically deploys a group of new content types, field formatters, contexts, context plug-ins, permissions and related code. It's called Microsites — I'm looking forward to it's deployment to live :)

Tate Christmas Party :)

December 5, 2012, 1:10 pm

Just got back from the Tate Christmas party, was a welcome end to a rather hectic few weeks, thanks guys for inviting me :) -- plus we finally managed to get version one of the mobile site launched!

CSS : Regions and Exclusions!

December 2, 2012, 10:42 am

It might look like it's finally going to happen, print-like layout in CSS! Good old Adobe and WebKit :D Google Developers SXSW Lightning Talks. Not to mention the numerous JavaScript APIs that are really going to help with the development of Pebbl :D

Forgot about JS1K again!

December 1, 2012, 12:22 pm

I don't think I'll ever actually enter JS1k -- it seems that whenever it's happening I'm either not around or too hectic... probably for the best however when looking at the competition, some of these guys are too good demo/1243

MySQL : REGEXP() no support for multibyte!

September 4, 2012, 10:52 pm

For some reason I've never come across this problem before, but for one of Tate's websites I needed to perform a regexp on a serialised field (naughty Drupal).. in the end I had to fallback to doing it in PHP, because MySQL's REGEXP function kept finding false positives (all due to multibyte characters it would seem).

Drupal 6 : Next stop, the bygone future

August 1, 2012, 10:42 am

Today is my first day properly working on the Tate Turbine Generation website... and just after getting used to the 'Drupal 7' way, I'm now going to have to go backwards and say hello to 'Drupal 6' again. Ah well, such is Life. Back to a world of no core fields, display modes, field formatters or render arrays... but hey it doesn't half run fast ;)

MongoDB : First steps with NoSQL

June 12, 2012, 2:32 am

It's been a while since I've actually had a chance to work with a 'proper' new technology. After having a bit of hassle getting Mongo set-up to work with my local environment, everything is now flying along perfectly. It's so nice not to have SCHEMA :) Although more wildcard abilities would be nice - at least for what I'm working on, probably not a call from the community at large ;)

Guess where I am?

May 27, 2012, 10:21 pm

After quite a few years of wondering what It would be like, I can safely say I now know what it's like to be in Tokyo :)

Views 2 export/import issues

March 14, 2012, 1:22 pm

Just in case no one else has noticed this - if you are exporting a view with grouped filters - make sure you double check the filters again after you import. It seems that quite often the imported version will have forgotten all it's groupings.

Yay... moving... again

March 10, 2012, 11:34 am

It has occurred at the worst possible moment it could choose (as per usual) but unfortunately we are going to have to move again. So, my month off that I was supposed to have taken over 5 months ago is yet again postponed to the point of probably never happening. Ah well, C'est la Vie. One of these days I think I'll just give up.

Too many ideas...

March 2, 2012, 2:10 am

There are people who say having an active imagination, a thirst for invention, or a brain that never stops dreaming up ideas... is a good thing... That is only true however if you have an army of people to help bring those ideas to life. If you don't, you are doomed into a never ending cycle of trying to decide what idea you should produce in the small amount of time that you have.

It really is rather tiring :/

I really hate caffine...

February 16, 2012, 11:33 am

Am dealing with my second day of Caffine withdrawal, and I feel ill :( Now that sentence makes me sound like I've been addicted to 5 cups of coffee per day or something! But no, I just seem to have a high sensitivity to it. I've only been having one coffee per week, and the odd Coke Zero every other day or so. I had almost stopped caffine for about two years, but my recent projects have been rather demanding... so now I have to contend with overtiredness, high anxiety, and disorientation. Foolish me :(

Drupal 7 : Integrity constraint violation

January 12, 2012, 7:45 am

Thought I'd post this just incase it helps anyone else. If you're using both the Pathauto and Redirect Modules, beware that you don't try and set the same alias that already exists as a redirect on the same node. Rather than a friendly error message you'll most likely get the following fatal error: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '[32 CHAR HASH]' for key 'hash': INSERT INTO {redirect}

2012 : End of the world...!? ... nope

January 12, 2012, 7:45 am

FireFox : -moz-element

December 29, 2011, 9:26 am

After my recent conversion of changing E.X.I.T from Flash to HTML5, there are a few dissapointments (I knew their would be) with specific browser functionalities. The feature with the most wow-factor (sad I know) but then let down, was Mozilla's element feature - allowing you to reference an element as a background. This is obviously a mad but cool idea, however, I was quite disappointed at it's optimisation.

Travel : Back from Braintree

December 11, 2011, 1:34 pm

Braintree was as expected. A typical middle-of-nowhere town which "somehow" manages to mimic everywhere else.. every shop, takeout & cafe all sadly homogenised :/ So no uniqueness there unfortunately. Also, I'd avoid staying at the White Heart Hotel. I mean the staff were nice, & breakfast was fine, plus the hotel itself does have a quirky tumbled-together-ness - but the room & bathroom we had really needed renovating. It's always worrying when windows let in more cold air closed than open ;)

Travel : On my way to Braintree

December 10, 2011, 4:25 pm

Just a random note - am currently on my way to an oddly named place - known as Braintree. About an hour out from Liverpool street station, we'll see if the unique name matches the uniquocity of the place ;) I just hope the hotel I've booked is not disctinctive - in a bad way.

Drupal 7 - Views 2 : Word of warning...

December 10, 2011, 4:03 pm

Views 2 has tripped me up twice with this Tate Project. Once with Themeing & again with bespoke module-ing. Probably a D6/D7 limitation, but Views is rather strict on keeping it's machine names <= 32 chars. My warning is, don't rely on automatically converting names to machine names, or expect Views to use a machine name that resembles the View's actual name. Once > 32 chars, it'll convert to using a 32 char hash. To get a list of hashes, use variable_get('views_block_hashes',array());

Drupal 7 - Drush : How did I miss this?

December 6, 2011, 9:08 am

Back when I was creating the Kitcatt Nohr Website in 2010, I would have loved to have easily constructed my own shell commands - to help with the numerous tasks involved in launching and maintaining a D6 install. Unfortunately the idea never occured to me that something like that would have already existed. Since working alongside some friendly Drupal experts :) I now see the error of my ways and have been creating some rather complex Drush scripts.

Misc : Words that should be words, or that should be used more often ;)

November 11, 2011, 11:11 am

Abrupted - (to my surprise this does already seems to be a word, well as much as any other at least, I've never heard it used however)...

Perpetualise - (the spelling may need to be refactored, but this should be the act of making something last forever)

Precautious - To implement or plan with the idea that your cautiousness might not be enough ;)

Trifficult - When difficult is not enough.

Codelamp v1.5 Launched

November 9, 2011, 12:00 pm

So.. have relaunched codelamp.co.uk with quite a bit of added functionality - see my new Homepage! I've also realised - after many years - that I tend to waffle just a little, so have limited my blog to only 512 characters per post. Let's see if I can m...

jQuery : Missing functionality?

November 9, 2011, 10:02 am

I'm not sure... but I couldn't find a way to easily create a grouped event/callback listener - for example, I load three images and the callback fires once all three are loaded. Now obviously you can code for this, but this is a repeating "pattern" I've encountered a lot in my time, I really thought jQuery would have something there for it. I ended up coding my own jQuery extends functionality called jQuery.Arbiter(), for further information check my blog.pebbl.co.uk

PHP : What... no function for this??

November 7, 2011, 4:36 pm

PHP always impresses me with what I like to call the "think of a function... any function; hey, here's the function you needed..." effect. Ok no that's just silly, but you know what I mean. I rarely find a "missing" core function. However I expected - but couldn't find - a function to filter an array by a list of keys. Obviously you could use array_filter with a callback, but there is just something odd about callbacks in PHP... Imo, array_values should have a second parameter, the inverse of array_keys!

Drupal 7 : Useful Functions

November 7, 2011, 4:22 pm

My most recent work for Tate Online involved a lot of time up to my neck in D7 themeing functions and naming conventions. Two extremely useful D7 functions - if you don't know them already - field_view_value() and field_view_field(). These defintely saved my life many times over, mainly because they auto-handle the current language settings... so no more ['und'][0]['safe_value'] :) A great post about this is here

MySQL : Convert String to Unique ID

November 1, 2011, 5:10 pm

Recently helped migrate a database. We needed to convert a string field to a unique NUMERIC value. I initially assumed we could use CONV, but was surprised to find it didn't support strings. It didn't occur to me (until I found this post) to cast the string to CHARs first ;) We ended up with this useful snippet SELECT CONV(SUBSTRING(CAST(SHA('test string') AS CHAR),1,16),16,10);

Chrome : Things to watch out for - #1

November 1, 2011, 1:22 pm

An annoyance that has come up whilst testing production sites in Chrome.

  • Make sure you don't prefix a Cookie's domain with a point if it is an IP address (i.e. .127.0.0.1 like you would for .www.hello.com). Other browsers like FireFox ignore this, whereas Chrome will reject the cookie. Symptoms of this will be cookie sessions failing only for Chrome.

Chrome : Things to watch out for - #2

November 1, 2011, 1:22 pm

Chrome does not seem to listen to the usual:<meta http-equiv="Pragma" content="no-cache" />If you want to make sure things like form values (on insecure connections) aren't cached, use:<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />

Firefox : Blur Effects (Yay!)

October 28, 2011, 1:22 pm

Just discovered that it's now possible to do on-the-fly blur effects in the latest Firefox (v8) by stealing the filters available to SVG elements... so cool :) not quite the implementation I was hoping for, but hey... it works. For an example, visit "http://www.codelamp.co.uk" in a new tab - or at least do something so you have a blank referrer. You should see my site animate, before the bulb turns on you'll notice the darkened/faded out page behind is blurred. Subtle, I know, but it makes me happy =^.^=

Misc : Last day at Kitcatt Nohr

October 10, 2011, 8:31 am

Really odd day, handed my notice in a month ago and so now - inevitably - today is my last day woking for Kitcatt Nohr Digitas. I'm going to miss a lot from my job for the last 2.5 years, mainly the great people! Good luck to all you guys :)

Travel : On my way to John Islip Street

October 10, 2011, 8:31 am

On my way to my first day at the Tate Britain, actually travelling on a bus for a change... much nicer than a packed tube. Means that I can actually type and do things! :)

Terminal : Log MySQL Information

September 1, 2011, 10:21 am

Just in case anyone else needs to find an easy way to log / monitor a MySQL instance - here's a handy little terminal / bash snippet. Just needs to be set-up to run on the cron and you'll get a date & time stamped log created on each call:mysql -e "show status;" > log_`date +%y_%m_%d_%H_%M`

JavaScript : Micro Revelation ;)

July 12, 2011, 2:50 pm

I'm not a JavaScript Guru - it's impossible to be one now-a-days unless you've every hour to spend bench-marking & testing the many JS environments out there. However I've been coding JS for about 14 years, so I have a much more stable & complete understanding of the language than many. Somehow though, something managed to slip me by, & I blame PHP ;) so test yourself, what would the value of A be:var A = (10 && 12);In PHP A === TRUE, in JS however A === 12