Legacy Code Part II: Pinning TestsFri, 4 Apr
We continue our series on testing and refactoring legacy code. Now that we understand the design of Intro.js and know what we want to change, we need a way to refactor the code safely. Our centerpiece will be pinning tests: rough tests that warn us when we accidentally change the behavior of our legacy code.
Legacy Code Part I: Reflective DesignFri, 7 Mar
Legacy code. It’s a problem everyone must face at some point in their career. What do you do when you inherit a codebase that you don’t understand? How do you add tests to existing code? Today in The Lab, we start a massive three-part series on testing legacy code. First up: reverse-engineering the design of existing code and creating a test strategy.
CasperJSFri, 7 Feb
We’ve used PhantomJS, the headless web browser, to automate our smoke tests. PhantomJS is fairly low-level, however, which makes writing tests pretty painful. Enter CasperJS. CasperJS is a wrapper that promises to make PhantomJS much more convenient. Today in The Lab, we put it to the test. How does CasperJS work, and will it live up to its promise?
Latest Live Episodes
Surprisingly ClearWed, 23 Apr
We kick off our new chapter with a discussion where we’ve been and what we’re doing before getting down to the purpose of the chapter: implementing a “clear screen” button that will clear our SVG canvas. The first step is surprisingly easy. The lack of blood, sweat, and tears is a bit disturbing, though.
Don’t Allow Mistakes into ProductionMon, 21 Apr
Everyone makes mistakes; it’s inevitable. The point of writing our code to fail fast is to make sure those mistakes don’t make it into production. In this episode, we make pageOffset() fail fast and clean up our tests. Now adding the wrong CSS will cause our smoke test to fail, preventing us from releasing broken code. That finishes the chapter.
Appropriate FailureWed, 16 Apr
In the previous episode, we made our code fail fast when calculating relative offsets if a border or margin is present. In this episode, we finish up relativeOffset() by taking care of IE 8 and cleaning up the code, then we get started on making pageOffset() fail in the same way.
A brand-new screencast about
I will be using it as *the* goto reference for
any JS development for some time to come.
It has the right number of details that you don’t get by
reading book but only working with exceptional people.
I like the variety of technologies used and the
complete integration of them shown together.
I like seeing *all* aspects of the development:
the dead ends, the surprises, the wins, etc.
Quality is excellent, and I love that I can
download them and not have to stream them.
What is Test-Driven Development?
Who am I?
I’m James Shore. I’ve been building applications using test-driven development and other Agile techniques for over 13 years. I’m a recipient of the Agile Alliance’s Gordon Pask Award for Contributions to Agile Practice and I wrote a book called The Art of Agile Development.
What You Get
This screencast series focuses on rigorous, professional web development. That means test-driven development, of course, and also techniques such as build automation, continuous integration, refactoring, and evolutionary design. We support multiple browsers and platforms, including iOS, and we use Node.js on the server. The testing tools we’re using include NodeUnit, Mocha, expect.js, Karma, and PhantomJS.
All videos are DRM-free, viewable on the web and downloadable, and all source code is included.
The “Live” Channel
The series consists of three main channels. “Recorded Live” episodes are a live recording of an application as it’s developed, with commentary. I edit out dead-ends and time spent in research so each episode is focused and meaningful. Each “Live” episode is about 15 minutes long and comes out twice per week, on Monday and Wednesday.
The application itself is a real-time multi-user drawing application, developed from scratch and continually enhanced in each episode.
In addition to the “Live” episodes, you also get a special “Lessons Learned” or “The Lab” episode every month.
“Lessons Learned” episodes are for people wanting a refresher, a quick reference, or who simply want to catch up. They provide a distilled look at a specific topic, such as automating Lint, testing a Node.js server, or automating cross-browser testing.
“The Lab” is about exploration and experimentation. These episodes examine topics that don’t fit into the other two channels.
I have learned so much more than I expected.
I really enjoy your approach to screencasting and
wish the series wouldn’t end some day.