Better world by better software

Gleb Bahmutov PhD

Our planet 🌏 is in danger

Act today: what you can do

Aug 1 2014
products

Async using generators

Asynchronous processing using ES6 generators.

Read More

Share Comments
  • es6
  • generators
  • javascript
  • nodejs
Aug 1 2014
products

Promise paths

Promise chain looks like a railroad with two tracks.

Read More

Share Comments
  • javascript
  • promises
Jul 29 2014
process

Refactoring OR

Example refactoring a block of code containing OR condition

Read More

Share Comments
  • functional
  • javascript
Jul 27 2014
process

Agile software quality

A small team can produce high quality software without exhaustive and long testing cycles.

Read More

Share Comments
  • advice
Jul 26 2014
products

Picking JavaScript testing framework

Pick QUnit/gt if you need TDD, use Mocha if you want BDD, and Ava if preparing for the future.

Read More

Share Comments
  • QUnit
  • advice
  • javascript
  • testing
Jul 24 2014
process

Testing without matchers

We use assertions in our unit tests instead of built-in matchers.

Read More

Share Comments
  • javascript
  • testing
Jul 23 2014
products

Fluent getters and setters

Single method working as both getter and setter

Read More

Share Comments
  • javascript
Jul 23 2014
products

Pick latest promise

Promise throttling and flatMapLatest equivalent

Read More

Share Comments
  • promises
Jul 19 2014
book review

Review "How Not to Be Wrong" by Jordan Ellenberg

The power of mathematical thinking

Read More

Share Comments
Jul 14 2014
process

Journey from procedural to reactive JavaScript with stops

Same simple problem solved in different programming styles.

Read More

Share Comments
  • functional
  • javascript
  • ramda
  • reactive
Jul 9 2014
process

Randomize file order when testing

Keeping the same load order of files and tests can lead to hidden bugs.

Read More

Share Comments
  • testing
Jul 9 2014
process

Why upgrade dependencies?

Keep dependecies up to date to get bug and performance fixes, not features.

Read More

Share Comments
  • advice
  • modular development
Jul 6 2014
process

Helpful assertions

Use lazy and helpful assertions instead of Jasmine matchers in the unit tests.

Read More

Share Comments
  • assertions
  • javascript
Jul 1 2014
products

A second taste of nodejs generators

Another set of examples using generators.

Read More

Share Comments
  • es6
  • generators
  • javascript
  • nodejs
Jul 1 2014
products

Using Node ES6 today

Current level of ES6 in various tools.

Read More

Share Comments
  • es6
  • javascript
  • nodejs
Jun 26 2014
products

JavaScript closures

Explanation of closures via lexical scope

Read More

Share Comments
  • javascript
Jun 22 2014
process

Too much curry

One can easily apply too much or wrong type of curry.

Read More

Share Comments
  • functional
  • javascript
Jun 18 2014
products

Angular $q promises with timeouts

Extend promises returned by $q with timeout method

Read More

Share Comments
  • angularjs
  • javascript
  • promises
Jun 18 2014
products

End to end unit testing

You can quickly verify complex logic if you use structured JSON logging.

Read More

Share Comments
  • advice
  • javascript
  • testing
Jun 18 2014
products

Promises with timeouts

An example adding a flexible timeout method to promises

Read More

Share Comments
  • javascript
  • promises
Jun 11 2014
products

Make serialized objects smarter using prototype

We can extend objects built from JSON strings by pointing to a different prototype object.

Read More

Share Comments
  • javascript
Jun 8 2014
process

Working around the keyword new in JavaScript

Make constructor functions work without "new" keyword in callbacks.

Read More

Share Comments
  • boilerplate
  • functional
  • javascript
Jun 7 2014
process

Put callback first for elegance

Combining functions into custom iterator callbacks and using _ will be easier if you put callback function first and data second.

Read More

Share Comments
  • advice
  • functional
  • javascript
Jun 1 2014
products

A taste of nodejs generators

Playing with ES6 generators in Node.

Read More

Share Comments
  • es6
  • generators
  • javascript
  • nodejs
May 27 2014
products

Lazy and async assertions

Flexible assertions without performance penalty.

Read More

