TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Data-Driven Development Is a Lie

95 pointsby mgdover 1 year ago

23 comments

starbugsover 1 year ago
&gt; But they would never give a speech about how they messed up by describing everything with maps.<p>I think this needs to be emphasized and can easily be transferred to a whole bunch of other topics unrelated to DDD&#x2F;Clojure.<p>Nobody ever talks about the negative sides of some new apparently cool thing, because it is assumed that doing so wouldn&#x27;t attract an audience. While in reality, often cool new thing does only work as advertised in a minority of cases and the negative sides are more important to look at.<p>We should more often talk about the negative sides of &quot;cool&quot; new approaches.
评论 #38354285 未加载
评论 #38350602 未加载
BoppreHover 1 year ago
EDIT: my comment is wrong because it confuses Data-Driven Design and Data-Oriented Design. Thanks @Narishma for the correction. DOD is pretty great, but I wouldn&#x27;t push for DDD outside game engines.<p>---<p>I see DDD as a counter movement to OOP: expose your fields, don&#x27;t bake behaviors into your data structures, and accept primitive types instead of instances of the internal class MyData.<p>To me it doesn&#x27;t imply &quot;convert your code into data&quot;, which seems to be OPs only gripe with it.
评论 #38351669 未加载
评论 #38351962 未加载
wccrawfordover 1 year ago
I&#x27;ve done DDD a few times, and every single time was a mistake. The solution fit me like a glove, but nobody else really understood it. Some of my best coworkers could modify it, but they still frequently did things &quot;wrong&quot; and overcomplicated things.<p>I&#x27;ve basically sworn to never do it again.<p>I didn&#x27;t know that I was doing &quot;DDD&quot;, though. I was just trying to make it easier to make changes that I knew were common.
评论 #38351526 未加载
zackmorrisover 1 year ago
I don&#x27;t think I could disagree with the article more strongly.<p>I&#x27;ve written conditional logic trees like this and they&#x27;re pretty much always better than some hardcoded OOP&#x2F;imperative code. I think what the author might have missed is that the conditions are labels for some functional result, usually from SQL as the app checks various fields on the user&#x27;s database tables. So DDD doesn&#x27;t actually work with data, but filters on data. The labels are to make the intermediate steps readable by humans, like how Prolog rules&#x2F;predicates work.<p>In other words, I don&#x27;t think that the article has said anything, because functional code can always be transformed to look like functions acting on conditions or conditions resulting from functions. At the end of the day, functional code is still a query composed of queries. The important part is to avoid mutable state, which would turn it back into imperative code which is hard to step through and reason about.
poulpy123over 1 year ago
I googled the definition of data driven development, and none of the results I looked at explain anything. I don&#x27;t know if it is because of the concept itself or because internet is becoming more and more shit
评论 #38349903 未加载
评论 #38352156 未加载
评论 #38351661 未加载
mjhayover 1 year ago
<i>whatever</i>-driven development is always just about vibes anyway. It shouldn&#x27;t be taken too literally. The example in this article may have been a good use-case for Clojure&#x27;s multimethod facilities.<p><a href="https:&#x2F;&#x2F;clojure.org&#x2F;reference&#x2F;multimethods" rel="nofollow noreferrer">https:&#x2F;&#x2F;clojure.org&#x2F;reference&#x2F;multimethods</a>
ChicagoDaveover 1 year ago
Let’s not confuse domain-driven design with data driven design.<p>Most architects would assign the DDD acronym to Domain-Driven Design.<p>&lt;&#x2F;pedantic-rant&gt;
评论 #38351689 未加载
评论 #38351659 未加载
评论 #38351446 未加载
ballparkover 1 year ago
I like that the author points out that trying to write a new interpreter is not a good idea. However, to call that DDD, and then to say DDD is a lie is where I would disagree. I guess one could say that it&#x27;s DDD taken to some extreme, but I would just call it a poor choice as the author points out.<p>Also I assume that the author is equating DDD with Data-Oriented Programming. Here&#x27;s a good book on the topic: <a href="https:&#x2F;&#x2F;www.manning.com&#x2F;books&#x2F;data-oriented-programming?ar=true&amp;lpse=A" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.manning.com&#x2F;books&#x2F;data-oriented-programming?ar=t...</a><p>One thing I don&#x27;t love about the book though is that it tries to demonstrate how to do DOP with Object-Oriented languages, which looks to be difficult to accomplish
评论 #38352054 未加载
funcDropShadowover 1 year ago
DDD usually stands for domain-driven design.[0]<p>[0]: Or in earlier times for the Data-Display Debugger.
评论 #38351039 未加载
评论 #38352628 未加载
评论 #38352977 未加载
emorning3over 1 year ago
I&#x27;m confused by this. I&#x27;ve never written Clojure or Lisp. I&#x27;m a run-of-the-mill C#, .NET developer. But even I am used to treating LINQ expressions as both code <i>and</i> data. I can take a LINQ expression, modify it if I want, compile it, and execute it against a given runtime context. I would have expected this duality between code and data to be intrinsic to Clojure. Hence my confusion.
评论 #38349897 未加载
mannykannotover 1 year ago
A program is written to do something, and you can only think so far about its data without thinking about what you want to do with it.
评论 #38349820 未加载
andrewshawcareover 1 year ago
How is using a function not sweeping domain complexity under a rug?<p>A complaint was that the data-driven development approach created a _poor_ DSL and then a non-DDD solution didn’t use a DSL at all…<p>What would a solution using a good DSL look like, and how would it differ from the DDD-based approach?
drbigover 1 year ago
Yeah the Data-Driven part is obvious but the development&#x2F;design... Approach? Way?<p>Serendipitous in some sort of a backwards-way that I have personally already gone that way ~a decade ago, with even func&#x2F;interface-first, and the first example I found is <a href="https:&#x2F;&#x2F;github.com&#x2F;drbig&#x2F;ricons&#x2F;blob&#x2F;master&#x2F;ricons.go#L57-L58">https:&#x2F;&#x2F;github.com&#x2F;drbig&#x2F;ricons&#x2F;blob&#x2F;master&#x2F;ricons.go#L57-L5...</a> (it&#x27;s an example, sorry).<p>As usual the devil is in the balancing, as in most languages functions won&#x27;t be data but code. Unless Lisp (...that statement is superficial; homoiconicity is the word).
评论 #38356425 未加载
Dansvidaniaover 1 year ago
I am new to Clojure and I am struggling to understand what the point made of the author is.<p>I understood the Data Orientation of Clojure as building mostly map-shaped, atom-wrapped representation of application state, and then functions and procedures that operate and transact on that state.<p>The ref to the data being the &quot;backbone&quot; of the application (so data oriented). Is this incorrect?<p>It seems to me like he&#x27;s actually criticising the &quot;data programmable engine&quot; (I just finished Joy of Clojure where they describe it) where you feed data to a function to change it&#x27;s behaviour (as opposed to example passing in a function?)<p>I am genuinely asking.
评论 #38350175 未加载
bob1029over 1 year ago
Seems there are quite a few perspectives around this.<p>For me, &quot;data-driven&quot; approximately means &quot;Something coaxed into a ~3NF&#x2F;BCNF schema that the business stakeholders can simultaneously understand&quot;.<p>In my mind, this term doesn&#x27;t imply any specific language or database technology. What it <i>strongly</i> implies to me is a certain modeling and normalization of the domain such that <i>any</i> reasonable business requirement can be realized within a ~constant cost factor.
stiivover 1 year ago
A warning worth taking to heart!<p>Even apart from Clojure and so-called &quot;DDD,&quot; there was a kind-of-recent push toward making your application logic as &quot;declarative&quot; as possible. Following that strategy would enable some compelling benefits, mostly related to scaling, but also enabling &quot;self-service&quot; for savvy application users.
account-5over 1 year ago
The XML comparison is stinging, considering XMLs modern popularity. Is it a case of what&#x27;s new is old?
deafpolygonover 1 year ago
You can apply this reasoning to &quot;<i>anything</i>-driven design.&quot;<p>Just stop being dogmatic and choose the right tool for the job.
schpaencoderover 1 year ago
As a sidenote, I guess spec could be useful for &quot;verifying&quot; the data.
anonzzziesover 1 year ago
I guess it depends on what you understand by this term. For me defining structA &gt; f1 &gt; f2 &gt; fn &gt; structB is easy to read, explain and modify. Never had issues with it but I did not use a lot of clojure before so maybe I don’t know the exact way.
amtamtover 1 year ago
I guess someone shortened<p>&gt; &quot;Show me your [code] and conceal your [data structures], and I shall continue to be mystified. Show me your [data structures], and I won&#x27;t usually need your [code]; it&#x27;ll be obvious.&#x27;&#x27;<p>as DDD.
评论 #38352233 未加载
vjustover 1 year ago
All these fads prevent us from producing simple maintainable code.
DarkNova6over 1 year ago
The author of DDD has openly admitted in a podcast that his book is essentially a scam.<p>He wanted to write a book about Clojure, but the publisher said that there was too little interest. So he &quot;tricked the readership into reading a book which is about Clojure without saying that it is about Clojure&quot;. I&#x27;m paraphrasing, but that is the genuine gist of what he said (much to the non-amusement of the interviewer who must have felt deceived as well).<p>Source: <a href="https:&#x2F;&#x2F;changelog.com&#x2F;podcast&#x2F;522" rel="nofollow noreferrer">https:&#x2F;&#x2F;changelog.com&#x2F;podcast&#x2F;522</a><p>I even read this stupid book because there was a hype at work and it is so full of strawman arguments it made me furious.
评论 #38350104 未加载