Live data from Hacker News

Structuring Clojure applications

yogthos.net

61–67 of 67 posts

Re: Structuring Clojure applications

#61

I love Clojure and also Common Lisp (basically, Lisp in general). But I also observed every single corporate Clojure project I had any connection with to fail spectacularly. Typically as a complete unmaintainable mess. Some as unmaintainable mess that is very slow and unreliable. My theory is that this is result of no guardrails on how to structure your application. Clojure to be productive must be used by people who…

Like many replies I've had the opposite experience. We've had good developers but I think that's also partially due to Clojure, it seems to take some professional confidence in many cases although we've had first-language Clojurists too. In my anecdotal experience the projects do better than the ones going for stack du jour.

Re: Structuring Clojure applications

#62
It seems like a lot of the anti-Clojure sentiment boils down to 1) lack of static typing, 2) poor IDE support.

I'm wondering, though, doesn't the same apply to Ruby, Python, and Node projects?

I've over-hauled 80k line Python projects, and the "lack of typing" there seemed to apply as well.

Why don't Ruby, Python, and Node projects suffer from the same critique? Genuinely curious...

Re: Structuring Clojure applications

#63

It seems like a lot of the anti-Clojure sentiment boils down to 1) lack of static typing, 2) poor IDE support. I'm wondering, though, doesn't the same apply to Ruby, Python, and Node projects? I've over-hauled 80k line Python projects, and the "lack of typing" there seemed to apply as well. Why don't Ruby, Python, and Node projects suffer from the same critique? Genuinely curious...

They do get the same themed critique from static language proponents, even more so since JS/Python don't have culture of using schema systems (ala spec and malli). But of course dynamic languages have a lot of upsides as well, it's just a tradeoff.

Re: Structuring Clojure applications

#64

Earlier quoted context omitted.

Of the two billion-plus exits I've been (peripherally) a part of, the most recent one was Clojure, and the one 10 years ago was Python. I've also seen several Clojure projects and one Scala project fail. With very rare exception, your tools will neither doom you nor ensure success. It all comes down to execution, in the end.

> Of the two billion-plus exits That's a lot of exits :)

hmmm. Does "two, billion-plus exits" or "two billion-plus-exits" work better?

Re: Structuring Clojure applications

#65

Earlier quoted context omitted.

Of the two billion-plus exits I've been (peripherally) a part of, the most recent one was Clojure, and the one 10 years ago was Python. I've also seen several Clojure projects and one Scala project fail. With very rare exception, your tools will neither doom you nor ensure success. It all comes down to execution, in the end.

> your tools will neither doom you nor ensure success. This holds true as long as you're not buidling your startup on something truly outlandish like brainfuck or piet

I'd argue that those are toys, not tools.

Re: Structuring Clojure applications

#66
post #37

I love Clojure and also Common Lisp (basically, Lisp in general). But I also observed every single corporate Clojure project I had any connection with to fail spectacularly. Typically as a complete unmaintainable mess. Some as unmaintainable mess that is very slow and unreliable. My theory is that this is result of no guardrails on how to structure your application. Clojure to be productive must be used by people who…

I had the opposite experience. I worked for a company with a bunch of Clojure projects, written by people of varying levels of experience. I had to do some cross-cutting changes and feared the worst. But when I actually got down to it, everything more or less made sense. Why did this happen? - We had small common framework that everybody used, at the very highest level (think application lifecycle management). That i…

> We had small common framework that everybody used

Python applications seem to benefit from this as well, and I've encountered a surprising amount of resistance to it from other developers. I think everyone has been burned at least once by "over-designing", building too much of the wrong abstraction. But the result is that they are never willing to commit to a common internal framework even long after the need for one has become painfully obvious.

Usually this happens among developers who have been solo developing a project for a while, and see themselves as YAGNI zealots fighting the good fight against excessive abstraction and overengineering.

I understand and sympathize with the sentiment. But when every design decision is ad-hoc and as-needed, it makes it really really hard for external contributors to make changes to the existing codebase. It discourages contributors from "big-picture thinking" and eventually leads to the dreaded Ball of Mud design, with some combination of:

• meandering flow control

• poorly-defined or nonexistent interface boundaries

• inconsistent naming

• lack of documentation, or incorrect documentation and/or comments

• redundant safety checks, or absent safety checks

• poor runtime performance

• difficult-to-test code that freely mixes I/O and business logic, requiring complicated test fixtures, tests that are difficult or impossible to change, and poor test coverage (antipattern and code smell: "idk how to test that, don't waste your time. did you run it on the QA environment and check that it worked?")

I think it arises as a misunderstanding of the forces that lead to overengineering and building incorrect abstractions in the first place. The problem is usually one of expanding the scope of an abstraction or framework too early, not of building the abstraction or framework in the first place.

Re: Structuring Clojure applications

#67
post #6

I'm an experienced developer and I'm getting the feeling that advanced languages are getting less relevant for most applications, since you usually just need a little glue code to glue together mainstream solutions or managed services. I don't need the power of Clojure to connect SQS to Lambda with some extra custom logic. But Clojure does look amazing :)

But you need to write the Lambda function itself in some programming language. The type of "glue" is less relevant than in the past, sure, but the thing being glued needs to be written as well, and that's often critical business logic.
Post reply on HN