20 ms·
Microsoft Small Basic
- ok123456 3y ago>Likewise, your program can use any variables defined in your subroutines. In computer talk, we say all variables in a Small Basic program have global scope. Is scope really that big of a hurdle for beginning students? Also, in the examples I saw there are no formal functional arguments. This seems like a big step backwards as a teaching language compared to Racket/Dr Scheme. Copying the same bad design decisions from 70s BASICs because of nostalgia doesn't seem that helpful for actual education.
- ModernMech 3y agoYes, in my experience, scope is a huge issue for beginners. This is why environments like blockly and scratch out so much effort into reifying scope with colorful blocks that “snap” together, so that scope becomes something more tangible.
- ok123456 3y agoThat sounds better than making everything global.
- ModernMech 3y agoDepends. Also in my experience I see a huge dropoff in coding interest when students move from the fun environments I mentioned, to the professional tools programmers use. Unfortunately there's not much of a middle ground, and there's only a small slice of students who "get" the stuff (like lexical scoping) we throw at them at such an early age. I think we are doing them a disservice by trying to make professional coders out of young learners. Many of us who learned on systems like basic became professional programmers eventually, so I don't really see why it's so important for early tools to mimic what software developers use. Excel is an example of a language with globally-scoped variables, and it's used by more people than all other languages combined to successfully run everything from personal finances to business operations. SQL is another example of a language that is used by non-programmers that doesn't have the typical lexical scoping rules. So it's certainly possible to build complex systems without lexical scoping, and it seems like non programmers “get” this version of programming moreso than even Python, which is lauded by programmers for how supposedly learnable it is.
- sacrosancty 3y ago[dead]
- hgsgm 3y agoThat's for syntax, not scope. Scratch doesn't have lexical scope.
- hfkwer 3y agoI teach intro to algorithms for math majors. Yes, scope is a difficult concept for students. Throw in recursion into the mix, and you'll see how bad it gets.
- analog31 3y agoI think it is. It solves a problem, that is of course very real and urgent in programming, but does so by adding a layer of abstraction. And I think abstractions have to be introduced sparingly and gradually. Likewise functions with arguments. I still find this to be a hurdle when helping people learn Python, and they don't naturally use functions and scoping unless I goad them into it. Many of them won't do anything beyond writing basic linear scripts, which is OK. My first language was the original line-numbered BASIC. I think a benefit was that you could pretend to think like the computer, and run the program in your head or on paper. Naturally we were led to experience the mishaps that scoping overcomes. Nowadays, a motivation is showing how they can import a package, and use its functions, without having to understand the internals of the package. The most primitive reasons are named function arguments and scoping.
- int_19h 3y agoI would argue that introducing such concepts in easy to understand ways is the task of the IDE for such learning languages. E.g. Thonny does a great job of explaining how locals work during debugging by using a multi-window mode where each stack frame gets a separate window that shows just that function's code (with current statement highlighted) and its locals. It also takes care of recursion - you can easily see how every recursive call adds a new window, and each window has its own set of variables.
- analog31 3y agoAh, I had forgotten about Thonny. For a while it seemed like they weren't keeping up with Python versions. Hmmm... even after just a few minutes, I'm impressed. I prefer to use beginner tools for my own work, even though I'm actually quite experienced, because it gives me a chance to familiarize myself with the things that I would actually recommend to beginners. Also, it reminds me of another thing, which is that not just the language but also the tooling, can be a source of abstraction and frustration.
- svb_2023 3y agoI've fixed this issues in Small Visual Basic: https://github.com/VBAndCs/sVB-Small-Visual-Basic https://github.com/VBAndCs/sVB-Small-Visual-Basic sVB has local and global scopes, functions that return values, and subs and functions with parameters. Also, sVB is a semi object oriented language, that allow access instant properties and methods of objects. It has a form designer and a mini winforms lib, so it can easily create multi-form apps.
- FourthProtocol 3y agoTop comment here is how many I interact with react when they discover my love of VB. net. Some food for thought, then: I wrote my first complete computer program in 1986. Since then I've programmed (or scripted) in Assembler, BASIC, C, C#, C++, COBOL, F#, HTML, Java, JavaScript, LOGO, Pascal, SQL, VBA and XAML. I don't mind C#. Or Java. The majority of the code I've written in my career was written in C#. And yet my preference remains VB.NET because - VB.NET supports both static and dynamic typing. VB.NET is a functional language, supporting local type inference, anonymous functions, monads, and language integrated comonads (even Lisp can be more complex and verbose than VB.NET with LINQ). VB.NET does project-wide namespace imports. C# doesn't. VB.NET is no more or less verbose than C#. Haskell and F# however, are indeed a lot less verbose. There are also readability issues in Java and C# that VB.NET doesn't have (braces, == and =, ! instead of Not, seperate keywords for inheritance and interface implementation, and so on). I learnt Pascal before learning C (and prefer Pascal to C). The fact that Pascal and VB.NET share syntactical smilarities (type declarations follow variable and function names, the Not keyword) is probably not an insignificant factor. Lastly, Microsoft announced that evolution of the VB.NET language has concluded, (although it will support .Net 5). This is welcome because it makes things predictable -- modernising legacy codebases takes ages.
- bt4u 3y agoC# does support project-wide imports since C# 10
- FourthProtocol 3y agoThanks for the update. It's a timesaver.
- Kwpolska 3y ago.NET 5+ supports VB.NET, but only barely. You cannot use VB.NET for ASP.NET Core web apps (due to missing support for Span<T>).
- FourthProtocol 3y ago
- teddyh 3y agoAt that point, you might as well just start with Python.
- im_down_w_otp 3y agoI’m over here pining for Apple to give the revival treatment to HyperCard with iOS as a “Stack” target, so my kids can make apps for the iPad and share them with their friends.
- WillAdams 3y agoThat would be ideal. I was hoping that Livecode (formerly known as "Runtime Revolution") would become that --- there's now an opensource fork --- maybe that will make it possible?
- beagle3 3y agoYou should really take a look at https://beyondloom.com/decker/ https://beyondloom.com/decker/ - It has a web implementation (so, usable everywhere including iOS), and an SDL implementation. It captures the original HyperCard spirit better than anything Apple would release today. The language is not HyperTalk or AppleTalk - it's a mix between Lua and APL, which is about as readable but much nicer to write. And if you find this interesting, look for the ArrayCast podcast episode where they interview John Earnest about Decker (and the associated language, Lil). IIRC, there are two episodes where John is interviewed, and this is the 2nd of them.
- Daunk 3y agoI still think BlitzMax NG is the way to go if you want something similar to BASIC - https://blitzmax.org/ https://blitzmax.org/
- protoster 3y agoNSFW, this is some serious domain name gore.
- chabad360 3y agoWow, this really brings back memories. Small Basic was the first actual programming language I learned back when I was 10 years old. I remember getting my dad to print the language manual so I could read it on the plane ride to my grandparents. The editor they shipped had some neat features for the time like Intelisense and built-in docs, it even had support for third-party libraries with DLLs. One really neat feature I also remember was that you could turn a SB project into VB with a click of a button, it would create the VS solution and vbproj for you. I'm not quite sure how it worked with the language itself cause VB looks quite a bit different and it wouldn't change your code (no transpiling or stuff like that, just a wrapper). Funnily enough, I didn't actually move to VB from that, I went to C# (which I have since forgotten). But it definitely got me quite a bit further in my developer journey (now I work with Go at a small org).
- vijayer 3y agoThis makes me so happy, thanks for sharing this.
- diego_sandoval 3y agoI also learned to program using Small Basic, and if I had to learn to program over again, I would choose Small Basic again. Thanks for creating it.
- UberFly 3y agoLearn to code with these creepy turtle-faced humanoids.
- TrashHeap64 3y agoI didn't care much for Small Basic when it came out. It did lead me to QB64 which I had a lot of fun with
- dang 3y agoRelated: Microsoft Small Basic - https://news.ycombinator.com/item?id=9981557 https://news.ycombinator.com/item?id=9981557 - July 2015 (87 comments, some from the creator) Microsoft Small Basic - https://news.ycombinator.com/item?id=1172519 https://news.ycombinator.com/item?id=1172519 - March 2010 (26 comments) Small Basic: Programming Is Fun - https://news.ycombinator.com/item?id=1171383 https://news.ycombinator.com/item?id=1171383 - March 2010 (27 comments) Introducing Small Basic - Microsoft releases yet another programming language - https://news.ycombinator.com/item?id=358050 https://news.ycombinator.com/item?id=358050 - Nov 2008 (6 comments)
- keithnz 3y agoI really liked it when my eldest son was playing with it years ago, but not being able to build your own functions was really unfortunate.
- vijayer 3y agoHey all, creator of Small Basic here. I made this back in 2008 as a side project when I used to work at Microsoft. My belief was/is that you can get more kids interested in programming when the IDE (language + runtime + libraries) encourages iterative coding with simple gratification loops built in. You can see a bunch of decisions influenced by .Net which I was working with back then. I had been meaning to go back and revisit some of those decisions, but haven't had a chance yet. I have changed my stance around scoping and argument passing in functions, for instance. (What is really neat is that 15 years later, my son is learning coding with Small Basic. And I hired an engineer for my current startup who had started coding with Small Basic as a kid in Brazil.)
- Razengan 3y agoIn the 1980s, home computers like the Sinclair Spectrum and Commodore 64 booted straight into a programming environment, often BASIC. Even if you just wanted to play games, you got some mandatory exposure to coding. I think it would be great if there was a modern "console computer" like that, which let you code the instant you switched it on. At the very least, I wish modern programming environments let you use graphics and draw right away without fumbling around with boilerplate, like a simple 10 LINE(1,1,10,10) :)
- jaybeavers 3y agoNice to hear from you, great work! As a lifelong dev who started by learning BASICA and who's first pro job was in Visual Basic, I love your thesis. Nowadays I work with people living with disabilities and I come across kids who want to program but who cannot use a traditional keyboard and mouse. I was just discussing the need for a simplified ide and language syntax with full programming power and Small Basic came to mind. Any chance this work will see new life outside of its 'side project' status?
- int_19h 3y agoI really wish someone would revive ABC: https://homepages.cwi.nl/~steven/abc/programmers/handbook.html https://homepages.cwi.nl/~steven/abc/programmers/handbook.ht...
- tomcam 3y ago> For ages 7 to 107, Small Basic is one of the easiest ways to learn to code. I’m 109 and I feel I’m not being seen
- svb_2023 3y agoHi @vijayer Thanks for the amazing language. I'd like to tell you that I've eveolde SB by adding a form designer and a mini winforms lib, in addition to many modification to the compiler itself. For more details: https://github.com/VBAndCs/sVB-Small-Visual-Basic https://github.com/VBAndCs/sVB-Small-Visual-Basic I also provided a 750 pages reference book for sVB: https://drive.google.com/file/d/1pCnB4_7pEBc_wT2u258MmutYCuXwpvjN https://drive.google.com/file/d/1pCnB4_7pEBc_wT2u258MmutYCuX... Thanks.
- vbfan 3y agoSeems nice!
- chkas 3y ago> Small Basic is the only programming language created specially to help students transition from block-based coding to text-based coding. Not the only one: https://easylang.dev/ide https://easylang.dev/ide
- olav 3y agoAnd, of course, https://gpblocks.org/ https://gpblocks.org/
- WillAdams 3y agoHow is this the first that I am finding out about this?!? I've been looking for such a tool for _forever_! Thanks! Any notable forums/discussion areas for this? (I will note the name makes it hard to search for --- maybe that's why I didn't find it?)
- hgsgm 3y agoWhy are all these scratch forks that enable extensions (like GP and Snap), all stuck on an ancient ugly version of Scratch core?
- teo_zero 3y agoHow can a block-based language help students transition from block-based coding to text-based coding?
- empressplay 3y agoAlso https://turtlespaces.org/weblogo https://turtlespaces.org/weblogo
- pjmlp 3y agoThis one is quite cool, thanks for sharing!
- svb_2023 3y agoAnd this is one more: https://github.com/VBAndCs/sVB-Small-Visual-Basic https://github.com/VBAndCs/sVB-Small-Visual-Basic
- pwdisswordfishc 3y agoIs this actually Microsoft-made? Everything about the webpage design screams knock-off.
- hammyhavoc 3y agoIt's made by Microsoft employees. https://github.com/sb https://github.com/sb
- hfkwer 3y agoKind of: https://techcommunity.microsoft.com/t5/small-basic-blog/bg-p/SmallBasic https://techcommunity.microsoft.com/t5/small-basic-blog/bg-p... It was started by MS employees in 2008: https://techcommunity.microsoft.com/t5/small-basic-blog/hello-world/ba-p/335289 https://techcommunity.microsoft.com/t5/small-basic-blog/hell...
- jonplackett 3y agoStill think QBASIC was the perfect way to start coding.
- asjfka 3y agoQBASIC was good to start but you couldn't grow with it. And then the step going to another language is still high. You had lot of fun learning QBASIC, then you hit a wall. Imagine if QBASIC had a CONS datatype. The beginner programmers would have been able to gently learn about a lot of data structures, while QBASIC would have still been QBASIC, only much more powerful.
- rbanffy 3y agoIt was an interesting blend of easy syntax and low-level concepts. GOTOs and GOSUBs, simple operations on primitive types, neatly mapping to the metal underneath. But back then, computers and operating systems were very thin abstraction layers on top of the metal anyway. The current computer is a totally different beast.
- codeflo 3y ago> when you graduate to Visual Basic Please don't. I don't mind Microsoft pushing .NET languages, that's sort of expected, but why VB? Getting started with modern Visual Basic isn't actually all that much easier than with C# -- both target the .NET runtime, and the deeper semantics are actually largely the same. And C# is infinitely more relevant in the job market.
- Kwpolska 3y agoThis is targeted at kids, and VB.NET might be easier for them. Also, in 2008 when this came out, VB.NET might have been more relevant. If you look at the auto-generated VB.NET code, it’s very close to the Small Basic code, with the addition of a variable declaration. This variable is of a magic, SB-specific `Primitive` type that is a string, a decimal, and a dictionary at the same time. Generating it was probably easier than translating to C# and introducing real (static) types.
- gonzo41 3y agoI think you're massively underestimating how much legacy vb6 code out there that is both business essential and poorly understood. There's money to be made for people willing to get in the muk.
- chillbill 3y agoin addition to the comments, you don’t learn to code to get a job necessarily, actually it’s way more common to learn to code and then suddenly find that you can get a job… also language difference is minimal, you need to show that you can learn to get a job, not that you know this specific syntax, eventually everything is obsolete.
- samwillis 3y agoMy first language was VB Script and ASP classic, didn't hurt me. Looking back it's pretty horrendous, but then so was my code. VB.Net lets an amateur achieve something quickly, with a UI! In my oppinion the most important thing a first language needs is very easy and quick UI tools. Prior to ASP/VB(script) I could code html, so it was super quick to get something on screen. Are there flaws with VB, yes, but it's almost the perfect first "proper" language.
- rbanffy 3y agoIt’s fun, but isn’t the effort similar to learn, say, Python, with a lot less market value? If you start from nothing, C can be as easy as BASIC. You can do a lot without ever touching malloc/free.
- hetman 3y agoI doubt that's the case for 8 year olds. C requires a mental model of more hidden abstractions than something like Small Basic (a decent grasp of pointers is kind of non-negotiable). I mean the Array and Stack objects in Small Basic sound like they would be a lot easier to handle for a beginner than anything equivalent in C.
- HeckFeck 3y agoI once explained arrays and frontbuffers/backbuffers to a 9 year old. I can't say that he did anything useful with the knowledge, though he wasn't put to sleep by it and went away knowing a little more on how graphics are done.
- hetman 3y agoThere's quite a bit of a gap between an understanding sufficient to follow someone else's explanation and an understanding sufficient to build something (including learning a rigid syntax understandable to a machine in order to express the concepts).
- pjmlp 3y agoSchool kids aren't thinking of market value, most of them won't even care about programming in a later age.
- svb_2023 3y agoI creeated Small Visual Basic to solve this issue. It's based on SB but more powerful, and it is actually an easy incarnate to the dot net platform, so, actually easier that C and even python and more powerful as it leads to learn a powerful commercial system (VS.NET). https://github.com/VBAndCs/sVB-Small-Visual-Basic https://github.com/VBAndCs/sVB-Small-Visual-Basic
- tpmx 3y agoI quite like this modern reimplemention of GW-BASIC: https://robhagemans.github.io/pcbasic/ https://robhagemans.github.io/pcbasic/
- WillAdams 3y agoThere's an effort at a "Visual" version of this: https://github.com/VBAndCs/sVB-Small-Visual-Basic https://github.com/VBAndCs/sVB-Small-Visual-Basic Which I've been trying to determine if I should try. For a while I thought Livecode (formerly Runtime Revolution), a rebooted HyperCard was going to be a good fit for small, graphical interface projects, but that's not looking so good since they closed the source and changed the license. I'd really like to find something which is as straight-forward to use as Blockly, but which had a stand-along desktop app/IDE.
- WillAdams 3y agoolav mentioned elsethread: >And, of course, https://gpblocks.org/ https://gpblocks.org/ which looks to be exactly what I was looking for.
- svb_2023 3y agoThis is the full reference book of sVB. It contains 750 pages full of info and samples. https://drive.google.com/file/d/1pCnB4_7pEBc_wT2u258MmutYCuXwpvjN https://drive.google.com/file/d/1pCnB4_7pEBc_wT2u258MmutYCuX... sVB is not really small, and it takes SB to a higher level to be a middle stage towards VB.NET and WPF. So, sVB can offer many levels of learning for kids, middle and high school students, and even beginners in collages that don't study programming. I created a series of short videos (10 minutes in avg) to introduce sVB to kids but it is in Arabic. I am not a fluent English speaker, and re-introducing these videos in English will take me too long besides accent issues, so, I hope others can introduce these lessons in English and other languages, with the help of the reference book and the samples folder. https://www.youtube.com/@smallvisualbasic https://www.youtube.com/@smallvisualbasic
- Dalewyn 3y ago>For ages 7 to 107, Small Basic is one of the easiest ways to learn to code. I really miss programmer sense of humor, we used to have more of this back in the day. Everything is so bland and serious now.
- themodelplumber 3y agoSpeaking of Small Basic, I found that SmallBASIC was a really fun discovery: https://github.com/smallbasic/SmallBASIC https://github.com/smallbasic/SmallBASIC There are lots of examples to work from, a very functional Android app, and Linux users can use the AppImage releases to get up and running fast. Back when I was comparing BASIC distros for scripting/programming, this one was by far my favorite for day-to-day use cases. (BTW, does anyone know if the MS Small Basic software runs in Wine?)