TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Learning your first programming language

13 pointsby rahul_rstudioalmost 13 years ago

4 comments

shawndumasalmost 13 years ago
I actually settled on Lua for teaching my son.<p>Very simple minimalistic syntax, few concepts, few primitives, few keywords, dynamically-typed / garbage collected, variable arity, no real gotchas, good tool support, great speed, the ability to access a key in a hash either using bracket or dotted notation, and one of the best programming books for any language (PiL).<p>But it also scales well; closures, first-class / true anonymous functions, metatables / metamethods, nice simple API for talking between script and C, tail-call optimization, coroutines, short circuiting operators.<p>And, the path from Lua to JavaScript is very straightforward. In fact I'd say that mastery of Lua would make you a mid-level JS programmer right out of the box...
评论 #4186033 未加载
评论 #4189388 未加载
quackeralmost 13 years ago
From the article: <i>i [sic] find C to be the language that every first time programmer must learn.</i><p>Well, yes and no. I say no because, on Windows, C is not one of the easier languages to set up. I wouldn't recommend Visual Studio (or any IDE), and getting GCC on Windows (MingW or Cygwin or ???) and updating your PATH isn't obvious. And C compiler errors might be cryptic to a new programmer. And C pointers are tricky. Heck, even printf has its gotchas.<p>On the other hand, I <i>would</i> say that every programmer would benefit from learning C. If you learn C <i>first</i> then you'll have learned all of the above, and that's great. You'll have some understanding of how arrays are stored in memory, what a compiler does, how references work, etc, which are aspects that other languages hide from you.<p>For the record, I'd probably recommend Python. Python has a binary installer for Windows, it's lighter on syntax, and it has exceptional documentation. You can play around interactively in the interpreter, and it's a language that has a little bit of everything to try: scripting, objects/inheritance, (some) functional features, etc.
评论 #4186130 未加载
verisimilidudealmost 13 years ago
Good one-on-one teachers may not be available to everyone, true, but they can make a huge difference.<p>Here's a personal anecdote. My first exposure to programming was back in 2005. I was living in Tokyo and agreed to do a "language exchange" with a Japanese friend: I would help him with English, he would teach me Ruby. And so we began. We shared our frustrations; we coached each other through the rough spots; we offered up nuance and context for everything. He gave me the gift of instance_eval long before I could have figured it out on my own. I gave him the confidence to hit on foreign girls. Win-win.<p>The author is right to suggest new programmers should just dive in, without waiting to find the perfect teacher. That's fine. Do, don't wait. But if you do get the chance to study under someone's wing, take it!
评论 #4189505 未加载
shawndumasalmost 13 years ago
<a href="http://c.learncodethehardway.org/book/" rel="nofollow">http://c.learncodethehardway.org/book/</a>