Last month I attended Hack Manchester – a 24 coding event as part of the Manchester Science Festival, held at MOSI. Having only arranged to team up with Mike, we ended up joining two guys Shaf introduced us to, his colleagues from the BBC, by the names of Jack and Tom. The four of us formed […]
This weekend I attended the fifth (my third) PHPNW annual conference. As a member of the local PHPNW user group and community, I volunteer as a helper which involves getting delegates registered, getting the speakers to the right place and making sure everything’s running smoothly. Starting on the Friday evening hackathon social, I got chatting […]
This trick was inspired by Brian Suda who I saw speak at Whisky Web. Take a string, any string. Hash it using MD5. Substring the hash to get a 6-digit hex code. Take a look at what colour that hex code represents. A really simple, really cool way of generating seemingly random colours, that can […]
So the other day, Rasmus tweeted that PHP 5.4 was fully released (following several release candidates): PHP 5.4.0 is out – go get it #php — Rasmus Lerdorf (@rasmus) March 1, 2012 There are some great additions, the highlights (other than a huge increase in speed, apparently) being square bracket notation for arrays, array […]
The ternary operator is a shorthand way of writing an if/else statement where a particular action occurs in both cases, but the value associated with that action depends on the condition stated. For example, the traditional if/else construct (C/Java/JavScript syntax): can be rewitten as: This in itself is a huge benefit to clean, concise code. […]