Ideas Into Software

Musings on writing code

All posts by Tomas Brambora

On delayed tasks

Scheduling tasks to be executed later is a pretty common scenario in backend development. Say you want to send a welcome followup email to a new user 24 hours after they sign up for your service. There’s a couple ways to approach this. Bad approach - using a timeout Pretty simple: User.onSignup((user) => { setTimeout(() => { sendFollowupEmailToUser(user)

6 Tips To Becoming a Better (Web) Developer

Much like football is not just about kicking the ball, programming is not just about writing code. Below I've summarized six things I've learned over the last ten years as a professional programmer that will help you become a better developer not just in terms of the code you write but all around. 1. Make. Yourself. Comfortable. I can't stress

Git Tips And Tricks

Git is probably the greatest thing that happened to the world of programming since the invention of sliced bread (1928...wait, seriously?). Anyway, as I'm sure we all know sometimes it can also be a huge pain in the butt. So here's a handful of quick tips and tricks that make it less so. > List of commits that have already

Ten-fold Query Execution Speedup For Larger Datasets In Meteor

Blaze's reactivity is an incredibly nifty feature of Meteor. It does away with a huge amount of boilerplate code and is mostly really nice to work with. However, nothing really comes for free, does it. The problem with reactivity is that unless you do some relatively awkward things, you may easily lose a lot of control over what gets called

Harmful Timeouts

Whenever I see code that goes like this: // Make sure foo is closed. setTimeout(function () { openNewFoo(); }, 150); my spidey sense starts tingling. Why? Because coding that way too often leads to "followup" code that looks like this: // Make sure foo is closed. setTimeout(function () { openNewFoo(); }, 150); // Make sure new foo is open setTimeout(function () { doBar(); }, 170); Which is a sure

Git Tips: Ignore Changes To a Local File

You know how sometimes when you need to change a flag in a versioned config file, it is just so hard to remember not to do git add ., commit, accidentally push the change and break everyone else's toys? Turns out the authors of Git are a forgetful (and smart) bunch too. Which is why there's git update-index and why it