Ideas Into Software

Musings on writing code

Opting Out of Contenteditable Reactivity in Meteor

It's a sad fact that Blaze (Meteor's reactive UI library) doesn't play particularly well with contenteditable elements. The corresponding ticket in GitHub is marked as closed but the issue itself is unfortunately far from resolved. This makes implementing e.g. autosave for contenteditable elements quite annoying - say you're throttling the keypress event and saving every two or three seconds.

Git: Detached HEAD State For Dummies

Alright, let's call things as they are: Git can be intimidating. Or, well, downright scary. Zillions of flags and oh-my-goodness-look-how-many configuration options! Consider git push - you can't even tell what it does unless you look at your git settings. For experienced developers, people with PhD in rocket surgery or power users: nirvana. For others: muddy pool full of crocodiles.

Limiting Parallelism In Meteor

In the latest blog post we've touched the topic of parallelism in the Meteor framework using node-fibers. We've shown how to do multiple HTTP requests at the same time. As we've seen, unbounded parallelism in Meteor is relatively easy. There are, however, cases when you wish to limit the degree of concurrency (akin to async's eachSeries). For example when issuing

Parallel Execution In Meteor

Meteor's async execution model is based on fibers which is essentially a patch to V8 providing blocking calls making it somewhat harder for a programmer to release zalgo. Fibers work in a way similar to ES6 generators/coroutines (even though generators are syntactically more explicit); when an asynchronous call is made, the running fiber voluntarily gives up execution, suspends and

Decrease Your WTFs/minute count

Any programmer will tell you - WTFs per minute is a metric whose hilariousness is surpassed only by its truthiness. Now, there’s one - rather obvious, I admit - lesson I learned in my programming career: when you inherit a codebase any information that can help you decrease the WTF count is priceless. Sure, documentation helps and so do

Tight Deadlines Considered Harmful

A couple years ago I have been involved with a company that found itself in a rather unenviable position. It spent a little over six months building an ambitious and complex product which by the time I joined was generally considered to be “almost ready to be released” (some parts of it, anyway). Unfortunately, it also had a long list