Reflections on craft.

This Week I Learned #8

Adding environment-based HTTP authentication to a Rails app, how to filter tailed log output, and a great habit for writing clearer, self-documenting code.

Continue reading...

jQuery Coding Standards and Best Practices

Abhinay Rathore has compiled a treasure trove of best practices for working with jQuery (and DOM manipulation in general), and best of all it’s well-annotated with links to explanations and performance comparisons to back up the recommendations. I learned more than a few tricks to improve performance, like detaching DOM elements before engaging in heavy manipulation, using string concatenation instead of appending elements, and passing an object literal to $el.attr({attr: value}) instead of chaining multiple attr() calls.

Continue reading...

Web Page Rendering Performance

Paul Lewis is a Developer Advocate on the Google Chrome team, and he’s been on fire lately with a series of excellent articles on the nuances of web page performance from the perspective of the browser. If you do front-end development (like I do), and you don’t know what frames, paints, and layers are (like I didn’t), then Paul’s articles are an excellent introduction to why your site isn’t silky-smooth when scrolling or animating.

Continue reading...

Impossible Programs

Here is a fascinating talk—from Tom Stuart at last year’s Scottish Ruby Conference—on the subject of programs that are impossible to write in Ruby. Computers are logic machines, and Stuart takes us on a tour of many of the underlying problems with logic and how they manifest themselves in computer science, touching on things like undecideability, the halting problem, and Rice’s theorem.

Continue reading...