Skip to content

Instantly share code, notes, and snippets.

View christianromney's full-sized avatar
🏠
Working from home

Christian Romney christianromney

🏠
Working from home
View GitHub Profile

Problem Solving

Analysis and Design Process

Why do we write problem statements?

  • to solve some problems hopefully

What kinds of problems?

  • developing a shared understanding

Keybase proof

I hereby claim:

  • I am christianromney on github.
  • I am christianromney (https://keybase.io/christianromney) on keybase.
  • I have a public key ASDQT7Xc5VEM9sVNu2_EjdbyCizbbreD-x3qiLBzvP0-nwo

To claim this, I am signing this object:

The Socratic Method: A Practitioner’s Handbook

Chapters 1-5

  • TODO: backfill notes

Elements of the Socratic Method

  1. proceeds by question and answer
    • some questions are open ended (especially in the beginning)
    • e.g. propose a definition
    • the person being questioned is the partner of the inquirer
  2. focus on consistency of statements
    • consistency is probed with the elenchus
@christianromney
christianromney / http_streaming.md
Created September 29, 2017 18:55 — forked from CMCDragonkai/http_streaming.md
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

#!/usr/bin/env bash
set -o pipefail
slow_compute_hash() {
find "$1" -type f -exec md5sum {} \; | sort -k 2 | md5sum
}
fast_compute_hash() {
find "$1" -type f -print0 | sort -z | xargs -0 md5sum | md5sum
}
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.mixpanel = factory());
}(this, function () { 'use strict';
var Config = {
DEBUG: false,
LIB_VERSION: '2.22.4'
};
;; -*- geiser-scheme-implementation: 'mit -*-
(load "sdf/manager/load")
(manage 'new-environment 'combinators)
#!/bin/bash
#
# DESCRIPTION
# utility to aid in the setup of temporary AWS assumed role credentials
#
# USAGE
# pipe the output of aws sts assume-role to this script and redirect the output
# to append the temporary credentials to your $HOME/.aws/credentials
#
# you may supply a profile name as an argument. if you do not, then one is generated

Concurrency on the JVM

Thread - this class represents a thread of execution. Unit of scheduling on the CPU.

ThreadLocal - a per-thread variable not visible to other threads

ThreadGroup - a grouping that allows convenient management for set of threads

hierarchical tree

all threads can see their group, but not necessarily their group’s parent group

ForkJoinTask - a thread-like entity that is much lighter weight than a normal thread

Runnable - an interface that classes wanting to execute in a thread should implement: void run()

Future - the result of an asynchronous computation

Huge numbers of tasks and subtasks may be hosted by a small number of actual threads

@christianromney
christianromney / datomic-system-name.sh
Last active November 20, 2019 12:26
Bash script to get the Datomic Cloud system name
#!/usr/bin/env bash
set -eo pipefail
if [[ "$#" -eq 0 ]]; then
cat <<EOF
usage: $(basename $0) <REGION> [OPTIONS]
REGION - a valid AWS region e.g. us-east-1
OPTIONS - any valid AWS CLI options e.g. --profile home
EOF