Book Review: Effective JavaScript by David Herman

This is book 4 in my JavaScript book review series…this time I’ve just finished¬†Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript by David Herman. I’m not going to get into a long discussion on this one, as I have just a few things to say.

If you are an intermediate (or above) JavaScript developer, this book HAS to be on your shelf (virtual or physical). I never really connected with The Good Parts by Crockford, though I’ll probably try reading it again at some point. So while a lot of people will refer to that one as one of the modern bibles of JS, I would vote for Effective JavaScript instead. Its one of the better (most effective, if you’ll pardon the pun) technical books I’ve ever read. I love the format, and would love to see more books like it. In fact, I’ve read the book 3 times now. It covers quite a few “gotchas” and edge-cases…things I¬†don’t run into everyday. Thus, I’ve found it worthwhile to read again every 6 months or so, to refresh my memory. Instead of wasting your time discussing the details of this book, I’ll just refer you to the Table of Contents here. That should tell you everything you need to know ūüôā

If you are looking to take your JS skills to the next level (I’m not a fan of that term, but couldn’t think of anything better), Effective JavaScript is a MUST read.

Book Review: AngularJS Web Application Development Cookbook

So this is the third book review in this blog series, and I’m happy to say I’ve finally found a book I can recommend. I just finished reading AngularJS Web Application Development Cookbook by Matt Frisbie. The e-book version happens to be on sale for $5 before January 6, 2015, and I highly recommend it for that price.

As the title says, this one is a cookbook. Its not a tutorial, and I wouldn’t recommend it if you are new to Angular.¬†The book has 10 chapters, and each chapter has multiple recipes (I believe the book description claims 90+ recipes). Each recipe is comprised of 3 sections: How To Do It, How It Works, and There’s More. The How To Do It section explains the purpose of the recipe, and contains the code sample. How It Works explains the code sample in more detail, and There’s More gives additional information about the recipe.

