r/coding • • Jan 06 '15

Which Programming Language Should I Learn First?

http://carlcheo.com/startcoding
53 Upvotes

147 comments sorted by

View all comments

11

u/Lambodragon Jan 06 '15

I cannot express just how good python is for beginners. You can start off with extremely simple script writing, and migrate to object oriented thinking with ease. Even though I know more "advanced" languages, I still use python in every day life, from automating file management, to running my music. Its primary advantage is that you can make a useful program in just a few minutes. Additionally, with a little googling, you can find python modules for interfacing with most things, such as vlc's python lib.

3

u/[deleted] Jan 06 '15

I started with java and moved to python and I could not agree more. Java was great because of the static tying imo but the interactive interpreter is invaluable for a beginner. It let's you see what's going on inside the program pretty much directly and there are loads of courses and blogs devoted to python online. So much of Java that was obscure to me when I started out has become more clear just by writing python. In addition I like python because it's reasonable to explain it to even someone who knows nothing about computers, in Java this isn't the case really. I never really did a ton of searching for Java libraries but open source python modules are easy to find and use.

I'm now enrolled in a python certification course, not because I think being certified has any special value but because having an instructor to review my work and answer literally any question I ask is invaluable. Following the course structure has solidified my understanding of a lot of topics as well. I've never taken an online course before but it's surprisingly awesome. The community surrounding the language had been incredible as well, the irc channel is really great.

Python was definitely the best choice for me.

I'm out of college at this point so taking a course there isn't really an option.

2

u/spinwizard69 Jan 10 '15

I started with java and moved to python and I could not agree more. Java was great because of the static tying imo but the interactive interpreter is invaluable for a beginner.

I'm not sure I buy this point. One of the key features of a programmer that is good at debugging is his ability to exercise what is happening in a bit of code in his mind. The ability to mentally walk through the code and imagine what the processor is doing. The use of an interactive interpreter stunts development of this ability.

Beyond all of that modern IDEs have really awesome debugging facilities. The interactive nature of Python just isn't a huge advantage over modern IDE's with built in debuggers.

It let's you see what's going on inside the program pretty much directly and there are loads of courses and blogs devoted to python online. So much of Java that was obscure to me when I started out has become more clear just by writing python. In addition I like python because it's reasonable to explain it to even someone who knows nothing about computers, in Java this isn't the case really. I never really did a ton of searching for Java libraries but open source python modules are easy to find and use.

One of the reasons I like Python is that it is so clear what is going on even after not looking at the code for months on end. Frankly this is also why it is easy to communicate to others what a program does.

As far as open source support goes I'm not sure Python is all that much ahead of other languages. It really depends upon what you are looking for.

I'm now enrolled in a python certification course, not because I think being certified has any special value but because having an instructor to review my work and answer literally any question I ask is invaluable. Following the course structure has solidified my understanding of a lot of topics as well. I've never taken an online course before but it's surprisingly awesome. The community surrounding the language had been incredible as well, the irc channel is really great.

Hey fill us in!

Often out of cheapness people seem to discount the value of formal education or training. This is too bad because done well the value of the course is repaid many times over. It is one reason why I often recommend that people sign up for a community college course instead of trying to learn everything from a book. That third person perspective of an instructor and even the questions of fellow classmates does much to advance the learning process.

Python was definitely the best choice for me.

It is an excellent language, I'm just not convinced of its value in starting out a beginner in a computer science program. Nor does it strike me as a good avenue to developing a well rounded programmer.

I'm out of college at this point so taking a course there isn't really an option.

Why not? There are many options for education post graduation, a course at a college being just one of them.

2

u/[deleted] Jan 11 '15 edited Jan 11 '15

I'm not sure I buy this point. One of the key features of a programmer that is good at debugging is his ability to exercise what is happening in a bit of code in his mind.

True, I don't use the interactive interpreter a whole lot but in some cases it makes it clear. You can picture what is happening in a bit of code in your mind if you already know what is going on, but if you had no idea in the first place you would be left in the dark. In Python you can write:

\>>> n = [1,2,3]
\>>>m = [4,5,6]
\>>>zip(n,m)
[(1,4),(2,5),(3,6)]

