DevMountain - Week Five

This was another roller-coaster week of Angular. One of the big dichotomies of the week was our variety of instructors. In the end, I definitely felt like I learned a lot, but it’s largely an ephemeral feeling with very little working code.

Action will remove the doubts that theory cannot solve.

Tehyi Hsieh

Overview

This was our second week of Angular. Late last week we started falling behind the schedule; at the pace we’re moving, this would have been a problem all by itself. To exacerbate that problem, we also had three different instructors over the four classes this week; none of the instructors appeared to know that we had fallen behind.

The upshot of having three different instructors is that we got different perspectives, along with a plethora of styles, tips, and tricks. The downside is we kept falling behind and we have less working code than normal to demonstrate.

Highlights

A handful of the cool things we learned about:

  • We can use .map to run a function on each element in an array.
  • Angular’s $http is a promise, therefore we don’t need to use $q with it.
  • We learned about the JavaScript “event loop” and the Angular “digest loop”. (Knowing about the JavaScript “event loop” earlier, particularly before working with jQuery, would have been useful!)
  • Decrementing loops. (When Chris wrote code with this, my mind first did a ‘huh’, and a split second later I realized what it was doing, and was blown away by the sheer elegance! Unfortunately, it appears to be far less elegant when performance is considered, e.g., http://jsperf.com/yet-another-js-loop-comparison/2#bs-chart)

Results

Most of the projects this week require a running server to view, so I’m linking directly to GitHub source code instead of a working demonstration of the page