由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - stanford 采用 javascript 为入门教学语言
相关主题
还是成员函数指针,试试这个诡异的东东吧。typedef basic_string string;
纸上谈兵C++怎么写任意重重循环?
请推荐讲算法和数据结构的好书!请教如何使用qsort() to sort string.
我觉得学C的话还是K&R最好c++ question
a c++ question.C++ func overload question
一道c++的考古题C++ Q16: dereferencing
[合集] reinterpret_cast a 4 byte unsigned char to integerC++ Q110: Add without +
c/c++/java的对象/结构输入Question about type conversion (转载)
相关话题的讨论汇总
话题: structure话题: data话题: level话题: reference话题: language
进入Programming版参与讨论
1 (共1页)
r*********r
发帖数: 3195
N********n
发帖数: 8363
2

Literally textbook definition of 误人子弟。

【在 r*********r 的大作中提到】
: 用来教 CS 101
: http://www.i-programmer.info/news/167-javascript/2723-stanford-

r*********r
发帖数: 3195
3
MIT is using python as the first language.
g*****g
发帖数: 34805
4
Whatever, for 101, any non-functional language is fine.

【在 r*********r 的大作中提到】
: 用来教 CS 101
: http://www.i-programmer.info/news/167-javascript/2723-stanford-

N********n
发帖数: 8363
5

That's when you teach it as a subject of science. If you want it to be
the work of engineering then it better be a strong-type based language.

【在 r*********r 的大作中提到】
: MIT is using python as the first language.
r*********r
发帖数: 3195
6
dynamically-typed languages like python and javascript are perfect
for entry level classes like "data structure", "problem solving",
or even "algorithms".
strong-typed languages are only needed when getting to the advanced
courses like software engineering, OS, compiler, PL, etc.
X****r
发帖数: 3557
7
Yes dynamically-typed high-level languages are good for an
introductory computing class like this one, which I suspect
most of the student may not even be engineering major.
So the class is not suppose to train student on programming
(real programmers rarely learn it in school anyway),
but just to give them an idea how software works.
But no I don't think such languages are useful for these CS
classes you specified. Ideally Data Structure (if it is still
taught individually) should be in a low-level language such as
C; and Algorithms should not require writing real code, pseudo
code at most.

【在 r*********r 的大作中提到】
: dynamically-typed languages like python and javascript are perfect
: for entry level classes like "data structure", "problem solving",
: or even "algorithms".
: strong-typed languages are only needed when getting to the advanced
: courses like software engineering, OS, compiler, PL, etc.

r*********r
发帖数: 3195
8
well, entry level (first time) algorithm course should encourage students to
try to run the algorithms, and understand the dynamics of it.
i particularly like the CLRS algorithm book simply because their "pseudo
code" are actually well crafted code that's almost production quality.
for data structure, what's important is the idea of "reference", not "
address". C is the worst choice where the language intentionally confuse the two.
X****r
发帖数: 3557
9
One needs to understand a reference is an address, before to
understand a reference is not an address. Skipping the basics
only introduces more confusion later.

to
the two.

【在 r*********r 的大作中提到】
: well, entry level (first time) algorithm course should encourage students to
: try to run the algorithms, and understand the dynamics of it.
: i particularly like the CLRS algorithm book simply because their "pseudo
: code" are actually well crafted code that's almost production quality.
: for data structure, what's important is the idea of "reference", not "
: address". C is the worst choice where the language intentionally confuse the two.

r*********r
发帖数: 3195
10
reference is a high level PL concept,
while address is a low level OS/compiler concept.
a high level concept should be understood by understanding its
definition, like mathematicians always do.
not by understanding its implementation details.
C's address arithmetic is the source of most code bugs for beginners.
while reference in all other languages is safe and clean.

【在 X****r 的大作中提到】
: One needs to understand a reference is an address, before to
: understand a reference is not an address. Skipping the basics
: only introduces more confusion later.
:
: to
: the two.