Share Comments
  • assertions
  • boilerplate
  • javascript
  • sentry
May 25 2014
products

Jade templates for Angular directives

Using Jade instead of HTML for AngularJS directives.

Read More

Share Comments
  • angularjs
  • jade
May 25 2014
products

Angular from browser console

Access angular model and update DOM from the browser console.

Read More

Share Comments
  • angularjs
May 20 2014
products

Inject valid constants into Angular

Using providers to inject runtime values into modules.

Read More

Share Comments
  • angularjs
May 19 2014
products

Keeping async data non-shared in singletons

Experiments with thread-local storage in Node.

Read More

Share Comments
  • javascript
  • nodejs
May 18 2014
products

No binding necessary

How to avoid having to bind functions to contexts.

Read More

Share Comments
  • javascript
May 16 2014
products

JavaScript stack size

Finding the size of the memory allocated for the stack.

Read More

Share Comments
  • javascript
May 15 2014
products

Recursive Angular Directive

If a directive is recursive, you must use template url to avoid infinite loop.

Read More

Share Comments
  • angularjs
May 8 2014
products

AngularJS $parse hacks

A few useful applications of AngularJS parsing service.

Read More

Share Comments
  • angularjs
May 6 2014
products

Assertions

Comparing 3rd party assertion libraries expect.js, should.js, etc.

Read More

Share Comments
  • assertions
  • javascript
May 5 2014
products

Simplicity in resource generation using promises

Simplify on deman resource loading with promises.

Read More

Share Comments
  • javascript
  • nodejs
  • promises
Apr 30 2014
products

Partial argument binding with heroin

How to bind any argument by name

Read More

Share Comments
  • javascript
Apr 27 2014
products

Why Node is different

Event-driven input/output makes for an efficient system for distributed computing.

Read More

Share Comments
  • nodejs
Apr 27 2014
products

Partial dependency injection

Examples of dependency injection in javascript

Read More

Share Comments
  • javascript
  • testing
Apr 27 2014
products

Why promises need to be done

Use .done() at the end of your Q promise chains to throw any unhandled exception.

Read More

Share Comments
  • javascript
  • promises
Apr 26 2014
products

Functional pipeline

Tiny library functional-pipeline composes functions in left to right order.

Read More

Share Comments
  • functional
  • javascript
Apr 23 2014
book review

Review of "Data Visualization with D3.js Cookbook" by Nick Qi Zhu

Great book, solid advice, focused on D3-specifics.

Read More

Share Comments
  • d3
Apr 22 2014
products

Unit testing promises

How to test promise-returning code.

Read More

Share Comments
  • QUnit
  • boilerplate
  • javascript
  • promises
Apr 21 2014
process

Defensive distance

Number of input data checks depends on the distance from the caller.

Read More

Share Comments
  • advice
  • assertions
Apr 16 2014
products

Linking promises

How to connect multiple promise-returning methods into single chain.

Read More

Share Comments
  • promises
Apr 14 2014
products

Unit testing Angular load using Node

Angular library can be loaded under Node synthetic browser environment.

Read More

Share Comments
  • angularjs
  • nodejs
  • testing
Apr 13 2014
products

Stop Angular overrides

Stop hunting phantom problems due to name collisions.

Read More

Share Comments
  • angularjs
Apr 8 2014
products

Dual grunt tasks

Grunt tasks that accept default options or can be configured.

Read More

Share Comments
  • boilerplate
  • grunt
Apr 6 2014
products

2 shell search commands

Search text files using grep and skip Node 3rd party folders.

Read More

Share Comments
  • advice
Mar 31 2014
products

Spying on methods

How to spy on methods using sinon.js

Read More

Share Comments
  • javascript
  • testing
Mar 26 2014
people

JavaScript books

Books to read to learn JavaScript.

Read More

Share Comments
  • javascript
Mar 24 2014
products

Unit testing D3 code without browser

Test D3 drawing code without running a browser for speed.

Read More

Share Comments
  • d3
  • javascript
  • testing
Mar 23 2014
process

Cloning 2048

Making my own clone of the popular browser game.

Read More

Share Comments
  • advice
  • javascript
Mar 21 2014
process

