My directives post seems to have gone over well. I've received emails and comments from readers expressing how much it helped them, so I figured I'd write a post about one of the simultaneously oldest, most useful, and most under appreciated AngularJS features.
I'm going to go out on a limb and say that the single most important quality that differentiates a good software developer from an excellent software developer is the ability to spend hours on a problem where he doesn't know if or when he'll find the correct answer. No matter how many unit tests you write or how disciplined your coding practice is, there will inevitably be bugs. Not only that, there will be those annoying, frustrating bugs that you can't seem to duplicate and you spend hours grinding your teeth trying to figure out why the damn thing doesn't work. As a matter of fact, when I'm conducting an interview, I often explicitly give people a question that is too difficult to solve in the allotted timeframe, just to see how well the interviewee deals with coming to the realization that they didn't "ace" the interview.
Displaying prices in different currencies is a common internationalization task for web developers. However, this task can be a bit tricky:
AngularJS is blowing up right now, and with good reason. There's nothing more satisfying than using AngularJS to turn 1,000 messy lines of Backbone.js and jQuery spaghetti code into a trivial 10 lines. To put it in a broader context, you can think of AngularJS' place in the world this way: AngularJS is to jQuery as C++11 is to x86 Assembly. However, your quest to capture all the wonderful benefits of AngularJS may be hindered because the documentation is a bit difficult to wrap your mind around. In particular, many readers have told me that the documentation for directives is pretty intimidating, and a lot of experienced users still don't quite grok how to use them properly.
In last week's blog post, I showed you how to install all of the basic tools that you need to get up and running with the MEAN Stack. Didn't catch that one and need help getting started with the MEAN Stack? You can find everything you need in Introduction to the MEAN Stack, Part One.
I've received several emails asking for instructions on how to set up a basic MEAN stack app. I'm going to take it one step further and give you guys a two-part post that will walk you through creating your first MEAN stack app- from installing the tools to actually writing the code. In Part One we'll go through the setup and installation process. Next in Part Two we'll walk through the steps for building a very simple to-do list. Part One consists of seven steps, although only the first two are are strictly necessary.
Software developers are not known for having the best nutrition. When it comes to development work, the stereotypical late night Red Bull-fueled coding binge is often not too far from the truth. It's hard to imagine a hackathon without a stack of pizza boxes and a mountain of empty soda bottles. In addition, no good tech firm lets their kitchen run out of chips or Vitamin Water. Proper nutrition is, however, about more than just being thin; it's about providing proper fuel for your brain so you can code smarter, faster, and better. In this post I'll give you some anecdotal evidence about why nutrition matters, some resources on how to eat and train properly, and finally give you a list of 8 concrete benefits I've enjoyed since I started eating properly.
If you're familiar with Ruby on Rails and are using MongoDB to build a NodeJS app, you might miss some slick ActiveRecord features, such as declarative validation. Diving into most of the basic tutorials out there, you'll find that many basic web development tasks are more work than you like. For example, if we borrow the style of http://howtonode.org/express-mongodb, a route that pulls a document by its ID will look something like this: