Live data from Hacker News

Ask HN: What language should I learn first?

news.ycombinator.com

51–60 of 77 posts

Re: Ask HN: What language should I learn first?

#51
post #20
post #10

Earlier quoted context omitted.

I would have to disagree. It all depends on how you learn JS. I really liked the book JavaScript: The Definitive Guide 6th Ed. which at many points talked about the differences between JS and C. As someone who learned JS as a first language, I find the syntax is close enough to C and C-Like languages to make picking them up fairly easy, but I'm still a novice and while I know JS pretty well I've only dabbled in C, D,…

Choosing any language because it's in high demand is a bad decision, see "Why SICP matters"[0]. " I tell my students, "the language in which you'll spend most of your working life hasn't been invented yet, so we can't teach it to you. Instead we have to give you the skills you need to learn new languages as they appear." " With regards to your statement, "It all depends on how you learn JS": That could be said of any…

That is odd advice, the top programming languages currently used have been around for at least 19 years (python, ruby, javascript, php, java, c, objective c) and while there are new languages being developed I don't see languages like go, rust or swift pushing any of those languages out of the market.

If anything, programming languages are a long term investment and I think that learning a language that is in high demand isn't that bad of a decision, you could learn some obscure super expressive, highly functional, statically typed language, but there is large chance that you'll come in contact with javascript at one point in your career.

Re: Ask HN: What language should I learn first?

#52
post #34

For serious work, starting with something like Python is probably a good idea (as many people have suggested), but if your goal is to learn about programming, I'd actually suggest you start with assembly. Assembly is really tedious to do anything practical with, but as a way to understand some of the most fundamental concepts in programming it really can't be beat. Doing the equivalent of hello world, in assembly and…

Definitely NO. Assembly is okay as a second or third language, but not as the first one. Python->C->ASM will have a much larger chance of success than ASM->C->Python; there's a good reason why college programs don't start with assembly first.

Speaking from personal experience, I tried to learn C first and could never understand pointers, then I studied assembly and that was a huge eye opener. I've had very good success teaching people programming starting with Assembly (well, starting with "This is a turing machine", but moving to assembly next), and it makes understanding something like C a lot simpler. The problem with C as a first language is that it's too low level to ignore details like memory management, but it's too high level to really understand how it all functions.

You could maybe do Python -> ASM -> C, but Python -> C -> ASM will probably be a waste of time because you won't actually get anything out of C until you've done ASM (and certainly not anything more than you'd have already gotten out of Python). I'm also not suggesting that he (or she) should spend months working in Assembly, but rather start with something simpler, play around with it a bit till you can do basic things like add a couple numbers and display them (things that in anything but assembly would take about 2 seconds), and get a feel for how at the most fundamental level a computer actually works. Once you understand the basics of what a computer really is, then when you move to C or Python you can actually understand what all those abstractions are doing for you. The law of leaky abstractions means sooner or later you're going to need to understand all of that anyway, and the sooner you do, the less time you waste and the firmer your understanding will be.

Re: Ask HN: What language should I learn first?

#54
All languages present on codeacademy are worth learning.

But: if you have something in mind you want to build, pick a language and environment that fits it. If you want to code on microcontrollers, python and ruby are not a good idea. Want to build a website? python or ruby + javascript are a great idea! Use something that people commonly use to solve such a problem.

Your first implementation will be bad in any case, regardless of language. You will laugh at it in a few years. Rebuild it after a whilse. But thats no problem: everyone of us went through this process.

Re: Ask HN: What language should I learn first?

#55
Does not matter, you will pick the wrong one. Thing is you will always regret not coding in X because of feature Y, when you actually have a project. On the other hand, you will not notice all the times that features A, B and C of your language of choice are helpful. So at least subjectively, another language would have been better.

As actual advice, it depends on your goals. If you want to build websites, then you should start with Java Script and perhaps another language for the backend. If you want to understand computer systems on a fundamental level or hack the Linux kernel, then you should pick C. And if you want to see progress, pick Python. But it is not too important, since a large part of programming is language agnostic. So just pick one, and learn another when the pain becomes unbearable. ( Then return to the first one, once you realize your mistake.)

Re: Ask HN: What language should I learn first?

#57
post #45
post #4

Earlier quoted context omitted.

I would actually recommend against using JS as your first, since it's so atypical.

Agreed. JavaScript is super useful. But it straddles a couple of paradigms in a way that makes it hard for me to recommend as a first language.

JS is a necessary evil. It's one of the worst languages in terms of design (beaten only by PHP and obscure languages no ones heard of). Learning it as your first language is going to gain you very little since almost none of that knowledge is translatable into other languages, and you're likely to have picked up a bunch of really bad habits from it. Further making matters worse is that there are tons of really really really really really bad JS code snippets floating around the internet, things that make professional programmers want to gouge their eyes out just looking at them, and for a newbie who doesn't know any better they're just as likely to assume that writing code like that is actually an acceptable thing to do.

In terms of a first language, nearly anything is going to beat JS in terms of learning useful things from it. The fact that we're stuck with JS now and you're going to need to learn it at some point doesn't mean you should expose a newbie to something like that, it will take them years to fix the damage that would do, it's like starting them at net negative in programming knowledge.

Re: Ask HN: What language should I learn first?

#59
Here's my path (~30 years worth).

high school:

  basic
  6502 assembly
  a little FORTRAN
  a little pascal, but didn't understand it
mit:

  scheme (sicp omfg)
  symbolics lisp
  common lisp
  clu
  pdp-10 assembly
  connection machine
  a little C
  a little more FORTRAN
grad school / 90's:

  a lot of C (system programming / unix kernel hacking)
  Obj-C / NeXTStep (reappears later as OSX / iOS platform)
  MIPS assembly (branch delay slots ftw)
  x86 assembly (segment registers wtf)
  ALPHA assembly
  a little C++, but hated every minute of it
  Visual Basic
dotcom years to present:

  Java
  C#
  SQL (Oracle, Sybase, MSSQL, DB2, MySQL, etc)
  Python (scheme without parens!)
  ETL platforms (visual programming environments for data manipulation)
  PHP
  Obj-C / iOS (oh hi, you're back)
  Groovy / Grails
  a little Ruby / Rails
I'm a little weird because I did a lot of Lisp early, and then became an OS hacker. Once you can find single-line errors in assembly code, everything else is easy.

I learned a lot doing C and assembly; especially the importance of working clean, checking results, and being careful with pointers. Lisp teaches you how good the world can be; C and assembly teach you how to cope with how bad it really gets. However, I'm not sure I would recommend a new person to spend as much time on this since the world has moved to languages with garbage-collected heap storage.

I never cared for the functional languages (ML, etc), mostly because I found the functional programming zealots to be such insufferable bores.

If I were starting today, I would start with Java or Ruby, since they are modern OO languages with good deployment options. Once you know these, it's easier to "downgrade" to simpler languages like Python, PHP, and JS.

But the real takeaway is that you should learn them all.

Re: Ask HN: What language should I learn first?

#60
post #40

Call me old fashioned, but I'm going to suggest learning C. It's one of the smaller languages around so you'll be quickly able to get past the "learning the language syntax" stage and into the "learning to program" stage. It's also still one of the most widely used and supported languages out there. It's also closer to how computers actually work so you'll learn more of what is actually happening when the computer ru…

The problem with C is that it fills a way smaller niche than, say, python or java. It's an amazing language, and I feel that every developer should know the basics about it, but OP is probably looking more for a practical language than C.
Post reply on HN