Defensive coding examples

Examples of using lodash, angular, check-types, ramda assertions

Read More

Share Comments
  • advice
  • assertions
  • javascript
  • ramda
  • sentry
  • testing
Mar 18 2014
process

Catch AngularJs minification errors

How to prevent hard to debug AngularJS injection errors due to minified code.

Read More

Share Comments
  • advice
  • angularjs
Mar 10 2014
products

Why function bind matters little in AngularJs

AngularJS relies on closures rather than modules, removing need to bind a context.

Read More

Share Comments
  • angularjs
  • javascript
Mar 9 2014
products

Presentation slides using HTML and CSS

My HTML framework for simple drag and drop presentations from Markdown files.

Read More

Share Comments
  • browser
  • jade
  • markdown
Mar 6 2014
products

CDN with local fallback

How to load JavaScript libraries from CDN but use local copy if there is timeout.

Read More

Share Comments
  • javascript
Mar 2 2014
products

Accurate coverage number

Remove unit testing coverage from the collected data.

Read More

Share Comments
  • code coverage
  • javascript
  • testing
Mar 1 2014
products

Sweet naked objects

Create and use objects without any prototype.

Read More

Share Comments
  • ast
  • javascript
Feb 28 2014
products

Infinite slow fake data on scroll using AngularJs

Example Angular application fetching more data on scroll.

Read More

Share Comments
  • angularjs
  • javascript
Feb 24 2014
process

Catch all errors in Angular app

Catch all possible errors using both global and angular error hooks.

Read More

Share Comments
  • advice
  • angularjs
  • javascript
  • sentry
Feb 23 2014
products

Server-side constants injection into Angular modules

How to pass configuration into AngularJS during server-side template rendering.

Read More

Share Comments
  • advice
  • angularjs
  • jade
Feb 21 2014
products

Code coverage via GT and Coveralls

Collecting JavaScript code coverage and sending to coveralls.io

Read More

Share Comments
  • QUnit
  • code coverage
  • javascript
  • nodejs
  • testing
Feb 19 2014
products

Chaining promises

How to connect promises into single sequence.

Read More

Share Comments
  • boilerplate
  • javascript
  • promises
Feb 12 2014
products

Homebrew CLI testing

You can easily perform CLI end to end testing by checking the exit codes.

Read More

Share Comments
  • advice
  • javascript
  • testing
Feb 10 2014
people

Reading books using epics

Effectively reading technical books by using agile epics.

Read More

Share Comments
  • advice
Feb 10 2014
products

Simplify filtering conditions

Example refactoring a block of code containing AND condition

Read More

Share Comments
  • advice
  • functional
  • javascript
Feb 7 2014
products

The most boring generator function's caller

EcmaScript6 generator that does nothing

Read More

Share Comments
  • es6
  • javascript
Feb 5 2014
products

Linting JavaScript inside HTML

Use jshint to statically check JavaScript inside HTML pages.

Read More

Share Comments
  • javascript
  • jshint
Feb 2 2014
products

Git branches with descriptions

How to set and see git branch descriptions.

Read More

Share Comments
  • advice
  • git
Feb 2 2014
process

Local Angular development

How to develop AngularJS applications in offline mode.

Read More

Share Comments
  • angularjs
Jan 25 2014
products

Unit testing blog posts

A way to unit test JavaScript code inside Markdown blog posts.

Read More

Share Comments
  • advice
  • javascript
  • markdown
  • nodejs
  • testing
Jan 21 2014
products

JavaScript does not annoy me anymore

Getting around typical JavaScript pitfalls.

Read More

Share Comments
  • advice
  • javascript
Jan 20 2014
products

Angular Templates

Precompiling all AngularJS HTML templates into single javascript bundle.

Read More

Share Comments
  • angularjs
Jan 20 2014
products

Error handling in promises

Handling the errors in the promise chain.

Read More

Share Comments
  • javascript
  • nodejs
  • promises
Jan 17 2014
products

Testing Connect middleware

How to test Connect or Express middleware functions.

Read More

Share Comments
  • advice
  • javascript
  • nodejs
  • testing
Jan 17 2014
book review

Review of "The Smashing Book 4"