相关主题
一道c++的考古题typedef basic_string string;
[合集] reinterpret_cast a 4 byte unsigned char to integerC++怎么写任意重重循环?
c/c++/java的对象/结构输入请教如何使用qsort() to sort string.
进入Programming版参与讨论
a**e
发帖数: 5794
11
That's why you need to learn C first.
古人云:由简入奢易,由奢入简难。

【在 r*********r 的大作中提到】
: reference is a high level PL concept,
: while address is a low level OS/compiler concept.
: a high level concept should be understood by understanding its
: definition, like mathematicians always do.
: not by understanding its implementation details.
: C's address arithmetic is the source of most code bugs for beginners.
: while reference in all other languages is safe and clean.

g*****g
发帖数: 34805
12
That's like saying you should learn Calculus
before addition.

【在 a**e 的大作中提到】
: That's why you need to learn C first.
: 古人云:由简入奢易,由奢入简难。

r*********r
发帖数: 3195
13
total nonsense

【在 a**e 的大作中提到】
: That's why you need to learn C first.
: 古人云:由简入奢易,由奢入简难。

X****r
发帖数: 3557
14
Maybe except a few genius, people don't learn an abstract
concept from its definition. On the contrary, they start with
some concrete examples. In mathematics, aren't you already
very familiar with properties of addition over integers before
you learn "a group consists of a set and an operation..."?
And almost certainly you know that the chance of getting a six
from a fair dice is 1/6 well before you start to understand
"a probability is a function that..."

【在 r*********r 的大作中提到】
: reference is a high level PL concept,
: while address is a low level OS/compiler concept.
: a high level concept should be understood by understanding its
: definition, like mathematicians always do.
: not by understanding its implementation details.
: C's address arithmetic is the source of most code bugs for beginners.
: while reference in all other languages is safe and clean.

r*********r
发帖数: 3195
15
college students are not kids. they are supposed to have the ability to
think abstractly.
of course, there's no harm to mention in passing that reference CAN be
implemented with addresses. but that doesn't mean you have to
actually use a language that doesn't bother to differentiate the two.
using C for writing data structure code would force students to spend most
of their time manipulate pointers, instead of focusing on the real beef.
M**u
发帖数: 10158
16
cs 101, more easy, more better

【在 r*********r 的大作中提到】
: 用来教 CS 101
: http://www.i-programmer.info/news/167-javascript/2723-stanford-

a**e
发帖数: 5794
17
more easy, more better 是不是应该改成
easier, better ?

【在 M**u 的大作中提到】
: cs 101, more easy, more better
N*****m
发帖数: 42603
18
haha

【在 a**e 的大作中提到】
: more easy, more better 是不是应该改成
: easier, better ?

g*****g
发帖数: 34805
19
b4你们两个,应该是the eaiser, the better

【在 a**e 的大作中提到】
: more easy, more better 是不是应该改成
: easier, better ?

T*******x
发帖数: 8565
20
弱问一句:reference有什么重要性?为什么在data structure里那么重要?

【在 r*********r 的大作中提到】
: reference is a high level PL concept,
: while address is a low level OS/compiler concept.
: a high level concept should be understood by understanding its
: definition, like mathematicians always do.
: not by understanding its implementation details.
: C's address arithmetic is the source of most code bugs for beginners.
: while reference in all other languages is safe and clean.

相关主题
c++ questionC++ Q110: Add without +
C++ func overload questionQuestion about type conversion (转载)
C++ Q16: dereferencingC puzzle 一日一题
进入Programming版参与讨论
T*******x
发帖数: 8565
21
用low-level比如C来学data structure比较好是因为
这样可以学到data structure到底是怎么构造的吧?
在高级语言中很多data strcture都是build in的,
所以反而学不到它是怎么构造出来的。对吧?

【在 X****r 的大作中提到】
: Yes dynamically-typed high-level languages are good for an
: introductory computing class like this one, which I suspect
: most of the student may not even be engineering major.
: So the class is not suppose to train student on programming
: (real programmers rarely learn it in school anyway),
: but just to give them an idea how software works.
: But no I don't think such languages are useful for these CS
: classes you specified. Ideally Data Structure (if it is still
: taught individually) should be in a low-level language such as
: C; and Algorithms should not require writing real code, pseudo

