Skip to content

Instantly share code, notes, and snippets.

View fairchild's full-sized avatar

Michael Fairchild fairchild

  • Procore
  • California
View GitHub Profile

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@fairchild
fairchild / regexp_syntax.md
Created January 16, 2023 16:48 — forked from glv/regexp_syntax.md
Ruby and PostgreSQL Regular Expressions

Ruby and Postgres Regular Expression Syntaxes

Ruby's regular expressions are unusually powerful. Postgres' regular expressions are not as powerful, but they come close; close enough that it's possible to do many pattern-based queries and string transformations entirely in a query.

And sometimes, it's very useful to have a single regular expression that works

import urllib
import plantumlencoder
from IPython.core.magic import magics_class, cell_magic, Magics
from IPython.display import Image, SVG
@magics_class
class Plantuml(Magics):
@cell_magic
@fairchild
fairchild / timed_subprocess.rb
Last active March 21, 2017 04:58
method to wrap a subprocess in a timeout
require 'timeout'
SUBPROCESS_TIMEOUT = 90
def timed_shell_command(cmd)
begin
Timeout.timeout(SUBPROCESS_TIMEOUT) do
subprocess = IO.popen(cmd)
Process.wait subprocess.pid
unless $?.success?
@fairchild
fairchild / mobile_data_creation_first.websequence
Created March 31, 2016 07:01
sync flow for data created on mobile first
title Create Data Mobile First
participant mobile as m
participant server as s
participant database as db
m -> m: create item {uuid}
m -> s: POST item {uuid}
s -> db: begin transaction
s -> db: SELECT id, uuid WHERE uuid={uuid} from write_log
local application = require "hs.application"
local tiling = require "hs.tiling"
local hotkey = require "hs.hotkey"
local Spotify = require "hs.spotify"
-- TODO: Move more stuff into these
-- custom scripts
require "sizeup"
require "triggers"
@fairchild
fairchild / .babelrc
Last active December 29, 2015 22:44
simple example of getting babel 6 running
{
"presets": ["es2015"]
}
import { createSelector } from 'reselect';
import _ from 'lodash';
const contractDataSelector = state => state.contracts.data;
const currentContractIdSelector = state => state.contracts.currentId;
const contractSelectors = {
contracts() {
createSelector([contractDataSelector],
{"photo":
{"id":"straw00267"},
"annotations":[
{
"x":19,
"y":20,
"w":50,
"h":50,
"predictions": {
"green":0.2,
{
id: 1,
name: "1",
number: 1,
lat: "34.179444444",
lng: "-119.140961111",
latlng: null,
planted_at: null,
uuid: "f97e61a0-6647-0132-d30b-5651f5fc0983",
rev: "19-1a2b076b1a5a756ff8fec30e8b4c2fd6",