Great book for front end engineers and designers.

Read More

Share Comments
Jan 16 2014
process

Give browser a chance

Send basic information with markup to generate low res page preview.

Read More

Share Comments
  • advice
  • browser
Jan 16 2014

Use Unix line endings

How to set Git and Grunt to always use same line ending character.

Read More

Share Comments
  • advice
  • git
Jan 12 2014
products

Hooking into Node loader for fun and profit

Log loaded files, add code coverage and extra features on the fly.

Read More

Share Comments
  • ast
  • code coverage
  • javascript
  • nodejs
Jan 11 2014
people

Developer value

Developer is more valuable if his / her code does not have to be rewritten for a long time.

Read More

Share Comments
Jan 10 2014
products

Functional decorators without coupling

Extend simple feature with little functional decorators.

Read More

Share Comments
  • ast
  • functional
  • javascript
Dec 29 2013
products

AngularJs inside Jade templates

How to write AngularJS code inside server-side Jade templates.

Read More

Share Comments
  • angularjs
  • jade
  • nodejs
Dec 26 2013
process

Know unknown unknowns with Sentry

Client side javascript error reporting using Sentry.

Read More

Share Comments
  • advice
  • javascript
  • sentry
Dec 21 2013
products

Shorten promises (advanced)

Advanced examples removing promise boilerplate code.

Read More

Share Comments
  • advice
  • javascript
  • promises
Dec 20 2013
products

Shorten promises

How to avoid unnecessary promise boilerplate code.

Read More

Share Comments
  • advice
  • boilerplate
  • javascript
Dec 19 2013
process

Missing feature in every project planning app

Using single time estimate for a task leads to inaccurate plans.

Read More

Share Comments
  • advice
Dec 17 2013
products

Fast prototyping using Restangular and Json-server

Quick demos using AngularJS library Restangular and JSON file backend.

Read More

Share Comments
  • angularjs
  • nodejs
  • ramda
Dec 16 2013
process

Debugging JS minification bug

An example of a weird browser behavior traced back to the minification step.

Read More

Share Comments
  • javascript
Dec 12 2013
process

Paranoid coding

Checking input arguments before doing any computation helps to quickly debug problems.

Read More

Share Comments
  • advice
  • assertions
Dec 9 2013
book review

Review of "Thinking, fast and slow"

Excellent book, highly recommend to read.

Read More

Share Comments
Dec 8 2013
book review

Review of "Node.js in Action"

Best book to read from the masters of NodeJS.

Read More

Share Comments
  • nodejs
Dec 6 2013
process

Aged to Perfection

Using different linting settings depending on the code age

Read More

Share Comments
  • grunt
  • javascript
  • nodejs
Nov 27 2013
process

Product, process, people

How I categorize every piece of knowledge about software development

Read More

Share Comments
  • advice
Nov 26 2013
book review

Review of "The Phantom Tollbooth"

Fun for kids, language mastery for adults.

Read More

Share Comments
Nov 26 2013
products

Deploy Node app to Heroku

Main steps when deploying NodeJS app using Heroku CLI tool.

Read More

Share Comments
  • ci
  • nodejs
Nov 16 2013
book review

Review of "High Performance Browser Networking"

A must read for anyone programming distributed systems that include the browser.

Read More

Share Comments
  • performance
Nov 16 2013
process

High MPG Code Coverage

How to get many useful things from unit test coverage information.

Read More

Share Comments
  • code coverage
  • testing
Nov 15 2013
process

High MPG Unit Tests

How to get many useful things from unit tests

Read More

Share Comments
  • testing
Nov 14 2013
products

Concurrency can bite you even in Node

Ordering of execution can be tricky in the JavaScript event loop.

Read More

Share Comments
  • concurrency
  • nodejs
  • promises
⬅ Prev1…6789Next ➡
 

Categories

  • book review15
  • climate10
  • people26
  • process176
  • products597

