Skip to content

Instantly share code, notes, and snippets.

View danieluhl's full-sized avatar

Typing Turtle danieluhl

View GitHub Profile
@danieluhl
danieluhl / cherry.md
Last active July 20, 2023 09:58
cherry-pick > rebase for stacked patches
@danieluhl
danieluhl / accountability-buddies.md
Last active May 3, 2022 19:01
Accountability Buddies

Accountability Buddies

  1. What are you going to do?
  2. Did you do it?

That's it.

You decide when and at what interval to check-in with your buddy to share the answers to these questions.

Join the #accountability-buddies channel to seek a buddy using this template:

@danieluhl
danieluhl / platform-building.md
Last active November 22, 2021 17:36
Notes from a great goto conf video about building a great eng platform

https://www.youtube.com/watch?v=4N2ywun-wTE

Successful platform experience

1. Clear boundaries & responsibilities (what's platform vs feature team)

  • Minimize friction for engineers
  • Promotes better collaboration & flow
  • Use a "platform contract" (more below)
@danieluhl
danieluhl / heaps-algo.js
Created October 13, 2021 13:21
heaps algorithm in javascript for all permutations O(n!)
const swap = (a, b, arr) => {
const temp = arr[a];
arr[a] = arr[b];
arr[b] = temp;
};
// heaps algorithm
const getCombinations = (inputArr) => {
const heaps = (result, arr, n) => {
@danieluhl
danieluhl / philosophy_of_software_red_flags.md
Created September 8, 2021 00:11
A Philosophy of Software Design Red Flags

from the book "A Philosophy of Software Design"

Why

High complexity code causes change amplification, high cognitive load, and more unknown unknowns, when working with a codebase. These are costly and plunge engineers into a kind of sadistic coding hell.

Complexity is caused by dependencies and obscurity. Code is obscure when information required to work with the code is not provided.

Complexity is most often incremental, it sneaks up on the best of us.

@danieluhl
danieluhl / settings.json
Created August 3, 2020 18:14
vscode settings.json snapshot
{
"editor.fontSize": 16,
"editor.tabSize": 2,
"editor.renderWhitespace": "boundary",
"editor.minimap.enabled": false,
"editor.cursorStyle": "block",
"editor.snippetSuggestions": "top",
"editor.renderIndentGuides": true,
"editor.cursorBlinking": "smooth",
"editor.insertSpaces": true,
@danieluhl
danieluhl / hoc_vs_render_props.html
Created October 11, 2017 16:30
Simple HOC vs Render Props (function as children) Example
<!doctype html>
<html>
<head>
<title>unpkg-demos :: global-react</title>
</head>
<body>
<div id="app"></div>
<script src="https://unpkg.com/react@16.0.0-beta.2/umd/react.production.min.js"
integrity="sha384-lJJbYsDe7wDuOttI/MIHfj68o3fVZOhJDxEn0cTPbDq5mkzjF1p+AFEp3r/HpUnt"
@danieluhl
danieluhl / from_scratch_sort.js
Created September 11, 2017 14:01
Implementing simple array sorting from scratch
const customers = [{
name: 'Billy',
age: 32,
averageOrderValue: '$34.38'
}, {
name: 'Mike',
age: 23,
averageOrderValue: '$300.38'
}, {
name: 'Zac',
const inputs = Array.from(document.querySelectorAll('input'));
inputs.forEach(input => input.addEventListener('click', handleClick));
function clickBetween(first, last) {
const direction = first < last ? 1 : -1;
let index = first;
while (index !== last) {
index += direction;
inputs[index].checked = true;
// ## Array Cardio Day 2
const people = [
{ name: 'Wes', year: 1988 },
{ name: 'Kait', year: 1986 },
{ name: 'Irv', year: 1970 },
{ name: 'Lux', year: 2015 }
];
const comments = [