Skip to content

Instantly share code, notes, and snippets.


Zach Caceres zcaceres

View GitHub Profile
zcaceres / index.js
Created Oct 27, 2017 — forked from groteworld/index.js
Example aws/aws-sdk-js IotData API Lambda usage
View index.js
// An usage of AWS.IotData in Lambdas
// This example assumes some things
// 1. That you have a environment variable AWS_IOT_ENDPOINT. This is the url that you can find in AWS IoT dashboard settings
// 2. The lambda and your aws iot devices are on the same account and region
const AWS = require('aws-sdk');
const iotData = new AWS.IotData({ endpoint: process.env.AWS_IOT_ENDPOINT });
const handler = (event, context) => {

Debugging JavaScript Applications

A practical distillation for Fullstack Academy students

Faults in computer problems were theorized as far back as 1843, when Ada Lovelace noted of Babbage's Analytical Engine, "Granted that the actual mechanism is unerring in its processes, the cards may give it wrong orders." Almost 160 years later, NIST reported that software errors cost the US $59 billion annually. Clearly, some of the cards are wrong. However, unlike Grace Hopper's famous moth, most of the time the culprit is ourselves.

Debugging is a sanitization procedure consisting of:

  • Preventing bugs in the first place, through good practices and assistive tooling.
  • Detecting bugs when they first arise, through proper error handling and testing.