Tags

  • 11ty2
  • QUnit5
  • a11y3
  • advice126
  • algolia3
  • angular3
  • angularjs58
  • angularjs21
  • assertions9
  • ast8
  • boilerplate14
  • browser22
  • ci35
  • circle14
  • climate16
  • code coverage17
  • concurrency1
  • cyclejs7
  • cypress350
  • cypress dashboard13
  • d33
  • db13
  • docker12
  • documentation6
  • email3
  • es613
  • es71
  • functional70
  • generators5
  • git15
  • github42
  • graphql5
  • grunt7
  • gulp3
  • hiring5
  • hyperapp7
  • immutable5
  • interview3
  • jade4
  • javascript166
  • jshint3
  • markdown11
  • model-based testing1
  • modular development28
  • netlify4
  • nodejs85
  • performance25
  • presentation7
  • promises31
  • proposal2
  • ramda28
  • react7
  • react native6
  • reactive12
  • reactjs5
  • renovate5
  • screencast1
  • security11
  • sentry11
  • service workers6
  • state machine1
  • testing208
  • tutorial29
  • typescript11
  • ui2
  • vercel10
  • visual testing5
  • vuejs5
  • web workers6
  • webpack3

Tag Cloud

11ty QUnit a11y advice algolia angular angularjs angularjs2 assertions ast boilerplate browser ci circle climate code coverage concurrency cyclejs cypress cypress dashboard d3 db docker documentation email es6 es7 functional generators git github graphql grunt gulp hiring hyperapp immutable interview jade javascript jshint markdown model-based testing modular development netlify nodejs performance presentation promises proposal ramda react react native reactive reactjs renovate screencast security sentry service workers state machine testing tutorial typescript ui vercel visual testing vuejs web workers webpack

Archives

  • May 20251
  • April 20252
  • March 20255
  • February 20253
  • January 20255
  • December 20243
  • November 20242
  • October 20245
  • September 20244
  • August 20242
  • July 20244
  • June 20242
  • April 20242
  • March 20245
  • February 20245
  • January 20243
  • December 20232
  • November 20233
  • October 20233
  • September 20234
  • August 20233
  • July 20233
  • June 20235
  • May 20235
  • April 202310
  • March 20236
  • February 20239
  • January 202310
  • December 20228
  • November 20224
  • October 20226
  • September 20225
  • August 20224
  • July 20227
  • June 20225
  • May 20228
  • April 20226
  • March 202210
  • February 20227
  • January 202211
  • December 202111
  • November 20217
  • October 20218
  • September 20214
  • August 20219
  • July 202110
  • June 202111
  • May 20215
  • April 20219
  • March 20219
  • February 20219
  • January 20217
  • December 20206
  • November 20208
  • October 202010
  • September 20205
  • August 20203
  • July 20203
  • June 20204
  • May 20203
  • April 20202
  • March 20207
  • February 20201
  • January 20201
  • December 20193
  • November 20193
  • October 20192
  • September 20196
  • August 20195
  • July 20192
  • June 20191
  • May 20195
  • April 20194
  • March 20193
  • February 20191
  • January 20194
  • December 20183
  • November 20182
  • October 20183
  • September 20184
  • August 20184
  • June 20185
  • April 20183
  • March 20184
  • February 20181
  • January 20185
  • December 20173
  • November 20174
  • September 20172
  • August 20179
  • July 20174
  • June 20174
  • May 20172
  • April 20179
  • March 201710
  • February 20175
  • January 20174
  • December 20165
  • November 20161
  • October 20162
  • September 20161
  • August 20165
  • July 20162
  • June 20167
  • May 20165
  • April 20168
  • March 201610
  • February 20165
  • January 20168
  • December 20159
  • November 20158
  • October 20154
  • September 20154
  • August 201511
  • July 20154
  • June 20159
  • May 20158
  • April 201510
  • March 201515
  • February 201513
  • January 201510
  • December 20148
  • November 201419
  • October 20148
  • September 201413
  • August 201412
  • July 201413
  • June 20149
  • May 201411
  • April 201413
  • March 201411
  • February 201412
  • January 201411
  • December 201311
  • November 201314
  • October 201311
  • September 201310

Recents

  • How I Stay Productive
  • Pick Tests By Network Calls
  • Cypress Is Joining John Deere
  • Rest Easy Example
  • Rest Easy
© 2025 Gleb Bahmutov
Powered by Hexo