Sunday, November 08, 2009

User Interface gripes

A great discussion on Stack Overflow about what doesn't work in user interfaces.

Tuesday, October 06, 2009

Web page performance and CSS selectors

Interesting article on web page performance and impact of CSS selectors. The article includes some test metrics to backup the author's position and history on the question of CSS selectors impact on page performance.

Bottom line: tweaking for performance only matters with extremely large page sizes. For general to moderately complex pages there is no noticeable benefit gained with CSS selector optimization.

Also has some links in comments section which may be worth following.

Monday, October 05, 2009

Creating objects in JavaScript

Finally a decent article on the various ways that an object can be created in JavaScript with encapsulated methods. Cleanly written, concise, and easy to follow.

Tuesday, September 29, 2009

Bitwise operations

A very cool article on bit operations. Samples provided using C language, but overall the article is language agnostic. Easy to read and very informative.

Thursday, September 24, 2009

Online tools for Regular Expressions

This site is very useful and performs well. Lets you test the expresson, view matches, and replace string elements. Not pretty, but performed flawlessly.

This one looks interesting but I've found the performance a bit twitchy. Still, it lets you visually examine your expression and can probably help you find some syntax errors quickly. It's probably going to be worth re-visiting this site to see how it grows.

Sunday, September 13, 2009

Semicolons in javascript

So, after examining some Google code I found they use semicolons more for statement delimiting than termination. Last statements in a code block are not semicolon terminated, only preceding code lines are. This got me searching for the meaning of semicolon in javascript. I found many sites stating it is optional, and many sites which warn of the danger of following this practice.

Although the script interpreter will insert semicolons at the end of lines, this may break down if the script is stripped of all needless white space. Therefore a good rule of thumb seems to be to put semicolons at the end of lines to clearly indicate the end of statement. Google's practice of using semicolon as statement delimiters seems to be adequate as well.

On a related topic, i have also found some advice for properly formatting javascript code because the interpreter will insert semicolons where it thinks appropriate. This is something I was not aware of before and knowing this now will probably help debug some code down the road.