Web Development
-
A Gentle Introduction to Javascript Test Driven Development: Part 2
Written by James SinclairWorking with JavaScript network calls can be tricky when practicing Test Driven Development. This article gives an example of how to use stubs and Promises to make testing network calls easier. This is part two of a three-part series outlining my personal approach to JavaScript TDD.
-
A Gentle Introduction to Javascript Test Driven Development: Part 1
Written by James SinclairGetting started with test driven development (TDD) can be daunting. It sounds tedious, boring and hard. There’s also a confusing array of frameworks and libraries out there. Some work on the server; some work in the browser; some do both… it can be hard to know where to start. This is part one of a three-part series outlining my personal approach to JavaScript TDD.
-
A Gentle Introduction to Functional JavaScript: Part 4
Written by James SinclairIn the last article of our four-part introduction to functional programming in JavaScript, we looked at higher-order functions. In this article we discuss how to use these new tools with style.
-
A Gentle Introduction to Functional JavaScript: Part 3
Written by James SinclairIn the last article, we saw how functional programming can be used with arrays. In this article we examine higher-order functions—functions for making functions.
-
A Gentle Introduction to Functional JavaScript: Part 2
Written by James SinclairIn the previous article, we saw how functions can be used to make certain code abstractions easier. In this article we apply these techniques to arrays and lists.
-
A Gentle Introduction to Functional JavaScript: Part 1
Written by James SinclairWhat is all the hype about Functional JavaScript? And why is it called functional? It’s not as though anyone sets out to write dysfunctional Javascript.What is it good for? Why would you bother?
-
Simple Parallel Processing in PHP with pcntl_fork()
Written by James SinclairFor a recent project I needed to process some code in parallel. A colleague pointed me to the
pcntl_fork()
function, and it turns out it’s not quite as scary and complicated as I thought. So I turned the simple use case into a generic function. -
Simple Parallel Processing with PHP and proc_open()
Written by James SinclairYou can find a reasonably sensible example of how to perform parallel processing with PHP using the
popen()
function at wellho.net. Sometimes though, the requirement to pass all the parameters to your function via command line arguments can be limiting. -
An introduction to Drush: The Drupal power tool
Written by James SinclairDrush is a tool that allows you to perform common Drupal tasks from the command line.