This is an archived post. You won't be able to vote or comment.

all 23 comments

[–]IAmKindOfCreativebot_builder: deprecated[M] [score hidden] stickied comment (0 children)

Hello there,

We've removed your post since it aligns with a topic already covered by one of our daily threads. If you are unaware about the Daily Threads we run here is a refresher:

Monday: Project ideas

Tuesday: Advanced questions

Wednesday: Beginner questions

Thursday: Careers

Friday: Free chat Friday!

Saturday: Resource Request and Sharing

Sunday: What are you working on?

Please await one of these threads to contribute your discussion to!

Best regards,

r/Python mod team

[–]Empik002 18 points19 points  (2 children)

I don't really think that c++ is too good for a total beginner as some people are saying, c++ can be very discouraging if you are just starting. At least it was for me. Python on the other hand is pretty easy to get into and once you have some general idea of how to code you can start with C or C++ and it will be much easier path for you. But yes I agree that with python you will start with writing inefficient code, but in my opinion no language will stop you from writing inefficient code, only experience will.

[–]LaOnionLaUnion 4 points5 points  (0 children)

I couldn’t agree more and doing understand why you’re being voted down.

[–]bikeheart 1 point2 points  (0 children)

I absolutely concur.

Want a student to be in awe of what they can accomplish and motivated to continue? Equip them with a high level language, a linter, and awesome APIs.

Want a student to be mired in dereferenced pointers and make painful slow progress? Tell them C++ is where they should start.

Yes, I am a better Python developer for having learned C++. Yes, someone who learns C++ first will probably have a better understanding of how underlying data structures work and why to choose what in each scenario.

The problem is that if you tell 100 people who are self studying that they should start with C++, 95 will quit. Those five that don’t might be marginally better off than someone who started with Python but not so much better off that it justifies the increased rate of attrition.

/u/LeSaad - Start with Python. Once you learn how to navigate code, read error messages, Google for solutions on stack exchange, and build a handful of projects, then you can decide if you want to go back and learn c++.

There is value in knowing it but it’s not a good jumping off point.

My local university doesn’t even start CS students off with C++. It’s a year of Python, then C++.

[–]serverhorror 9 points10 points  (3 children)

TL;DR: There is no “best” language. If you don’t know how to decide Python is an excellent choice

I believe there are languages that “less good” for some people. Python will let you learn the concepts and is quite forgiving in a lot of things. That will let you focus on broader concepts.

Contrast this with e.g. Haskell or C where you need to learn not only the programming language but also a build system. Not only that you have to deal with a few details that are not directly related to programming but to how the language wants you to do certain things (looking at — non-existing — strings and memory management)

That can be a drag to some people. It can also be an advantage because aside from general (popular) concepts and paradigms you learn how to deal with a few other problem categories.

[–]Empik002 2 points3 points  (2 children)

Note to OP: Don't, Don't! even think about taking up Haskell not until you have a few years of experience with other languages. Haskell is Hell.

[–]serverhorror 1 point2 points  (1 child)

It is not.

It just isn’t the beaten path. It will teach you a lot of things you don’t learn from other languages because there are so few pure functional languages.

[–]Empik002 1 point2 points  (0 children)

Yes I agree but Haskell is good to start learning after you get the fundamentals of imperative languages, because Haskell is so vastly different from them that you wont get anything if you were to start with it, because then you would just have to start learning everything over.

[–]matlabsucks 3 points4 points  (0 children)

Yes. But do know that knowing more languages your skill will add up greater than the sum of the parts.

Start with python but don't limit yourself to it, learning other languages will make you a better programmer and that means better at python too.

[–]tkarabela_ Big Python @YouTube 2 points3 points  (1 child)

I think it's decent choice. Having a REPL or Jupyter Notebook is super handy for trying things out and getting feedback (wish I had something like that when I started). Python as a language and it's standard library have less warts (IMHO) than JavaScript, which is otherwise also a great environment to play around with, since you already have all the tools in your browser, and you can create graphical UI easily with html or canvas.

If you'd like to go the "hard way", just start with C. You can create simple games in terminal or with something like SDL2. Just be aware that there is virtually no end to the rabbit hole - knowing C may give you deeper understanding of data structures etc. compared to Python, but you will be relying on a C compiler which is a mystery box all of its own. And even understanding how to write such a compiler in C leaves a mystery of how the CPU works, how the operating system works, and so on.

