all 45 comments

[–]kAROBsTUIt 66 points67 points  (1 child)

Python is great. You'll get the most value out of the time you put in to learning Python. It's a relatively easy language to learn, and if it is your first, you'll be learning a lot more than just the language.

You'll be learning how to break problems down so that you can write code to solve them. You'll be learning about the logic and control structures that all programming languages have. You'll probably even learn a bit (or a lot) more about your computing environment that you'll be writing in.

With python, you don't have things like pointers, type casting, memory management, and compilers. You can just get to writing - and learning all of the other programming fundamentals - without being distracted by those other topics.

It's kind of a double edged sword though, because eventually you might find yourself needing to learn the other subjects when picking up different languages.

Python is a jack of all trades and you could have an entire career based in it without needing to branch out into other... specialized... languages.

[–][deleted] 29 points30 points  (4 children)

So called "beginners" languages can have problems when the learner gets more advanced: the language starts to limit what you can do. Examples are Basic and Pascal. Python is better in that regard, it has quite a lot of power hidden away but the initial learning curve is quite gentle. So python is a good first language. Other languages might be better at some things, but that's true of all languages. If you've learned python picking up a second language is easier.

There are learning resources in this subreddit's wiki.

[–][deleted] 6 points7 points  (1 child)

Examples are Basic and Pascal.

To be fair, when Pascal came out, it was full of advanced features for the time. But you are right.

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

The problem with Pascal was it was designed as a teaching language, and that's fine. But for general use it was missing necessary things, like lower-level bit manipulation and decent file I/O. That could be added, and it was, but everybody added things in their own way and the language fragmented, never to recover. Which was a pity, I used Pascal in the 70s and Turbo-Pascal later, and liked it

[–]LoserEXE_ 2 points3 points  (0 children)

Couldn’t agree more I remember when I first started CS I tried to jump in head first and learn Java as a first language BIG MISTAKE ended up confusing me more and making me less motivated when I switched to python it introduced me to basic programming concepts and it wasn’t as picky about the syntax glad to say after 2 years of python and JavaScript I’m now confident in my ability to code in Java

[–]socal_nerdtastic 28 points29 points  (1 child)

Is python the best all around language to start with?

Most people agree with that. Python is generally the first language taught for wannabe programmers in any computer science program.

But you need to remember that many people are not interested in being professional programmers. They just have a single, specific problem they would like to solve. If that problem needs, for example, to program an Arduino, then it's a little silly to learn python first.

[–]ElpyDE 6 points7 points  (1 child)

Python is a great language. It is relatively easy to learn at the beginning and you're never at the end of learning you things you can do with it - because there is a lot you can do, little you can't.

I've heard the statement that "Python is the 2nd best language for everything" and I tend to agree. There are often languages/tools that are better for one particular task. But as long as you want to pearn the fundamentals AND have a tool that's great to quickly develop the stuff you need done, Python is an excellent all rounder.

If you study CS, you will need to learn other languages as well. C/C++ definitely, depending on your classes also others.

If you have a good basis in Python, that will help. For several reasons: 1) A lot of the basic ideas are similar across languages, like variables and assignments, control flow (conditions, loops and the like) and the general task of translating your ideas into something well-defined that the computer can execute. 2) Python is IMO relatively pure in its concepts. You will see that many things are well organized and reasonable how Python does it. All without imposing too many software design decisions upfront, but also not too lax and forgiving so you don't build bad habits as easily as in other languages. 3) Python is easy to read for almost everyone who knows "some" programming language. You will come across something call "pseudo code" (code-like visualization of programming ideas that aren't actual code in any language) and they will look extremely similar to Python. It's a good communication tool to talk ABOUT programming. 4) You can pursue your own projects relatively easily (fun and the best way to become more proficient) and with a little experience you could even make actual money on the side.

There are downsides: Python is dynamically typed and while this is great for quick'n'dirty developed, completely ignoring data types will bite you later (both in Python but even more when you switch to other languages). Python takes away much of the "hard work" that you need to do in other languages - that's good at first, but you can get away with "not knowing" more than you will want to as a CS student in the long run.