p***o
发帖数: 1252
22
怎么教学生是个很主观的问题, 无论是从low-level入手比如knuth的那几本书
还是从math入手比如CLRS都有道理, 你们看CMU不就回归C和FP了么.

【在 T*******x 的大作中提到】
: 用low-level比如C来学data structure比较好是因为
: 这样可以学到data structure到底是怎么构造的吧?
: 在高级语言中很多data strcture都是build in的,
: 所以反而学不到它是怎么构造出来的。对吧?

T*******x
发帖数: 8565
23
Data Structure用low-level language,
Algorithm用high-level language。
我是想确认一下Xentar是不是这个观点。我也同意。
你同意吗?你回帖说的不是很清楚。

【在 p***o 的大作中提到】
: 怎么教学生是个很主观的问题, 无论是从low-level入手比如knuth的那几本书
: 还是从math入手比如CLRS都有道理, 你们看CMU不就回归C和FP了么.

p***o
发帖数: 1252
24
我觉得你很难把data structure和algorithm分开。

【在 T*******x 的大作中提到】
: Data Structure用low-level language,
: Algorithm用high-level language。
: 我是想确认一下Xentar是不是这个观点。我也同意。
: 你同意吗?你回帖说的不是很清楚。

g*****g
发帖数: 34805
25
那也不是,比如用java来学数据结构就很好。
不需要指针折腾来折腾去,也不会让你直接用collection的库,
学的就是结构而已。
class Node {
Node next;
int data;
}
Node node0 = new Node();
Node node1 = new Node();
node0.next = node1
这个代码多么干净,多么简单易懂。根本不需要讲pointer跟reference的区别。
因为只有reference.

【在 T*******x 的大作中提到】
: 用low-level比如C来学data structure比较好是因为
: 这样可以学到data structure到底是怎么构造的吧?
: 在高级语言中很多data strcture都是build in的,
: 所以反而学不到它是怎么构造出来的。对吧?

T*******x
发帖数: 8565
26
这是用java的low-level的功能,目的是学数据结构的构造。
我觉得大家的意思差不多。

【在 g*****g 的大作中提到】
: 那也不是,比如用java来学数据结构就很好。
: 不需要指针折腾来折腾去,也不会让你直接用collection的库,
: 学的就是结构而已。
: class Node {
: Node next;
: int data;
: }
: Node node0 = new Node();
: Node node1 = new Node();
: node0.next = node1

T*******x
发帖数: 8565
27
那倒是。
另外一个问题吧:
不过大致可以分为这么两个阶段:
基础的Data Structure阶段,和应用层面的algorithm阶段。
而且这两个阶段的确存在着一定的矛盾:
1.Data Structure阶段需要用到reference,
2.而algorithm阶段全部用值传参数最方便。
这样说对吧?

【在 p***o 的大作中提到】
: 我觉得你很难把data structure和algorithm分开。
M**u
发帖数: 10158
28
靠,我太文盲了。。。

【在 g*****g 的大作中提到】
: b4你们两个,应该是the eaiser, the better
M**u
发帖数: 10158
29
用啥都一样。。。

【在 T*******x 的大作中提到】
: 那倒是。
: 另外一个问题吧:
: 不过大致可以分为这么两个阶段:
: 基础的Data Structure阶段,和应用层面的algorithm阶段。
: 而且这两个阶段的确存在着一定的矛盾:
: 1.Data Structure阶段需要用到reference,
: 2.而algorithm阶段全部用值传参数最方便。
: 这样说对吧?

O*******d
发帖数: 20343
30
我个人认为C是最好的教学语言。 C里有很多编程的基本概念。 从C可以比较容易理解
其它语言,反之则不然。
相关主题
Algorithms and Data Structures那本比较好呢?纸上谈兵
技术牛人,只有goodbug和thrust两人,microbe也算半个请推荐讲算法和数据结构的好书!
还是成员函数指针,试试这个诡异的东东吧。我觉得学C的话还是K&R最好
进入Programming版参与讨论
X****r
发帖数: 3557
31
对,我就是这个观点。

