Skip to content

Instantly share code, notes, and snippets.

View eraserhd's full-sized avatar

Jason Felice eraserhd

View GitHub Profile
package main
import (
"encoding/json"
"fmt"
"math/rand"
)
type T struct {
Value int64
@eraserhd
eraserhd / defer.go
Created July 13, 2023 16:38
defer.go
package tkt
import (
"sync"
)
type Deferred[T any] interface {
Get() T
}
Only in zmk/app: build
Only in zmk: build
Only in zmk/modules/bsim_hw_models/nrf_hw_models: .git
Only in zmk/modules/crypto/mbedtls: .git
Only in zmk/modules/crypto/tinycrypt: .git
Only in zmk/modules/debug/mipi-sys-t: .git
Only in zmk/modules/debug/TraceRecorder: .git
Only in zmk/modules/fs/fatfs: .git
Only in zmk/modules/fs/littlefs: .git
Only in zmk/modules/hal/atmel: .git
package conf
import (
"list"
"strings"
"text/template"
)
#URLEncoding: {
let doNotEncode = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_."
@eraserhd
eraserhd / foo.c
Created June 23, 2021 14:48
Executable C file
//usr/bin/env cc -o "/tmp/foo.$$" "$0" || exit $?; exec "/tmp/foo.$$" "$@"
#include <stdio.h>
int main(int argc, char *argv[])
{
printf("hello, world!\n");
}
{
description = "2u environment configuration";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
outputs = { self, nixpkgs }: let
devEnvironmentForSystem = system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
;; I? Input satisfied?
;; O? Output satisfied?
;; RR? Requires release?
;; HR? Has release?
;;
(def status-table
;; # I? O? RR? HR? | Status
;; --- -- -- -- -- | ------
'[[ 0 N N N N :| "UNAVAILABLE"]
[ 1 Y N N N :| "AVAILABLE"]
irb(main):001:0> class Foo
irb(main):002:1> class Bar
irb(main):003:2> end
irb(main):004:1> end
=> nil
irb(main):005:0> Foo::Bar.new.kind_of?(Foo)
=> false
irb(main):006:0>

I really like and support this ADR, and want this to work. The SSM Parameter Store seems like a solid solution that integrates well with our tech stack.

On a procedural note, I'm worried that we are making these decisions without considering the migration cost. In the software indstry, I've very frequently experienced this pattern:

Time index Organizational mood
1 B is better and easier to maintain than A, so we will move to B
2-50 Implement B
51-60 Migrate a few easy systems, as a test bed
Time index Organizational gestalt
1 B is better and easier to maintain than A, so we will move to B
2-99 Implement B
100 (Pareto's) 80% of systems migrated to use B. The easiest systems are chosen first, as test bed, and the most often used systems are chosen next.
101 Organizational analysis of remaining systems indicates it isn't worth migrating - some of the systems are "going away", and any way Product is putting pressure on us to deliver customer-facing value and it is very hard to explain the value of what is affectionately known as "the second 80% of the project"
101+ Organization maintains A and B indefinitely, increasing costs, the fragility of the system, and defeating the original purpose of the project.