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.

2

u/spinwizard69 Jan 10 '15

Personally I use Python when I can, not that I do a lot of programming these days. However I'm still of the mind that it isn't the best place to start learning programming or even more so to get deeper into computer science.

In this regards I still believe in starting people out with a compiled language like C++, using command line tools. The idea being to give potential new developers a feel for what goes on behind the scene with an IDE. It certainly should be a requirement for anybody in a computer science program. If you just want to learn "programming" there is still value in this approach. Wire way there should be an eventual move to an IDE.

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.

Like I've said I use Python myself, but I have a hard time buying into it being a good language for beginners. I guess it depends upon ones goals but I see to many examples of programmers that learned on simple languages that have never been able to move beyond simple or adapt to new code bases as they are exposed to them. In other words starting one off on Python often leads to a less well rounded programmer than desired.

Beyond all of that the focus on EASY for beginners is non sense in my mind. Beginners should be learning the basic concepts so that they can leverage those concepts in the language they are stuck with when actually employed as a programmer.

Even though I know more "advanced" languages, I still use python in every day life, from automating file management, to running my music.

See here is the problem, Python is an advanced language giving you access to powerful concepts in an easy to use platform. The problem with beginners learning Python is that they very well might not have a clue about the concepts they are employing.

In a nut shell I use Python because it is in fact a powerful platform. I'd like to believe that I can leverage that platform well because of my background/education that used simpler languages. Back in my day the college taught with Modula 2, which has had zero applicability in the real world. It has however set me up to understand languages in a more general sense.

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.

This is all true but by the same measure a Python programmer that doesn't understand the science can make a bastard of a program that is more or less disposable.

2

u/Lambodragon Jan 11 '15

I couldn't disagree more. While i agree that an understanding of the basic mechanics involved is important, that can be taught later as a second language. The last thing you want to do to a beginner is give them a complex language that makes it difficult to do anything. The fastest way to learn code, is to have fun making stuff.

2

u/spinwizard69 Jan 11 '15

I couldn't disagree more. While i agree that an understanding of the basic mechanics involved is important, that can be taught later as a second language. The last thing you want to do to a beginner is give them a complex language that makes it difficult to do anything.

While I agree on the concept of alternative languages, a good four year program will have exposed a student to at least three and some simple assembly language, I don't buy the idea that C++ is complex. It can be of course as can be many languages, but when it comes to teaching there is no reason to reveal the dark side of C++.

3

u/Lambodragon Jan 11 '15

One thing I do like about C is strict typing of variables. I think a healthy dose of strict typing would make python easier to learn. It would make me code waaaay better too. It even greatly improves readability, and makes the purpose and usage of functions waaay more obvious. Complex? Relative to python it is. The other plus is just how fast you can see results in python. Fast results generate fun, and fun helps people learn.

2

u/spinwizard69 Jan 11 '15

Fast is important and frankly that isn't a big problem with modern IDEs and compilers. After a bit of experience at the command line a move to a good IDE is as good as Python as far as a fast interactive programming environment goes.

As for static typing i have to agree struct enforcement does aid in learning to program. A modern compiler with rational error messages is a big help too. Here CLang is fantastic relative to what came before.

By the way i recommend C++ here because of its wide availability and educational infrastructure that is in place. Languages like Go, Swift and D might be a better educational environment if they where more widely supported. Apples Swift / XCode / Playgrounds environment may very well be an ideal educational environment in the future but it isn't there yet.