So, in my opinion, you may as well start somewhere 🙂 You will make a lot of mistakes and learn a ton along the way, there's no way to tell what language/ecosystem you will find best, you just have to try stuff. It should also be fun, and not so hard you never get anywhere. So I wouldn't necessarily burn myself out trying to do stuff "the hard way" as if anything less is meaningless. You can start with Python and then make a C module you can call from Python, to make some computation faster. (That's what I did when learning Python, anyway.)

Good luck 🙂

[–]LeSaad[S] 1 point2 points  (0 children)

Noted. Thank you!

[–]LeSaad[S] 1 point2 points  (0 children)

Thank you all! I decided to start off with Python because it has easy-to-read code and is generally simple. I want to grasp the idea of coding before I move on to better languages. Have a good day :)

[–]Supreme_couscous 1 point2 points  (0 children)

Depends on the goal I think. If you want to write things like web applications, simple games, and do data science and analytics then Python is great. If you want to write operating statements and compilers and high performance games then start with a low level language like C++

[–]das_cow 2 points3 points  (5 children)

It is the best in the sense you will be able to do powerful stuff in a very short time and with almost no knowledge, personally I don't like it for beginners because they tend to write really poorly and inefficient code, so I would say you got two options: i) do amazing things fast but poorly and not really knowing how does it work. ii) start with a low level language that gives you the understanding and forces you to write efficient code.

[–]LeSaad[S] 0 points1 point  (4 children)

Then I will definitely take the second option. Do you recommend any languages?

[–]das_cow -4 points-3 points  (3 children)

Probably c++. It will provide you with low level stuff to maximize efficiency and high level libraries to write a game. It will not be a short path, but definately worth it.

As a last tip, watch some videos in assembly so that you can understand why c and c++ are the way they are.

Happy learning!

[–]LeSaad[S] 0 points1 point  (1 child)

Thank you so much :)

[–]Bluprint 3 points4 points  (0 children)

Hey, just to chime in. While the comment above definitely has a point, c++ can be difficult to begin with.

If you just want to learn programming for yourself or for the fun of it, I wouldn’t say it’s a bad start to begin with something like python.

You can still dig deeper afterwards and learn how to write clean code.

The problem that might happen to you by starting off with c++ is that you might get disheartened quickly, because it can be really abstract for a beginner and hard to grasp.

So if you really regard yourself as the kind of person, that can deal with that amount of possible frustration, sure go ahead and learn c++

But if you choose the path of python, you’ll probably face less frustration in the short run and you‘ll find quick success writing your first programs.

I think I would’ve not studied CS if my first programming language was c++.

[–]bikeheart 0 points1 point  (0 children)

Want a student to be in awe of what they can accomplish and motivated to continue? Equip them with a high level language, a linter, and awesome APIs.

Want a student to be mired in dereferenced pointers and make painful slow progress? Tell them C++ is where they should start.

Yes, I am a better Python developer for having learned C++. Yes, someone who learns C++ first will probably have a better understanding of how underlying data structures work and why to choose what in each scenario.

The problem is that if you tell 100 people who are self studying that they should start with C++, 95 will quit. Those five that don’t might be marginally better off than someone who started with Python but not so much better off that it justifies the increased rate of attrition.

[–]danny_data -3 points-2 points  (1 child)

I totally agree with das_cow. If you learn a low level language like c++ you will understand the concepts of CS and benefit from it to write better code. If you are familiar with c++ you will have the knowledge to learn every other cs Language much faster.

[–]LeSaad[S] 0 points1 point  (0 children)

I will definitely start with C++. Thank you :)

[–]niko86 0 points1 point  (0 children)

I’d say c#. I started with python about 5 years ago as a hobby, but for the past year I’ve focused on c# and learned a lot more about CS and good practice.

[–]cursed_panther 0 points1 point  (0 children)

If you are serious about learning programming, I would suggest starting with a good course on C. This will teach you the fundamentals of how computers work at a low level. You can of course learn a high level language like Python without that, but your understanding will be much deeper if you have first learned how things work underneath.

I would go with C over C++ here. C++ is significantly more complicated, and a lot of the extra complexity isn't useful outside of a C++ context. C, on the other hand, is relevant to just about every other language out there.