Instantly share code, notes, and snippets.

View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
View WindyCityRails Exercises.md

For all exercises, let’s make sure we’re collaborating, not just submitting as quick as possible. We are a community of professionals - let’s learn from each other!

While we need working software, we also want well-crafted software. So once we’ve got a working solution, let’s see how we can improve it for flexibility and maintainability, rather than jumping right to the next one.

  • Driver: Lean on your team! Talk through your reasoning! Pass the keyboard in 5 minutes or less!
  • Navigators: Ask questions! Suggest improvements empathetically!
  • Narrator: Nudge folks as needed! Stick with the Easy difficulty setting!

Example Exercises, with extra credit ideas/prompts

View keybase.md

Keybase proof

I hereby claim:

  • I am trptcolin on github.
  • I am trptcolin (https://keybase.io/trptcolin) on keybase.
  • I have a public key whose fingerprint is 67E5 7A31 E9E0 2368 EEAC 5CCF BB1D BD36 16F1 DDB9

To claim this, I am signing this object:

View runq.d
#!/usr/sbin/dtrace -s
/*
* runq.d - run queue sizes by CPU.
*
* This prints the average, min, and max run queue count by CPU each second. A
* consistently large run queue count is a sign of CPU saturation.
*
* USAGE: runq.d
*
* FIELDS:
View dispqlen.d
#!/usr/sbin/dtrace -s
/*
* dispqlen.d - dispatcher queue length by CPU.
* Written using DTrace (Solaris 10 3/05).
*
* 14-Feb-2006, ver 0.90
*
* USAGE: dispqlen.d # hit Ctrl-C to end sample
*
* NOTES: The dispatcher queue length is an indication of CPU saturation.
View double-barrier-confusion.md

Double Barrier Confusion

Recipe

The way I'm reading the Zookeeper Double Barriers recipe, the exit condition (for Leave) is that all children of the barrier node must be deleted before any given client process can complete the Leave operation.

So it seems to me that if a client process Enters the barrier after the minimum number of processes have joined the barrier, it can hold up previously-Entered client processes. I feel like a typical implementation of barriers might have the minimum # of processes equal to the total # of processes, so maybe this is an edge case? And maybe this is all totally OK and normal; I'm just looking to confirm/disconfirm my interpretation.

  1. Am I thinking about this right? If so, is there actually a problem here? If not, why not?

Paper

View core-test.clj
;; test/foobar/core_test.clj
(ns foobar.core-test
(:require [clojure.test :refer :all]
[foobar.core :as foobar]))
(deftest formats-intervals-properly
(is (= "1" (foobar/format-interval [1])))
(is (= "1-2" (foobar/format-interval [1 2])))
(is (= "1-3" (foobar/format-interval [1 2 3]))))