Chris Webb

Front-end Engineer

Page 2


Book of the Day: The Modern Web

The Modern Web: Multi-Device Web Development with HTML5, CSS3, and JavaScript by Peter Gasston is an ambitious achievement. It is a carefully curated compendium of some of the most compelling developments in web technologies placed in context of the multi-device landscape.

This book is about front-end web development in this new web-everywhere era. It’s about learning methods to make first-class websites, apps, or anything built on open web technologies, with the multi-device world aforethought.
This is not a book about how to make mobile websites or smart TV apps; it’s about learning the latest developments in current and near-future web technologies so you’ll be better able to build sites capable of offering the best experience everywhere.

— Peter Gasston

The Modern Web is packed with information. It starts with an introduction to the current landscape of devices and the platform...

Continue reading →


iPhone & iPad apps my workflow can’t live without

I’m relatively picky when it comes to iPhone apps and iPad apps. I’ve downloaded countless apps and rarely open them more than once before deleting them. Among the apps that don’t get quickly deleted there’s a small group that have made it into my daily or weekly flow for longer than a few days or weeks. These are the apps I ‘love’.

In the spirit of sharing a good thing, I’ve put together a list of the apps that have surprised me and become become an integral part of my regular routine along with what I love about them. Have a look and see if you find a gem worth trying.

TextExpander (iPad / iPhone & OSX)

I was interested in TextExpander for a long time before I finally decided to give it a try. I had a hard time seeing how I would use the mobile app so I started with the free demo for OSX. It only took a few days to realize I loved it and buy the mobile version as well. It’s an app...

Continue reading →


Book Review: JavaScript testing with Jasmine by Evan Hahn

js-testing-with-jasmine.gif

JavaScript Testing with Jasmine is a new book written by Evan Hahn and published by O'Reilly that aims to:

…explain the concepts of testing and test-driven development, as well as why they’re useful… dive into Jasmine and explain how it can help programmers test their JavaScript code… give readers an understanding of Jasmine’s concepts and syntax.
— Evan Hahn

What’s Good

If you’re just getting started with Jasmine and want to save yourself some time researching and reading documentation and blog posts, JavaScript Testing With Jasmine is a concise read that will help take a bit of the pain out of understanding Jasmine.

Misses

I feel like there’s some missed opportunities with the book. It doesn’t seem to offer quite enough information either for a complete beginner or for a seasoned pro.
For a novice in JavaScript or testing, it would have been useful to really dive into the...

Continue reading →


Client-side error logging with Google Event Tracking

Thanks to this article: Client-Side Error Logging With Google Analytics I started an experiment yesterday with logging client-side JavaScript errors as an event in Google Analytics in 3 lines of code. Within a couple hours, I could generate a report of which scripts were causing the most errors, what the errors are, which pages and/or which browsers have the most errors. I still think it would be a good idea to have a dedicated solution, but in the meantime this is a great way to get an instant picture of the current situation.

Here’s the code I’m using in case you want to give it a try.

window.onerror = function(message, file, line) {
   _gaq.push(['_trackEvent', 'JS Error', file + ':' + line + '\n\n' + message]);
};

Related Reading

  • You really should log client-side errors
  • Client-side Error Logging from dev.opera
  • Google’s guide to Event Tracking

Continue reading →


Promise & Deferred Objects in JavaScript Pt.2: in Practice

Introduction

In part 1 of this post, I spent a lot of time looking at the theory of promises and deferreds: what promises are and how they behave. Now it’s time to actually explore some ways to use promises and deferreds in JavaScript and dive into some best practices. I’ll start with some basic uses and examples of promises and then will dive into a number of specifics pertaining to using promises in jQuery. While the exact specifics of the API may vary from your chosen library, there is enough overlap in concepts to illustrate the use of promises.