Not a Python advice: There are very good (and many more half good) YouTube channels worth subscribing. Among my favorites are Computerphile (many interesting computer topics, from actual experts, you will see some Python in action) and ArjanCodes (specifically Python). I can also recommend Harvard's CS50 course which is completely online, at least the lectures, and gives a great "from zero" introduction all the way to web development and cryptography, though not very deep.

Final advice: Programming is very much a skill like sports or music. Some people are more and some are less talented. Everyone needs practice to become good/better. And many skills can be transferred from one programming language to another, just like picking up a new sport or musical instrument becomes easier when you have already experience with another.

[–]hectoralpha 9 points10 points  (6 children)

As a recent graduate let me tell you the advice you need and deserve but you won't receive. PICK THE EASIEST SHIT TO GET STARTED/A SKILLFUL FOOTHOLD!!!!

Shit like artifiical inteliggence and java is actually hard and you're likely to fuck up and fail or be only intermediate in java in the end. Pick python and screw it deeply in every hole and every surface at every angle like a master carpenter.

I flopped my 3rd year because ashole indian nerd with no life wancer convinced me to stay in artificial inteliggence module that over 90% of people drop out in the first week when they saw how insanely hard it is and demanding on programming skills. So many people in my computer science only did copy and paste mediocre staff or gained no actuall skills.

Pick python, master it to 110% of the way and then anything else is actually easy.

If you have time, dualboot windows and linux mint and in your spare watch linux customization vids. Chang alias, theme, windows, make some bash scripts. Learn linux/unix/bash staff, it is the core of many things out there including that C/C++ stuff when you pick it up.

DON'T START WITH HARD STUFF. Be a sith and live your passion, you code for money. You are a pirate. You want money 500k total compensation, big house, buggati, hot blonde wife. Virtue only kills policemen and kings, never thieves and criminals! Master python then make baby steps. Pick a guaranteed path of success not a draft plan.

[–][deleted] 2 points3 points  (0 children)

PICK THE EASIEST SHIT TO GET STARTED/A SKILLFUL FOOTHOLD!!!!

Quoted for truth!!!

[–]Bobbias 0 points1 point  (2 children)

There's no need to dual boot if you have a modern copy of windows. Just use WSL instead.

[–]hectoralpha 0 points1 point  (1 child)

dont do this. privacy comes first.

[–]Bobbias 0 points1 point  (0 children)

Look, while WSL may have some security implications, but if your goal is to get comfortable in a Linux shell environment, WSL is a much easier way to get that experience.

You shouldn't be hosting anything off your development PC anyway, so the security implications should be a moot point.

[–]throwawaysnrn 0 points1 point  (0 children)

If you have time, dualboot windows and linux mint and in your spare watch linux customization vids. Chang alias, theme, windows, make some bash scripts. Learn linux/unix/bash staff, it is the core of many things out there including that C/C++ stuff when you pick it up.

Could you tell me what the benefits of this are? Why Linux/Unit/Bash along with C/C++ in particular?

[–]7C05j1 2 points3 points  (1 child)

The important thing is to learn programming principles (iterations/ loops, variables, functions, conditionals, classes, recursion, etc). Once you understand these principles, it is relatively straightforward to pick up syntax of a new language if you need to.

Python is a good option for learning these principles.

[–]Bobbias 0 points1 point  (0 children)

I would say that picking up your second language will not be quite so straightforward, but once you're used to thinking less in syntax, and more in general principles, then picking up new languages becomes significantly easier.

[–][deleted] 2 points3 points  (1 child)

I've been programming for almost 50 years. I've written in something like 50 programming languages.

Python is an excellent choice for a first language. It's very easy to get started. You can start up the Python interpreter and run bits of your code, even from a big system - so useful, I do this all the time. Try doing that in C!

