|
I've been feeling the past few weeks the repeated impact of hitting a wall. Programming was starting to feel like grinding. I felt wistful for SICP, when programming was full of big ideas and elegant new approaches to problems my unprincipled brain's first instinct was to clobber by brute force -- and learned, quickly, in Scheme, it's hard to be artless. It is, I think, harder code gracelessly in Scheme than to code with grace: it has a way of bending your ideas to a form. I think that's my main complaint with Python. In Python, exactly the opposite is true: it doesn't force you to think overly hard about the way you solve problems, so you can solve more problems! Woohoo! You can Code Like Coltrane, as Rich Hickey says. For better or for worse. Here's an unfortunate side effect I've noticed: my programs are vastly more complex and efficient than when I graduated from SICP a year ago, which is good, and yet I can't remember the last time I wrote code that was truly beautiful. Code I felt proud to call my code. Whose inner workings I could explain to a child. To me, efficient Python programs conceal so much of how they work, that striving for craftsmanship can feel alienating. It conceals so much. It's like a black box magic trick: in goes the value... (pause) oh, and there's the answer! And the obvious what's happening in between those two points, the less efficient my solution tends to be. The prize winning solutions are often the most opaque, the most dense with imported methods. And my programs look inevitably kind of haphazard and provisional. Like doodles. My Scheme programs, on the other hand, looked like Swiss clocks. They pleased me. They wouldn't have worked any other way. They molded to the precise, regimented form they had to be. I understood them. They were good. I like functional programming. I think the wall I'm hitting might be Python. The thought of a little Clojure or Haskell in my life right now sounds like a beach vacation. |
This is the reason, why I started to do little side-projects with clojurescript and reagent [1]
I love the way how programming with reagent is visual, with almost no friction. I just start repl, start browser, open the code, and every time I save file, I see how my program changes :-)
Compared to my work, where it can take me the first hour to get into the zone, and additional 20 minutes each time I need to switch frameworks, it really feels like a vacation :)
[1] https://reagent-project.github.io/index.html