JS作为一种教学语言 [英] JS as a teaching language

查看:51
本文介绍了JS作为一种教学语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在社区学院教物理,并且2000我使用python作为教学工具实验了
。关键是不要教这么多b $ b编程本身,而只是为了让学生在没有办法得到一个问题时用数字方式解决问题。封闭形式

使用代数或微积分的解决方案。其他物理老师使用电子表格做过类似的事情,但我个人认为这是'b $ ba可怕的方法 - 部分是因为电子表格不是美元b $ b标准化编程语言的方式,部分是因为

电子表格不像代码那样可读。我认为我的实验是部分成功的,部分是不成功的。我现在是

即将在很长一段时间内再次教授相同的课程,并且考虑从

python到javascript。我会很感激任何关于

的人的评论,这是否是一个好主意,或者是我想要做的事情的某些方面。


我在python遇到的一个障碍是我必须确保我的学生可以访问python解释器。这意味着下载

大型应用程序并安装它。对于js来说这似乎是一个明确的胜利

,因为安装了firefox的每个人都可以在控制台中运行单行

,我认为这将是相当简单的

提供一个基于浏览器的界面,允许用户

编写简单的javascript程序并运行它们。


它是在python中也是一个令人讨厌的计算,就像2的平方根一样简单的计算需要这么多代码:

导入数学

打印数学.sqrt(2。)

此外,它让学生们感到困惑

打印2/3

给出0作为输出。我发现许多学生对于蟒蛇空白的重要性感到困惑。


这一切都不是一个难以逾越的障碍,但它是

占用时间并妨碍了。 (我特别记得一个学生,一个中年移民,他不仅从未做过任何计算机编程,而且还不知道怎么办鼠标。)


在js中,上面的第一个例子变得更简单了:

Math.sqrt(2),

和第二个就像一个人天真地期待的那样。


我也在思考通过暴露一些全局变量让学生变得更容易的想法

。例如,他们自己的

代码可以在以下条件已经完成的环境中运行:

sqrt = Math.sqrt;

因此他们可以简单地做

sqrt(2)

并得到答案。


Are有没有很好的,开源的,基于浏览器的环境

用于编写简单的JavaScript程序?我想在一些开源课件中加入

