Skip to content

Instantly share code, notes, and snippets.

View pedro's full-sized avatar

Pedro Belo pedro

  • San Francisco, CA
  • X @ped
View GitHub Profile
@pedro
pedro / nike.md
Last active August 29, 2015 14:09
Nike's journey to microservices

Nike's journey to microservices

  • 2011: running activity/service "barely running in production"

    • reliability issues
    • little tests
    • features deployed in months
  • 2012: their own backend

    • "deep vertical" stack
  • 9 teams on the same codebase supporting 14 products

module Base
class Foo
end
end
module Base
class A
def self.test
puts Foo.object_id # this works
end

Keybase proof

I hereby claim:

  • I am pedro on github.
  • I am ped (https://keybase.io/ped) on keybase.
  • I have a public key whose fingerprint is B3CB A84E 05B4 03FC 2506 BD8F ACF9 8F42 BA4D 4E90

To claim this, I am signing this object:

Given a stupid table:

# SELECT * FROM sample;
 id | foo | bar 
----+-----+-----
 10 | a   | a
 11 | a   | b
 12 | a   | b
 13 | a | c
require "rubygems"
require "octokit"
# get an access token at https://github.com/settings/tokens/new
token = ENV["TOKEN"] || abort("missing TOKEN")
repo = ENV["REPO"] || abort("missing REPO. eg: pedro/devdigest")
client = Octokit::Client.new access_token: token
stats = Hash.new(0)
@pedro
pedro / rank-pulls.rb
Last active December 27, 2015 13:19
Quick hacky script to rank closed pull requests on a repo in hopes to answers "what happened last year?". Requires gems octokit and peach.
require "rubygems"
require "octokit"
require "peach"
# warning! this will make a crapton of requests under your account.
# you might want to review/tweak the values below, or disable
# auto_paginate to test things first.
# get an access token at https://github.com/settings/tokens/new
token = ENV["TOKEN"] || abort("missing TOKEN")

Pedro's Amazing Guide To Rooftop Bars

Drinking with a perspective

Very few people respect the art of rooftop drinking these days.

Notably, rooftop bar customers often believe that wearing a suit or a fancy dress conveys respect.

Niclekback wears suits

"there are only two industries calling their customers users"
maps of cancer in the us - multivariables/prob 1k data points but not clutter
fix the clutter. Clutter is in the presentation, not in the data.
tables - espn has 500 numbers
have we suddenly got dumber because we got to work?
look at financial tables, weather tables, sports..
7 elements on a page? paper: the magic number 7

API testing and validation

  • Difference?
    • Validation: API receives a message and decides if it's valid or not
    • Testing: different use cases
      • TDD as you build the API
      • Test if the API is running (lifecycle/ci)
      • Debugging
    • API performance testing