编程与软件工程ejohn.org编辑精选
学习高级 JavaScript
Learning Advanced JavaScript
2009 — 2016,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
这是 John Resig 的交互式高级 JavaScript 教程/幻灯片,代码示例可双击编辑并重新运行,还配有断言来验证结果。作者说明内容源自 Web 2.0 Expo 工作坊,并与其《Secrets of the JavaScript Ninja》一书相关。
为什么经久不衰:它把抽象的 JavaScript 进阶概念变成可动手修改、立即验证的代码实验,所以多年后仍是值得反复访问的经典学习材料。
HN 评论精选
作者说明教程来源、与书的关系,并提示代码可双击编辑重跑。
很高兴大家喜欢这个教程!它来自我在纽约 Web 2.0 Expo 做的一场工作坊,大部分内容取自即将出版的书《Secrets of the JavaScript Ninja》。另外说明一下:你可以双击代码幻灯片,然后编辑并重新运行。这个教程是我演讲后放上去的,还没来得及改进。Remy Sharp 的 jsbin.com 也基于这个教程的结构(运行并展示 + 双击编辑)。
jeresig查看英文原文
I'm really glad that everyone is enjoying the tutorial! As mentioned below this is from a workshop that I gave at the Web 2.0 Expo in NYC. You can find more information about it here: http://ejohn.org/blog/adv-javascript-and-processingjs/ Most of this tutorial is taken from my upcoming book 'Secrets of the JavaScript Ninja' which can be found here: http://jsninja.com/ I don't think this was explicitly stated on the slides but you can double click the code slides and you'll be able to edit and re-run them. I tossed this tutorial up after the talk and haven't really had a chance to improve upon it. Sort of related: Remy Sharp built http://jsbin.com/ which is based off of the construction of this tutorial (using the run-and-show style together with double-click-to-edit).
指出教程中关于原型属性影响范围的一个技术细节需要限定条件。
第 67 条“原型属性会同时影响同一构造函数的所有对象,即使这些对象已经存在”只对把新属性加到已有原型对象上的情况成立;如果把一个新对象赋给 prototype,则不成立。已有对象只能看到它们创建时作为构造函数原型的那个对象上后来添加的属性。
praptak查看英文原文
#67 "Prototyped properties affect all objects of the same constructor, simultaneously, even if they already exist" This is only true for properties created as new properties on the existing prototype (Ninja.prototype.swingSword = ...). It is not true if you assign a new object to the prototype (Ninja.prototype = { 'swingSword' : ...}). The existing objects will only see new properties added to the object which was constructor's prototype at their creation time.
称赞其示例选择、断言验证和设计带来的教学效果。
非常聪明的教学工具。我见过其他带可编辑 JavaScript 示例的教程,但这个把精选示例、断言检查和出色设计结合起来,提升到了全新层次。
rauljara查看英文原文
Really smart tutoring tool. I've seen other tutorials with editable javascript examples, but I think the combination of well chosen examples, use of asserts, and nice design brings it to a whole new level.
补充推荐 ECMA-262 标准、MDN 参考和浏览器兼容性资源。
真正想学 JavaScript 的人,我也推荐读它基于的 ECMA-262 标准,这有助于理解语言核心如何工作。我还常备 Mozilla JavaScript 参考手册方便查阅,浏览器兼容性方面则看 quirksmode.org。
onteria查看英文原文
For those really wanting to learn JavaScript, I also recommend reading the Ecma 262 standard it is based upon: http://www.ecma-international.org/publications/standards/Ecma-262.htm It will help you understand how the core of the language works. I also keep the Mozilla Javascript Reference: https://developer.mozilla.org/en/Javascript/Reference handy for looking things up. For the browser compatibility side: http://www.quirksmode.org/
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选