知乎周源微信_每周源代码49-SmallBasic是针对儿童和成人的有趣,简单,强大的编程...

知乎周源微信

知乎周源微信

While the boys are only 2 and 4, I'm always keeping an eye out on new ways to teach them programming. Certainly I hope they'll be more well-rounded and I and spend more time outside, but a even a basic background in programming and logic, I think, produces a more empowered individual.

虽然男孩只有2岁和4岁,但我一直在关注教他们编程的新方法。 当然,我希望他们会更加全面,我会在外面花费更多的时间,但是我认为,即使是具有编程和逻辑基础知识的人也会培养出更强大的人。

Created by Vijaye Raji, Small Basic is a simple (only 15 keywords) but powerful environment for getting started programming. Great for kids and non-technical spouses, but powerful enough even for the professional game developer. In fact, Small Basic is probably the fastest and simplest way I've seen yet to produce and publish Silverlight-based games. Read on to see why.

Small Basic是由Vijaye Raji创建的,它是一个简单的(只有15个关键字)但功能强大的编程入门环境。 非常适合孩子和非技术配偶,但即使对于专业游戏开发人员也足够强大。 实际上,Small Basic可能是我迄今为止制作和发布基于Silverlight的游戏的最快,最简单的方法。 继续阅读以了解原因。

Small Basic is part of MSDN DevLabs and just released version 0.8. It's the eighth installment, but I suspect they are too modest to call it 8.0. ;) It's even internationalized in English, Chinese, French, German, Italian, Japanese, Jorean, Russian, Spanish, Brazilian Portuguese and Turkish...so if you know a computer teacher, you might tell them about this!

Small Basic是MSDN DevLabs的一部分,刚刚发布了0.8版。 这是第八期,但我怀疑他们过于谦虚,无法称之为8.0。 ;)它甚至已经以英语,中文,法语,德语,意大利语,日语,英语,葡萄牙语,俄语,西班牙语,巴西葡萄牙语和土耳其语进行了国际化...因此,如果您认识计算机老师,就可以告诉他们!

Take a look at Small Basic Tetris, for example. You can run it in the browser with Silverlight, right here. The full Small Basic source code for the app is listed right on the page. There's a bunch of great sample Small Basic apps here also.

例如,看看Small Basic Tetris 。 您可以在Silverlight浏览器中在此处运行它。 该应用程序的完整Small Basic源代码在页面上列出。 这里也有很多很棒的样本Small Basic应用程序

It has a nice friendly IDE (Integrated Development Environment) with a clever take on Intellisense as seen below. The IDE goes out of its way to give you as much information and context as possible not only with the intellisense "arc" but also context-sensitive help in the right doc.

它具有一个友好的IDE(集成开发环境),并巧妙地采用了Intellisense,如下所示。 IDE尽其所能,不仅通过智能“ arc”为您提供了尽可能多的信息和上下文,而且还在正确的文档中提供了上下文相关的帮助。

Even more clever, I think, is the "Graduate" button that will convert your Small Basic program into Visual Basic for use directly in Visual Studio.

我认为,更聪明的是“毕业”按钮,它将您的Small Basic程序转换为Visual Basic,以便直接在Visual Studio中使用。

Here's what a Small Basic text mode application would look like:

这是Small Basic文本模式应用程序的外观:

number = 100
While (number > 1)
TextWindow.WriteLine(number)
number = number / 2
EndWhile

Here's a SmallBasic Windows app:

这是一个SmallBasic Windows应用程序:

GraphicsWindow.BackgroundColor = "Black"
GraphicsWindow.Width = 200
GraphicsWindow.Height = 160
GraphicsWindow.PenColor = "Blue"
For i = 1 To 10
GraphicsWindow.PenWidth = i
GraphicsWindow.DrawLine(20, i * 15, 180, i * 15)
EndFor

For those of us old enough to remember learning to program with LOGO and its ubiquitous Turtle, Small Basic includes a Turtle object built in! Remember this?

对于那些年龄大到足以记住学习使用LOGO及其无处不在的Turtle进行编程的人,Small Basic内置了一个Turtle对象! 记住这一点?

sides = 50
length = 400 / sides
angle = 360 / sides
Turtle.Speed = 9
For j = 1 To 20
For i = 1 To sides
Turtle.Move(length)
Turtle.Turn(angle)
EndFor
Turtle.Turn(18)
EndFor

Which gives us this image. See the turtle inside?

这给了我们这个形象。 看到里面的乌龟了吗?

The most amazing part from a learning perspective is the ability to publish your game directly to the Small Basic website and play it or give it to your friends. I hit Publish for this Turtle app and Small Basic - in one click - gave me this link: http://smallbasic.com/program/?WKN265. Now I can send my friends or students to that link.  They can play the game LIVE, see the source listing right there, or even embed it on their own website with included HTML.

从学习的角度来看,最神奇的部分是能够将您的游戏直接发布到Small Basic网站并进行播放或赠送给您的朋友。 我一键点击“发布”以获取该Turtle应用程序和Small Basic,就给了我这个链接: http : //smallbasic.com/program/?WKN265 。 现在,我可以将我的朋友或学生发送到该链接。 他们可以玩LIVE游戏,在此处查看源清单,甚至可以将其嵌入到包含HTML的自己的网站上。

I'm really impressed with the amount of though that was put into this app and how easy it was. I hope other folks at Microsoft check it out and appreciate the simplicity.

我对该应用程序投入的金额以及它的简易程度印象深刻。 我希望Microsoft的其他人可以检查一下并欣赏其简单性。

Related Links

相关链接

翻译自: https://www.hanselman.com/blog/the-weekly-source-code-49-smallbasic-is-fun-simple-powerful-programming-for-kids-and-adults

知乎周源微信

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值