5 ms·
Sometimes I read conversations about software engineering concepts by career developers and I get this sense that there is this entire hidden world of other eng
by zaphar 6y ago
Sometimes I read conversations about software engineering concepts by career developers and I get this sense that there is this entire hidden world of other engineers that I have somehow managed never to encounter.
Every engineer I've ever met who has been doing it for more than a couple years universally decries circular dependencies. Every one of them has come to that opinion via hard won experience dealing with real world problems they encountered. And yet comments like yours reveal there are other engineers working in places where apparently the opposite is true. Whenever I see that I wonder how this sort of self sorting manages to occur.
- ironmagma 6y agoSome problem domains have unique characteristics. I think the closer a problem resembles nature, the more it breaks our structures we want to impose on it.
- kayodelycaon 6y agoPossible reason: selection bias. If everyone else is fine with circular dependencies or at least sees them as a necessary evil... are they going to extremely vocal about the current status quo when there they have no need to defend it?
- Aeolun 6y agoIn my experience, it’s generally less experienced engineers that will happily make a clusterfuck of circular dependendies. If a more experienced engineer does, it’s generally considered a necessary evil, but not a choice taken lightly.
- TeMPOraL 6y ago> Every engineer I've ever met who has been doing it for more than a couple years universally decries circular dependencies. Every one of them has come to that opinion via hard won experience dealing with real world problems they encountered. They may not realize they have them - at runtime, in the object graph, possibly indirectly. There's little difference in principle between cycles in "static" code vs. runtime state, but we often can't express them in the former, because our languages don't specify the concept of dependency at enough granularity (and some rely on a linear compilation pass).
- leoc 6y agoThe fact that computing is shot through with people who think that putting things in-band makes them go away, and that because special cases have nice properties therefore King Canute can abolish the general case with a wave of his hand, is a very large part of the problem with computing.
- hrktb 6y agoTo me, the parent is describing a functional circular dependency that we all have to live with, but when we’ll design the system it will be masqueraded in a many to many association in a third object/table and we’ll proudly say “we have no circular dependencies”. To me both are technically true, reality is messy, and we hide the mess under imaginary constructs.
- Smaug123 6y agoAh, but in the functional version, the messiness is both totally explicit and trivially inspectable.
- username90 6y agoI've worked with very high level engineers at Google that thought cyclic dependencies are fine. Sometimes they are just the simplest solution and trying to design abstractions to avoid it just creates a huge mess. If you've working with Java at Google (Guice) makes you learn to hate hiding circular dependencies behind dependency injection, since your binary gets injected by some huge tree of thousands of dependencies all that can create errors or interfere with each other. And without static checking trying to reason and fix those issues becomes really hard. I strongly prefer using the languages actual type system to create circular dependencies that you can inspect using well known tools over that any day, better have a problem you can see than hide the same problem to satisfy some tools requirement.
- jonhohle 6y agoI think something has been lost along the way with injection and IoC that makes using a fully functional programming language for object wiring a compelling alternative for most engineers.
- stingraycharles 6y agoI have to say that in my whole career of doing Java / Clojure, Google’s SDK are one of the worst in terms of dependency hell. It’s incredibly unpleasant to work with, lots of breaking incompatibilities with libraries, etcetera. I may sound very snarky, but it really feels like an over engineered mess and I suspect the reason they need all these dependency tricks is the fact that it’s over engineered, not necessarily that the problem they’re solving is so unique that they need circular dependencies.
- username90 6y agoYou never truly need circular dependencies, however many times letting functions at the same abstraction level call each other greatly simplifies code.
- dexwiz 6y agoManifolds? Locally we want everything to be a straight line, but when you zoom out far enough you see it was a circle all long.
- dataflow 6y agoIt's not clear the parent commenter actually needs a cyclic reference there, so I wouldn't draw any conclusions from it. Some of us don't believe it's necessary in that example.