Friday, January 28, 2022

Code & Coffee - 1/28/2022

 

Notes for Code & Coffee: 1/28/2022

  • Replacing the six year old mouse
  • SICP for javascript is available for pre-order
    • link
  • Found this out from hacker newsletter
  • x Driven x
  • Coupling question
    • Building an interface just for the sake of building an interface
    • Talked about the usefulness and when to use and not use an interface
    • It is cheap to extract so what is the reason to make them unnessecarily
  • Stringly typed interfaces
    • Open API contract first
    • Contract is outside the code so does not get accidently changed
    • Service POJO is generated from Open API
    • First thing that happens is a conversion from the POJO to a Domain Object
    • (Immutable) Domain Object has the validation
    • Each Domain Object has invariants and will throw and exception if attempting to construct an invalid object
    • Validation code is concentrated into the Domain Objects, not strewn about
    • Disadvantages
      • Changing the rules can expose issues with previously stored data
      • Example changing a business rule that will make a newly required field
        • There will be a problem loading the previously saved fields.
      • Just be careful ;-)
  • DRY 
    • What is too dry
    • Rule of three
    • Is code that looks the same really the same?
      • maybe/maybe not
    • Summing the budget and the audience is not the same.
      • How do you round the audience members?
  • Splitting the domain object
    • In three parts
      • ID - invented key or perhaps multi-part 
        • guid
        • or guid + userId
        • validated at ID construction time
        • don't cross the streams ;-)
      • Data - User controllable data
      • MetaData - System created data
    • Insert - xData comes in and is validated - return ID
    • Update - .... something something something.
    • Only need the parts you need.
  • Immutable grass is what I need
    • it doesn't grow so I don't need to waste time cutting it.

Friday, January 21, 2022

Code & Coffee 1/21/2022

Topic:  Book Review: Code that fits in your head

  1. Intro
  2. Book review: Code that fits in your head:
    1. Slides: https://docs.google.com/presentation/d/1zIvPQo_h_w168xCE2fS4J4OYqHylvH6kSZGw8IQsm5I/edit?usp=sharing
    2. O'Reilly: https://learning.oreilly.com/library/view/code-that-fits/9780137464302/
    3. Amazon: https://www.amazon.com/Code-That-Fits-Your-Head-ebook/dp/B09D2X43VX
  3. Talked a bit about state
    1. How to mutate 
    2. Functional stuff
    3. Grokking Simplicity
      1. Deconstruct programs into:
        1. Data
        2. Computations
        3. Actions
      2. Links to book:
        1. https://learning.oreilly.com/library/view/grokking-simplicity/9781617296208/
        2. https://www.manning.com/books/grokking-simplicity
        3. https://www.amazon.com/Grokking-Simplicity-software-functional-thinking/dp/1617296201
      3. this pairs well with the book:
        1. "Solving Problems the Clojure way"
        2. This aligns well with the data/calculation/actions of Grokking Simplicity
        3. https://www.youtube.com/watch?v=vK1DazRK_a0
  4. Matt's book recommendation:   "How not to be wrong"
      1. Using math to be righter
      2. https://www.jordanellenberg.com/how-not-to-be-wrong
      3. https://www.amazon.com/How-Not-Be-Wrong-Mathematical/dp/0143127535
      4. https://en.wikipedia.org/wiki/How_Not_to_Be_Wrong

    1. Things started getting crazy around here and I couldn't keep up typing as much ;-) and my outline numbering is broken beyond comprehension.
  1. "97 things every programmer should know" - Kevlin Henney
    1. O'Reilly: https://learning.oreilly.com/library/view/97-things-every/9780596809515/
    2. Also look for other "97 things every X should know" books
  2. Refactoring - Martin Fowler
    1. Learn what the work REALLY means.
    2. Changing the shape of code without changing external behavior.
    3. O'Reilly: https://learning.oreilly.com/library/view/refactoring-improving-the/9780134757681/
    4. Amazon: https://www.amazon.com/Refactoring-Improving-Existing-Addison-Wesley-Signature-ebook/dp/B07LCM8RG2/
  3. Pheonix Project - 
    1. Accelerate - Building and Scaling High Performing Technology Organizations"
      1. This is a data and case study driven book separated into two parts, the first part tells about the findings and the second part presents the backing data.  It may be possible to get most of what you want with just the first part if you suspend caring about the backing data.
      2. O'Reilly: https://learning.oreilly.com/library/view/accelerate/9781457191435/
      3. Amazon: https://www.amazon.com/Accelerate-Software-Performing-Technology-Organizations-ebook/dp/B07B9F83WM
    2. The Devops handbook - Gene Kim/Jez Humble
      1. May be hard to just read
      2. Amazon https://www.amazon.com/DevOps-Handbook-World-Class-Reliability-Organizations-ebook/dp/B09G2GS39R
      3. O'Reilly: https://learning.oreilly.com/library/view/the-devops-handbook/9781457191381/
    3. The Unicorn project
      1. https://www.amazon.com/Unicorn-Project-Developers-Disruption-Thriving-ebook/dp/B07QT9QR41
  4. The mythical man month
    1. https://en.wikipedia.org/wiki/The_Mythical_Man-Month
    2. Classic that everyone should read.
  5. Unlimited book budget for the kids
    1. Go pick out any book you want
    2. Would rather have them read low quality stuff than not read at all.
  6. Quastor.org
    1. Daily email with quick hits for learning
    2. https://quastor.org/
  7. Hardcore History - podcast by Dan Carlin
    1. https://www.dancarlin.com/hardcore-history-series/
Good stuff today!
Thank you everyone.

Friday, January 7, 2022

Code & Coffee 1/7/2022

 Topic of the day:  What is an "Expert"?

  • The Expert: https://youtu.be/BKorP55Aqvg
  • The name on the frame is Expert: https://www.youtube.com/watch?v=B2XQN-Yz9EM
  • If someone else says you are good at something you may be an expert
  • If you think you are good: https://www.britannica.com/science/Dunning-Kruger-effect
  • Finding 3 BILLION unnecessary queries might mean you are an expert.
    • Added a cache in front of the db
    • Saved a week of cpu time every 24 hours
    • This was about 1/3rd of the queries
  • Shadow ops are easier when nobody is looking.
  • regexing for xml tags means you probably an expert (at causing yourself pain)
    • Oh by the way, intellij has regex tester (a la regex101) built in
  • Using string interpolation to insert comments making conditionals in your sql query might mean your an expert
    • or it might mean you like pain
  • March is not far from January
    • learning to estimate
    • nobody is an expert at estimation