code

A -post collection

Parallel Promises in Node (or how to wrangle multiple Promises)

Promises offer a much easier pattern for handling asynchronous requests. Compared to the callback pattern Promises allow for much cleaner and maintainable code. A common pattern encountered when working with APIs is the need to do several requests at once, and return all the data in a single response. For example: Imagine an app where you've requested users who have Liked a photo on Instagram. This can be accomplished with a GET request to /media/[media-id]/likes. The response will be an shallow array of users: { "data": [{ "username": "jack", "first_name": "Jack", "last_name": "Dorsey", "type": "user", "id": "66" }, { "username": "sammyjack&

Read more

SSL Certs with DigitalOcean and Comodo

This past weekend I installed a SSL Certificate onto a DigitalOcean Droplet (Ubuntu/Apache). The droplet runs a little side-project of mine - a fan site for the Swarm app where I test and try ideas, frameworks and technologies. During installation I encountered a few hiccups so hopefully this can save some others some time. Generate a CSR and Private Key The first step is to create a CSR (Certificate Signing Request) and private key on your server. DigitalOcean provides a great how-to on this process. In short, you'll run an openssl command, answer a few questions and then a .csr and .key file will be created. Purchase a SSL Certificate If you're new to the SSL world you're in for a wild ride. When you

Read more

Slack Theming

Themes for Multiple Teams As a remote developer/teacher Slack is one my most important tools. There are 5 teams I communicate with on a regular basis: Developers/PMs at Citrusbyte Developers/PMs for our primary client Students at Thinkful Mentors and admins at Thinkful The local Bozeman JS Meetup group In addition to these core 5 I routinely join other teams when I'm looking for support on issues. That is, many companies use Slack as a support channel so I temporarily join teams when needed. With 5 (or more) teams it starts to get a bit busy on the Slack app. At any given time I might have 1 or more ongoing conversations, and with that comes the potential for me to send an errant

Read more

Bozeman Javascript Meet-up

Excited to announce the creation of the Bozeman Javascript Meetup group - a meetup to network with other Javascript coders, discuss JavaScript tips, tricks, hacks, and frameworks, show off interesting projects and learn what's going on in the JS community. The local Javascript community is growing rapidly and it will be great to have a time/place to meetup each month. The reasons for the growth in the community? For one, Javascript itself is growing in adoption. Stats from Github show more Javascript repos than any other language. Other factors: Montana Code School, our local coding bootcamp, is focused full-stack Javascript development Many Bozeman start-ups and businesses are using Javascript in their stack First Meetup Our first meetup will be at 7pm on Thursday July 21,

Read more

Acceptance Testing with CodeceptJS

Over the past few months I've been getting up to speed with automated testing and I'm still seeing only the tip of the iceberg. For one, there are different types of automated tests, each with many synonyms. Here's a quick summary: Unit Tests - tests the most basic components of your app/site. These are the simplest and fastest tests to create and run. Integration Tests - tests the connections between the basic components and possibly the backend. UI Tests - tests the application as a user would, ensuring the app behaves as expected on the front-end. Also known as functional tests, acceptance tests, or end-to-end tests. Performance Tests - tests the performance of the application/site. The Issue A few days ago I was helping

Read more