Dr. Gleb Bahmutov, PhD

JavaScript ninja, image processing expert, software quality fanatic

email blog github @bahmutov search slides conferences

videos from my conference talks. For example, this is me speaking at ng-conf 2015 about running digest cycle in web worker


I am a software engineer interested in front and back end development, especially in using JavaScript (and its flavors) across the entire stack. I work at Kensho, making the world a better place. I try to blog on topics related to software craft. This is what people say about my blog posts and presentations:

In my spare time I built some cool stuff; see the links below. I try to keep modules small because I agree with Sindre Sorhus.

for everyone:
  • 2048 5x5 is a clone of the famous 2048 game with larger board and two new tiles appearing at each turn. Makes the game very fast paced. source.
  • 2048-cram lets you play standard 2048 but every N seconds pops a JavaScript question. Answer incorrectly and lose a turn, plus get a penalty tile! source.
  • slides-now is a stand alone slide presentation viewer implemented inside the browser without any server side components. Just drag and drop a Markdown (.md) file into the website page and it will play a stylish HTML5 presentation. I love the simplicity of editing my talks as pure text files, keeping versions using Git and playing them whenever I need without logging in / uploading / etc. It even works when I am offline, because the website is so simple it works from cache.

    Alternatively, there is Chrome extension and a stand alone Node module if you prefer.

  • read on paper is the simplest way to send readable article from PC to your tablet for easier reading. It saves your eyes and trees!
  • Command line Boggle solver.
