Skip to content

Instantly share code, notes, and snippets.

View telekid's full-sized avatar
👨‍🚀

Jake telekid

👨‍🚀
View GitHub Profile
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

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

@benjchristensen
benjchristensen / FuturesB.java
Last active December 12, 2023 09:36
FuturesB.java Example of using Futures for nested calls showing how it blocks inefficiently.
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@staltz
staltz / introrx.md
Last active May 17, 2024 01:39
The introduction to Reactive Programming you've been missing
@devn
devn / cheating.clj
Created September 5, 2014 21:40
Implementing IFn
(defn gen-nonvariadic-invokes [f]
(for [arity (range 1 21),
:let [args (repeatedly arity gensym)]]
`(~'invoke [~@args] (~f ~@args))))
(defn gen-variadic-invoke [f]
(let [args (repeatedly 22 gensym)]
`(~'invoke [~@args] (apply ~f ~@args))))
(defn gen-apply-to [f]
@aldendaniels
aldendaniels / alternative-to-higher-order-components.md
Last active October 6, 2018 09:50
Alternative to Higher-order Components

React now supports the use of ES6 classes as an alternative to React.createClass().

React's concept of Mixins, however, doesn't have a corollary when using ES6 classes. This left the community without an established pattern for code that both handles cross-cutting concerns and requires access to Component Life Cycle Methods.

In this gist, @sebmarkbage proposed an alternative pattern to React mixins: decorate components with a wrapping "higher order" component that handles whatever lifecycle methods it needs to and then invokes the wrapped component in its render() method, passing through props.

While a viable solution, this has a few drawbacks:

  1. There's no way for the child component to override functionality defined on the higher order component.
@gfredericks
gfredericks / sneaky_NaNs.clj
Created June 17, 2015 00:55
Encoding strings as a collection of NaNs.
(ns sneaky-NaNs
"Secret codez.")
(defn char->NaN
[c]
(-> c
(int)
(bit-or 0x7ff8000000000000)
(Double/longBitsToDouble)))
@msgodf
msgodf / condition-systems.md
Created December 15, 2015 08:23
Condition Systems in an Exceptional Language by Chris Houser

Condition Systems in an Exceptional Language by Chris Houser

I recently watched Chris Houser's talk from Clojure/conj 2015 on condition systems in Clojure. I enjoyed the subject, so I decided to write up the talk as a way of encouraging me to really understand it, and in the hope that it might help others understand it.

The last time I heard about Common Lisp's condition system was at a talk by Didier Verna at ACCU in Bristol in 2013 (slides here). It sounded really interesting, but I didn't understand it well enough.

tl;dr

Chris Houser talks about different ways of handling errors in Clojure. Based on examples from Peter Seibel's book, Practical Common Lisp, he describes condition systems, which are also known as resumable exceptions, or restarts.

@kennwhite
kennwhite / 1944_OSS_Simple_Sabotage_Field_Manual.md
Last active May 16, 2024 23:54
1944 OSS Simple Sabotage Field Manual