This post answers the question “What is an abstraction in programming?”. The purpose of abstraction in programming is to create a solution that can be widely used and managed. Abstraction is the way to express an idea in a specific context without using unnecessary details.
The term of abstraction is used to describe real-world problems into the computer language. Abstraction operates on the certain level of detail and there is a layer on the top of abstraction (covering unnecessary details).
Abstractions are good for organising solutions, managing complexity and reasoning of solution. When abstraction is put into use, it has to work with some level of detail, in other words the abstraction in use should be supported by certain details.
Simple example of abstraction is a phone call. All phone user need to know is how to make a call in his cell phone – to open calling interface, dial the phone number and press call button. What user don’t necessarily need to know is how phone works internally (on the electronics and signals level), these details are unnecessary for the user.
Science as well is built on abstractions – the simplified work models of phenomena without certain details. It shows how the phenomena generally works, and all necessary details can be involved into the model later.
In object oriented programming certain classes can be created that will provide certain abstraction for further use in the code without specifying code imbedded into this class during every use.
More educational texts are available at the Reddit community r/ElectronicsEasy.