Live data from Hacker News

What programming language should I start with?

news.ycombinator.com

21–30 of 117 posts

Re: What programming language should I start with?

#22
If you want to learn to program then C. That's right learn C. C is the language that the operating system you're using is written in, not to mention several of these other programming languages (the main implementation of Python or Ruby, for example). Is this language easy? No. Is it right for newbies? Maybe, maybe not. If you want the least amount of abstraction and don't want a bunch of stuff in your way, learn C. It's a hair's breath from learning assembly, and you can get a free compiler for it on any operating system.

If you want to get stuff done quickly, learn Python or Ruby.

Re: What programming language should I start with?

#25
Sorry.. This is probably the wrong question for you to ask :)

The first question to ask is, "What would I enjoy creating? A website? A video game?"

Based on that answer, you then choose the best tool for the job. Depending on the answer, you may only have one choice.

Re: What programming language should I start with?

#26
post #23

Just curious, but would anyone recommend Javascript?

That's an interesting suggestion. On one hand, you get a decently powerful language with most of the benefits of Scheme and without the scary (non-)syntax. However, I have to go with "no" because Javascript is tightly coupled with so many messy real-world details like DOM and browser incompatibilities. You end up with just as many brackets; they just happen to be a little pointier. It would be a good choice for someone already comfortable with HTML and web administration. Otherwise, you have too much static friction to overcome before you get to Hello World.

Re: What programming language should I start with?

#27
post #23

Just curious, but would anyone recommend Javascript?

I would. It is high level enough for someone who wants to grasp basic concepts about programming (flow control, basic data structures) and has a really low barrier to entry (a web browser is all you need) which results in lots of online material.

And, as the learner makes progress, he can start to go deep into the functional side of the language.

It seems to be a nice fit for the case, indeed. Python would be my second best.

Re: What programming language should I start with?

#28
post #24
post #21

Earlier quoted context omitted.

Yes, but it'll teach you terrible habits.

Like what?

Dumping things into global variables. Using regexes to hammer anything vaguely resembling a nail. Thinking in for loops when you should be thinking in higher-level abstractions.

Re: What programming language should I start with?

#29
post #22

If you want to learn to program then C. That's right learn C. C is the language that the operating system you're using is written in, not to mention several of these other programming languages (the main implementation of Python or Ruby, for example). Is this language easy? No. Is it right for newbies? Maybe, maybe not. If you want the least amount of abstraction and don't want a bunch of stuff in your way, learn C.…

Having programmed in both C and assembly, I wouldn't say "a hair's breadth" is an accurate characterization. It looks like a high level language, and it's easy to use it like one. But it's equally easy to misunderstand C's semantics, they're often subtly different from what you'd expect. An obvious example is the array[index]. There are complicated syntax rules required to do some fundamental things, such as passing parameters by reference. Strings are a nightmare, and of course don't forget malloc() and free().

I only recommend learning C first if you have handy: an excellent instructor or an excellent book-- preferably both. I might also recommend C if you already know a lot about how computers work architecturally but don't know much about languages.

With python and ruby, just go to www.python.org or www.ruby-lang.org. Several good resources have been mentioned for Scheme. In those cases, you'll get familiar with the basic idea of telling the computer what to do, as well as fundamentals like expressions and abstractions. Going the SICP+Scheme route will introduce you to recursion and high-order functions fairly quickly, while Ruby and Python have all sorts of practical libraries. Interpreters for Javascript are more readily available than C compilers, though at the moment I can't recommend an ideal place to go learn about it. JS is everywhere though.

I love C, and think that an undergraduate Computer Science curriculum should require learning it early on. But for someone who wants to learn to hack on their own, C is probably not the best choice.

Re: What programming language should I start with?

#30
I'm learning on Lisp, and it's kind of weird. I'm using Practical Common Lisp (http://www.gigamonkeys.com/book/) and I have to reread chapters a few times to really understand them. I downloaded Lisp in a Box for it, and that is weird because it's rickety. The tutorial isn't there, and it will keep kicking me out of the SLIME.

I'm in the middle of a four-month vacation, but progress is pathetic. Lisp in a box and Practical Common Lisp aren't helping me stay on task. The look like they're made for guys who are learning their sixth programming language.

If you're looking to learn Lisp, try to find something ostensibly beginner-friendly.

Post reply on HN