编程与软件工程nicolasbize.com
30 年后,QBasic 依然是最好的
30 years later, QBasic is still the best
2016 — 2020,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
作者在教孩子编程时重新审视 QBasic,感叹 30 年过去,依然没有哪种语言能像它那样让人如此直接地体验编程的乐趣:打开即用、即时运行、无需配置环境。文章引发了对现代编程工具是否过于复杂、以及如何给孩子最好的编程入门的讨论。
为什么经久不衰:它触及一个至今未解的问题:编程入门工具越来越花哨,却未必比 QBasic 那种零门槛、即时反馈的体验更好,因此每隔几年就会重新引发共鸣。
HN 评论精选
对幼儿来说,具体线性的 BASIC 比“更先进”的结构化语言更符合认知发展规律
从神经发育角度看,幼儿抽象能力有限,QBasic 和 goto 这种具体、线性的编程模型反而更适合他们。可以先让孩子用这种方式体验编程的乐趣,等他们成长、程序变复杂后,再引入结构化编程、OOP、函数式等更抽象的方法。
jbandela1查看英文原文
For young children, QBasic and goto may indeed be superior to more structured languages. From a neuro development perspective we know that young children are very concrete and have limited abstraction ability. With Basic and goto, a program is more concrete (you run a line which is more or less 1 command) and linear (no nested structures). With structured programming, it is more abstract, and has an recursive structure (with arbitrary levels of nesting). Because of this, it might be preferable to introduce a child to the more linear, concrete programming model with goto and let them experience the thrill of programming then as they develop more and their programs increase in complexity, introduce them later to other more abstract methods and languages such as structured programming, oop, and functional.
现代浏览器 F12 控制台里的 JavaScript 提供了同样即时的入门体验,不必怀旧
教孩子编程很棒,但说 30 年没有比 QBasic 更好的东西有点浪漫化。如今浏览器里的 JavaScript 就是很好的替代品:按 F12 打开控制台,输入 alert("hello world") 立刻弹窗,还能直接改网页。这种即时性让编程触手可及,孩子完全能上手。
jasode查看英文原文
>to realize that in more than 30 years, we have not been able to come up with something better for our kids: Qbasic ..., but we have never really made a simpler or more direct access to the thrill of programming than QBasic. First, I think it's really cool that he's exposing a young mind to programming. But I'm also old enough to have installed QBasic from floppy disks and part of me thinks his statements I quoted are romanticizing QBasic a little bit. I think that Javascript in today's browser is a fine substitute. I've had good experience with children that age by going to the browser, pressing F12, go to Console tab and start typing code. It can start as simple as: alert("hello world"); And boom, you get a popup. You can also show the kid he can type in arithmetic stuff like "2+3" and he'll get back the answer 5. You can then show him how to modify the existing web page. You can ramp up a slight bit of complexity by showing how to create a text file and writing Javascript and then having the browser run it. The 8-year olds I've seen can handle this no problem. What I like about the Javascript-for-kids approach is that it shows them that programming isn't some other universe where you install QBasic in a vm. Instead, the initiation into programming/experimentation is just 2 keystrokes away. There's something about the immediacy of F12-Javascript that keeps it from being an esoteric dark corner. The kid can also get more mileage out of his "programming" knowledge because he can use his Javascript console tricks at his friend's house on any web browser. On the other hand, playing with QBasic today is more isolating. The use of QBasic in 1980s had more utility because the syntax of '10 PRINT "HELLO"' also worked on Apple II, Commodore 64, Radio Shack TRS-80, Texas Instruments TI-99, etc.
QBasic 低心智负担、即时反馈、自带帮助系统的设计胜过许多现代工具
QBasic 才是编程该有的样子:简单易懂,不给你强加心智负担,自带解释器和编译器,既能即时运行(带数组越界检查)又能编译出快速版本。我写过很多一次就跑通的程序,这在现代环境里很少见。没有指针,用 PEEK/POKE 操作内存反而更好懂。没有一堆标签页和窗口,帮助系统也极其出色。现在的编程太复杂了。
meuk查看英文原文
Oh, how many hours I spent in front of that TUI. QBasic was how programming should be. It's amazingly simple to understand (at the cost of ugly and somewhat verbose syntax). It doesn't force any mental burdens on you, and it included both a compiler and a interpreter, so you could run your programs instantly (with array out-of-bounds and overflow checking) and have a fast, compiled version. I wrote plenty of programs that worked the first time I ran them, something that seldom happened to me in more modern programming environments, which put many mental burdens on you, and encourage writing fast and sloppily, and then improving your mistakes afterwards. You don't need any boilerplate - I regularly used QBasic to just plot a graph for example (in a program written from scratch). Also, I like the approach to pointers is very nice, I think. There are no pointers. You need to PEEK or POKE into memory! In C you do a = *b In QBasic you do a = PEEK(b) Which is so easy to understand that I sometimes wonder if pointers is C are even an improvement to this. I'm probably being a bit nostalgic here, but I genuinely miss the feeling of mastery and understanding I had when I used QBASIC. I could do anything I needed inside the editor. No plethora of tabs and windows. In my opinion, programming is too complicated nowadays. Edit: More nostalgy! The help system was absolutely amazing. It was possible to read a keyword for the first time, press F1, and two minutes later you would actually understand the statement. Something I never experienced afterwards.
FreeBASIC 是 QBasic 的现代替代品,BASIC 的快速迭代与无痛起步值得现代工具学习
怀念 QBasic 的人可以试试 FreeBASIC,安装简单、体验几乎一样。我失忆后几乎从零重学编程,用 FreeBASIC 加上 Wirth 式的子集化和形式化规约方法,一小时内就完成了挑战。BASIC 快速迭代、默认安全、运行快,给开发者提供了许多现代工具缺乏的无痛起步体验。
nickpsecurity查看英文原文
For anyone that misses QBASIC, there's FreeBASIC that's a lot like it & easy to install: http://www.freebasic.net/ After loosing my memory, I have to relearn programming nearly from scratch. I took a challenge to do specific program in around an hour, from language to toolchain to solution. Had to be system-like language. Got bogged down by toolchains, IDE's, whatever. Said screw it: why the hell is it so hard when I faintly recall starting lightening-fast on QBASIC? Found a BASIC, FreeBASIC, that was just like it with simple command to launch stuff made in text editor and good documentation. Maybe half an hour of my challenge gone. Next, time to apply lessons I remembered from high-assurance and Wirth. First, subset the language to minimum necessary. Used docs to test each in isolation to develop template & functions for using them, esp file I/O. Wrote formal spec in English & pseudocode of my problem with decomposed functions. Mapped almost 1-to-1 to FreeBASIC as expected. Did one refactoring. Executed code for first time to see successful run & solution to problem. Yeah, BASIC is friggin awesome. I stretched industrial BASIC's, esp 4GL's, really far back when I was a hacker as they did rapid iteration, safe-by-default, and ran fast. Today, I'd say do a Wirth language like Oberon or Component Pascal instead. Still, BASIC has lessons to teach us and a painless bootstrapping for developer that many modern tools lack outside of scripting.
历次讨论
同类还值得读
开源应用架构
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编辑精选