Best Practices

Car attempts to use JavaScript

Getting started Getting fast feedback in your IDE is vital to having a happy developer experience. Flow adds that value for me for JavaScript programming. Atom Install ide-flowtype. I just switched from the lighter-weight linter-flow and I’m liking it. The good parts You can use Flow with no transpilation You can use Flow with no…

Read More Flow Type for coding in JavaScript with guardrails

I use n to manage my system/default NodeJS, but if I’m in a legacy repo (hint: pretty much every repo where I work) I’ll need to drop into an old version of NodeJS just for that terminal. Here’s how I install and use nvm. Based on the original instructions at: github.com/creationix/nvm curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh cd…

Read More Installing nvm for n users

There is a war going on. A war between those that say Python requirements should be explicit and those that say requirements should be implicit. Before I continue, I’m going to be talking about requirements.txt, not setup.py. The difference between explicit and implicit requirements comes down to whether the line says Django==1.9.7 or Django, respectively.…

Read More requirements.txt==2.0

With 12factor style environment configs, it’s a very easy to accidentally connect to your production database when you think you’re connecting to dev. Here’s a simple guard you can add to make sure your  DATABASE_URL isn’t somehow pointed to someplace it’s not supposed to (assuming you’re using Amazon AWS): bash: if [[ ${DATABASE_URL} == *”amazonaws”*…

Read More Patterns: don’t mess up the prod db!