*snippet* This is just a quick “bookmark” style post to remind me to look at the potential for utilising Parallel Processing in PHP using the “divide and conquer” method which may help in compiling/comparing stats in an application I’m working on.
Archive for the ‘Snippet’ category
Snippet: Parallel Processing in PHP
February 20th, 2009Snippet: London Underground “Tube” – Oyster or Travelcard
January 13th, 2009I’ve suspected it, but it’s nice to have confirmation -it is cheaper for me to use Oyster Pay as you go then a Transport For London (TfL) travel code for my commutes between Zone 5 and Zone 1. Is it cheaper for you? (by looks of things, only if you regularly travel in to London during the weekend is it even worth considering a TravelCard).
Snippet: Weird Pricing on TheCloud
January 13th, 2009I’m just helping somebody find temporary wireless internet access (ideally free wireless in London), and I remembered The Cloud. Their pricing is a bit odd: for Pay as you go access, the price if £6.99 for 3 hours or £9.99 for 24 hours, or you can go for their subscription wireless access, it’s £6.99 for a whole month.
There must be a snag there – who would pay for 24 hours access, when it’s cheaper to get 30 days?
Snippet: PHP, MySQL and IDN Email addresses
November 20th, 2008Here’s something to look out for if you are building an international website where you are handling email addresses…
Email addresses, as you are probably aware, comprise of two parts. The “local part” (the bit before the @ sign) and the “domain part” (the bit after the @ sign). Therefore with the email address richard@example.invalid , “richard” is the local part and “example.invalid” is the domain part.
The domain part of the email address can actually be 255 characters in length theoretically (it’s 63 characters for the actually domain name, then the TLD: however, you could have sub domains in force which can take it up to the 255 limit.
The local part of the email address can be 64 characters: bringing the count up to 319 characters. Allow an extra one for the “@” sign and 320… Just slightly too big to fit within the standard 255/256 character string field that has tended to be used. I’ve seen rumours that this section may be expanded to 128 characters, so plan for 383 characters.
Oh – don’t forget that Internationalised/Internationalized Domain Names are becoming popular in some countries and unless you want to handle conversion to/from Punycode or another storage format for the IDNs, then you’ll need to make your database store the email address in Unicode… However, that appears to cause a problem in some version of MySQL if you store it all in a Varchar field.
So in your programming language (such as PHP), you’re going to have to keep all the above in mind and then split the email address into two parts for storing in the database for sanity.
See http://www.faqs.org/rfcs/rfc2821.html, http://en.wikipedia.org/wiki/E-mail_address, http://www.santosj.name/general/stop-doing-email-validation-the-wrong-way/ and http://askville.amazon.com/maximum-length-allowed-email-address/AnswerViewer.do?requestId=1166932.
Snippet: What Microsoft Can Learn About Retail from Apple and Best Buy
February 13th, 2009Robert Scoble ( @scobleizer ) has an interesting post on FastCompany about What Microsoft Can Learn About Retail from Apple and Best Buy and there’s quite a few pointers there.
Comments Off »
Posted in Life: News Commentary, Snippet
Tags: apple best buy microsoft retail scoble scobleizer