这样的东西我已经写了一些东西( http://www.lightandmatter.com/spotter/spotter.html) ,可能是

使用一些ajaxy方法允许用户在我的服务器上保存他的程序




提前感谢任何建议或意见!


-Ben

I teach physics at a community college, and ca. 2000 I experimented
with using python as a teaching tool. The point wasn''t to teach
programming per se, but simply to give students a way of solving
problems numerically when there isn''t any way to get a closed-form
solution using algebra or calculus. Other physics teachers have done
similar things using spreadsheets, but personally I think that''s
a horrendous approach -- partly because spreadsheets aren''t
standardized the way programming languages are, and partly because
spreadsheets aren''t readable in the way that code is. I think my
experiment was partly successful and partly unsuccessful. I''m now
about to teach the same course again for the first time in a long
time, and am thinking about the possible merits of switching from
python to javascript. I''d be grateful for comments from anyone on
whether this seems like a good idea, or on certain aspects of what
I''m thinking of doing.

One hurdle I encountered with python was that I had to make sure
my students had access to a python interpreter. This meant downloading
a large application and installing it. This seems like a clear win
for js, since everyone who has firefox installed can run one-liners
in the console, and I would think it would be fairly straightforward
to supply a browser-based interface that would allow the user to
write simple javascript programs and run them.

It was also a nuisance in python that a computation as simple as
taking the square root of 2 required this much code:
import math
print math.sqrt(2.)
Also, it confused students that
print 2/3
gave 0 as its output. I found that many students were confused by
the significance of whitespace in python.

None of this was an insurmountable hurdle, but it
took up time and got in the way. (I remember in particular one
student, a middle-aged immigrant, who not only had never done any
computer programming, but didn''t know how to hold a mouse.)

In js, the first example above becomes simpler:
Math.sqrt(2) ,
and the second one works as one naively expects.

I''m also thinking about the idea of making things a little easier
on the students by exposing some globals. For example, their own
code could run in an environment where the following has already
been done:
sqrt=Math.sqrt;
Thus they can simply do
sqrt(2)
and get an answer.

Are there any well-implemented, open-source, browser-based environments
for writing simple javascript programs? I would want to incorporate
such a thing as a component in some open-source courseware I''ve
written (http://www.lightandmatter.com/spotter/spotter.html), probably
using some ajaxy method for allowing the user to save his programs
on my server.

Thanks in advance for any advice or comments!

-Ben

推荐答案

" Ben Crowell" < cr ******* @ lightSPAMandISmatterEVIL.com写在留言中

news:47 *********************** @ roadrunner.com ...
"Ben Crowell" <cr*******@lightSPAMandISmatterEVIL.comwrote in message
news:47***********************@roadrunner.com...

我在社区学院教物理, 2000我使用python作为教学工具实验了
。关键是不要教这么多b $ b编程本身,而只是为了让学生在没有办法得到一个问题时用数字方式解决问题。封闭形式

使用代数或微积分的解决方案。其他物理老师使用电子表格做过类似的事情,但我个人认为这是'b $ ba可怕的方法 - 部分是因为电子表格不是美元b $ b标准化编程语言的方式,部分是因为

电子表格不像代码那样可读。我认为我的实验是部分成功的,部分是不成功的。我现在是

即将在很长一段时间内再次教授相同的课程,并且考虑从

python到javascript。我会很感激任何关于

的人的评论,这是否是一个好主意,或者是我想要做的事情的某些方面。


我在python遇到的一个障碍是我必须确保我的学生可以访问python解释器。这意味着下载

大型应用程序并安装它。对于js来说这似乎是一个明确的胜利

,因为安装了firefox的每个人都可以在控制台中运行单行

,我认为这将是相当简单的

提供一个基于浏览器的界面,允许用户

编写简单的javascript程序并运行它们。


它是在python中也是一个令人讨厌的计算,就像2的平方根一样简单的计算需要这么多代码:

导入数学

打印数学.sqrt(2。)

此外,它让学生们感到困惑

打印2/3

给出0作为输出。我发现许多学生对于蟒蛇空白的重要性感到困惑。


这一切都不是一个难以逾越的障碍,但它是

占用时间并妨碍了。 (我特别记得一个学生,一个中年移民,他不仅从未做过任何计算机编程,而且还不知道怎么办鼠标。)


在js中,上面的第一个例子变得更简单了:

Math.sqrt(2),

和第二个就像一个人天真地期待的那样。


我也在思考通过暴露一些全局变量让学生变得更容易的想法

。例如,他们自己的

代码可以在以下条件已经完成的环境中运行:

sqrt = Math.sqrt;

因此他们可以简单地做

sqrt(2)

并得到答案。


Are有没有很好的,开源的,基于浏览器的环境

用于编写简单的JavaScript程序?我想在一些开源课件中加入

这样的东西我已经写了一些东西( http://www.lightandmatter.com/spotter/spotter.html) ,可能是

使用一些ajaxy方法允许用户在我的服务器上保存他的程序


I teach physics at a community college, and ca. 2000 I experimented
with using python as a teaching tool. The point wasn''t to teach
programming per se, but simply to give students a way of solving
problems numerically when there isn''t any way to get a closed-form
solution using algebra or calculus. Other physics teachers have done
similar things using spreadsheets, but personally I think that''s
a horrendous approach -- partly because spreadsheets aren''t
standardized the way programming languages are, and partly because
spreadsheets aren''t readable in the way that code is. I think my
experiment was partly successful and partly unsuccessful. I''m now
about to teach the same course again for the first time in a long
time, and am thinking about the possible merits of switching from
python to javascript. I''d be grateful for comments from anyone on
whether this seems like a good idea, or on certain aspects of what
I''m thinking of doing.

One hurdle I encountered with python was that I had to make sure
my students had access to a python interpreter. This meant downloading
a large application and installing it. This seems like a clear win
for js, since everyone who has firefox installed can run one-liners
in the console, and I would think it would be fairly straightforward
to supply a browser-based interface that would allow the user to
write simple javascript programs and run them.

It was also a nuisance in python that a computation as simple as
taking the square root of 2 required this much code:
import math
print math.sqrt(2.)
Also, it confused students that
print 2/3
gave 0 as its output. I found that many students were confused by
the significance of whitespace in python.

None of this was an insurmountable hurdle, but it
took up time and got in the way. (I remember in particular one
student, a middle-aged immigrant, who not only had never done any
computer programming, but didn''t know how to hold a mouse.)

In js, the first example above becomes simpler:
Math.sqrt(2) ,
and the second one works as one naively expects.

I''m also thinking about the idea of making things a little easier
on the students by exposing some globals. For example, their own
code could run in an environment where the following has already
been done:
sqrt=Math.sqrt;
Thus they can simply do
sqrt(2)
and get an answer.

Are there any well-implemented, open-source, browser-based environments
for writing simple javascript programs? I would want to incorporate
such a thing as a component in some open-source courseware I''ve
written (http://www.lightandmatter.com/spotter/spotter.html), probably
using some ajaxy method for allowing the user to save his programs
on my server.



JavaScript数学可能有问题:


4.7为什么简单的十进制算术会产生奇怪的结果?


例如,5 * 1.015并不准确给出5.075和0.06 + 0.01

在javascript中没有给出0.07。


comp .lang.javascript常见问题 - 9.88 - 2007-10-12
http:/ /jibbering.com/faq/index.html


Am 14.10.2007 23:59 Ben Crowell写道
Am 14.10.2007 23:59 Ben Crowell wrote

我在社区大学教物理, 2000我试验了
I teach physics at a community college, and ca. 2000 I experimented



我不是那么多数字计算器,但我在

安装软件方面有一些技巧; - )


Javascript可能更容易抓取和更多自由形式,因为Python(我这两个都是b / b),但是因为Python是由数学家写的我将

假设,对于您的特殊任务,它可能更适合。

如果你留在Python我会建议你看看这个:


---------------------- http://ipython.scipy.org -----------------------

IPython:增强的Python Shell


IPython是一个多平台,自由软件项目(BSD许可),

提供:


*一个增强的Python shell,专为高效的交互式工作而设计。

它包含了许多针对默认Python shell的增强功能,包括

控制能力以交互方式交互式所有主要的GUI工具包

无阻塞方式。

*用于构建自定义交互式环境的库使用

Python作为基础语言(但可能有扩展或替代语法的
)。

*用于交互式分布式和并行计算的系统(这个
是IPython新开发的一部分。

-------------------------------- ----------------------------------------

基本上就是这样是一个增强的Python Shell,具有用户可定义的启动

配置,什么不是。非常舒服!

I ain''t that much of a number-cruncher, but I got some skills in
installing software ;-)

Javascript may be more easy to grab and more freeform as Python is (I do
both), but since Python is being written by a mathematician I would
assume, that for your particulare task it may be suited better.
Should you stay with Python I would recommend you to have a look at this:

---------------------- http://ipython.scipy.org -----------------------
IPython: an Enhanced Python Shell

IPython is a multiplatform, Free Software project (BSD licensed) that
offers:

* An enhanced Python shell designed for efficient interactive work.
It includes many enhancements over the default Python shell, including
the ability for controlling interactively all major GUI toolkits in a
non-blocking manner.
* A library to build customized interactive environments using
Python as the basic language (but with the possibility of having
extended or alternate syntaxes).
* A system for interactive distributed and parallel computing (this
is part of IPython''s new development).
------------------------------------------------------------------------
Basically it is an enhanced Python Shell with user definable startup
configuration and what not. Very comfortable!


我也正在考虑通过暴露一些全局变量让学生变得更容易的想法

。例如,他们自己的
I''m also thinking about the idea of making things a little easier
on the students by exposing some globals. For example, their own



这可能适用于iPython(见上文)

This may work well with iPython (see above)


有没有良好实现的,开源的,基于浏览器的环境

用于编写简单的JavaScript程序?我想要合并
Are there any well-implemented, open-source, browser-based environments
for writing simple javascript programs? I would want to incorporate



当然,Javascript更适合初学者,特别是因为

它的负载较少。人们可能会很快失去对Python的概述。


检查这些:

http://jconsole.com/


http://mochikit.com/examples/interpreter/index.html


祝你好运!


-

问候,

Andreas M.

Of course, Javascript is better suited for beginners, especially since
it is less loaded. One can lose overview with Python pretty fast.

Check these out:

http://jconsole.com/
or
http://mochikit.com/examples/interpreter/index.html

Good luck!

--
Regards,
Andreas M.


Am 15.10.2007 01:03 McKirahan写道
Am 15.10.2007 01:03 McKirahan wrote

也许你可以使用带有VBScript的Internet Explorer ...


输入以下内容在地址栏中输入:

vbscript :提醒(5 * 1.015)



vbscript < b> :提醒(2 ^ .5)
Perhaps you could use Internet Explorer with VBScript...

Type the following in the Address bar and hit Enter:
vbscript:Alert( 5*1.015 )
or
vbscript:Alert( 2^.5 )





jscript:Alert(5 * 1.015)



jscript:提醒(2 ^ .5)


;-)


-

问候,

Andreas M. 。

or
jscript:Alert( 5*1.015 )
or
jscript:Alert( 2^.5 )

;-)

--
Greetings,
Andreas M.


这篇关于JS作为一种教学语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