【在 T*******x 的大作中提到】
: Data Structure用low-level language,
: Algorithm用high-level language。
: 我是想确认一下Xentar是不是这个观点。我也同意。
: 你同意吗?你回帖说的不是很清楚。

N***m
发帖数: 4460
32
你们都剑走偏锋了阿。
不管英语汉语,用啥语言都可以写小说不是。
当然写得好坏,那就得看功力了

【在 X****r 的大作中提到】
: 对,我就是这个观点。
c*****t
发帖数: 1879
33
其实,早点让学生学习 C/C++/Java 比较好。这些语言都需要时间来理解
和使用。第一年学了,到了第三年和第四年能更好的给 system/compiler
这些编程课准备。
很多学生实际上不会认识到平常课外也要做大量的编程。所以课程表要针
对这些人准备。那些早就意识到课外需要编程的人高中的时候就自学了,
所以什么烂课程表都没关系。
如果说学 JavaScript 和 Python 有什么好处的话,那就是学生将来能更
加体会到 static typed language 的好处 :) 不过没必要为了这让学生
把大好青春浪费在这两种语言上。

【在 X****r 的大作中提到】
: Yes dynamically-typed high-level languages are good for an
: introductory computing class like this one, which I suspect
: most of the student may not even be engineering major.
: So the class is not suppose to train student on programming
: (real programmers rarely learn it in school anyway),
: but just to give them an idea how software works.
: But no I don't think such languages are useful for these CS
: classes you specified. Ideally Data Structure (if it is still
: taught individually) should be in a low-level language such as
: C; and Algorithms should not require writing real code, pseudo

s***o
发帖数: 2191
34
don't worry, it's allowed in JavaScript.

【在 M**u 的大作中提到】
: 靠,我太文盲了。。。
d*****u
发帖数: 17243
35
很多选101的都不是计算机专业的,那是工程和数学、物理专业的必修课
这些专业的本科生只希望能完成科学计算,或者编一些简单的文本处理
顺便也懂得计算机的基本工作原理
为了这些目的学C实在不值得,不如学python,javascript之类的实用
另外某大学把programming I从C++改成python后做了跟踪调查
学生学programming II (用c++)时成绩并没有比以前下降
所以first language用哪个好像也无所谓

【在 O*******d 的大作中提到】
: 我个人认为C是最好的教学语言。 C里有很多编程的基本概念。 从C可以比较容易理解
: 其它语言,反之则不然。

r****t
发帖数: 10904
36
some ppl still think python is not strong-typed, after so many years.

【在 N********n 的大作中提到】
:
: That's when you teach it as a subject of science. If you want it to be
: the work of engineering then it better be a strong-type based language.

g*****g
发帖数: 34805
37
It's duck typed. And you can end up with run time error for
incompatible types. You have to rely on tests to guarantee
quality. And almost all software are undertested now.
Static typed languages, as verbose as they are, provide such
check in compilation time. Yes, you can still have bugs, but
compilers give you a list of basic tests at least.

【在 r****t 的大作中提到】
: some ppl still think python is not strong-typed, after so many years.
l******d
发帖数: 530
38
CS学生还是应该从C语言学起
1 (共1页)
进入Programming版参与讨论
相关主题
Question about type conversion (转载)a c++ question.
C puzzle 一日一题一道c++的考古题
Algorithms and Data Structures那本比较好呢?[合集] reinterpret_cast a 4 byte unsigned char to integer
技术牛人,只有goodbug和thrust两人,microbe也算半个c/c++/java的对象/结构输入
还是成员函数指针,试试这个诡异的东东吧。typedef basic_string string;
纸上谈兵C++怎么写任意重重循环?
请推荐讲算法和数据结构的好书!请教如何使用qsort() to sort string.
我觉得学C的话还是K&R最好c++ question
相关话题的讨论汇总
话题: structure话题: data话题: level话题: reference话题: language