Regex-fu #PHPUK2010

February 26th, 2010 Wade No comments

Good start: don’t use it unless you need to, there’s plenty of alternatives, e.g. DOMXML, str_replace, etc. Also PHP5+ has lots of filters for email validation and URL validation etc, function calls you can make rather than complex regular expressions. Regular expressions can slow down quickly due to back tracking, pattern complexity and long strings.

Read more on Regex-fu #PHPUK2010…

Categories: Programming Tags:

#PHPUK2010 Part 2 (MySQL stuff)

February 26th, 2010 Wade No comments

Just picked up a nice tid-bit on creating a unique index on a two column table where the values in each column may be either way around but you only ever want one instance of the value in that row. So what this means is, inserting 2,1 and 1,2 for example would result in only the first of the two inserts succeeding.

Read more on #PHPUK2010 Part 2 (MySQL stuff)…

Categories: Programming Tags:

#PHPUK2010 Part 1

February 26th, 2010 Wade No comments

Josh began by using the dictionary definition of simplicity (as given by Wikipedia) pointing out that the word is often used as a derogatory statement. He then went onto “clarity of expression” and that striving for it while programming is something a lot of people do but never quite seem to achieve.

Read more on #PHPUK2010 Part 1…

Categories: Programming Tags:

Photo of Ant Holding 500 times its own Bodyweight

February 21st, 2010 Wade No comments

_47340444_008791133-1This amazing picture of an ant holding its own bodyweight while upside down was taken by zoology specialist Dr Thomas Endlein of Cambridge University while researching creatures sticky feet.

This photo snatched the guy £700 in photographic vouchers from the Biotechnology and Biological Sciences Research Council.

Read more on Photo of Ant Holding 500 times its own Bodyweight…

Categories: News, Science Tags:

Find Music by Humming – it really works! #midomi

February 1st, 2010 Wade No comments

We are sitting on the sofa at home at the moment discussing our holiday plans for the year and I got a song in my head that I started humming. Remembering the adverts on TV where you hold your phone up to a speaker and it tells you the song, I thought there must be one that you can hum to and it’ll find the song. So I did a quick google and found Midomi, I hummed the song (and I can’t really sing or even hum very well) and sure enough…it found the exact song, 2 results came back and it was the second! We’re both amazed by how well it worked.

Read more on Find Music by Humming – it really works! #midomi…

Categories: Random Stuff Tags:

MySQL and Binary(16) – The Reasons/Benefits/Drawbacks (#mysql)

January 31st, 2010 Wade No comments

I recently posted an article about using BINARY(16) for storing MD5’s as unique identifiers instead of simple integer ID’s (usually auto increment); in that article I touched on one of the benefits, reducing JOIN’s, but there are other reasons for doing it too, so I thought I’d post an article discussing purely the reasons behind using BINARY(16).

Read more on MySQL and Binary(16) – The Reasons/Benefits/Drawbacks (#mysql)…

Categories: Programming Tags:

MySQL – Binary(16) and scalability

January 29th, 2010 Wade 1 comment

Over the past few months at work, we’ve seen our database grown from silly big to really silly big, it’s still a way to go to get to the size of the big boys such as Facebook etc. but it’s still a database stored in MySQL that most day-to-day PHP programmers would avoid like a midget cannibal.

Read more on MySQL – Binary(16) and scalability…

Categories: Programming Tags:

Avatar is a must see film – at IMAX in 3D

January 13th, 2010 Wade No comments

On Tuesday night we went to see Avatar at the IMAX in Bradford’s National Museum of Film and Photography. I had semi high expectations for the film but had heard some bad press so how good it would be was left wide open. someone suggested we go to see it at the IMAX as it is vastly better, so that’s what we did.

Read more on Avatar is a must see film – at IMAX in 3D…

Categories: Films Tags:

Federal Court to determine constitutional legality of gay marriage

January 12th, 2010 Wade No comments

It seems like it’s taken a long time for someone in the States to get up and do it, but someone seems to finally be ready to stand up in court and challenge the legality of banning same-sex marriage on a nationwide scale. The result of this trial should finally end the confusion the USA has had in it’s divided states. If it is voted unconstitutional to ban the marriage of two people of the same sex, any state that currently denies it will no longer be able to, effectively ending one of the biggest remaining prejudices in the States; this is, of course, if it is then argued and taken to the Supreme Court for one final showdown. If it’s voted constitutional, then my partner will be glad he’s in the UK now and doesn’t have to deal with a country that thinks it’s OK to treat people that way.

Read more on Federal Court to determine constitutional legality of gay marriage…

Categories: News Tags:

Transparent Laptop? Samsung’s new 14 inch OLED display

January 10th, 2010 Wade No comments

We’ve all seen the movies where interactive displays are done on transparent glass, well Samsung, using OLED (organic light emitting diodes) have finally created one for us all to gawp over. Details are scarce, but it shows that yet another sci-fi idea is becoming mainstream reality. For now, here’s a video of the display, courtesy of Engadget.

Read more on Transparent Laptop? Samsung’s new 14 inch OLED display…

Categories: Hardware, News Tags: