Tag: programming
-
Modern Mobile Redirect Using .htaccess
The following set of rewrite rules will redirect all Android, Blackberry, iOS, Windows and WebOS devices to a specific mobile directory on your website. Additionally, it will redirect Google’s mobile crawler – according to Google search spam czar Matt Cutts this is perfectly acceptable and even somewhat encourage. Code snippet – Simple .htaccess Mobile Redirect…
-
How To Detect Mobile Visitors Using .htaccess Rewrite Rules, Simplified
Since my original posts on mobile redirection in .htaccess files I’ve gotten some comments and emails asking for step-by-step guidance on exactly how to “install” these rules. I hope this post will answer some of those questions. Before you continue reading, if you have php installed on your server, you may want to consider Andy Moore’s php…
-
DIGG: 4000% PERFORMANCE INCREASE BY SORTING IN PHP RATHER THAN MYSQL
To scale at Digg they followed a set of practices very similar to those used at eBay. No joins, no foreign key constraints (to scale writes), primary key look-ups only, limited range queries, and joins were done in memory. When implementing the comment feature a 4,000 percent increase in performance was created by sorting in…
-
How To: Exclude Words Like “An, A, The” From Alphabetized MySQL ORDER
When ordering lists of names or titles it’s sometimes desirable to exclude articles or other words from the order clause (eg. you want “The Burning Hell” to show up before “Great Lake Swimmers” in a list ordered by name). Early on in my career I must have assumed it was not possible and never bothered…
-
Even Google Makes Mistakes
This is an expert from a Gmail Blog Post re: the recent gmail outage: Unexpected side effects of some new code that tries to keep data geographically close to its owner caused another data center in Europe to become overloaded, and that caused cascading problems from one data center to another. It took us about…