What I’ve Learned This Week (2018-11-04)

  1. There are three mechanisms for injecting values in Spring but constructor injection is superior because A) it allows you to make your fields final and B) it causes you to physically recoil at the stench of your gigantic constructor if your class has too many dependencies. Credit to Roger Guldbrandsen and Petri Kainulainen for putting the case for constructor injection so eloquently.
  2. In Java 8 I can write List<MyThing> things = new ArrayList<>(); rather than List<MyThing> things = new ArrayList<MyThing>();. Probably very old news, but I haven’t worked full time on a Java project since 2012 and I’m absurdly excited to see that Java has become a smidgen less bloaty.
  3. “If you feel that you’re over-communicating, you’re probably doing it correctly.” – Stella Garber (Head of Marketing, Trello) on making remote work work – something for the ‘wish somebody had told me that earlier’ file.
  4. There are some great tools out there to help newcomers dip their toes into the open source community. During NomadPHP’s two-day open access event I watched a lightning talk Your First PR: How to Contribute to Open-Source Projects by Gareth Ellis and learned about two of them: issuehub.io and Up for Grabs. Contributing to open source is one of those things I keep meaning to do but never find the time for, but I pinky promise that next time I spot a typo in the documentation, I’ll fix it.
  5. PHP is getting typed properties in 7.4! This is another step forward in PHP’s transformation into a mature, enterprise-ready language. There isn’t much more left to do, but I’d love to see strictly typed arrays added to the mix.