Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 WEB


  If PHP Were British

When Rasmus Lerdorf first put PHP together, he - quite sensibly, despite his heritage - chose not to write it in Greenlandic or Danish. Good job too - that would have been rather unpleasant to work with. He opted instead, being in Canada at the time, for the local tongue. No, not French - that bastard dialect of the Queen's English commonly referred to as "US English"1.PHP developers in Britain have been grumpy about this ever since. What was he thinking? And more importantly, how do we undo this travesty? How do we developers ensure the traditions of the British Empire continue to be upheld, ...

2,777 0       PHP CLASS BRITISH STATEMENT ENGILISH LIKE


  This Is Why Your Website Is Slow

Click for a larger imageGhostery, the browser plugin that allows its users to "track the trackers," just released data on the tags, widgets and analytics on websites that are the worst in terms of slowing page loads to a crawl.Update: Ghostery discovered an error in their original data set. It appears that Millenial Media was not on this year's list at all, and the #2 slot belonged to AdFunky. Both the text and the graph above have been changed to reflect this.Any webmaster worth his or her salt already knows that slow page loads adversely affect Google rank and pageviews, but not everyone see...

2,624 0       WEB APPLICATION PERFORMANCE REASON SLOW LAGTAG


  JavaScript-style object literals in PHP

The object literal notation in JavaScript looks like:var fido = {name: "Fido", barks: true};or var fido = {};fido.name = "Fido";fido.barks = true;From assoc arrays to objectsIn PHP you would call that an associative array. $fido = array( 'name' => "Fido", 'barks' => true);And you can easily make it an object too:$fido = (object)$fido;echo gettype($fido); // "object"Or if you want to start with a blank object and add stuff to it:$fido = (object)array();or$fido = new StdClass();and then$fido->name = "Fido";$fido->barks = true;A little explanation maybe: objects in JavaScript are ha...

3,479 0       PHP JAVASCRIPT OBJECT FUNCTION CALL SELF VS THIS


  A turing machine in 133 bytes of javascript

Multiply turing machineThe fact it took me 20 lines of javascript to implement a nondeterministic turing machine simulatorlast week kept me up at night. All weekend. Too much code for something so simple and I kept having this gut feeling implementing a basic version shouldn’t take more than 140 bytes.Sunday afternoon I sat down for about an hour, collected my thoughts, and started pumping out code with cryptic variable names. It was beautiful, first version ...

3,078 0       JAVASCRIPT TURING MACHINE SIMPLE CODE


  The Ultimate GetElementsByClassName, Anno 2008

Two and a half years ago, I released the first version of getElementsByClassName. With how web browsers has evolved since, I thought I’d release a real ultimate version, dated 2008. Native Web Browser SupportSafari 3.1 has native getElmentsByClassName support, and upcoming Firefox 3 and Opera 9.5 will have it too. It only leaves out, you’ve guessed it, Internet Explorer.The Necessity Of This ScriptLiving in a world where Microsoft is halting every possible way the web could evolve, this means that you will need a custom script for this for years to come. Also,...

1,927 0       JAVASCRIPT IMPLEMENTATION GEELEMENTSBYCLASSNAME CROSS BROWSER COMPATIBLE


  Hash Tables in Javascript

IntroductionHash tables are a permutation of associative arrays (i.e. name => value pairs). If you use PHP, then you are very familiar with this type of data structure already since all PHP arrays are associative.The Javascript language implements very loose and somewhat limited support for associative arrays. Any JavaScript array can use other objects as keys, making it a hash, but there exists no formal constructor for initializing them and it is more or less unweildy to work with. A short example of a hash in JavaScript would be as follows:var myArray = new Array();myArray['one'] = 1;myA...

4,841 0       JAVASCRIPT ARRAY IMPLEMENTATION HASHTABLE


  UIWebView Secrets - Part1 - Memory Leaks on Xmlhttprequest

My first blog post on iphone subject reveal a big memory bug when using UIWebView component. This is the (only one) component to display some HTML content in an iphone interface. UIWebView object has a lot of differents issues and I’m going to highlight the biggest of them. Actually, all XMLHttpRequests used in javascript code are fully leaking!!! I mean when you do a request that retrieve 100ko of data, your memory used grow up for 100ko! This bug is not always active, but almost always. In fact the trigger to enable it is to simply open one link in your UIWebView. For example, clickin...

7,370 0       XMLHTTPREQUEST MEMORY LEAK MOBILE DEVICE UIWEBVIEW


  6 Tips to Help You Build a Great Web Application

Web applications are a little more challenging to design than websites. Designers need to anticipate user behavior, make users’ lives easier and make the experience as visually appealing as possible. Many designers tend to do what is easier for them than think about what’s easier for the user. The following is a small list of tips that designers often overlook in the process of designing a web application.1. The Power of a Good TooltipWhen you present your web application to a potential customer, the last thing you want to do is ruin your lovely graphic design work by plaste...

3,014 0       WEB DESIGN STYLE MOBILE DEVICE LIBRARY