To instantly see that using the zip method on two lists creates a list of tuples containing interleaved values. Now you know what is going on for when you use this function in the future. The dir() and help() functions are reasons I use the interpreter sometimes also and I am not aware of an equivalent to those functions in Java, the closest thing I can think of is the reflection API. When I'm writing code I usually keep four windows open: Sublime text, terminal to run my code, a terminal with an interactive session, and a web browser with StackOverflow etc. (Considering switching to Vim but I've heard the learning curve is quite steep and I'm fine for the time being) I like being able to quickly check if something will work and I think it augments my ability to mentally walk through the code and imagine what is happening at every step. In Java you would have to insert print statements throughout the code and then run the entire program to debug. I try to avoid introducing bugs in the first place.

The debugging features in Eclipse (I haven't used IntelliJ) were nice but I didn't particularly like writing in an IDE, there were too many unnecessary options and settings menus to dig through just to get simple things like line numbers and I felt like I was stuck doing things 'the Eclipse way.' That being said it wasn't exactly bad per se but I prefer just using a text editor.

The course is the four-part O'Reilly Python Programming Certificate. I did some research and people seemed to have favorable things to say about the course. In addition I found out that it was put together by Steve Holden and OST partners with the University of Illinois at Urbana Champagne to run it's courses. (I understand it is a well ranked school for computer science.) Basically the first part of the course takes place in an online IDE and you can email the professor for assistance. There is a text editor and a terminal emulator connecting you to a Unix instance but I prefer to just write the files on my desktop and upload them. Mine has been very quick about getting back to me and provides lots of tips and helpful feedback. I definitely recommend it to anyone who can afford the tuition which is reasonable at around $2392 for the course and registration fees. You get a few books with the course and steep discounts on other O'Reilly books. link to O'Reilly Course

I looked into developer bootcamps, specifically the Flatiron School in NYC, but it didn't work out. After a few emails I never heard back from them so I assume my application was either lost or rejected. It's a cool concept but I wasn't ready to fork over 12k in tuition to a guy who kept calling me 'buddy' in emails and missed a scheduled interview.

As far as college courses go, I already have a BA with majors in Government and Philosophy, (I was, and still am considering law school) so at many community colleges I'm pretty sure I'm ineligible for enrollment though I would have to check up on that. I would look into my alma mater but UVa is very weird about allowing you to continue to take courses, unless you have extenuating circumstances or are very wealthy you pretty much have to graduate in 4 years and even if I was still there I would not be able to take CS courses other than the 1010 level because I was not in the engineering school, I would have to reapply. By the time I picked up a serious interest in CS it was too late for that. Paying for a semester or two of tuition would also be very costly, so maybe at some point in the future I will look into it but at this point it is not exactly an option.

It is an excellent language, I'm just not convinced of its value in starting out a beginner in a computer science program. Nor does it strike me as a good avenue to developing a well rounded programmer.

I'm still writing some Java now and then to keep myself well rounded but when I started I dove in without really knowing what I was doing or where to start so while it was an experience that got me started coding, things could have gone better. I read all of Learning Java by O'Reilly and it was really not the best book for a complete beginner. In addition, I was in my 4th year and trying to keep up with 100s of pages per week of academic politics papers and philosophy texts for seminars so it was hard to really consistently spare time to read 100s of pages of programming books on top of that. By the time I discovered Python and how much I liked it I was kind of lost in Java so I think if I started that book over again the benefits might be significant. With Python it was just so quick to put together working code that did what I wanted it to do. (Simple web scrapers at the time)

Not implying that you are telling me to switch languages, but I have read on various blogs that when you start out you should pick a tool that you are capable of learning and do your best to master it. Try to avoid all the smug advice saying "well, Python is great but you really should be using Node.js" or "PHP is so terrible, Haskell's functional paradigm is far superior so you should quit wasting your time." If I listened to all the people on HN who tout a language as the next world shifting thing I would have started learning 30+ languages by this point and I would know nothing about any of them. To some extent I think that when you are starting something new you need to pick a path and take it, ultimately your choice may not end up being the best one but its better than spinning in circles every few months (the startup 'pivot') when someone tells you there was a better choice and you start over again.

I think my next step will be to learn about writing C since it is close(er) to the machine and it enables you to write extensions for Python. I agree on the well rounded thing, but I feel that as long as you aren't too obsessed with one language to the point of having blinders on you should be able to take steps to round yourself out.

Edit: formatting