• ares623 7 hours ago

    I miss the days when productivity booster posts were all about REPL, functional programming, composability, immutability.

    • adityaathalye 37 minutes ago

      So. Much. This!

      Circa 2013-14, I was a QA having to write some Selenium / WebDriver test suites for the web application side of our product.

      At the time, when our team was tiny, Clojure was one of our "company languages" (besides JavaScript/YUI for web, and iOS/Objective-C, Android/Java for our mobile SDKs).

      Our extant web testing framework was written in Clojure, so I continued refactoring that to support our people through "hypergrowth" feature churn including a web tech migration from YUI to React (took about four years for YUI to completely factor out, IIRC).

      I did not fully grok just how much Clojure's multiple dispatch facility helped me then. I knew that feature was useful, of course, but the magnitude became clearer as the years progressed.

      It allowed a single person---yours truly---to address the real needs of a ridiculously complex moving target (because B2B web products be like that --- full of special cases and customisation options and spooky effects at a distance).

      I would not want to try supporting a test suite in that sort of situation, without at least these Clojurish programming facilities, that I have come to expect as a given these days.

      Talk: https://www.youtube.com/watch?v=hwoLON80ZzA&list=PLG4-zNACPC...

      Deck: designing_object_functional_system_IN-Clojure_2016.pdf, here https://github.com/adityaathalye/slideware/

      Incidentally, I implemented the refactored test suite API using the "PageObject" abstraction. An apt OO abstraction is worth its weight in gold, provided the implementation composes naturally.

      Thanks, Martin Fowler! This very post helped me back then: https://martinfowler.com/bliki/PageObject.html

      • gleenn 6 hours ago

        I just wish more people appreciated those things at all. What's the name of the rule where everyone with a sufficiently large codebase has a partially implemented, buggy time oriented data log somewhere and it's too bad people didn't realize that sooner. Datomic et all are so cool and solve so many interesting and pervasive problems but people would rather just mangle those bits themselves. The glory of refactoring a large, purely immutable piece of software is so glorious and easy. The wrapper/adapter hell that comes out of the Expression Problem is just one more thing that people just assume is unavoidable and the amount of gross code that falls out of that is so painful.