TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How My 10-Year-Old Learned JavaScript

150 点作者 rohmanhakim超过 8 年前

19 条评论

uniclaude超过 8 年前
This reads like the author really wants his kid to learn programming, and the article shows more interest from the parent than from the child.<p>That&#x27;s obviously anecdotical but I&#x27;m very glad nobody steered me into programming. It was my private garden, and I enjoyed every single second of the freedom it gave me. Writing my Delphi programs was funnier to me than programming books.<p>I think my point here is that I&#x27;m not sure it is in the best interest of children to push them into our passions. Then again I&#x27;m not a parent, so my opinion doesn&#x27;t hold much weight!
评论 #13206926 未加载
评论 #13206632 未加载
评论 #13206718 未加载
评论 #13207576 未加载
评论 #13206600 未加载
评论 #13207073 未加载
评论 #13206601 未加载
mwcampbell超过 8 年前
What do you think about teaching JavaScript as the first programming language rather than Python? I know that some think JavaScript is a better choice [1], because it&#x27;s so much easier to produce a real application as opposed to a command-line toy. But the opposing argument would be that JS has so many flaws, or more charitably, it&#x27;s such a quirky language. Also, any opinions about Khan Academy&#x27;s platform and lessons for learning to program with JavaScript [2]?<p>I&#x27;m not a parent, but my friend&#x27;s 10-year-old son has asked me to teach him to program.<p>[1]: <a href="http:&#x2F;&#x2F;prog21.dadgum.com&#x2F;203.html" rel="nofollow">http:&#x2F;&#x2F;prog21.dadgum.com&#x2F;203.html</a><p>[2]: <a href="https:&#x2F;&#x2F;www.khanacademy.org&#x2F;computing&#x2F;computer-programming" rel="nofollow">https:&#x2F;&#x2F;www.khanacademy.org&#x2F;computing&#x2F;computer-programming</a>
评论 #13208235 未加载
评论 #13207890 未加载
评论 #13208343 未加载
评论 #13208617 未加载
评论 #13207312 未加载
mattnewton超过 8 年前
I honestly didn&#x27;t recognize his description of closures. It sounded like memoization. Closures are probably best understood without metaphors like that, scoping in JavaScript might be weird but it is consistent everywhere- only functions have scope, and they carry that scope for their entire life. I think just thinking of everything in the language as a collection of scopes really clicked it for me.<p>The real trip up with javascript I often see even in professionals is asynchronicitiy, since JavaScript has a run loop.
cdevs超过 8 年前
Feel like that title needs a tweak..<p>Learned JavaScript ? Or learned about JavaScript. Maybe &quot;how I kept my kid interested in programming&quot;, &quot;short attention span vs programming&quot;, &quot;getting your child into programming&quot;. There&#x27;s a pretty good click bate video on YouTube that says &quot;15 year old dreams in code&quot; and it was something along the lines of he made game where the ball moves to the left and right with your keyboard and score increments...basically the tutorial for his framework. I think the problem is the school system not pushing some of these basic introductions into a few classes. There was a time unix commands were day to day office needs for almost every employee at certain places...and then <i>poof</i> the GUI killed it.
pacaro超过 8 年前
I wonder if closures are easier to understand in languages with clearer (or tighter) scoping rules. I notice that the author doesn&#x27;t have an analogy for scope on his article
评论 #13206657 未加载
kowdermeister超过 8 年前
&gt; He just lost motivation. I guess command line output only motivates a kid so much these days.<p>That&#x27;s why we made text based games and an tkinter based RPG game at a coding bootcamp where I do mentoring.
评论 #13206953 未加载
评论 #13206572 未加载
评论 #13206627 未加载
jtcond13超过 8 年前
Cool write-up. Programming is a great thing to learn as a kid.
nv-vn超过 8 年前
That description of closures is really odd to me and I know for a fact that it would not have worked on me as a child. After spending some time teaching programming to middle schoolers&#x2F;high school freshmen, I think they&#x27;re really something that comes more naturally than that. The way scoping works for closures is almost instinctual in my experience, but the anonymous part is much harder to understand. Trying to write functions inside of functions is also fairly natural (although you might have to nudge the kids into that style of thinking), so you can teach closures with the use of named inner functions. I still haven&#x27;t found a great way to teach lambdas that really sticks without them writing some code first and seeing how they can fit lambdas into there...
partycoder超过 8 年前
Let&#x27;s not forget that it was not rare that kids learned Assembly in the 1980s.
评论 #13208952 未加载
评论 #13207217 未加载
评论 #13206455 未加载
评论 #13206462 未加载
icambron超过 8 年前
Like a few people in this thread, I didn&#x27;t really buy the closure analogies. I think if that were my first exposure to it, I&#x27;d end up with some pretty wrong ideas about how they work. Specifically, it&#x27;s <i>not</i> a snapshot.<p>I was bothered enough that I went and quickly wrote an explanation of closures in five steps. The language probably needs tightened up a bunch, but I&#x27;m curious if it&#x27;s useful?<p><a href="https:&#x2F;&#x2F;jsfiddle.net&#x2F;hghgp6x2&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jsfiddle.net&#x2F;hghgp6x2&#x2F;</a>
tobilg超过 8 年前
Thanks for the interesting article! Are there any recommendations for non-English speakers? I&#x27;d be especially interested in German materials. I&#x27;d love to teach my eight year old daughter about computers and programming, but there are close to none books and resources available if the kid doesn&#x27;t speak&#x2F;read English yet.
fiatjaf超过 8 年前
Programming is so easy anyone mildly interested can learn it. Specially a kid. The key point is the interest. Kids will never be interested if they never hear about programming, but you can also not force interest on them.
commentzorro超过 8 年前
Should have started him with Haskell so he would learned monads and functors right from the start with no mutable object baggage to trip him up. Maybe a few weeks of child level category theory first.
评论 #13206458 未加载
评论 #13206327 未加载
评论 #13206466 未加载
评论 #13206960 未加载
kampsduac超过 8 年前
Congrats on sharing with your son! I would be interested to learn how he responds to <a href="https:&#x2F;&#x2F;groklearning.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;groklearning.com&#x2F;</a>
评论 #13206944 未加载
iamcreasy超过 8 年前
Loved this article. I especially liked the &#x27;Explaining programming concepts to kids&#x27; section.<p>Please keep us posted about what your kid is building next.
sn9超过 8 年前
<i>Realm of Racket</i> would likely have been a really good alternative.<p>Maybe <i>NAND to Tetris</i>.
nether超过 8 年前
Kids should be outside playing and interacting with other kids, not coding.
评论 #13206506 未加载
评论 #13206468 未加载
评论 #13206362 未加载
评论 #13207231 未加载
评论 #13206985 未加载
lttlrck超过 8 年前
The closure description sounded more like memoization.
aibottle超过 8 年前
There is no learning JavaScript. There is only the ability to use StackOverflow and Google Search. ;)
评论 #13206290 未加载
评论 #13206296 未加载