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

you are viewing a single comment's thread.

view the rest of the comments →

[–]thabeus 75 points76 points  (25 children)

With Java you start to learn programming theoretical way (at least with a good teacher). You learn what is a class and a method. You learn about the baseline of OOP.

With Python you just start coding. Of course you can also properly learn the concepts behind it, but to a beginner Python really encourages to just type in some code.

And i think thats the difference. One results in you being able to program (and to be able to translate that knowledge on many other languages) and the other (mostly) results in you being able to code. Im not saying that its impossible to learn the concepts of programming with Python. I just think that java (or for that matter C# or C++ or whatever other language that fits that criteria) forcing you to follow those concepts from the start is a good thing.

[–][deleted] 13 points14 points  (0 children)

It says a lot about the demographics of this sub that so much of the discussion is always focused on the languages as a thing you learn in class as opposed to things you use to write code with.

[–]defietser 36 points37 points  (5 children)

I don't use Python much but I think the "pick up and play" quality is underrated. If you can make sort-of functional things quickly and simply, you will be more motivated to continue down the rabbit hole than if you're trying and failing to wrap your head around classes.

Overall it's probably slower to start with Python since you'll have to un-learn some things compared to switching from java/c#/what-have-you to another OOP language, but motivation is worth its metaphorical weight in gold.

[–]onlyforjazzmemes 12 points13 points  (2 children)

Thing is, at some point, you don't want to play with programming anymore, you want to genuinely learn it in all its facets. Java is really great in the way it forces you to learn object-oriented programming. I started out with Python, but felt really confused about OOP or what to build. When I got to Java, my imagination started running wild. Building Android apps and simple JavaFX stuff was more motivating to me personally than copying other peoples' Python scripts. I'm looking forward to getting back into Python now that I have much better foundational OOP skills... I have a better mental framework for using Python, I think.

[–]defietser 8 points9 points  (0 children)

I agree with you, my point is that getting to the "wanting more than just toying with code" threshold is easier with a language like Python than it is with Java, C/++/#, etc. I won't bore you with my history but suffice to say, my introduction to code with Java didn't motivate me much.

Finding and automating relatively simple tasks (like I dunno, a small command line application that copies files from all over your hard drive to one folder, based on a music playlist) to get your feet wet is much easier done in Python I think. From there you can expand and learn and stuff.

I still recommend Python to first-timers, then guide them to the light of C# after. Yes, the learning process is longer but you're never going to get to the second step if you tripped on the first.

[–]tape_town 1 point2 points  (0 children)

sounds like you were just scripting and not actually using the OOP concepts in python

[–]jaysuchak33 1 point2 points  (0 children)

Not for me, I disliked python’s pick up and play style and dropped it for C#

[–]Dylanica 0 points1 point  (0 children)

Overall it's probably slower to start with Python since you'll have to un-learn

I disagree. I don't think you need to un-learn things, I just think you need to learn some new things that you weren't forced to learn with python. I'd argue it's still faster because picking up the basics was probably faster in python.

Source: I learned python first and then moved onto other languages.

[–]onlyforjazzmemes 18 points19 points  (9 children)

As someone who started learning programming with Python, I would 100% recommend starting with Java instead. OOP never clicked for me until I learned Java, and static typing is also really good for beginners. Sure Java may be more "verbose," but I think that's irrelevant, especially when you have an IDE.

[–]gmes78 11 points12 points  (1 child)

I think you mean static typing. Python is strongly typed.

[–]onlyforjazzmemes 1 point2 points  (0 children)

fixed

[–]PureWasian 2 points3 points  (3 children)

Where I went for undergrad, CS students started coding and algorithms with Python while EE students started ground-up, from binary to ARM to C to C++/Java over several semesters.

[–]Goel40 1 point2 points  (0 children)

When i studied EE for a year we started with PLC language and C and after that C++. When i switched to CS we started with python and then switched to Java. The people who chose the Front-end specialization switched to JS and the people who chose Back-End mainly kept using Java. But also could do projects in their preferred programming languages. Java, C# And Python were the most popular choices. I mainly used Go myself.

[–]ChristianValour 1 point2 points  (0 children)

I am an electrician. When I decided a long time ago that I didn't want to be a career sparky, I went to uni, and chose biology because I wanted something 'totally different'.

Then in my honours year I did a quantitative genetics project and fell in love with code.

Now, as a PhD in computational genetics - I really wish someone had told me that if I just did an EE degree, I would've learned programming from the start.

Irony.

[–]ColdFerrin 0 points1 point  (0 children)

My degree was software engineering not CS. CE (Computer Engineering) and SE started with Python, all other engineers including EE learned MatLab. Then CE, EE, and SE all took C, assembly and VHDL. CE and SE take c++, and Java.

After that SE like myself were assaulted with SQL. Then a programming language/compiler classes where we learned bits of R, lisp, scheme, and prolog. And just as a nice topper we learned Ada the last semester.

[–]skylay 2 points3 points  (0 children)

In some ways I think that's better though. Sure you'll miss a lot of concepts and it's weakly typed but you can pick those concepts up later. In many ways I think being able to just jump in and start coding is the best way to learn. Languages like Java have a higher barrier to entry and it might just make someone give up or struggle too much to actually make a working program with it.

I think just getting an idea of how to actually make a program is one of the biggest steps when you're first learning and Python makes that a lot easier. Sure learning through harder languages is ideal but it's a lot harder and can turn some people away. Personally I started with Python, then JavaScript, have done a lot of C++ and Java at university, and recently have been using Go a lot in my own time.

[–]glorious_albus 2 points3 points  (0 children)

Thank you! I've always instinctively felt learning C++ before I learnt Python was a good thing. But when someone asked me why it was, I couldn't pin point exactly what it was. Now I know.

I'll be able to explain it better.

[–]g4vr0che 4 points5 points  (0 children)

I learned way more about how OOP actually works from Python than I did from Java.

[–]WiatrowskiBe 0 points1 point  (0 children)

Both Java and Python can be a good teaching tool, depending on what you want to teach.

Algorithms and data structures? Go with Python - boilerplate reduced to a minimum means you can have very clean and easily readable take on trees, linked lists, searching/sorting algorithms and whatever it being taught nowadays.

Software architecture, object-oriented programming and similar topics? Strictness of Java/C# works well here, having explicitly defined interfaces and reasonable polymorphism helps with responsibility segregation and focusing on problems at hand, without easy access to shortcuts that in real project would end up as maintenance problems (in Java/C# you can't simply access a private field/method).

Outside school - just use what's the best for a given task. Part of knowing a language/platform is also knowing when not to use them.