The problem with solving future problems is your guesses about what problems you're going to have in the future are usually wrong. Solve your current problems.
-
-
এই থ্রেডটি দেখানধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
What’s your definition of “abstraction”?
-
one low-level example I fight folks on all the time: extracting code to functions or helper packages even though it's only used in 1 place, or 2 places with significant variations
-
I asked about definition because the concept is often misunderstood and that probably contributes to messes we make. Recently, John Day (BU prof & RINA researcher) suggested “abstraction is invariance”.
-
What’s so powerful about that definition is that it removes the now vs future dichotomy and the prediction fallacy. Precisely the parts that are invariant are abstractions. Since they are invariant, they need no conditional accommodation.
-
The challenge once following the “abstraction is invariance” definition is to not attempt to hold things fixed (invariant) when they *should* vary.
-
I don't mean abstraction as "invariant". Many early abstractions I see are attempts to make API interfaces invariant long before the use case is fully fleshed out. This is usually well intentioned but born out of a combination of overestimating the cost of changing code later.
-
We also tend to overestimate the likelihood of changing things later along with the cost. "Let's abstract this (API / data store / whatever) in case we want to use a different one later", etc.
-
1000% — the large majority of engineering mistakes I've caused or seen were the result of "future-proofing" something against a speculative, ultimately incorrect, future
- 4টি আরও উত্তর
নতুন কথা-বার্তা -
-
-
I think the feedback loop is shorter. With performance optimization, the cycle for knowing whether your optimization worked is shorter.
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
IME developers tend to focus on how to make pieces interchangeable, rather than how to make them as simple as practical. Useful abstraction is much more about the latter. It allows focusing on a single domain at a time.
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
Reminds me of
@sandimetz's great blog posthttps://www.sandimetz.com/blog/2016/1/20/the-wrong-abstraction …ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
I have seen way more serious, long term problems caused by YAGNI than by taking time to understand the problem space.
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
IMO it's far more constructive to focus on what they have in common -- because they both come from the same place. (Both place the programmer's own sense of aesthetic or craft above the professional responsibility to focus on the business problem actually in front of them.)
-
Smothering technical debt from people writing whatever they needed to to ship is possibly even more common.
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
-
-
So often, I've found this is a result of inferring long-term semantic similarity from early syntactic similarity.
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
Took me a while to get this
ধন্যবাদ। আপনার সময়রেখাকে আরো ভালো করে তুলতে টুইটার এটিকে ব্যবহার করবে। পূর্বাবস্থায়পূর্বাবস্থায়
-
-
-
Any example of bad premature abstraction?
-
Agreed. Example: easy, any interface with a single implementation.
-
And for that matter, some will argue that it’s not even worth defining an interface unless you have at least three implementations. Otherwise, the interface is likely to be overfitted and too tightly coupled to its implementation(s).
-
Moreover, even if in the short term you somehow avoid the pitfall of overfitting your rarely-implemented interface, you still run the likely risk that in the long term, future maintenance will make this abstraction leaky, since there’s no alternative implementations to expose it.
-
Long story short: premature optimization and premature abstraction are both examples of premature complexity. Premature complexity is a maintenance burden, no matter what form it manifests in.
-
I disagree. Abstraction is about simplifying by hiding unnecessary details. Interfaces are about simplifying the contract to only the necessary elements
-
But having reread what you said I now see that premature abstraction is abstracting before it actually simplifies anything. As with the single interface example
কথা-বার্তা শেষ
নতুন কথা-বার্তা -
লোড হতে বেশ কিছুক্ষণ সময় নিচ্ছে।
টুইটার তার ক্ষমতার বাইরে চলে গেছে বা কোনো সাময়িক সমস্যার সম্মুখীন হয়েছে আবার চেষ্টা করুন বা আরও তথ্যের জন্য টুইটারের স্থিতি দেখুন।