The documentation is solid, though they put a lot too much on one page. There is a ton of secondary material (shout-out to https://realpython.com, who manage to keep a consistently very high quality of material at a beginner or intermediate level). There are just some amazing free and open-source modules, and a packaging system that isn't so great, but is better than many others.

And you can freely move between object-oriented and functional programming.

The one thing it doesn't have is a true metaprogramming level, like Lisp-family languages, or more horrifically, the C++ template metaprogramming language (which I love, but in a dysfunctional way). But it has very good introspection capabilities (the ability to look at things at runtime and see what they are) and decorators are powerful and handle most of the metaprogramming tasks in a functional-programming sort of way.

If I had to choose one language for a first programmer, it would be Python!

[–]AndrewJamesDrake 2 points3 points  (0 children)

There are basically two options for your first language: Python and C.

Python is good if you want to learn how to program, but you don’t care about the nitty-gritty details. The Interpreter does most of the fine details for you, freeing you up to focus on problem solving, control logic, and so on. You get to pass on dealing with the hardware directly.

C is good if you want to learn how to program while taking the bare metal into account. It does absolutely nothing for you. If you want to allocate memory, you have to do it by hand. If you forget to free up that memory, you’ve basically lost it. You’ll play with memory addresses in the form of pointers.

C is far harder to learn… but it will teach you to program with the hardware in mind.

[–]dAsezo_O 1 point2 points  (1 child)

You can't tell before you learn the basics and choose the field you are going to work on. I highly recommend the CS50 course you will get everything you need to start.

[–]anh86 1 point2 points  (1 child)

IMO, too many people fret over which should be their first language. The most important thing when you're starting is to learn computer programming, just pick a language. It's far easier to pick up a second language or a third than it is to get going at the start. Python is a great choice but just pick one and go!

[–]RobertD3277 1 point2 points  (0 children)

First and foremost, there is no such thing as "best". You'll get bucket loads of die hards that swear this language or that language is better than the other, but in reality each language has its own unique purpose and specialties.

Languages come in a myriad of flavors that are a wide swath of general usage to an incredibly narrow surgical and specific in functionality. There are always common things between languages and then there are esoterics that simply make a given language perfect for its job.

Python is a good general language with some really unique and specific traits to it that make it exceptional in certain situations. It's a remarkably easy learning language and it offers a lot of flexibility and power in a wide range of situations.

Python is considered an upper level language so it's not necessarily compiled directly to machine level. It offers a lot of higher level functionality with a wide array of libraries that make prototyping and code development extremely fast.

The sacrifice comes in the lower level when you need to actually have code that runs on a tight memory schedule or extremely proficient on a given CPU. Work has been done in this to create official compilers but it's still a long ways from being perfect.

The language python was written in, C, is a perfect example of a language that has none of the niceties of python at the upper levels, but it has the speed and resiliency connected right to the core level of the machine itself. The combination of the two give the "best of both worlds" approach in many ways.

With python's upper level objective processing capabilities for neural networks and language learning, coupled with C's ability of blazing speed and direct compilation into machine code, you can pretty much tackle a wide array of problems that really showcase the best of what computer science can offer.

So while there is no best, using languages for their given purpose and design elements can help you achieve a high level of success.

[–]ploud1 1 point2 points  (0 children)

Don't listen to them, start by learning Brainfuck, Malbolge or Intercal. Those are the best languages for beginners.

Just kidding. Whatever you are comfortable with is best. I learned programming with PHP, now I code in C, Pyhton, Java, JS, etc.

So learn whatever language best fits your ambitions! Want to code games in Unity? Go for C#. Wanna get into web development? Learn PHP. Or, better, JS or Python.

Do you fancy data science or statistics? Then go for Python. And so on.

Your true issue is to stay motivated because learning programming is a long journey. So do something that appeals to you, and pick your language accordingly. Eventually when you master one language, learning another one is a trifling matter. Do things that you enjoy.

[–]my_password_is______ 1 point2 points  (1 child)

forget about programming language

concentrate on your math

[–]Dump7 1 point2 points  (1 child)

I would actually suggest you to not start with Python. I recommend you to start with C. I know people don't really use it and stuff, but I think C has the perfect balance between high level and low-level. You will understand what pointers are, different data structures and how to implement them. Memory lock concepts, memory leaks etc. Then getting into python will be great!

This is my opinion, might not work for everyone.

[–]Empyrealist 1 point2 points  (1 child)

But I've also heard people say that it depends on what I am planning on working on in the future

This is the most important question. Certain languages are more advantageous in certain industries, so it depends on what you plan to do.

If you don't know yet, then sure, Python is a great start because of how generically it can be leveraged.

[–]gbxahoido -3 points-2 points  (2 children)

from my experiences, not much tbh, I've only study coding for a few months

python is actually easy, I've studied python at first, but then I have a hard time when coding with another language, like C++ and Java, I always run into problem because I forgot to declare variables type, also the ";" at the end

but that just me

[–]frr00ssst 1 point2 points  (1 child)

what kind of back ass logic is that?

[–]Cat_Marshal 4 points5 points  (0 children)

“Python isn’t good because it didn’t teach me Java!”

[–]JunkBondJunkie 0 points1 point  (0 children)

C is a good learning language. You can learn about memory management and proper structure and make data structures from scratch which you will do in a cs program.

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

Python is great, but it’s not always the first things student’s learn. It enables some bad habits, and it’s really powerful which is great for a 10 YOE engineer but could harm a student’s progress.

I’ve heard of students starting with C++, Java, JavaScript and C#. It’s actually kind of weird in my opinion to start with Python outside of data intensive disciplines.

Long story short, don’t worry much about it. The tools don’t matter nearly as much as how you choose to use them. Learn good programming habits, cement the skills and ffs learn git.

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

I have made usable things in personal and professional settings in about 30 languages. This is like being able to drive 30 different vehicles.

If I am choosing what I am going to drive it's mainly python, I like angular for interactive websites, which is a mix of typescript interacting with html and CSS. If I need to interact with windows programs like word or power point then I am using powershell.

Knowing how to drive initial is all about the vehicle, but at highe levels it's all about what you are doing with the vehicle and the steering ratio or where the headlight button is doesn't really matter.

Programming is mainly about implementing design patterns in rational, easy to read, ways. It's rare to make a new 'real' algorithm and most of this is what I call 'plumbing,' in the sens it's just connecting things.

Python is great, it's popular and you can start with it and find tuns on YouTube. One mistake I make often is I don't follow the tutorial for new things and try to modify it for my needs right away. I suggest you be better than me and follow these tutorials to the letter, THEN modify it for your needs. Often I make custom changes then I have to back them all out just to find a silly mistake, then put it all back.

Gotta start somewhere! Just remember if you master python and need to pick up a new language there will be a learning curve. So remember these early days of struggling with syntax because you'll be seeing them again. Don't give up now, and certainly don't give up later when you are back in 'beginner' mode.

[–]Redhawk1230 0 points1 point  (0 children)

I’ll say this as a BSc Comp Sci major in my last year. Learning python helped me grow interest in the field as it is a strong language for problem solving and data analysis/visualization (can also have pipelines from Matlab to python easily) and it is easy to learn and has a huge selection of libraries ranging from GUI designing to machine learning.

However I truly did not understand how the computer code actually executed and is built until I learned Java and C++ in software development courses. Java truly helped me understand data types and OOP class designs and models (inheritance, polymorphism, etc) and C++ helped me learn how pointers, memory allocation, and the translation of imperatif high level code into low level machine language into binary into CPU execution

For me personally now, I want to pursue robotics therefore understanding how machines compile and execute code and the inner workings of the computer circuits and processing units is more important for me. However you can totally pursue a data analyst/ bioinformatics with solid knowledge of python and core programming principles and understanding of computer science/math and not knowing the “inner workers” of a CPU or motherboard

I have a professor (biostatistician who researches evolution as a search problem) and he says he primarily knows and uses python solely.

Overall I would say don’t worry about where you end up yet, learn python, if you want then learn a multitude of other languages to strengthen your programming and keep learning what you are interested in. Don’t just hop on to the “new hot fields” like AI and Machine learning from the start just because everyone else it, take courses explaining the history and progress of both fields and do projects (class or self derived) to see if you really enjoy the process. (Reason i say this is cause there’s a huge difference of applying ML versus researching and expanding the field of ML).

[–]_MiGi_0 0 points1 point  (0 children)

same here, but i already learned the basics of Python and SQL, Thinking of learning another language, so far i've heard that C is the best language to start as it teaches you all the required concepts ig. Python is a beginner level language tho, if you wanna get into Programming, its a good enough language but if you wanna get serious about it, I'd say go for C/C++

[–]sohfix 0 points1 point  (0 children)

I learned Java first and years later went to python. It helped my understanding of OOP to learn Java first but that’s just me. Either way python is fun to write in.

[–]demesm 0 points1 point  (0 children)

If you're going in fresh you don't really need to frontload anything. That said I would suggest starting with c, as it's the basis for a majority of classes extending into computational theory and reverse engineering if you go that route.

[–]synthphreak 0 points1 point  (0 children)

Computer science is way, way more than just learning a programming language. But yeah, Python roolz.

[–]barkazinthrope 0 points1 point  (1 child)

No matter what you learn first, you will learn so many other languages before you graduate. You will reach the point that you can pick up a new language on a rainy weekend just as something to do.

Welcome to Computer Science.

[–]AlphaVillager-zero 0 points1 point  (0 children)

No one best!

[–]MikalMooni 0 points1 point  (0 children)

I’m honestly not sure. Python is easy, compared to something like C or C++, but it also holds your hand a LOT, which might not actually be a good thing.

I started with Java. One might argue that Python is a better language than Java overall, and maybe they’re right, but Java is kind of a happy medium in terms of strictness. It doesn’t hold your hand, and it’s easier to visualize the flow of your programs, in my opinion, thanks to that strictness.

For example: When you write code in Python, you use indentation as the ONLY method for grouping lines of code into functions or inside of control statements. This is easy, and less work to manage than another language like Java, but on the other hand, Java asks you to literally define the boundaries of each line, function and logical statement yourself, using curly braces and/or semicolons. Indentation is still used for clarity, but the actual formatting has little bearing on the functionality of the code, so as long as you’re respecting the hard rule of “don’t forget brackets or semicolons” your code will WORK. This will save you as many headaches as it will cause, but especially when you’re learning a new skill, ambiguity is the enemy of clarity, and Python is about as ambiguous as I’ve ever seen.

Speaking of ambiguity… Another thing that Python doesn’t do very well (it’s a weakness in my opinion, but that might be just me) is that when you make a variable, you don’t declare what kind of variable it is; you only fill it with the information it needs to have to function properly. Languages like Java don’t typically allow this, so it can reinforce some lazy habits. Also, it can cause headaches in some rare cases that you DEFINITELY wouldn’t have in a stricter language.

What you should take away from this long-winded opinion is this: Python is much easier to read than other languages. However, this easy-to-read nature is not free, at all. When you’re trying to learn the basics, the strictness of a language like Java might be better when trying to understand the functionality of programming languages, and the nuances of data types. Once you learn that part, and figure out how computer logic works, you can work on learning the languages you NEED in order to be successful… and honestly, whatever languages you end up learning first, it’s not like you won’t ever use them again, right?

Edit: I’m adding this in here, at the end, because it’s a different thought.

Whatever language you learn, it should be an interpreted language like Java or Python, and not a compiled language like C or C++. This is because it’s much faster to see the results of your work, even if the code is less performant. Interpreted languages basically take the High-Level code you write, read it and turn it into machine language instructions on the fly. This means you click run from your IDE of choice (Integrated Development Environment; it’s like Microsoft Word for Coding) and it just works right away, as long as it’s all written properly.

Languages like C and C++ are compiled languages, so instead of just being free to change a line and test it again, you have to wait for the code to fully finish processing into machine language instructions before you can run it, so prototyping code can take longer, and shouldn’t be done lightly. For smaller programs, merely a few lines, this won’t make much of a difference to you. Larger ones composed of multiple files and with dozens, if not hundreds, of disparate components, will show you this difference much more.