Even though I’ve worked with Angular for 18 months, I still learned a few things in the first 5 chapters. The chapter on testing (#6), was a bit of a disappointment, but that is really the only weakness in the book. I thought chapters 7-9 were excellent, even for more advanced Angular developers. In fact, I plan to go back and re-read those chapters as I didn’t fully understand the details of some of the recipes in my first read-through. Those 3 chapters explained how to speed up your Angular apps, using promises, and covered some of the new stuff in Angular 1.3. The last chapter contained recipes on Angular hacks, and I felt these were a bit mixed. I did not like the DRY Your Controllers recipe (I can’t imagine ever implementing that recipe in real life. I would solve the problem by using Controller As), and the recipe on using $parse to reference deep objects felt a bit too hackish. But those are minor complaints. Most of the book is well-written, interesting, and full of good stuff.

Overall, this is one of the better Angular books I’ve read in the last year. If you already know some Angular, and are looking to take your skills to the next level, you should add this book to your reading list. And do it fast so you can take advantage of the $5 sale.

Book Review: Responsive Web Design with AngularJS

This is the 2nd in my series of book reviews (my previous post was the 1st book review, also an AngularJS book). This time I am reviewing another newly released book: Responsive Web Design with AngularJS by Sandeep Kumar Patel. And like the first review, this isn’t a book I can make myself recommend (sorry!).

I was looking forward to seeing what this book had to offer. Since moving from being a java developer to a front-end developer 2 years ago, I’ve spent most of my time programming¬†JavaScript, and not enough learning css & responsive design (which is one reason I’ve started this review series, as I plan to include design books in my reviews). I also wondered, having used AngularJS a lot, what I could have missed in regards to it supporting responsive design. So when I saw a book called Responsive Web Design with AngularJS, I had to check it out.

The book is short, just 5 chapters, and only 3 of them really focus on the topic of responsive design. Below are some thoughts about each chapter.

-Chapter 1: Introduction to Responsive Single Page Application and AngularJS

First, notice the small grammatical error in the chapter title. Those grammatical errors are littered throughout the book. Not a huge deal, but I do expect better editing from a professionally published book. And I thought some of the editing issues had an affect on the material. Moving on…there isn’t much to say about this chapter. The author describes the meaning of SPA, and gives a quick overview of the features of AngularJS. While obviously not a tutorial, the overview isn’t bad.

-Chapter 2: The AngularJS Dynamic Routing-Based Approach

I’m not sure about you, but my first thought was “what the heck does the Angular router have to do with responsive design”? Turns out (at least in my opinion) the answer is nothing. The author builds a service using $provider (why?) to determine the device type (tablet, mobile, desktop) based on width, then within the router, serves 1 of 3 templates. Thus there is a completely different template (and css file) for each of the 3 device types. While I’m fairly new to responsive design, this doesn’t sound like RD to me. Does it? My opinion on the book takes a hit…let’s see what happens in the next chapter.

-Chapter 3: The AngularJS Directive-Based Approach

This chapter begins by talking about the shortcomings of the approach from the previous chapter. Good. Though it makes we wonder why a chapter was devoted to the previous topic if it wasn’t a good approach. Just to have something to talk about maybe? Anyway, in this chapter, 3 custom directives are made: one for responsive images, responsive text, and responsive item lists. I’m honestly not sure the ideas in this chapter are any better. Each of the 3 directives has some duplicate code that is used to determine the device type. The directives attach a $watcher to the $window, listening for windowResize events. The code is listening for changes to the window’s width, so that it can change the layout of the page if needed. Seems a bit messy to me, and I don’t like having this device type logic in 3 separate places. Maybe this is a good idea, and those of you with more RD experience can correct me. But I don’t see my adopting ideas from this chapter, either.

-Chapter 4: The AngularJS-Based Breakpoints for Layout Manipulation

Again, maybe it’s my lack of RD knowledge, but the design in this chapter feels downright dirty (wrong) to me. Basically, the author sets up an event-based approach to setting breakpoints for changing the page’s layout. I won’t give away all the author’s tips, but basically a couple of watchers are set up this time, and when the width changes and drops below (or goes above) one of the pre-defined breakpoints, an event is broadcast. Then listeners for this event will catch it and modify the layout accordingly. Again, not something that feel’s right to me. This feels like an abuse of the pub/sub system.

-Chapter 5: Debugging and Testing Responsive Applications

This chapter had a promising title, but it was really just a collection of debugging tools and plugins you can use. There were some I had not heard of, which is good. But there isn’t really enough explanation into how to use any of them (though that info could easily be found on the website for most of the tools mentioned)

After reading this book, I don’t feel like I know any more about proper RD with Angular than I did before I read it. I guess I did learn a few ideas that I would NOT want to repeat in my applications, though. I believe my preference is to choose a CSS framework that will take care of most of the RD logic for me, so that I’m not littering my code with hard coded device widths and conditional logic. For those of you more experienced in RD than I am…what are you thoughts?

Also, I plan to read a proper Responsive Design book soon. Anyone have any recommendations? I would prefer something published in the last 12 months. My first thought is to read this one.

Book Review: Learning AngularJS by Ken Williamson

One of my plans for 2015 is to read a lot more development-related books, so you’ll see book reviews of JavaScript, CSS (a skill I need to improve), responsive design, and various other front-end topics. I recently bought a Surface Pro 3 (awesome so far), I thought I would use it to read & review something prior to the 2015 kicking off. Some of the reviews will be long(ish) and some will be more brief, depending on how much I learned from the book.

My first¬†review is for Learning AngularJS by Ken Williamson. Before I jump into it, I should mention this book is an “Early Release”, which means it is not the final edition. I assume the content is mostly there, but some editing and polish remains. With that out of the way, let me pass on my thoughts…

I’ve been working with AngularJS for quite a while now, maybe 18 months (my Github repo). That means I am not the target audience for this book. But having read several AngularJS books (and having read tons of tech books during my career), I would like to think I know what makes a good beginning book. I’ve also done some recent pre-publication technical reviewing for Packt and Manning (and O’Reilly several years ago). And I’m afraid to say that I don’t think this would qualify as a good beginning book on AngularJS. In fact, I’m a bit confused about the target audience for this book. If you are a developer, this book won’t help you learn enough AngularJS for it to be useful. If you are a designer, it might help you understand enough to add some html to a page that contains Angular. If you are a manager, it might give you a high level overview of the different pieces of Angular (animation, routing, directives, services, etc).

The biggest problem is that the book is SO shallow, I don’t see how it offers any benefits over other introductory Angular books or even many of the free online tutorials and blog posts. For example, the chapter on directives explains how to define a directive, how to restrict them to elements, attributes, classes in the html, and how to pass an html ¬†attribute into the directive. That’s it. Nothing else. ¬†The chapter on services shows you how to define a service module, and make some basic calls with $resource. Pretty much all of the chapters are this way. The book¬†gives you just enough info to READ some Angular code, but nowhere near enough to actually do coding in Angular. If you view the Table of Contents, you’ll see that almost half of each chapter is devoted to testing. Great! No…the testing is so basic that it isn’t useful, other than as a skeleton for how to write your first, basic test.

To say something positive, the author does point out useful tips occasionally throughout the book. But without major changes to the content, I wouldn’t recommend this to a developer who needs to learn AngularJS. If you are interested in a super high-level view of Angular, just to get an idea what its about, you might get something from this book. But you could also find this info for free on a ton of blogs (see my Angular Learning repo on the Github account).

I’ll keep an eye out for the final book to be published (the current pub date is March 2015) and update this review if the book’s content changes significantly.

Quick Review: Days of Rage by Brad Taylor

While book reviews won’t be a focus of this blog (tech related stuff will be), I will still mention books I’ve read and liked. I recently finished the latest book in the Pike Logan series by Brad Taylor: Days of Rage.

Brief Thoughts:

The Pike books continue to get better and better. I’m not sure how how the author can continue to release 2 high quality books each yet, but he is doing it. This series is the biggest reason I’m reading spy/thriller novels again. As for this book, it continues to take Pike and his team into new territory. What I really like about this series is that you can see how events in previous books are affecting events in this book. In many series, it seems like each book is a standalone episode, with each book having minimal impact on the next. But in the Pike Logan books, the characters continue to grow (and unfortunately, die). These books and characters feel real…unlike many in this genre (in which the characters feel like they are just filling roles in the story).

I’m already looking forward to the next book (which I thought was due in Jan 2015, but now I can’t find a reference to it on Amazon).