r/AskComputerScience • u/[deleted] • 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.
3
u/phao Aug 09 '20 edited Aug 09 '20
These questions, and some more like these, don't have exactly right answers, even though there can be extremely wrong ones. In reality, what you find is that there are reasonable answers to these questions and they usually depend on context.
Having practice projects help. Build your own stuff. However, just going around doing your own things without looking at what others did isn't that smart. Reading other people's code is an interesting idea. Some books are also helpful here, but don't expect miracles. SICP (https://www.amazon.com/Structure-Interpretation-Computer-Programs-Engineering/dp/0262510871/) really helped me with some of the issues I believe you're having. Maybe you can benefit from reading the gang of four design patterns book (https://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612/). There are books about design and implementation of particular systems or types of systems. For example:
https://www.amazon.com/Design-UNIX-Operating-System/dp/0132017997/
https://www.amazon.com/Design-Implementation-FreeBSD-Operating-System/dp/0321968972/
https://www.amazon.com/Operating-Systems-Design-Implementation-3rd/dp/0131429388/
https://www.amazon.com/Database-Design-Implementation-Data-Centric-Applications/dp/3030338355/
https://www.amazon.com/Retargetable-Compiler-Design-Implementation/dp/0805316701/
https://www.amazon.com/Modern-Compiler-Implement-Andrew-Appel/dp/0521607655/
https://www.amazon.com/Engine-Architecture-Third-Jason-Gregory/dp/1138035459/
https://www.amazon.com/Design-Implementation-3D-Graphics-Systems-ebook/dp/B00918NP90/
https://www.amazon.com/gp/product/0130319953/
There are more, of course, and some of these are not so great (although still helpful and, usually, much better than what you'd find in "random blog posts in the web").
In general, I believe one of the best way to learn about what you want to learn is to go look at what others did. How did people solve the problems they had in building software system X? Start filling in for X and doing your own research. X could be linux, windows, google chrome, google search software, google translator, adobe photoshop, matlab, R, Eclipse, and so forth. You may not find much for some X, but you'll actually find a bunch of stuff about for several very interesting X.
Another tip here is to pick a problem domain and see what problems people are trying to solve there. I mean, leave "general programming" and start looking at more specific stuff like numerical methods, image processing, AI, game development, bioinformatics, embedded computing, computational statistics, simulations, etc. Find one or two of these subjects that are of interest to you, follow some important people in the field, see what is going on there. You'll find that "design methods" and also "resource usa optimization methods" can vary drastically from field to field, for very good reasons. There are some subcategories in these, by the way. For example, 2d versus 3d game development; single player versus multiplayer (multiplayer can be online or not), etc. In AI there are the deep learning people, the rule based systems people, etc. Numerical methods is huge. There are tons of these. Although you can learn quite a lot on the "general programming techniques" side, there is only so much there. A lot of the interesting things is context specific.
By the way
That is actually non-trivial. I don't know how much of the technical stuff you know, but much of the design that happens has to do with these "technical stuff". I don't want to go much into this (because I don't know about it that much), but look for some of the talks by Martin Thompson (they are on youtube and also on vimeo). He'll tell you about how knowing about the technical stuff should be an extremely valuable guide for designing systems and their interfaces. So you're not on the wrong track (in case you thought you were).
As a final disclaimer, even though I majored in CS, I'm not a software developer. I'm pursuing a career in research in Math, so don't take what I say about software development too seriously.