27 year old and new to CS

I woupd also state you should learn Java before Python or C++. Python allows you to write code quickly, but dirty because it evaluates each command at runtime. Meaning you do mot have any form of tyoecheck, which allows you to do cool stuff and patterns that are not possible in other languages, but also allows you to do stuff you should not.

Also multi-threading is much easier to learn in the beginning than multi-processing for concurrency. Python supports parallel threads but they are not executed concurrently, which only leaves multi-proc for python.

Also Java forces you to only use single inheritance for classes, which avoids a lot of unclean code and some problems won't arise. So it forces you to use some other patterns first. Which is good as a beginner.

Both take care of memory handling and when to release it. A garbage collector occasionally runs and removes unreferenced code.

In python, since global vars or any context/container var can exist it can lead to mem not being deleted, so take care that you delete vars from containers (also Java) and global scopes you do mot need anymore or just used scoped functions.

Some libraries allow the deletion of memory directly, which is useful for large data. Only the class data will be cleared later.

Python (R is a similar language used by a lot of statistical apps) is much easier to use forgein packages and libraries as it comes with a package manager and a good tool set to create your own (pip, setup tools,...). Java's Std lib is great and comes with a lot of stuff, but for C/C++ or Java there only exist external package managers to manage and install libraries quickly.

In C/C++ you have to handle everything yourself from memory/resource allocation to releasing it. It will be more performant usually and fully type checked, but it is nativ code, meaning a compiled Programm will only work only one CPU arch and OS. To work for another you need to recompile it for those. In Java or Python, since they are interpreted languages, usually work on all supported platforms as long as all packages are available and the interpreter is installed in a sufficient version.

We use python now for a lot of tools, when shell scripts become a little too long, which you can use to start and learn programming too (also for Websites you can look into HTML and Javascript). Also most of our and a lot of research and official machine learning code is using python.

But for the basic structure of a code (vars, loops, assignments, conditions, classes, functions,...) you can use almost any language.

So for basics I would start Java, which is also the native language of Android.

/r/computerscience Thread