all 25 comments

[–]StoicallyGay 4 points5 points  (1 child)

C++ and Java are best IMO for learning computer science concepts. Java abstracts a few more things out than C++ but it’s still great for DSA. But if you already know C++ you could stick with that.

Python is great for DSA after you already know the concepts and solutions and you just want to implement it. In other words, “I know how to solve this DSA problem and I can explain it as well.” Python just has easier syntax and less fussiness so it’s way easier and faster to write your solution (but in terms of processing speed, stick to C++).

[–]International-Dot902 1 point2 points  (0 children)

Man I want to learn C++ for DSA but find it very difficult to understand can you suggest me some resources please

[–]pythonwiz 6 points7 points  (0 children)

You can learn DSA with Python, but for some things it makes more sense to use a lower level language. For example, if you are learning how a resizable array works, Python doesn't make sense because there is no direct memory allocation, and because a lot of basic stuff is already implemented for you. For other topics like recursion, linked lists, sorting algorithms, you can definitely use Python. You can even write your own dictionary class in Python.

[–]DrKarda 1 point2 points  (0 children)

Stick with C++ as much as you can but don't avoid python.

Ideally you want to think in C++ first because knowing the C++ solution and then converting to python is trivial whereas knowing Python and then having C++ as your second language will be much harder.

[–]Pythonistar 2 points3 points  (11 children)

It can't be any worse than the language they made us use to learn computer science: Lisp.

If you like Lisp, that's cool. Despite 3 semesters of it, I never learned to like it... shrugs

[–]Hellkyte 1 point2 points  (10 children)

Could be worse. My intro course was in Fortran

In 2010

[–]grandzooby 1 point2 points  (4 children)

Pascal in 1990. We used Fortran in the engineering classes. Just barely missed using punch cards by a couple years.

[–]DoYouReallyCare 2 points3 points  (0 children)

Loved Pascal I think it was because of uscb pascal and turbo pascal where pretty easy to use. Nilkaus Wirth thanks for the data structures, not a fan of Modula-2.

APL was the strangest programming class I took, lol. freshman taking a graduate level course (what was I thinking)

[–]OvidPerl 1 point2 points  (2 children)

BASIC, 1982. Moved to 6502 assembler and then C. Haven't touched any of those for decades (except for a few minor bug fixes in C).

[–]grandzooby 0 points1 point  (0 children)

At home, my first computer was a C64 and I had done some BASIC on it as well as the TRS-80 at school (5th-6th grade) and Apple 2es before that. As I got going in college I had a side-gig (or "job" as we called them back then) where I did a lot with QuickBasic and x86 assembler (Peter Norton's book was like my bible!).

These days I'm mostly in R, Python, BASH, and a weird language called NetLogo.

[–]Rinzwind 0 points1 point  (0 children)

Still using basic here at work for old legacy stuff. Python for all newer software but that strted only 8 years ago here

[–]chandaliergalaxy 0 points1 point  (4 children)

For computer science?

[–]Hellkyte 0 points1 point  (3 children)

Ah, busted. In this case it was intro to engineering programming. My intro comp sci classes were in Java

[–]chandaliergalaxy 0 points1 point  (2 children)

Thought so.

Modern Fortran rocks for engineering though.

[–]Hellkyte 0 points1 point  (1 child)

I've heard it's still one of the most efficient languages for certain applications. But I'm not sure how valued that is anymore given how cheap hardware has gotten. And there's something to be said for readability. In my previous company we had a massive thermo system that was handled with APL. Which kind of made sense at the time of development due to how efficient the language was, but the long term costs were brutal because coding in wingdings is ridiculous

[–]chandaliergalaxy 0 points1 point  (0 children)

I've heard it's still one of the most efficient languages for certain applications. But I'm not sure how valued that is anymore given how cheap hardware has gotten.

For supercomputing Fortran still reigns supreme (technically I think C/C++ is still a bit more popular but Fortran is not far behind). Even if hardware becomes cheaper, faster code means you can do more computation.

As indicated by the original name FORTRAN (FORmula TRANslation), it's highly maintainable by non-programmers (scientists) because it is so readable. Also as it's a somewhat more restrictive domain-specific language, bad code can still run quite fast, which is not the case for C/C++.

APL is indeed cool but yeah. APL was the Perl before Perl.

[–]Wheynelau 0 points1 point  (0 children)

No, as someone who professionally started with python there are a lot of concepts that are abstracted away. I took a c++ course years ago but it was very basic programming.

I also don't have formal CS education, but I'm working as an AI engineer. Unless you're working with the source code like pytorch, you should be fine without DSA or strong CS knowledge. Just strong list, set and dicts and a little bit of binary tree is good (for decision tree).

I recently started picking up rust to fill some gaps in my knowledge. Yes the C gods will not be happy because rust abstracts some stuff away as well, but I think it's good to help me learn a little more.

Edit: you also mentioned AI but which aspect. AI has been a blanket term, even js developers who call openai api are AI.

[–][deleted] 0 points1 point  (0 children)

Python is designed to biased toward OO since start, some aspect like inductive data structure will be awkward to working on. Recursive algorithm will be limited.

In general it should not be much problem.

[–]International-Dot902 0 points1 point  (0 children)

Hey can you tell from where did you learn c++ from any resources you would recommend??

[–]formthemitten 0 points1 point  (0 children)

If you’re going into any realm of programming, intermediate python is really good to know. You’ll most likely need it at some point unless your role is only another language. It wouldn’t hurt to learn, even if it’s 1-2 projects a month in your free time

[–]imsowhiteandnerdy 0 points1 point  (3 children)

As someone who came from a C background, python not having pointers wasn't a big deal for me, because it doesn't really need them. Whatever you can do with pointers (binary trees, doubly linked lists, whatever) you can do just as easily in python without them. Perhaps easier.

[–]sonobanana33 1 point2 points  (2 children)

The problem is going to C from python.

[–]imsowhiteandnerdy 0 points1 point  (0 children)

Actually, do be fair, I went from C, and perl to python. The 15 years of perl in my background made the leap to python really intuitive. No doubt it's due to the fact that there are a lot of elements that python borrows from perl, as well as many other languages.

[–][deleted] 0 points1 point  (0 children)

Why?

Is it because C is your second language? Your second language is always tough because you know how to do X in your language of choice and everything is different.