Live data from Hacker News

What programming language should I start with?

news.ycombinator.com

111–117 of 117 posts

Re: What programming language should I start with?

#111

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 P…

You can't learn lisp with PCL. You can marvel and say ohhh Lisp can do that kind of stuff! But you can't really learn the language with a handful of pre-made examples.

To learning lisp I recommend: http://www.cse.buffalo.edu/pub/WWW/faculty/shapiro/Commonlis...

Notes: YOU HAVE TO DO ALL EXERCISES. Just reading the book teaches you very little.

After this, you can go and read On Lisp (the Uber-Programmer Lisp book) and understand it perfectly in the first read.

Re: What programming language should I start with?

#112

Re: people around here recommending The Structure and Interpretation of Computer Programs (SICP), I'd warn a newbie that it may be a demanding way to start, and I've had trouble encouraging former coworkers (some with way more experience than me) into reading it. But don't get scared a priori; skim the preface and the 1.1 section to see if it's for you. Even if it's for you, you may want to check out The Little Schem…

I wonder how many people that recommend SICP have actually learned to program from it or even read it. I did way back as in undergrad (with severe MIT envy) and I would not recommend it as a first book for beginner programmers. Also, I wouldn't recommend Lisp or Scheme as first languages to use for beginners wanting a taste of the practice (despite how much better off the world would be if we all programmed in Lisp :…

In my experience, to normal people who are simply math students, but without any previous programming experience, C syntax is ugly and Lisp syntax is clean and beautiful.

Lisp is so much easier for them, that I think that your statements do not take into account familiarity and most people are just being too used to a particular syntax.

SICP is a hard book to read, however. There are much easier books to learn Lisp.

Re: What programming language should I start with?

#113
post #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…

I'm surprised that people disagreed with my C recommendation (although, note that I did say Python or Ruby if you want to get something done quickly). Learning C isn't really about learning C, it's about learning how the computer actually does things (aka pointers, memory management, etc.). Knowing C lets you understand concepts in higher level languages easier. For example, "pass by reference" is easy to understand once you have passed around some pointers. It helps you understand what the garbage collector is doing, and why it's doing it. It helps explain why even in managed languages sometimes you need to "free()" something (an example is bitmaps in C#).

Would you rather start programming on the surface (not knowing what is happening underneath) or would you rather start by learning the hard stuff underneath? I, personally, would rather know what is happening underneath. Is there an argument for learning the more surface stuff first? Maybe I'm off nuts and have a slanted view because I learned Java, Scheme and then C.

Re: What programming language should I start with?

#114
post #110

Earlier quoted context omitted.

JavaScript probably fails miserably on the "easiest to write simple programs" count. The development environment is easy to find, obviously...any browser and any plain text editor. But user interaction is hard, and gets all mixed up with nasty DOM and browser incompatibilities in short order. You also have to have additional tools (like Firebug) to get anything resembling useful errors from JavaScript. A good modern…

We don't really need the browser's implementation of Javascript. For example, consider Steve Yegge's rails port to JS which he developed on top of Rhino (the mozilla engine.) IIRC, rhino includes a very basic shell.

Ah, but then you have to have a JVM, so "having Rhino" is a challenge. But I guess if you're not on a UNIX system where Perl, Python and Ruby are pervasive and always available (or a couple of clicks or commands away), then having Java around is just the same amount of effort. It also lacks "beginner" tutorials that are focused on the kind of interaction that you need to understand to build applications. JavaScript is a weird interactive model, because you are talking to the DOM to do anything interesting, which is a mess--it's really way more complex than beginners usually grasp (I have a hard time with it, and I've been developing in several languages since I was a kid).

That said, I think in the end JavaScript is going to be the world's most popular language for almost everything, including web applications. I happen to agree with Yegge in that regard. But it's still somewhat less friendly to learners than the other languages I mentioned.

Anyway, if Rhino (or some other standalone JavaScript engine) becomes popular I'd reckon that in a year there will be some good tutorials for interactive JavaScript, and it'll become a great choice for learning programming. I happen to think JavaScript is a very pretty language. A few confusing quirks (Function vs. function vs. = {}(); modules, for example), but overall it offers some great functionality in a pretty simple syntax and low keyword manner.

Re: What programming language should I start with?

#115

Earlier quoted context omitted.

I found the opposite to be true. Objects in Python are uncomfortable for newbies, while they are very intuitive in Ruby. Both are fine learning languages, however.

What is uncomfortable about Python objects? If it's the explicit self in methods, that will only bother you if you come from a language that implicitly pollutes the local method namespace with that of the object.

Explicit self drove me bonkers with Python, and still does.

Re: What programming language should I start with?

#116
post #86

If it's for the web only, nothing beats PHP right now in terms of speed and deployment (especially if you're on a budget and need to scale). I'll probably get a lot of flack for this, oh well - but PHP isn't as bad as people say it is provided you take advantage of OOP and separate your logic from presentation.

Agreed

Re: What programming language should I start with?

#117
post #23

Just curious, but would anyone recommend Javascript?

I just ran across this thread randomly -- far too late -- but, yes, I would. In a concurrent thread, I gave my thoughts on why I'm glad I learned JS first: http://news.ycombinator.com/item?id=46531

Functional JS rocks. And the fact that you can examine other peoples' programs with FireBug is huge.

Post reply on HN