Live data from Hacker News

From Rails to Clojure, Then to Java, Then Back to Rails

engineering-management.space

51–60 of 157 posts

Re: From Rails to Clojure, Then to Java, Then Back to Rails

#51
post #34

I've tried a lot of different languages over the years including Ruby, Go, Scala, and Haskell. Ruby actually isn't too bad if you don't use Rails. Between Rails and stuff like Spring over in Java-land I've developed a strong hatred of huge frameworks :) Clojure, however, is the one language that just 'clicked' for me almost immediately. In fact, I'm pretty certain I'll be sticking to Lisps as much as possible from he…

Clojure also clicked with me too, and I also dislike huge frameworks.

There's a trade off there though, rails gives you so much, you almost forget what the problems are with slapping different libraries together.

Definitely room for a "blessed" path to web dev in clojure.

Re: From Rails to Clojure, Then to Java, Then Back to Rails

#52
post #21

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.

I've always had better luck restricting FP to using things like map, reduce, filter, (etc) inside methods as an implementation detail, but having the structure of the app use OOP.

This is where I've landed when writing Ruby code, as well, and it's served me really well.

Re: From Rails to Clojure, Then to Java, Then Back to Rails

#53
post #33

Earlier quoted context omitted.

Ruby is still a beautiful language, particularly for its object oriented-ness. And I think Ruby's nature, simplicity and power appeals to young people, however the resurgence of a towering Javascript/NodeJS is hard compete with. These are market forces that really matter when you're wondering what language & platform to use for your MVP. In recent surveys, Ruby & Rails has fallen to the bottom of the list among the f…

Ruby also suffers from top quality JITs vs what JS has. The only good option being JRuby, as far as I understand. I am not at all into Ruby. Regarding being polyglot and seniority, a possible solution is to work for consulting companies that focus on multiple stacks.

MRI has just added a JIT, I know nothing about it other than that it exists.

Re: From Rails to Clojure, Then to Java, Then Back to Rails

#54
post #51
post #34

I've tried a lot of different languages over the years including Ruby, Go, Scala, and Haskell. Ruby actually isn't too bad if you don't use Rails. Between Rails and stuff like Spring over in Java-land I've developed a strong hatred of huge frameworks :) Clojure, however, is the one language that just 'clicked' for me almost immediately. In fact, I'm pretty certain I'll be sticking to Lisps as much as possible from he…

Clojure also clicked with me too, and I also dislike huge frameworks. There's a trade off there though, rails gives you so much, you almost forget what the problems are with slapping different libraries together. Definitely room for a "blessed" path to web dev in clojure.

re-frame is the uncrowned king of web dev at the moment, there is nothing like it out there

Re: From Rails to Clojure, Then to Java, Then Back to Rails

#55
I switched from rails to full-stack js and couldn't be happier. EmberJS + ExpressJS is so simple to set up, and than you have everything in one language and you can even share files and just use a build script to distribute them to client and server (e.g. regex)

Re: From Rails to Clojure, Then to Java, Then Back to Rails

#56

As a hiring manager, I now look for at least two languages, and they don't need to be the tech stack we're currently using. If you're a good developer, and you know more than one language, you understand that picking up another is not an insurmountable barrier. You'll pick up our stack soon enough. What I need to know is if you can think critically, not if you already know what we plan to teach.

Same here. Depending on the team I'm leading, I can actually consider not having the current stack a plus, as an outsider's perspective on architecture can help grow a team and codebase that's been stuck doing things the same way for a long time.

There's some penalty in ramp-up time, but I find it more than pays for itself down the road.

Re: From Rails to Clojure, Then to Java, Then Back to Rails

#58
post #54
post #51

Earlier quoted context omitted.

Clojure also clicked with me too, and I also dislike huge frameworks. There's a trade off there though, rails gives you so much, you almost forget what the problems are with slapping different libraries together. Definitely room for a "blessed" path to web dev in clojure.

re-frame is the uncrowned king of web dev at the moment, there is nothing like it out there

That's only for the front end though. Lots of people use Compojure which is essentially Sinatra if you're coming from Ruby. Luminus is a far more complete solution that feels like Rails. After I cut my teeth enough times starting from nothing, Luminus unfortunately feels a little clunky because you have to figure out how it's all glued together.

Re: From Rails to Clojure, Then to Java, Then Back to Rails

#59
post #18

Clojure does not have an alien syntax. As with Lisps in general, it has almost no syntax. (operator param param ...) Done.

> As with Lisps in general, it has almost no syntax

That's not true. Lisp has lots of syntax - actually more than most programming language, because the syntax is arbitrarily extensible via macros.

The idea of (operator param param ...) is only valid for function calls, but even then the syntax is slightly more complex, since several Lisps have keyword arguments.

But besides (operator param param ...) Lisp also has:

((lambda (arg ...) . body) param ...)

(special-operator ...)

and

(macro-operator ...)

Each special operator comes with syntax. Example is LET.

LET is not

(LET param param)

but

(let (arg ...) declarations . body)

where arg is arg | (arg value)

declaration the is something complex like

(declare (type (integer 0 3) arg))

for a type declaration for the variable arg, which is an integer in the range of 0 to 3.

Re: From Rails to Clojure, Then to Java, Then Back to Rails

#60
post #3

Earlier quoted context omitted.

Like Gary Bernhardt's notion of a "Functional Core, Imperative Shell" — https://www.destroyallsoftware.com/screencasts/catalog/funct...

Damn, I knew I got this idea from somewhere, I just totally forgot where. Thanks for posting this link - I'll have to rewatch it.

Brian Goetz has talked about this as well - see FP is Dead - Long Live FP (https://youtu.be/ROL58LJGNfA).
Post reply on HN