Skip to content

Instantly share code, notes, and snippets.

@mathesond2
mathesond2 / higher-cohesion.md
Created March 28, 2023 14:22
Notes from "Putting An Age-Old Battle To Rest" by J. B. Rainsberger

Traditional rules of simple code design:

  1. pass its tests
  2. minimalizes duplication
  3. reveals its intent
  4. reduces the number of classes/modules/packages

^This is put in order of importance. Now some have argued over the order of 2 & 3, because when you're doing one you're doing the other...these 2 rules inform each other in a rapid feedback cycle.

@mathesond2
mathesond2 / how-to-read-a-book.md
Last active October 11, 2023 18:53
How To Read A Book

Notes taken from reading How To Read a Book by Mortimer Adler.

"Knowledge is not as much a prerequisite to understanding as is commonly supposed. We don't have to know everything about something in order to understand it; too many facts are often as much of an obstacle to understanding as too few. There is a sense in which we moderns are inundated with facts to the detriment of our understanding." - p.4

"Reading is a complex activity that consists of several acts, all of which must be performed to be 'good reading'."

Levels of Reading
  1. Elementary - "what does the sentence say?"
@mathesond2
mathesond2 / how-to-read--practical.md
Last active September 13, 2023 04:14
How to read a book - a practical guide
@mathesond2
mathesond2 / effortless.md
Created September 14, 2023 17:43
Notes from "Effortless" by Scott McKeown

State

'clear the clutter in our heads and our minds'

Invert

  • we're evolutionarily wired for 'easy', embrace it
  • Carl Jacobi, Mathematician - "one must invert, always invert" ^ transform a problem into a different representation to make it easier to work with

just asking, "what if this could be easy?" is a simple way to reset your thinking

choosing an indirect approach - for a really difficult task (as opposed to hitting it head-on)..how do you do this in practice? Consider strategy before doing aka "how should I approach this for ease?"

@mathesond2
mathesond2 / cobb-salad.md
Created September 15, 2023 15:35
How to make the perfect Cobb salad
  1. Boil 2 eggs
  2. Cut one ear of corn
  3. Make a big bowl with 1/2 spinach and 1/2 butter lettuce (or spring mix)
  4. Pan fry 2 pieces of bacon crispy, let sit out to harden afterward
  5. Toss all bacon grease except leftover in pan, cook corn in it
  6. Cut up 1 avocado and crumble bacon over salad
  7. Slice eggs to desired thickness and put in salad
  8. Make dressing and pour over salad: 
    • 2 tbsp Honey
    • 1/2 cup of Red wine vinegar 
@mathesond2
mathesond2 / ddia.md
Created November 23, 2024 22:46
Notes from "Designing Data-Intensive Applications"

Ch.1

data intensive apps are built from building blocks:

  • db - store data to find it again later
  • caches - remember res of expensive calculation
  • search indexes - allow users to search via keyword or other ways
  • stream processing send msg to another process to be handled async
  • batch processing - periodically crunch a bunch of accumulated data.

questions for designing systems

  • how do you make sure data remains correct and complete, even when things go wrong internally?
@mathesond2
mathesond2 / peach-cobbler.md
Created February 10, 2025 01:13
Peach Cobbler

Ingredients

  • 1 ½ cups self rising flour
  • 1 stick butter
  • ½ cup water
  • 2 cups sugar, divided
  • 4 cups peaches, peeled and sliced
  • 1 cup milk
  •  ground cinnamon, optional

Directions