Category: Software Development

Javascript Testing on Travis CI with Karma and Mocha

By Emily Dolson on November 24, 2017 in Software Development / 0 Comments
Javascript Testing on Travis CI with Karma and Mocha

When working on large software projects, automated testing dramatically reduces the risk of unknown bugs creeping into your code. That’s why I’m a huge fan of services like Travis CI, that automatically test all code that is pushed to a git repository. However, some code is a lot easier to write automatable tests for than others. Recently, I’ve been working on testing some code that has proved very challenging to test: data visualization code compiled from C++ to Javascript via Emscripten. Now that I’ve got it working, I’m writing this post to document how, in hopes that it will save others a lot of trouble. My ultimate solution was to use the Mocha testing framework and the Karma test runner, but I’m going to start out by talking about a few other things I tried and why they […]

Signal GP, an Introduction

Signal GP, an Introduction

Genetic programming (GP) is the application of natural principles to evolve computer programs rather than writing them by hand. Here, I introduce Signal GP, a new type of linear GP representation designed to more directly capture the event-driven programming paradigm, allowing evolved programs to handle signals from the environment or from other agents in a more biologically inspired way than traditional linear GP representations. GP is successful across a growing set of problem domains. Signal GP targets problems where programs, much like biological organisms, must react on-the-fly to signals in the environment or from other agents. I’ll address the following questions in this blog post: What is linear genetic programming? What exactly is the event-driven programming paradigm, why is it so powerful, and why do we want to capture it in GP? And, how exactly does […]

An Introduction to Web Development with Emscripten

An Introduction to Web Development with Emscripten

As a professor, I am always trying to juggle more tasks than I can possibly handle, which means I usually end up focusing my time on “urgent” matters over things I find merely “important” or “satisfying”.  A bit over a year ago I started making sure that I take time to code every day (and am much happier for it).  A sizable majority of this time I’ve devoted to learning and using the Emscripten compiler. Emscripten compiles C or C++ code into high-efficiency JavaScript (using asm.js) that can run in any web browser, and is accelerated in newer browsers.  How efficient is it?  Well, in practice it tends to be half to two-thirds the speed of running a C++ application natively.  To put that in a more provocative way, it runs 8 to 10 times faster […]