DEV Community

Discussion on: What are the building blocks of the software?

Collapse
 
akosyakov profile image
Anton Kosyakov • Edited

Is it algorithms and data structures? I don't think so, because we don't have an exhaustive list of them, those are more like premade receipts. More like theorems in geometry, not axioms.

They are not, but aren't they constructed from basic building blocks, like sequence, selection and repetition? There was a theorem somewhere that any other program can be derived from them.

What every programmer should know to understand the programming independently of language and paradigm? What are the most basic building blocks in software development?

From time to time I think that i need only 2 kind of abstractions: functions and state machines.

For example I can map a state machine to a class or module, i.e. internal properties or variables are the state and methods/functions are transitions. State machine does not change, my choice of language constructions will depend on qualities whether i for example want to allow overriding classes and customizing them, support DI, or opposite avoid exposing some internal functions via function scoping in JS.

And when i don't have a state it boils down to functional design. I don't mean here functional or imperative programming style. But a mapping of getting an output from inputs applying basic building blocks mentioned above. I can implement it then in imperative or functional style depending on quality reasons, like runtime performance of the underlying platform.

P.S.
There was a great book long time ago from Harlan Mills: amazon.com/s?k=9780205079964&i=str... It was teaching a student principles of programming via designing a programming language (pascal, in later editions ada) to solve practical issues. But the point was that a student was not given with an idea that here is a language and learn to think into it. But that we as programmers should learn to design and construct well-structured abstractions, i.e state machines, languages, algorithms, data structure and so on. Maybe someone has to redo it for popular languages :) Cannot believe that it is not possible to buy this book anymore and used cost over 2000 USD!