Fix wrong abstractions - Deepstash
Fix wrong abstractions

Fix wrong abstractions

In the long run, it's better to fix wrong abstractions ASAP than to add more code and make everything more complicated.

Your goal is to remove the abstraction and conditionals, and to reduce each caller to only the code it needs. Here's how:

  1. Re-introduce duplication by inlining the abstracted code back into every caller
  2. Within each caller, use the parameters being passed to determine the subset of the inlined code that this caller executes
  3. Delete the parts that aren't needed for this particular caller

Once done, you can start anew, re-isolating duplication and re-extracting abstractions.

2

17 reads

CURATED FROM

IDEAS CURATED BY

ocpodariu

Alt account of @ocp. I use it to stash ideas about software engineering

The idea is part of this collection:

Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

Related collections

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates