3 ms·
I definitely had that same experience. I've been writing code like that for about 15 years now and it's only started changing over the past two years or so. I
by bpchaps 10y ago
I definitely had that same experience. I've been writing code like that for about 15 years now and it's only started changing over the past two years or so.
I think it stems from a few reasons -
1. I have a tendency to fix small problems that only need a one-time fix. So, lots of code, but disposable and messy.
2. HS programming classes lacked a lot of the meta stuffs, like refactoring, working in groups, etc.
3. Most of my coding years have been spent in a terminal where a combination of awk, sed, grep, xargs, etc works perfectly fine. A non-trivial number of problems can be solved that way, but it hits a wall pretty quickly.
For the past few months, I've been writing a lot of Clojure and have found that it fits my mental model significantly better than Python, C, etc. What's interesting is that all other languages I code in have dramatically improved ever since Clojure "clicked". Hell, even my bash-fu has become cleaner, terser, faster and more bug free. Funny how that works..
- abc_lisper 10y agoHey, I'm currently using Clojure too and I feel the same way! I think the reason it feels more natural is its emphasis on process instead of things. You think of computation as series of transformations, and that makes easy to establish causal relationships among events and thus help reason better about the system. (I think Steve Yegge first complained about Java, that it is a land of nouns) I think the failing of OOP for me is that I never got what an object is! To me, an object always felt like a weird plane in a n-dimensional axes(because an object contains other objects), and it was hard to reason about that. For example, my first (atleast in my latent consciousness) reaction about Abstract classes was, what is it abstract about? If it is abstract about a bunch of things, that are only related because of the flow of code, I guess I wasn't smart enough to crack that effectively.