Ideas Into Software

Musings on writing code

Practical Guide to Promises

Promises. Right? There are things about them that just seem, you know, natural once you've been using them for long enough. But they may be a little hard to grok if you're new to them. So here’s my short and opinionated list of what you should know about JavaScript promises (roughly in order of importance). Here we go. Avoid

Twelve-Factor Logging

I’ve been developing node.js web servers for quite a while now yet still there’s one thing that confuses me. Why on earth are all the logging frameworks so complicated? Consider winston. Great logging library. But so big and complex. All those transports, all those settings. Twelve-Factor Manifesto states that app shouldn’t concern itself with where it’

Vim Tips For Intermediate Users

I know from experience starting with Vim can be somewhat discouraging. Let's face it - Vim was made for power-users and, man, the learning curve is steep! That said, I can guarantee you taking time to learn this infinitely configurable yet surprisingly lightweight editor will pay off. Here's a few productivity tips that make the Vim experience even better (and

Promises Broke My Return (and Coroutines Fixed It)

We all know writing asynchronous code is hard. Even though async and other libraries do a great job at cooling down the infamous callback hell, most programmers would agree that promises make writing code in JavaScript way simpler. Especially since bluebird came along. Now, I heartily concur that promises make one's life much easier. They offer consistency and composability (in

History Is a Tree

I’m sure it happened to you too. Just remember. That horrible moment when you time-travelled using undo - to copy and paste that line you deleted twenty minutes ago but for some reason you really, really, need it now - and then you hit a key and insert a letter. And just like that, your way back is gone.

Foreign Key Naming in Sequelize and Postgres

Sequelize is a pretty nice ORM wrapper for Node.js. It keeps focus on writing JavaScript and helps avoid the annoying mental context-switch to SQL. And even though it's a somewhat leaky abstraction it makes a programmer more productive. And in this century, who doesn't like being more productive, huh? Now, speaking about leaky abstractions, there's one syntactic issue that