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
| /** | |
| * clickBotChecker.js | |
| * ------------------------------------------------------------------------------ | |
| * ABOUT: | |
| * clickBotChecker.userIsBot() returns true if it thinks a bot is clicking your specified DOM element. | |
| * METHOD | |
| * .userIsBot() does the following to determine auto-clicking behavior: | |
| * 1. Store the timestamp of every n clicks for analysis | |
| * 2. Once three timestamps have been stored, every n clicks, find the absolute value of the difference between: | |
| * a. ( (the average of the last three timestamps) * 3 ) |
Notes on Martin Kleppmann's excellent Designing Data-Intensive Applications.
- Data Systems
- Dimensions to consider when thinking about data systems: access patterns, performance characteristics, implementations.
- Modern data systems often blur the lines between databases, caches, streams, etc.
- Reliability
- Systems should perform the expected function at a given level of performance, and be tolerant to faults and user mistakes
- Fault: One component of a system deviating from its spec. Prefer tolerating faults over preventing them (except for things like security issues). Faults stem from hardware failures, software failures, and human error (in a study, config errors caused most outages).
In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and
returning the cached result when the same
inputs occur again.
— wikipedia
I've been debating for weeks whether or not I was going to write any of this down. I'm a dad with two kids and a house to take care of and a business to run. Adding story-telling like this to my plate is exhausting.
Until yesterday, I had decided to forget about the whole thing, until I received the email that broke the camels back, as it were.
The best way I can describe why I'm writing this email is for the same reason why you might spend two hours dealing with an uncooperative mobile phone carrier to get them to remove that $5 charge on your bill that shouldn't be there. Some combination of the feeling of frustration and injustice that really pushes my proverbial buttons.
In this particular case, the "$5 charge on my phone bill" turned out to be literally hundreds of recurring subscription invoices that Stripe disabled collection for because, apparently, those subscriptions required "location inputs".
Generally speaking, I don't blog much anymore, and the last thing I wa
| {-# LANGUAGE TypeSynonymInstances #-} | |
| data Dual d = D Float d deriving Show | |
| type Float' = Float | |
| diff :: (Dual Float' -> Dual Float') -> Float -> Float' | |
| diff f x = y' | |
| where D y y' = f (D x 1) | |
| class VectorSpace v where | |
| zero :: v |
JavaScript Standard Input/Output: Unspecified
Some definitions. One important point is stdin, stdout, stderr do not
have to originate from a keyboard, or a TTY.
Let's hear what IBM has to say Understanding standard input, standard output, and standard error
Once a command begins running, it has access to three files:
- It reads from its standard input file. By default, standard input is the keyboard.
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.
SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on
| // git clone https://github.com/feross/buffer | |
| // cd buffer | |
| // bun install base64-js ieee754 | |
| // bun build ./index.js --target=browser --outfile=buffer.js | |
| var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); | |
| // node_modules/base64-js/index.js | |
| var require_base64_js = __commonJS((exports) => { | |
| var getLens = function(b64) { |