Skip Navigation
General Programming Discussion @lemmy.ml
Linnce @lemmy.ml

What programming language should I learn?

I don't really want to go in depth into programming, I just want to know what I'm looking at if I ever come across anything like that at my job (mechanical engineering) and maybe solve some simple problems.

I learned C and Java in my first year in college, but it's all mostly forgotten. I'm leaning towards Python since I read it's relatively simple and used a lot nowadays, and it's what my teachers used later on in college anyway.

What do you guys think?

Thanks in advance!

22 comments
  • If it’s just for learning I’d say JavaScript. It’s in basically everything online and there are plenty of free learning tools and courses. It has a bit of everything and no types makes it pretty beginner friendly.

  • No idea about mechanical engineering, but Python is so easy to learn that you have a huge benefit over cost (in time) for it

  • To flip this around, think of some projects you want to do. The languages are just tools and will be determined by what you want to do, and then each type of project has it's best tool chain. Think of the problem(s) you want to solve first and the rest will follow.

  • I'd go with php, it can be strictly or loosely typed, has C-like syntax (same as C#, Java, C, C++, Javascript and others) and has a huge standard library built-in, so for a lot of tasks you don't even need an external dependency.

  • Another vote for Python. It's quick to learn the basics, and there are libraries available to let you achieve most anything. You can program it in a procedural, functional or object-oriented way, and if you understand those, you'll be well set-up to learn any other language. You may not need to learn any other languages - Python is both comprehensive and available in most places, and you can make a career out of it.

    My primary problem with Python is that its unstructured nature causes bigger projects to collapse into a big ball of mud after a while - any function being able to accept any argument is more of a curse than a blessing. And I wouldn't want to code collaboratively in it - Java, for all it gets shit, is blessfully limited in what nonsense my coworkers can get up to.

    It's also not 'fast', although it's made great strides. I did Advent Of Code in Python this year; a simple rewrite in C++ only acheived about a 4× speed-up, when it used to be 10× a few years ago, and that's for some very algorithm-heavy code. Python multithreading is still pretty terrible, though, so if you're really wanting to get the best out of your computer you'll want to use a native-code library like NumPy, or use some other language.

  • This won't be very popular, but something with manual memory management. You probably won't use it a whole tonne, but that's not the important thing. The important thing is the understanding of memory concepts such as addressing and pointers.

    Personally I learned C++ first, haven't used it a whole lot, but it absolutely helped me understand other languages much much much better.

  • Python is easy to pick up but it is very different from Java/C/C++ so it may or may not help you in understanding other people's work. If you are just messing around I would recommend looking at Python, Processing.org (Java) and Arduino(C++). If you can solve the same simple problems with all three you will be set for most anything (and you get to play around with Arduinos).

  • Python is good but the syntax is quite different from what you get in most other languages, so if you then want to learn another language you might find it a higher learning curve than if you learnt something like Java or Javascript

22 comments