Skip to content

Instantly share code, notes, and snippets.

View toddhgardner's full-sized avatar

Todd H. Gardner toddhgardner

View GitHub Profile
@toddhgardner
toddhgardner / abstract.md
Last active December 24, 2021 08:35
We Didn’t Stop to Ask If We Should: Understanding Build vs. Buy

Software Conference talk proposal for 2018/2019 season. Thanks for taking the time to review this for me. Comments and criticism welcomed.

Title

We Didn’t Stop to Ask If We Should: Understanding Build vs. Buy

Topics

Architecture, Business

Abstract

We were so preoccupied with whether we could, we didn’t stop to think if we should! Before debating React vs. Angular or .NET vs Node, we must ask ourselves, should we even build this? Whether you’re an entrepreneur launching a new project, an enterprise developer stuck integrating middleware, or a architect moving logic to the cloud, you’re making decisions that will have lasting consequences. Deciding which problems are worth your investment is at the root of success or failure.

@toddhgardner
toddhgardner / interceptingProxyServer.js
Created February 6, 2016 02:30
Debugging Proxy Server to host a subset of production resources locally for troubleshooting.
// NOTE Before Starting, be sure you have an entry in your hosts file like:
// 127.0.0.1 domain.you.are.intercepting.com
'use strict';
var _ = require('lodash');
var express = require('express');
var fs = require('fs');
var httpProxy = require('http-proxy');
var https = require('https');
@toddhgardner
toddhgardner / index.html
Created July 24, 2015 20:00
Adding Application State to TrackJS Error Reports
<html>
<head>
<!-- BEGIN TRACKJS -->
<script type="text/javascript">
window._trackJs = {
onError: function (payload) {
var state = SomeFunctionToGetRelevantState();
payload.console.push({
message: JSON.stringify(state),
severity: "info",
@toddhgardner
toddhgardner / backbone-trackjs.js
Last active December 28, 2015 10:29
Integrating {Track:js} TrackAll with Backbone.
// OPTION 1:
// Automatically wrap everything
;(function() {
'use strict';
if (!window.trackJs) return;
[ 'View'
, 'Model'
@toddhgardner
toddhgardner / gist:7478573
Last active December 28, 2015 09:19
Gathering actual performance from the browser in real time
(function (window) {
var iterations = 100;
var sampling = 1000;
var counters = [];
var i = 0, j, sum = 0, mean;
var lastNow = window.performance.now();
var interval = setInterval(function () {
@toddhgardner
toddhgardner / gist:6310687
Created August 22, 2013 18:05
An argument for Backbone over Angular
Many teams are comparing AngularJS with Backbone and other libraries. An argument I have
sometimes heard is that Angular is backed by Google, while Backbone is just one Guy.
That is really incorrect and misleading. The project was created by Jeremy Ashkenas (AKA
the One Guy), but that guy also created CoffeeScript and Underscore. He did it as part
of the Documentcloud project and has since been Lead Web Architect at FinancialTimes and
NewYorkTimes, both of which have very large installations.
Backbone is the *only* web framework that has a track record of very large sustainable
web applications.