In the "things learned from Ruby" section: Focus on strong object oriented programming What I've learned from Ruby is to favor functional programming concepts - minimize side effects, isolate state mutation, etc. Ruby is definitely OO, but when my Ruby code is more functional it's less buggy, easier to understand and move around, and generally less convoluted.
From Rails to Clojure, Then to Java, Then Back to Rails
21–30 of 157 posts
Re: From Rails to Clojure, Then to Java, Then Back to Rails
#22In the "things learned from Ruby" section: Focus on strong object oriented programming What I've learned from Ruby is to favor functional programming concepts - minimize side effects, isolate state mutation, etc. Ruby is definitely OO, but when my Ruby code is more functional it's less buggy, easier to understand and move around, and generally less convoluted.
I've learned to think of objects as not exactly monadic, but monad-like in their pattern of use: whenever there's a bit of state that I need to track and isolate from all other state in the system, wrap that in a class. The allowable state transitions then become methods.
Re: From Rails to Clojure, Then to Java, Then Back to Rails
#23Earlier quoted context omitted.
It's because we don't like or approve of rails. It doesn't make business sense to us (us being a completely anecdotal group of young developers I'm friends with). There are other solutions that provide sufficiently more developer speed and safety, while also providing much better performance than any rails application. Edit: I guess I just hang out with like minded people, but our biases shouldn't negate the fact tha…
What other solutions are you youngsters using then? Elixir/Phoenix? Django/Python? Node? Haskell?
Re: From Rails to Clojure, Then to Java, Then Back to Rails
#24Earlier quoted context omitted.
I've learned to think of objects as not exactly monadic, but monad-like in their pattern of use: whenever there's a bit of state that I need to track and isolate from all other state in the system, wrap that in a class. The allowable state transitions then become methods.
Right, and most of the times, if state have different life times, then it should be in different classes.
Re: From Rails to Clojure, Then to Java, Then Back to Rails
#25Earlier quoted context omitted.
Right, and most of the times, if state have different life times, then it should be in different classes.
What do you mean by life times?
Re: From Rails to Clojure, Then to Java, Then Back to Rails
#26"Clojure: considering the difference between being easy and being simple. Clear difference between data and logic that changes that data. Distinction between pure functions and functions with side effects, try to separate them. Let’s try to make simple code by default."
"Java: performance, concurrency and strictness."
Maybe they mean they were forced to think about concurrency in Java?
I don't think any reasonable person would argue that concurrency is easier in Java than in Clojure.
Re: From Rails to Clojure, Then to Java, Then Back to Rails
#27Another thing I’m getting is that the new kids won’t like rails, and it’s being harder to hire. I'm surprised by this, to me the language used would be a long way down the list when evaluating an employer.
I really think Pedro (the blog post writer) has an excellent point about being a polyglot but trying to qualify as a Senior Engineer except I'm older and have even more platforms & languages behind me. Its a serious problem because I have the experience to easily be a Sr. Engineer or manager but my experience isn't concentrated long enough anywhere to make me useful enough to warrant the role.
Re: From Rails to Clojure, Then to Java, Then Back to Rails
#28In the "things learned from Ruby" section: Focus on strong object oriented programming What I've learned from Ruby is to favor functional programming concepts - minimize side effects, isolate state mutation, etc. Ruby is definitely OO, but when my Ruby code is more functional it's less buggy, easier to understand and move around, and generally less convoluted.
Ruby used functionally is great, but it takes an already time-inefficient language and amplifies that weakness (lots of creating new collections and returning them, whereas normally in Ruby you would modify elements within the collection).
Re: From Rails to Clojure, Then to Java, Then Back to Rails
#29Another thing I’m getting is that the new kids won’t like rails, and it’s being harder to hire. I'm surprised by this, to me the language used would be a long way down the list when evaluating an employer.
The majority of HR departments tend to suffer from myopia for anything beyond the last couple of months on the current employer.
So always take care not to land in something that will be hard to get out of.
Re: From Rails to Clojure, Then to Java, Then Back to Rails
#30Clojure does not have an alien syntax. As with Lisps in general, it has almost no syntax. (operator param param ...) Done.
(Yes, several of those are implemented as reader macros. I don't see how that would make them any easier to learn than the same feature implemented as "syntax".)
That's not a knock against it. I think Clojure is the best general-purpose language today, but we've come a long way in the past few decades. Lisp is no longer a language whose implementation fits on a blackboard (and everyone extends it in their own way). We've discovered a bunch of common functionality that almost all programs need, and pushed it up into the stdlib and language.