open source tools for developers:
  • d3-helpers are tiny functional utilities mostly to simplify callbacks for D3. Also could be used to chain method calls, property access and function applications anywhere.
  • dirty-water is CLI tool measuring how much JavaScript is in your EJS / AngularJs templates. One should not mix js with html, or css with html, or generate html in js. Or drink dirty water.
  • deps-ok quickly checks if any of the top level dependencies are missing or out of date. Faster than using npm ls. I also wrote grunt-deps-ok grunt plugin.
  • grunt-nice-package is an opinionated package.json validator.
  • grunt-npm2bower-sync is a fork of another project that copies main properties from package.json to bower.json
  • changed is a command line tool that displays changes for a given nodejs package, so you don't have to hunt manually.
  • next-update is a stand alone nodejs tool that can check if upgrading your module's dependencies to newer versions breaks any tests. Makes it a breeze to keep your module using the latest and greatest 3rd party tools. Even if you do not have tests, you can use next-update-stats service to check overall module upgrade success statistics (collected anonymously).
  • next-updater can update all your github repos that each pass through next-update. Makes keeping dependencies up to date over all your projects a breeze.
  • dont-break allows to check if your library would break projects that depend on it if you publish it as it is now.
  • A homebrew unit testing framework gt that follows QUnit syntax but adds better async testing and code coverage (via istanbul). There is agrunt-gt to run GT as a grunt task.
  • There is static source complexity tool jsc that keeps my code nice and understandable
  • I wrote lasso to instrument widget test pages on the fly, giving you insight into the code covered for by the unit tests. There is no setup necessary, and check out the list of unit test frameworks in the examples folder: everything just works!
  • When the number of tests grows, and you cannot wait to run them all on each code change, take a look at untested. It stores test point mappings for each JavaScript source file (generated from code coverage reported by gt and lasso), and returns which unit tests should be run for all changed files. Test your changes all the time very quickly!
  • Well documented modules with lots of API examples are easier to reuse, maintain and develop. I wrote js API documentation tool xplain that takes an unusual approach of placing unit tests as examples in the API documentation. The specific test syntax is transformed into human readable format, producing documentation that looks hand-crafted, will always stay in sync with the code, and does not require any developer maintenance. I wrote grunt-xplain wrapper.
  • I automate basic sanity check for any website deployment using clean-console. It loads the url using phantomjs WebKit browser and checks for any JavaScript errors. This is quick test that runs as a last step of the deployment script. There is grunt-clean-console plugin for grunt.
  • risk-map is a cool way to visualize the entire project's code complexity and unit test coverage using D3 treemap layout. Shows high risk source files in a very obvious way as large red patches. I talk about my inspiration for the project in this talk. I am currently working on using risk-map and developer's vanity to improve software quality, see man-behind prototype.
  • qunit-promises is a QUnit plugin that makes checking promises a breeze.
  • qunit-once is a QUnit plugin adding module.setupOnce and module.teardownOnce functions.
  • qunit-inject is a QUnit plugin for injecting variables from the module into unit tests by name.
  • qunit-helpful is a QUnit plugin for automatically providing the entire failed expression. Magical.
  • npm-utils is a set of promise-returning functions that run different NPM commands.
  • jshint-solid tells how strict your .jshintrc file is. As project matures, you should tighten the Jshint settings. There is grunt-jshint-solid plugin for grunt.
  • time-promise is a functional decorator measuring time for sync or promise-returning functions. It is among my four favorite functional adaptors.
  • proud collects NPM downloads for all modules authored by a developer with given username. One can generate a proud-badge, even host a simple proud-connect server or use the deployed Heroku proud.herokuapp.com app.
  • aged is tiny utility grunt helper for filtering files by last modified age. Allows to define separate sets of quality metrics for recently modified (fresh) and stable files. Read why I think this is important in Aged to Perfection blog post.
  • es6-generators-example shows how to write EcmaScript6 code with generators and make them available to everyone, even to people who use EcmaScript5 on node.
  • dotdot installs a hook into Node loader and allows you to write shorthand foo..bar('something') instead of foo.bar.bind(foo, 'something'). You can also write fn..('args') instead of fn.bind(null, 'args') To make it compatible with build tools, I wrote gulp-dotdot that transforms `..` notation in the stream.
  • node-hook is a simple way to hook into Node loader to transform the source before compiling it. There are multiple ways this is super useful.
  • really-need is a replacement for Node's require function. Bust cache, transform loaded source, change loaded object.
  • connect-slow is middleware for node Connect and Express servers. Allows to selectively delay serving some requests using URL RegExp. Used to polish user experience as described in give browser a chance. I wrote same feature for Koa server using generators, see koa-slow.
  • connect-stop stops some requests based on url. Good for testing.
  • console.json removes need to write console.log(JSON.stringify(object, null, 2));
  • console.html beautifies and prints HTML code or HTMLNode console.html($('#id'));
  • console.table adds a method to print array of objects as nice table in Node.
  • status-gravatar changes your Gravatar profile image depending on the Travis-ci build status of your projects. Sometimes I look angry when my projects start to fail ;) Uses my set-gravatar module for Node.
  • grunt-help runs given command, captures output and saves to given file. Useful to include the program`s --help output directly in the README.md.
  • iframeable is tiny CLI to check if given website could be iframed inside another website (and is susceptible to clickjacking attack).
  • grunt-filenames is a grunt plugin to validate source filenames, for example require all filenames to be lower cased with dashes.
  • grunt-blank finds all empty, blank or small files.
  • console-pop buffers calls to console.log and then returns a copy, useful for higher level testing.
  • bare-objects adds <> syntax to JavaScript via nodejs loader hook. Why? Because bare objects are sweet!
  • lcov-filter filters coverage info for some files, useful to send accurate info to coveralls.io
  • available-versions returns newer releases for a given NPM module.
  • functional-pipeline is super simple chaining for property access, method and function calls. It is like _.invoke + _.pluck + _.compose in one function.
  • heroin is a single dependency injection function for JavaScript changing methods to accept dependencies through separate object.
  • post-merge-make installs a Node git hook that runs after a merge. The hook executes make post-merge command and is useful to install dependencies and run builds after new code is pulled. I also wrote pre-commit-make to run make before a commit. There is also pre-commit-make-parallel to run make with parallel tasks.
  • lazy-ass is a lazy assertion function for node and browser. Do not pay a performance penalty if the condition is false.
  • lazy-ass-helpful rewrites any function that uses lazyAss on the fly putting the condition expression into the message. Super useful for unit testing because you can skip writing extra messages in each assertion.
  • lazy-test turns testing inside out. You inject small testing framework and run the unit tests in production. Makes quick testing of code private to a closure possible, built on test-mole principle.
  • scoreunder is simple function to make underscore or lodash libraries more functional by putting callback first, before data. Makes functional reuse a lot more elegant.
  • quiet-grunt replaces grunt's output with dots if everything is going ok. If an error happens, all output is dumped.
  • bunyan-gt makes end to end program runs easy to analyze as if they were unit test by inspecting JSON log output
  • ng-q-timeout adds .timeout method to promises returned by angular $q service.
  • bdd-tree transforms BDD (jasmine, mocha) spec source into syntax tree.
  • ng-ast builds a graph of loaded modules and what they provide from a running Angular app.
  • check-more-types is a library of predicates, modifiers and defensive programming helpers
  • squint is a visual online tester for source code white space. It is a cool project because I implemented it while watching "Overkill" presentation by @kytrinyx at engineers4engineers conference, and thinking "a tool like this would actually be useful".
  • quote safely adds quotes to given string without adding multiple ones.
  • quote-markdown adds markdown format characters around a string, like `some code` or *emphasis*
  • find-missing-directives detects empty tags in the page due to missing angular directives.
  • stop-angular-overrides prevents silent and hard to debug angular module overrides.
  • ng-wrap allows you to wrap global variables into Angular dependencies on the fly.
  • d3-panel adds d3 panel to the Chrome DevTools. You can now plot data while debugging web applications without leaving the browser console.
  • spots is partial application with placeholders.
  • eslint-rules is my collection of custom eslint rules.
  • ng-wedge intercepts $http requests sent by AngularJS app without modifying the application code or installing extensions. Pure magic.
  • was-tested is a JavaScript code coverage proxy that instruments a live website on the fly.
  • tested-commits splits JavaScript code coverage by commit.
  • turtle-run is a testing proxy that slows down or aborts some requests.
  • service-turtle is in page Ajax mocking proxy using a ServiceWorker. Read Robustness testing using proxies.
  • chdir-promise is a convenient promise-returning stack for changing the current working directory.
  • ng-describe removes all boilerplate from AngularJS Karma specs.
  • was-it-used - spy on 3rd party modules to tell if they were really used during testing.
  • q-flush - flushes Q promise chain on demand for simpler testing.
  • I contributed a few features and plugins to cute-stack - a beautiful Node exception stack reporter, for example see my plugin bad-line.
  • ng-hot-templates - reload single AngularJS custom directive in place while keeping the data. See demo video
  • gulp-lint-everything needs just a single command to lint the sources files using all linters.
  • debug-logdown is flexible per-feature logger with Markdown support.
  • raven-express simplifies Sentry client initialization for Express servers.
  • inquirer-confirm is simple promise-returning CLI confirmation question with yes/no choices. Built on top of inquirer.
  • crasher is a tiny middleware for throwing sync and async errors; allows verifying your crash reporting setup.
  • PE-N-starter is a dead simple starter project with PouchDB, Express, Node and Github auth. Demo
  • cache-require-paths and cache-require-source speed up the Node app startup, see Faster Node app require.
  • quickly recursively starts all local programs necessary to test a program. Inspired by Aviator.
  • bdd-stdin provides test responses to CLI stdin prompts.
  • functional-extract quickly gives you nested properties and default values from an object.
  • obind is a small utility for partial application for functions taking a single argument object.
  • git-pages lets you run your own github pages-like static website.
  • grunty runs a single Grunt plugin without writing Gruntfile.js, useful for NPM scripts.
  • last-commit saves and reads last commit to allow easy git id embedding into server-side code.
  • render-vars provides same variables across all Expressjs rendered views.
  • useful-express-partials are several useful partial views for ExpressJS server (analytics, crash reporting).
  • with-package uses values from the package.json in the NPM script commands.
  • changed-log returns list of commit messages for any NPM module between given two tags. Great for finding what has changes between two versions.
  • csv-pair combines a pair of CSV file collapsing identical columns.
  • first-existing finds the first file existing on disk from the list of arguments.
  • csrf-login allows to login from the command line to websites that use CSRF protection.
  • get-username-and-password is promise-returning function that asks user to enter username and password. Or reads from the environment.
  • describe-it extracts a private function or variable for BDD unit testing. No source code modification necessary, works via NodeJS loader really-need.
  • changed-complexity is a useful CLI tool that tells you how the modified JS files changed in complexity. Lets you judge the commits better.
  • modules-used makes a Markdown list of your project's dependencies to share used tools.
  • center-code shows syntax-highlighted file contents in the center of your terminal. Great for demos and live coding.
  • update-markdown updates a single markdown section with new content.
  • crash-reporter-middleware sets the first available crash reporting middleware client by looking at environment keys.
  • object-fitter eliminates properties from objects until they fit size limit.
  • error-receiver - your own crash information collector server, described in this blog post.
  • exact-semver is a global script or local tool to clean up the fuzzy versions from your package.json dependencies.
  • js-to-js is Express template engine for rendering input JavaScript modules as external JavaScript snippets to allow very strict and safe Content-Security-Policy to fight script injection attacks.
  • npm-module-checklist is a good checklist for any NPM package author to use.
  • manpm is the man for NPM modules, based on searching the README files.
  • condition-circle is semantic-release plugin for publishing to NPM from CircleCI
front-end components:
  • iframe-api is bidirectional communication between parent website and iframed website.
  • color-pusher is a widget geared towards real time website color tweaking. Allows anyone to change multiple page colors, including swapping an entire external palette. I created color-pusher to give graphic designers power to tweak live websites without making a round trip to a developer to deploy the new color scheme. There is a Chrome DevTools panel extension, source, that allows editing any live website.
  • code-box is a lightbox for code blocks. Adds full screen lightbox to all code elements in your page with single call.
  • progress-full-width is a progress bar along the bottom of the page, can be stacked or run on a timer.
  • timer-bar is a progress bar connected to a timer for finishing presentations on time.
  • sticky-right-top-icon adds a sticky icon to any element, even if it has scrollable content inside.
  • code-snippets are performance snippets for Chrome DevTools for debugging and fine-tuning application performance. Read how to use them in this blog post. Featured in Performance Calendar 2014.
  • overflowing finds elements that do not look right. Makes it simple to detect basic responsive layout problems
  • check-element-attribute overwrites Element.prototype.setAttribute to validate passed value, especially used in SVG/D3 code.
  • self-addressed converts iframe communication into promise returning calls.
  • console-log-div mirrors console.log calls to a div created and shown at the bottom of the page. Great for demos and experiments.
  • script-attributes helps read script arguments from the script tag.
  • ng-alertify is AngularJS wrapper around alertify.js popup library.
  • ng-waffle is AngularJS wrapper for Django Waffle.
  • confirm-click asks the user to confirm when clicked on href, ng-href or even before executing ng-click action.
  • angular in web worker is a demo of running full AngularJS 1.x inside a web worker.
  • ng-http-estimate is a configurable $http time request estimator.
  • freeze-prototypes is tiny code to prevent unapply-style attacks that modify common prototypes.
  • ng-simple-webrtc has two tiny directives for broadcasting and watching a room via WebRTC protocol.
  • unit-testing-angularjs-tutorial a tutorial on testing AngularJS code using ng-describe library.
  • ng-services is a wrapper for using AngularJS code from apps that do not want AngularJS.
  • bundle-angular-for-web-worker bundles Angular 1.x library to be able to run in a WebWorker.
  • ng-services are Angular data services for application that don't want to be Angular.


I worked at uTest for half a year, mostly bringing together and updating various front end technology stacks.

I worked for a year at MathWorks, helping to bring the power of MATLAB to the browser.

Earlier I spent four years as a researcher at EveryScape, writing panorama stitching and 3D modeling software. Before that I worked calibrating 3D laser scanners and developing white light scanners. Even before that I wrote distributed database access software that worked across Objective-C, C and Java systems.


I am a member of multiple meetups in the Boston area and spoke about grunt, code coverage and testing, technical debt visualization, best practices for handling dependencies, agile software quality, angular performance, Chrome code snippets and many other topics. You can find most of my slide decks at slides.com/bahmutov.


Doctorate from Purdue University (West Lafayette, Indiana) working with Dr. Voice Popescu (adviser) and Dr. Mihai Mudure (fellow candidate), developing a novel scanning sensor. We were building 3D models of rooms in real time using a video camera and a bunch of lasers. If you were afraid of lasers, you could be anywhere else in the world, observing the results over the internet, as our system was smart enough to incrementally update the 3D model and send the results in real time.

Small print

Some of my github repositories are not up to date, while I am working on cleaning up the code.