Live data from Hacker News

What programming language should I start with?

news.ycombinator.com

71–80 of 117 posts

Re: What programming language should I start with?

#71
post #23

Just curious, but would anyone recommend Javascript?

Funny you ask.

I happened to listen to a talk Marc Andreessen did called , "2005: A Web Odyssey" http://osc.gigavox.com/shows/detail994.html> where Andreessen talks about commodity hardware and how it effects programming language choice.

"... programming has moved from being machine dependent and complicated to become a dynamic and easy-to-learn process ..."

Andreessen talks about how languages are moving up the ladder from machine languages to "high level, dynamic languages" by looking at increasingly comoditised, powerful hardware. He notes that Java should now be thought of as a system language. JS in browsers was created in '95 to bridge the gap b/w HTML & Java. Java was deemed too complicated for HTML users. The original idea was JS to be server side. But it never took off due to lack of effort by Netscape to create an Open source version and the tool problems.

"PHP is to 2005 what Java is to 1995"

A lot of the talk he talks about how "PHP is to 2005 what Java is to 1995" The talk was done in 2005. So for Andressen PHP or PHP like languages (Ruby, Python etc) are what he suggests. But right near the end of the talk he talks about Sajax and JPSpan where server side PHP (python,perl) transparently talks to higher level JS code in the browser.

You can find more about Sajax and JPSpan following:

- Sajax http://www.modernmethod.com/sajax

- JPSpan http://sourceforge.net/projects/jpspan

Re: What programming language should I start with?

#72
post #61

Earlier quoted context omitted.

Agreed - I don't use Perl any more, having grown disillusioned with its messiness a long time ago, but it's certainly much more of a serious language than PHP.

I mean really what made you say such things about PHP? not being a serious language like Perl? This is not an attack mind you, but I'm curious to know what Yahoo, Flickr, Wikipedia, and perhaps to some extent Facebook seemed to have missed when they decided to use PHP for server side stuff. What's with all the PHP hate here in YC anyways?

The reason I can't stand it is because I've had to deal with so much of it that sucks. Also, it just doesn't feel like what I want in a language.

The real double edged sword for PHP is that it made it very easy to do web programming. The good side of that is that it let a lot of people write web stuff who otherwise might not have been able to. The bad side of that is that a lot of those people write really bad code that is no fun to clean up.

Re: What programming language should I start with?

#73
post #42

Earlier quoted context omitted.

Alright, as much as I love Haskell, do not attempt to learn it as a first language. Repeat: do not attempt to learn it as a first language. That's like learning to swim by taking a submarine into the Marianas Trench and then opening the airlock.

I wonder if Haskell is as hard for first-time programmers as for experienced ones, though. There are high school kids in #haskell that know way more and probably have an easier time learning than I did. They don't have any bad habits to unlearn. Also, many "tricky" Haskell concepts (algebraic data types, lexical closures, first-class functions, programming without state) are actually quite logical if you've never bee…

I don't agree that exposure has anything to do with it. Its like saying being a viola player makes it harder to pick up the guitar (as you are tranposing strings/notes in your head). Yeah for about the first day it may be a bit strange but once you get past that it is not a problem.

Miranda was the first language I ever learnt. I am the only person who I know who learned a strict functional language from the get go. And yes, it scared and confused the heck out of me :( I am not sure if it helps, but at least I (only now) have a appreciation for the mathematical side of functions/functional programming (has taken me 10 years to get here though).

Re: What programming language should I start with?

#74

If I ever have children I'm planning on introducing "programming" through digital logic simulators, viz, "How to add numbers using transistors". This sort of thing has been done before: http://www.multicians.org/thvv/boyd.html ...but I think it's more suitable when kids are younger. If you're old enough, you probably want to get web pages up and running faster than you could with bare wires.

Hear hear! This is the best approach, IMHO.

Re: What programming language should I start with?

#75
post #23

Just curious, but would anyone recommend Javascript?

The only reason I wouldn't recommend it is because the vast majority or books / tutorials available don't teach how you can really use it. Douglas Crockford and a handful of others have been beating the drum about Javascript being a functional language, but I don't think it's at critical mass yet.

I think most people starting out with Javascript would learn how to do stuff in a browser but not how to "program".

Re: What programming language should I start with?

#77
post #36

Dare I say Java? Seriously though, Java is a good programming language to start with. You get used to C style syntax, but don't have to much with memory management and architectural differences. Plus you can use Eclipse, a great IDE, for free!

I think learning Java is a great way to get turned off to programming. There's just too much busy-work you have to do before you can actually do anything interesting. Pick a language where Hello World is one line.

I agree with this. I also think that the REPL of Lisp, Ruby's irb, and Python's IDLE are very valuable for the new programmer. I knew a few languages when I hit graduate school, but I ended up doing most of my "programming" in Matlab because of the interactive shell. When I first picked up Python and later Ruby and Lisp, I was delighted by the interactivity. The instant feedback, even when it's negative, just feels more forgiving than compiler errors, and the whole process of trying things out at a prompt feels more like learning than code/compile/run.

Re: What programming language should I start with?

#79
post #72

Earlier quoted context omitted.

I mean really what made you say such things about PHP? not being a serious language like Perl? This is not an attack mind you, but I'm curious to know what Yahoo, Flickr, Wikipedia, and perhaps to some extent Facebook seemed to have missed when they decided to use PHP for server side stuff. What's with all the PHP hate here in YC anyways?

The reason I can't stand it is because I've had to deal with so much of it that sucks. Also, it just doesn't feel like what I want in a language. The real double edged sword for PHP is that it made it very easy to do web programming. The good side of that is that it let a lot of people write web stuff who otherwise might not have been able to. The bad side of that is that a lot of those people write really bad code t…

How exactly did PHP ever make it "very easy" to do web programming? Was that when register_globals was on? Was it that there was plenty of example code to cut and paste?

I hear this "easy" term applied to PHP by many people, but when I look at the language itself, I don't see it. PHP is easy for me because I did C for 12 years, but I look at the comp.lang.php newsgroup and see newbies tripping over all sorts of things.

Re: What programming language should I start with?

#80
If you are serious about learning to program, Im gonna have to recommend C or C++. Many people may recommend that you start out by learning a scripting langauge, but these languages have many weaknesses. I'll use python as an example. Python is an easy language to learn, but it is also a softened and simplified language aimed for ease of reading and writing efficiency, not performance. Python runs about as slow as Java (which is quite slow), making it hard to run complex and especially recursive algorithms. The OO in python seems very fake and inflexible, and as they say, it feels "tagged on".

At first, learning a fully-fledged programming language may seem difficult, as there are all the blocks that you have to simultaneously put in at the right place. But after the first few steps, you will be surprised at the power of the computer at your command. C/C++ also forces you do develop good programming standards and habits, both of which play an integral role in your working efficiency.

I myself learned C++ as my first language. Yes, it was hard at first. But the payoff now obviously outweigh the initial difficulties.

Post reply on HN