Link to survey: tiny.cc/programthemind
I found this thorugh this tweet:
I dare someone to truly learn LISP or OCaml and then claim that their way of thinking did not change, not even just about codeā¦ ^.^
In what way do they change the way you think?
Well for Lispāy languages the macro system causes you to think about not only about the code, but also about simplifying it and making it more readable, to make a DSEL for your problem rather than just handling the problem.
For OCaml and other strong HM typed languages is that you learn about how to structure data First. In dynamic languages, including elixir, many people do not always have in mind in what form their data is and it causes a lot of bugs because of it (which dialyzer can catch āsomeā of the issues of). Where if you program the ātypesā first you figure out how your data should be, then writing functions becomes writing simple transforms to transform data from one form into another, instead of in dynamically typed languages where you are thinking more about operations and less about data.
I have always found that databases frame how I think about data more than anything else.
Elixir and Erlang have entirely changed how I think about server side development though. Everything else just feels like doing it wrong now.
SQL has changed my mind, for sure. After for loops selecting data, and even after very modern Clipper, it was a game changer. Since Iāve found SQL, I donāt have to think āhow to retrieve my dataā anymore, but āwhat I want to getā.
Then it was heitml and PHP/FI. Since this, my brain does not think about HTML as a static thingy.
Then, Ruby has convinced me to think objective. It was not my first OO language, but it was Ruby who convinced me to think in OO.
Then, SML. My brain switched from OO, and it was a damn good switch.
Geez, Iām old
Iām not sure if this counts, but Elixir has made me change the way I think about myself.
Prior to coming to Elixir, I never thought of myself as a āRails Developerā (despite learning/reading quite a bit about Ruby and Rails) - I always thought of myself as more of a āRails Userā because it never really felt like I was architecting software; more like just putting blocks together. (Thatās probably a little harsh but you know what I mean - and Iām not knocking it, as a nube that was incredibly empowering.)
With Elixir I feel different, and although I havenāt actually made any Elixir apps yet, I think when I do, I will feel more like a software developer or a systems architect - because youāre not just putting your app together, but thinking about processes, when to spawn them, how they interact with each other, how data is passed between them, how state is dealt with etc; you have to think about and design the system as a whole.
I also love the way Elixir - and PragDave in particular - have shaped the way I think about software development - with making easy good principles and practises such as the Single Responsibility Principle, Microservices and the Replaceable Component Architecture. I know Iāve said it before, but I really do think that Elixir making these things not just possible but āeasyā is going to be a huge selling point in the near future
I wonder if thatās not a symptom of Elixir being new to you. Maybe after more experience youāll feel like youāre putting blocks together again? Only this time the blocks will be different (processes, genservers, etc) instead of requests, responses, middleware, etc. and thatās a good thing, it means you underetand the components very well already and donāt get too caught up in the details.
Iāll have to get back to you on that
I wouldnāt say that Elixir changes the way I think. The BEAM model of computation has always felt like the right thing to do for web applications. I just didnāt know it was possible. The stateless nature of the applications (request goes in, response comes out) pushed by most web frameworks Iāve tried was a limitation I was quite happy to get rid of.
I think Iāve written this already somewhere, but back when I used python, I had stateful ideas I wanted to try which again and again proved to be impossible inside the frameworks. I tried most of them (Django, Flask, Pyramid, Web2py, etc.), and not a single one of them allowed me to do what I want.
The workflow would be: 1) have an idea, 2) fail to implement the idea, and 3) read extensively about the idea 4) read a post by Armin Ronecher that advocated for running a nodejs server in parallel with the python app for websockets and praising the python frameworkās limitations as a good thing (Iām not kidding, although I canāt find the blog post now) 5) quit in frustration.
With Phoenix, it is: 1) think of an idea, 2) read the docs and 3) implement the idea. Goto next idea.
I understand that the BEAM is a one-trick-pony, but itās great for orchestration and for moving data between processes (no nodejs server running besides my app! Yay!).
In conclusion, I donāt think Elixir has changed my mind significantly, but instead it seems to adapt to the way Iāve always thought things should be done.
I mean, the BEAM and some goodies built on the BEAM like Phoenix channels and Phoenixās PubSub system allow for much more exciting possibilities than what you can get with single threaded languages like Python (and I think Ruby too? Iāve never used Rubyā¦).
In no time you find yourself trying to implement real time notifications or collaborative editing and reading papers about Operational Transformation and CRDTs which are new and cool and experimental, but once someone builds a good library on top of the BEAM for that, itās just a nee component you can plug into xD
(Offtopic: anyone here interested in real-time collaboration wants to port ShareDB into Elixir + Phoenix? The core is a couple of JS files on the backend and for the frontend one can build on top of Phonix channels)