4 ms·
Ask HN: If you were to learn a programming language for your first time
which would you learn?
- iterationx 17y agoC# or Java because they are easy on beginners.
- nostrademons 17y agoC# and Java are easy on beginners? I'd start with Python, Scheme or JavaScript. Python's syntax is closest to English, the language is nice and consistent, there's an interactive interpreter, and there're a lot of libraries for things you might want to do out of the box. Scheme's syntax is weird but simple, there're very few core concepts you have to learn, and it'll teach you core computer science better than many of the other alternatives. JavaScript lets you do cool things right away, the language is small, and there's an interpreter built into every web browser. If you use FireBug you've even got a semi-decent debugger at your fingertips.
- hga 17y agoAgree with nostrademons: you want a reasonably simple and minimally regular multi-paradigm language with an interpreter that is a good fit for a problem domain you're interested in. Based on the domain, you're unlikely to go wrong with any of the three languages and ecosystems he's suggested (granted, to a great extent JavaScript is a Scheme with an Algol family face). C# and Java are not interpreted and have complicated syntax, pretty much see things in an OO way---all in all their friction is high and there's a lot you have to learn before you can really start doing things.
- martinp 17y agoC# and Java enforces too many OO concepts to be a good choice for beginners. Start with something easy like Python or Perl.
- gte910h 17y agoI know my college's insistance on java as the first language that people learned (at first course 1 was psudocode, course 2 was java) put tons of people off. (This was a decade ago). When they switched to scheme and python, people took it much better (especially media centric python). http://coweb.cc.gatech.edu/cs1315 http://coweb.cc.gatech.edu/cs1315 If you wish to follow along in their intro course.
- gte910h 17y agoPerhaps compared to C or C++. Compared to almost any other modern language, they're pretty painful with all the boilerplate and copy pasting a newbie will have to do.
- jaddison 17y agoSeriously, pick one with great online resources. That gives you a lot of options at first glance, it would seem... Of course, online resources vary greatly in terms of quality. Personally, I wish I'd started (years ago...) with something like Python. Great resources, great community. Great tutorials: http://diveintopython.org/ http://diveintopython.org/ (for the recent Python 3: http://diveintopython3.org/ http://diveintopython3.org/) What it all boils down to is finding a language that teaches you the fundamentals well. Once you have those basic precepts and fundamentals, you can transfer them quite easily to take on other languages. And Python is also quite easy on beginners.
- hga 17y agoGood point ... but what language with any degree of mind share doesn't have great on-line resources today? All the ones that I've used after the late '70s are well covered as far as I can tell. ADDED: about the only thing I've found that's subpar is x86-64 assembly, and I assume that's because x86 is well covered, x86-64 is quite new and isn't a big jump from it, and not all that many people are interested in it.
- jordanbrown 17y agoI was thinkin that same thing, Im sure you can find good online resources for any language.
- gte910h 17y agoDive into python is for seasoned programmers trying to learn python. Learn to program by Alan Guald(sp) is a much better resource for first time learners. http://www.freenetpages.co.uk/hp/alan.gauld/ http://www.freenetpages.co.uk/hp/alan.gauld/ (Javascript and python both available there).
- knipknap 17y agoPython thirded. Then, perhaps C# ("C++ without the headaches") - it has most of the concepts and none of the really hard parts.
- holograham 17y agoThere is a difference between learning a programming language in order to get something done and learning about programming where you learn the basic building blocks of programming. Python, C#, and Java are easy programming languages to learn and build stuff quickly in. Master C and you can pretty much breeze through the advanced languages while having a good base in the inner workings of modern programming languages.
- jpd 17y agoPersonally, I'd start with assembly (not necessarily x86 though, probably MIPS or similar. The reasoning here should be obvious as it's almost as low-level as you can get, everything else in computer science is based on the axioms found at this level. For similar reasons, I think Number Systems would be an excellent place to start learning mathematics (and possibly predicate calculus in parallel).
- kls 17y agoI would second you on this, but I would throw in ARM as a possible processor to target there are a lot of devices to tinker with that have ARM processors. My second recommendation would be LISP, it is pure and helps you understanding structure very well. If you are just diving in start with a procedural or functional language doing so will make you a better OO programmer when you make that leap, but I always think it is better to learn pure functional and then learn what OO brings to the table. Doing so will help you understand when to use which one for a particular task, something that 90% (i made that percentage up) of programmers do not know how to do. Example being we use OO languages for system, data and batch processing and we use functional for UI an AI development. This is backwards and accounts for a good portion of why development, these days, is so convoluted. Finally, if you are just wanting to sling some code to make money then just learn Java, no offense to the Java community intended, but if one does not have the passion they should just learn the most popular language and start building junk.
- JFitzDela 17y agoI reckon I'll be different, here. I'd say PHP (particularly if the new coder has interest in web programming). It's syntactically easy-ish, freely available, very well documented and supported, and sets the newbie up for easy freelance or professional work. - John
- kanak 17y agoScheme via How To Design Programs (www.htdp.org)