DEV Community

Bhumi
Bhumi

Posted on

How Abstraction Can Be a Useful yet Painful Concept, Especially for Beginners

We're always trying to abstract away details in software so that, well, we don't have to think about everything all the time. It reduces the cognitive load and allows us to focus our brain's processing power on the details most relevant to the task at hand.

The concept of abstraction is fundamental to software engineering and it is so necessary (imagine if we all had to think about memory allocation or scheduling tasks or routing packets). Abstraction is powerful and a sign of progress in this field that we don't have to think about this stuff all the time.

However, often we are in fact left thinking about it all the time. In a slightly different form, the thought is something like "I don't really get this or I wish I knew this at a deeper level but oh well". That lingering thought creates a psychological load of having to be okay with not knowing or not understanding something. Many of us crave details and not knowing exactly how something works is a psychological burden we subconsciously carry.

I think this is true at all levels of experience as a software developer, even with decades of programming under one's belt there are threads they haven't had a chance to pull at to full satisfaction. I imagine this can be especially painful for new developers. If typing some code into a browser and having a console print out 'hello world' is not satisfying to you, you're not alone. There are questions that need answering, how? why?

Things do progressively get better. As more time passes you can hope to have more foundation under your belt, you see patterns and can predict outcomes. I like keeping a log of things I want to understand deeper and try to pull at those threads when I can. This, of course, requires some discipline and some free time and motivation.

What are some concepts, abstracted away in your day-to-day, that you want to understand at deeper level?

Top comments (6)

Collapse
 
suckup_de profile image
Lars Moelleken

I want to learn more about Elasticsearch, it's working but I did not understand how. :P


“Duplication is far cheaper than the wrong abstraction.” ... so a good rule is if you have something more than three times, then think about an abstraction.

You need context and different use-cases for a good abstraction level.

Collapse
 
newfront profile image
Scott Haines

Lars. ElasticSearch runs off of a core technology called Lucene. The thing that makes your search so powerful is due to the reverse index. This creates a powerful sparse matrix of zero and ones with respect to each records fields within a specific index (seen via index pattern in Kibana if using KSQL). The search is able to perform quickly by doing distributed linear algebra (matrix math) so each data node in your cluster can return a partial search back to the front nodes where the zeros and ones match the query and then the front nodes will do a final aggregation / and any post filtering necessary. That is the basics. If you are even more interested you should read about the gossip protocol and NewSQL databases since there is some overlap there in terms of linear scalability within a cluster and what happens when a data node is lost.

Collapse
 
devanghingu profile image
Devang Hingu

bro.. you didn't understand @suckup_de 's topics.. @suckup_de You are great.!!!

Thread Thread
 
newfront profile image
Scott Haines

Just trying to help. I'm new to this site

Thread Thread
 
suckup_de profile image
Lars Moelleken

@newfront "bro"... I think you are the person how understand me, because you respond with a helpful comment, so thanks for that. :)

Collapse
 
suckup_de profile image
Lars Moelleken

Thanks for the reply, do you know a good book about that topics?