Note: The code samples will use jQuery in spite of jQuery’s deviations from the Promise/A proposal, which is particularly noticeable in the case of error handling and when working with other promise libraries. Since part 1 discussed and included links to in-depth articles on the topic, I will refrain from saying anything else about it in...

Continue reading →


Promise & Deferred objects in JavaScript Pt.1: Theory and Semantics.

Introduction

In the not too distant past the primary tool available to JavaScript programmers for handling asynchronous events was the callback.

A callback is a piece of executable code that is passed as an argument to other code, which is expected to call back ( execute ) the argument at some convenient time

Wikipedia

In other words, a function can be passed as an argument to another function to be executed when it is called.

There’s nothing inherently wrong with callbacks, but depending on which environment we are programming in there are a number of options available for managing asynchronous events. In this post my goal is to examine one set of available tools: promise objects and deferred objects. In part I, we will cover theory and semantics and in part 2 we will look at the use.

One of the keys to effectively working with asynchronous events in JavaScript is understanding...

Continue reading →


Book of the Day: Effective Javascript

When a book about JavaScript has a foreword written by Brendan Eich and rave reviews from Paul Irish, Rebecca Murphey, Alex Russell and Anton Kovalyov, you might begin to suspect that you should check it out — in this case you would be right.

Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript by David Herman and part of the ‘Effective Software Development Series’ is a distillation of the type of knowledge you gain along the way — through years of being a programmer — tackling problems, asking questions and running into brick walls. In other words the lessons of experience are in here and while you may already know some of the information you will find things you don’t know.

Effective JavaScript reminds me of JavaScript: The Good Parts by Douglas Crockford in its short dense explanations of a wide variety of important concepts including scoping, functions...

Continue reading →


Book of the Day: Metaprogramming Ruby

Metaprogramming Ruby: Program Like the Ruby Pros by Paolo Perrotta is a book whose style tends to be divisive. In other words, you will probably love it or hate it. Once you’ve realised that, it’s important to note that even if you fall into the category of people who hate it, it’s worth giving it a chance and pushing through. The content inside makes it worth your time.

The concepts are wrapped in a thin narrative and presented while walking through solving a series of problems in which you get the thought process and concepts along with code samples that evolve iteratively incorporating the concept being discussed. Some of the concepts covered in the book include: object model, methods, blocks, class definitions, code that writes code and Rails. The explanation of the Ruby object model is one of the best I’ve ever read.

While the narrative isn’t everyone’s preferred style ( just read...

Continue reading →


Goodbye ubiquitous digital service

Over the past months I’ve been transitioning away from a number of the digital services and apps I use. Honestly I didn’t set out to do it, rather it has become a snowball effect that started with one service I hated using and has led to an almost meditative evaluation of my digital workspaces and the way I interact with the technologies that are intertwined with my existence.

As a front-end developer and modern first-world citizen I spend most of my day in front of a screen. I am immersed in technology - keeping up with it, using it, interacting with it. It is after all my work. I spend all day shifting between my text editor, terminal, browser and phone. I use social media to interact with the wider world around me. I use a RSS reader to streamline my ability to find, read and share content with others. I use digital bookmarks to keep track of the knowledge I need access to ( either...

Continue reading →


Book of the Day: Secrets of the JavaScript Ninja

I’ve decided to write a new series of posts: Book of the Day. In prior posts I’ve written some recommendations of my favorite books related to JavaScript and Ruby:

  • 4 best JavaScript or JQuery books for beginners
  • JavaScript books to take your skills to the next level
  • 6 Best Books for Learning or Advancing your Ruby Knowledge

Book of the Day will highlight a book — generally related to design or development — that I think is worth the time to read along with why. As always when I write a about a book, my hope is to give some clues about the book to help you make the difficult decision about whether it’s a book for you. The only catch is that I won’t be publishing them daily.

Without further ado…

Secrets of the JavaScript Ninja

The first book on the list: Secrets of the Javascript Ninja.

As developers, we frequently rely on the libraries and frameworks built by others, however an...

Continue reading →