Friday, September 10, 2021

Code & Coffee 9/10/2021

 Code & Coffee 9/10/2021

  • Topic: "What is clean code to you"
    • A data access layer that is actually tested
      • there is a thing called NULL
      • it is uncomparable
      • value.equals(otherValue) will make your life less fun 
        • Sonar Cube would have caught that 
          • yup :(
      • 10 year old code may still have fun and interesting bugs yet to be discovered
      • Clean code is code you can trust
    • Clean code takes more time
      • and yet this saves time
      • Quick and dirty saves time
        • the cost is hidden in the future
    • When you are doing code in reverse
      • (dissecting code previously written to figure out what the code is doing)
      • The time taken is exponential with the complexity of the code.
    • Clean code is code that is acceptable to the maintenance team
    • Clean code is NOT ssdd
      • Shiny Stuff Driven Development
      • aka Resume Driven Development
      • This leads to somewhat hackish code as it takes time to learn how to cleanly implement a new tool or technology
      • Instead of resume padding seek to master the new tech and make sure that it is tested and that other team members are onboard with the new shiny stuff.
    • Clean code and testing
      • attitude has changed over time
      • used to be more militant
      • but over time you realize that people are trying their best but more understanding now
      • virtually nobody is deliberately lax on quality.
      • This is a sensitive topic but there are techniques for having these conversations.
    • SOLID and DRY
      • both are commonly misunderstood, misapplied and worthy of additional study.
      • For example Single Responsibility
        • ... database and business logic can be side by side if their requirements will ALWAYS change at the same time.
        • You missed more examples because I don't type fast enough to keep up sometimes.
      • Is SOLID still the best we can do?
        • I wonder if part of the pain is friction from applying OO principals in a functional-ish style
    • Can you grok this code,  can you read it and modify it and how long will it take to do so.
    • Postel's law: https://en.wikipedia.org/wiki/Robustness_principle
    • Clean code is not prematurely optimized
  • Communication
    • Sometimes it seems that people are using works from the same language
      • but entirely failing to convey meaning
    • It is good to be able to recognize when this is happening so that course corrections can happen
  • Linux distros
    • Manjaro - Arch derivitive
      • "easy mode arch"
      • Used this as it had the latest kernel at the time
    • Next up is back to Ubuntu, it caught up to the kernel that is needed for the fancy video card
  • Barrier for mouse sharing - required xorg, does not support wayland
  • Talked a bit about HATEAOS (pronunciation is left to the reader) and beyond.
    • Links about what is beyond and how it to make it more useful:
    • http://amundsen.com/talks/2015-04-codepalousa/semantic-gap.html
      • As presented at Google: https://www.youtube.com/watch?v=UkAt9XSOfaE
      • Slides: http://amundsen.com/talks/2015-04-codepalousa/gap-slides.pdf
      • On O'Reilly Learning: https://learning.oreilly.com/videos/rest-hypermedia-and/9781491936511/9781491936511-video219221/
        • better audio if you have access.
    • I have not looked deeply into this yet but it looks to have some very interesting potential.

No comments:

Post a Comment