RobertLumley comments on PSA: Learn to code - Less Wrong

34 Post author: John_Maxwell_IV 25 May 2012 06:50PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (77)

You are viewing a single comment's thread. Show more comments above.

Comment author: Andreas_Giger 25 May 2012 08:56:50PM 0 points [-]

Great post.

Coding doesn't directly improve rational thinking, but it improves logical thinking, because it is basically a generalized approach to problem solving. It is also a skill that will lead to a much better understanding of topics like game theory and Friendly AI, and it seems pretty obvious to me that in the future, more and more interesting and rewarding jobs will require coding skills. There was a time when secretaries had to use pen and paper. Then they had to learn how to use a typewriter. Then they had to learn how to use MS Word and Outlook. Today some of them need to write Excel scripts. Secretaries.

So if you're not a coder yet, and don't have any specific reason not to spend a considerable amount of time and effort to learn how to code, I strongly urge you to do so.

That said, I disagree with the choice of programming languages to start with. In general, for someone with no coding experience and no inherent affinity for working under artificial constraints, I suggest starting with a scripting language like Lua instead of a full-blown programming language. Or if you play PC games, see if maybe for some of your favourite ones there exist modding tools with an own script language, as is often the case with strategy games. You won't learn all that much about actual programming, but the impact on your logical thinking should be similar and you will probably be more motivated as well.

If you insist on learning a real language, don't start with a weakly typed, high level, or interpreter language (Python, Java, Objective C, BASIC, Javascript, C#, etc). I also can't advocate Ruby as a beginner language because of its syntax.

What I can advocate is Ada (more or less an improved version of Pascal), a language that will not only lead to a deeper understanding of programming logic, but also automatically teaches good programming practices. For example, the command "assign the value 0 to the variable x" is written as "x := 0", while in many other languages the same thing is written as "x = 0", which creates the illusion of equivalence with the mathematical expression "x = 0"; something that many people new to coding struggle with.

Do not learn C. I repeat: Do Not Learn C.

If you're absolutely sure your first language has to be one that is currently widely used in the industry, I can reluctantly recommend C++, but only if you're really, really sure about this. Better to start with Ada, then switch to C++.

Comment author: RobertLumley 25 May 2012 10:25:24PM 0 points [-]

I agree with the second half of this. Pick a language that suits your needs. I use Visual Basic extensively, for interfacing with spreadsheets, and I wrote a bejeweled program (which sucked, since it took comparatively forever to get the color of a pixel and tell me what color the square was) in AutoHotkey, an awesome program that will let you remap hotkeys on your computer. I know a bit of PHP and C++, but the vast majority of what I do is in VB and AutoHotkey, because that's what's most accessible to me.