Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
// ==UserScript== | |
// @name NM Series downloader | |
// @namespace http://tampermonkey.net/ | |
// @version 1.10.1 | |
// @description try to take over the world! | |
// @author 7nik | |
// @match https://www.neonmob.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=neonmob.com | |
// @grant GM.download | |
// @grant GM.addStyle |
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
I was asked to share a few memories of Jim Weirich as someone prepared for a conference talk about him, so I figured I'd share what came to mind here:
-
My cofounder Todd Kaufman would often refer to Jim as the "Santa Claus of the Ruby community". He was a big, jolly guy and he always brought joy to every room he was in. If people take away one thing to know about Jim, it's that even when he had 30 years of experience on someone, he always treated them with tremendous deference and respect. He always approached my ideas and questions as if they were urgent and fascinating, even if he'd encountered them dozens of times before. It's a trait I strive to imitate whenever I meet people at a user group or a conference, because it made such an impact on me when someone that I looked up to treated me like my experiences mattered to them.
-
I would sometimes drive 2 hours from Columbus to Cincinnati just to hang out at Jim's office. No matter what client work he had to do, he was never too busy for me. I remember
(defn holdings-manager | |
"Returns a collection of kstreams, one for each different way in which | |
loan ownership state may be updated" | |
[puma-events] | |
(let [ownership-store (k/store "loan-ownership")] | |
(-> (k/kstream puma-events) | |
(k/transform (update-ownership ownership-store)) | |
(k/branch [trade-result? | |
repayment-result?]))]) |
Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.
If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3
HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.
Follow along...
; Taken from https://github.com/weavejester/crypto-equality/blob/master/src/crypto/equality.clj | |
(ns crypto.equality | |
"Securely test sequences of data for equality.") | |
(defn eq? | |
"Test whether two sequences of characters or bytes are equal in a way that | |
protects against timing attacks. Note that this does not prevent an attacker | |
from discovering the *length* of the data being compared." | |
[a b] |
def with_retries(timeout = 5.seconds, retry_delay: 0.1.seconds, &blk) | |
start = Time.now | |
begin | |
blk.call | |
rescue | |
if Time.now > start + timeout | |
raise | |
else | |
sleep retry_delay | |
retry |
- You can store a price in a floating point variable.
- All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
- All currencies are subdivided in decimal units (like dinar/fils)
- All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
- All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
- Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
- For any currency you can have a price of 1. (ZWL)
- Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)