Take Your Emacs to the Next Level by Writing Custom Packages

I wrote recently about using Emacs as a JavaScript development environment. One of my chief complaints was the inability to easily run JavaScript tests from within Emacs. I practice TDD frequently, and having to context-switch out of the editor I’m using to run tests is a big annoyance for me.

I knew it was possible to do what I wanted from within Emacs, as evidenced by other test runner modes like RSpec-mode. Armed with that knowledge, I decided to go through the process of learning enough Emacs Lisp to make a Mocha test runner. In the process, I learned a lot about developing Emacs packages and ended up with a really useful tool, so I thought I would share some of the things I learned.
Read more on Take Your Emacs to the Next Level by Writing Custom Packages…

Up Your Logging Game with Improved Log Management Tools

Are you still using plain text files to collect logs for your application? I was too until recently, but no more. While plain text logging is simple, it has a number of limitations. The good news is there are a number of superior logging alternatives available, including two that I have used personally—Loggly and Graylog. Read more on Up Your Logging Game with Improved Log Management Tools…

Bye-Bye, Sinon – Hello, testdouble

UPDATE: Justin Searls, the author of testdouble.js sent me an email with some notes on this post.
I’ve added some his comments below to provide some additional context.

I’ve been working in JavaScript-land for the last little while, writing lots of Node.js code. Since I practice TDD, I’m always trying to keep my eye on the best new ways to test JavaScript code. Read more on Bye-Bye, Sinon – Hello, testdouble…

Emacs vs. WebStorm for Node.js Development

If you’ve ever worked with me, or read my blog posts, you know I am an Emacs junkie. Emacs is my first and last editor, and I’ll happily spend hours making it just the way I want it.

Lately though, I’ve been doing a lot of Node development and feeling some pain from using my favorite tool. I also recently ended a large Java project where I had been using IntelliJ as my editor, since it was much more advanced than anything Emacs could offer. Since I had been using IntelliJ and some other JetBrains products, I was aware of WebStorm, their IDE geared towards JavaScript development. Read more on Emacs vs. WebStorm for Node.js Development…

Using ES6 in Node.js

My team recently upgraded our Node version from 0.10 to 4.0 for a big app we are working on. Lots of improvements came in the upgrade, but by far, my favorite is all of the ES6 features now available natively in Node.

Just to be clear, Node 4.0 does not exhaustively support ES6. It implements a lot of the biggest new features, all incorporated from the upstream V8 engine. Getting all of these features–especially without having to set up up a build process with Babel or another compiler–has been a huge win for our team. We’ve been able to write cleaner, better JavaScript, and we’ve been gradually refactoring our app to use the new ES6 features. Read more on Using ES6 in Node.js…

Don’t Let Silos Ruin Your Software

Dividing up work is a natural and proven way to solve most problems faster. Specialization is also common, especially in areas that demand a range of skills too broad for anyone to master fully. Both of these approaches can be useful, but just like ammonia and bleach, if you aren’t careful to keep them separate, bad things can happen. I’m talking about the dreaded silo, the bane of engineering projects. Read more on Don’t Let Silos Ruin Your Software…

Serving Remote PDF Files with Node.js and Express

Recently, I got my first exposure to Node.js by working on a small Express web app for a client. One of the things the app needed to do was forward PDF files from another web service to a browser. The task seems quite simple: Just make an HTTP request for the data, then serve the same bytes through our endpoint. However, I ran into a couple of sticky points when loading the PDF data over HTTP and serving correctly to the user, so I thought I would whip up a quick tutorial on how to do it right.
Read more on Serving Remote PDF Files with Node.js and Express…

Using Cookbook Documentation to Pass on Knowledge

Documentation is hard. Like writing code, it is a delicate balancing act of packing information into a format that is both very dense and very readable. Going too far in either direction severely limits its usefulness.

While ramping down a client project recently, I was asked to provide documentation and guides for the JavaScript application stack the company was using. Talking such a broad topic in a useful and consumable way was a daunting challenge. Read more on Using Cookbook Documentation to Pass on Knowledge…

Speeding Up Your JavaScript Test Suite

Having fast tests is important. Slow running tests slow down development, especially if you’re practicing TDD. If tests are too slow to run, some developers may avoid running them altogether. Slow tests will also slow down CI builds, increasing the length of your feedback loop.

While it takes more development time, doing maintenance on your test suite to ensure it continues to run quickly is an important task that any significant project should prioritize. Read more on Speeding Up Your JavaScript Test Suite…