r/AskComputerScience • • Aug 09 '20

Learning higher level programming

Hello

I've been programming for about 5 years now, and I have a decent understanding of several language (mostly C/C++, as well as some assembly and python).

While I do feel that I have a decent knowledge of the detailed, technical stuff (algorithms, data structures, languages and concepts, etc), I'm lacking in the higher level program... design. How do I design and structure larger applications?.
For example, how would I know if I should design something as an object or function? What should I run as separate threads, and how do I figure these things out on my own?

Links or references to informative litterature or articles are highly appreciated, as well as comments!

Thank you in advance.

28 Upvotes

14 comments sorted by

View all comments

1

u/here_2_observe Aug 09 '20 edited Aug 09 '20

This is speaking from my experience, so feel free to correct me.

Higher level programming are based on 3 pillars.

PAIE / SOLID / patterns

PAIE (Polymorphisme, Abstraction, Inheritance, Encapsulation). These are the basic building blocks that are used in higher programming and in smaller bits in lower level languages like c++. So it could be you already have some knowledge about it.

Each of these concepts is the bread and butter of higher level programming language and understanding these helps to know when you should make a method/function or a class.

Single responsibility principle

Open Closed principle

Liskovs substitution principle

Interface integration principle

Dependency inversion principle

These are principles that build further on upon the basic building blocks (PAIE)

And ensures that each application you program will be as good practice as possible. This will in time also help you to scale the application.

Third pillar is patterns, you have a lot of patterns, for example you have observer pattern, MVC pattern, ... These are common solutions to common pitfalls or problems that happens a lot during programming and help you to program an application that will have good practices.

And you guessed it this will build further upon SOLID principal.

This in total still amounts to one application but one you can easily scale with for example docker/docker-compose. Or extend with extra functionality.

This is not all the info, it's a lot of information to write down, but hopefully enough to get you on track. I'm on mobile so there can be some mistakes. If you have some more questions feel free to ask!