Abstract till you drop. Going beyond 'extract till you drop'
thinkfoo.wordpress.com
Abstract till you drop. Going beyond 'extract till you drop'
1–7 of 7 posts
Re: Abstract till you drop. Going beyond 'extract till you drop'
#2Re: Abstract till you drop. Going beyond 'extract till you drop'
#3I wanted to hear what HN has to say about this, because to me it reads like a parody, but maybe I'm the ignorant one, and can learn something.
Abstractions help to create clean, readable code. You do create lots of small classes, but they tend to be focused on one thing and are easily verified by unit tests. It helps debugging since it helps you focus on the area that is causing an error, without having to know how the full system is working.
The downside is that is does scatter the code around, and the creation of units tests requires discipline. When you're first learning the system, it can be challenging since the code is not all in one area.
Re: Abstract till you drop. Going beyond 'extract till you drop'
#4I wanted to hear what HN has to say about this, because to me it reads like a parody, but maybe I'm the ignorant one, and can learn something.
My response? YMMV Abstractions help to create clean, readable code. You do create lots of small classes, but they tend to be focused on one thing and are easily verified by unit tests. It helps debugging since it helps you focus on the area that is causing an error, without having to know how the full system is working. The downside is that is does scatter the code around, and the creation of units tests requires dis…
Re: Abstract till you drop. Going beyond 'extract till you drop'
#5I wanted to hear what HN has to say about this, because to me it reads like a parody, but maybe I'm the ignorant one, and can learn something.
Re: Abstract till you drop. Going beyond 'extract till you drop'
#6Earlier quoted context omitted.
My response? YMMV Abstractions help to create clean, readable code. You do create lots of small classes, but they tend to be focused on one thing and are easily verified by unit tests. It helps debugging since it helps you focus on the area that is causing an error, without having to know how the full system is working. The downside is that is does scatter the code around, and the creation of units tests requires dis…
Yes, but just to search/replace code? In a language that already has regular expressions? Maybe I'm being too literal, and I was supposed to see beyond the particular example, but hang me if I see the point of filling a screen with code for a functionality that can be written in two lines.
Extraction provides descriptions to the state maintenance. I would agree this particular post is taking abstraction to an unreasonable level, but that is definitely a subjective analysis.
Re: Abstract till you drop. Going beyond 'extract till you drop'
#7Edit: I remembered that I wrote a blog post about this: https://drew.thecsillags.com/cult-of-abstraction/