11 comments

  • aspizu 1 hour ago
    Scratch is how I first learned programming. I was building increasingly ambitious projects in it, and at some point the editor itself became the main thing I was fighting. Once a project got to around 10,000 blocks, it could get painfully laggy, and I ended up spending a lot of time engineering around Scratch's limits.

    That is what eventually led me to build goboscript: https://github.com/aspizu/goboscript

    I'm one of the programmers who owe their career to Scratch, this year, I joined https://ente.com as a software engineer. Scratch taught me how to code, and perhaps a bit of real-world engineering indirectly.

    • varun_ch 1 hour ago
      same here! I got into Scratch at the age of 7 and without it (and the Scratch community), I wouldn’t have any career (or even a plan for one). I also worked as an intern on the Scratch team at the Scratch Foundation.

      I also know that one of the important developers for the Asahi Linux drivers also started on Scratch. I think there’s a lot of real software engineers who started on Scratch (and the Scratch community, which is often overlooked)

  • sinuhe69 3 hours ago
    Snap is designed to be more expressive and powerful than Scratch. But I find debugging them is very painful. Changing the name of a variable or block for example, could create “holes” in the calling sites but the system can or cannot report an error and fails silently. Snap is IMO more flaky and the team seems more eager to add features than polish the existing ones or make the system mor robust and stable.
    • Xirdus 1 hour ago
      > Changing the name of a variable or block for example, could create “holes” in the calling sites

      WTF. Isn't the whole point of visual programming that you are NOT bound by the limitations of text as a medium? A block refers to a specific variable. It shouldn't matter what it's called, it shouldn't matter if what it's called changes, it should still refer to the same variable even after renames.

      • gs17 1 hour ago
        That one is a bit more defensible for variables, when you rename variables, it gives you "rename" or "rename all". "rename" renames the variable, leaving uses of it the same, "rename all" also renames where you used it. Deleting a variable leaves the blocks that references it in place but they'll throw an error if called (IIRC this is useful if you wanted to switch from a global to local variable or vice versa).

        Now, custom blocks have a different issue, where deleting one just severs any code that was using it (so if you had some custom blocks in a program: [on start] -> a -> b -> c, deleting the definition for b will mean c no longer gets called). There's now a block to delete custom blocks, so you can make self-destructing code.

    • gs17 1 hour ago
      They've fixed surprisingly many of the quirks, but my biggest gripe with Snap is that they don't like to add documentation with new features. A lot of the older content has a nice "help..." context menu option with a description of what it does (which is often out of date itself, e.g. the "split" and "join" by blocks feature isn't shown on those blocks), and newer blocks have the context menu option... but nothing pops up.
  • Dwedit 1 hour ago
    Any name that you can't type is going to be a problem.
    • gs17 1 hour ago
      That's more of a problem in text-based coding. One of the things I genuinely like about Snap (well, in my case NetsBlox, which is a fork of it) is the ability to have spaces and weird characters in a variable name.

      Edit: Oh, you meant the lambda in the post title? It's not really part of the name, but you can at least type it into Snap itself.

    • Jtsummers 1 hour ago
      > Any name that you can't type is going to be a problem.

      Fortunately the name is Snap! so typing it isn't much of a problem. (With the !, which was stripped from the submission title and when most people write about it.)

      • jayknight 1 hour ago
        The logo has a lambda in front, and I assume that's where the "Λ" came from in the title of the post. But I don't see it in any of the text on their site.
        • Jtsummers 1 hour ago
          Correct, it's not part of the name, which is just "Snap!".
  • andrewla 3 hours ago
    I don't love graphical programming environments like this and Scratch and I can't quite put my finger on why I find them so unattractive.

    A big part of it is that you can, to some degree, learn programming from this. But you absolutely cannot learn software engineering from this.

    • lubujackson 1 hour ago
      I would love to see the opposite emerge, a programming environment focused on teaching architecture, security, separation of concerns, etc. All while letting LLMs deal with the fussy programming bits.

      The script is already flipping, with kids making software using AI but they can only fumble forward inch by inch while burning tokens. It would be great to introduce programming in the way it functions in the workplace - we want to make a Mario clone, start with the goal, hammer out the elements to a certain fidelity then let the AI cook.

      • diskzero 1 hour ago
        This would be so exciting. The implementation language would be less of a concern, but it worth wondering about... Would you use Rust, Racket, Lisp, Clojure, etc? I had a lot of fun teaching adults to program using DrRacket and didn't focus on the language as much as the concepts you mentioned above. They ended up being easily able to move to Javascript, Swift, and others at the end of the course.
    • JoeOfTexas 1 hour ago
      LEGO created NXT-G for programming their Mindstorm NXT. It has since, in my opinion, been the best graphical programming I've seen to date.

      It did have a slight learning curve, but 5th graders were competing just fine against high schoolers haha.

    • alanbernstein 2 hours ago
      If you appreciate when keyboard interaction gets added to a GUI, then you might think of a graphical language as the opposite, as it essentially removes keyboard interaction from what is normally a text-based system.
      • gs17 1 hour ago
        Snap does have a limited keyboard mode (shift click), but it's not really as good as "real" IDE.
    • crushinator 2 hours ago
      You also can't learn to be a great novelist from the alphabet song, but it has its place!
    • poly2it 1 hour ago
      I learned to program from block programming, starting out when I was 12. I'm now a full-time developer and funded startup founder. You absolutely can learn complex concepts from simple primitives, and there is a large underground community pushing the limits of languages like Scratch. See for example Linux running on RISC-V running on Scratch:

      https://turbowarp.org/1201938491

      • DrewADesign 18 minutes ago
        In my experience, there’s no better way to learn more complex programming techniques or tools than running into a brick wall with the simple tools you’re familiar with, spending a ton of time on an unreasonably irritating solution, only to realize that you’re running into a classic [n] problem and some clever person figured out a simple logical trick to address it. I mean, it can be enraging but that knowledge tends to stick.

        Though I doubt that happens much anymore.

    • jonplackett 2 hours ago
      I have the same gripe and I think it’s just simply that when you are used to being able to just write code, everything else feels like it’s in the way.

      Visual coding is a pain to change and move around quickly. It’s just clutter ultimately - if you know how to actually code.

    • lern_too_spel 2 hours ago
      This supports making your own higher order functions. You absolutely can learn software engineering from this. What you can't do is get syntax errors, which makes teaching a classroom of kids by yourself intractable.
    • r_lee 3 hours ago
      from someone who can remember how they even got into programming:

      it's because this is BS and just a toy, it's got no connection to the real world.

      from the angle of someone trying to make some toy to teach programming, maybe in their head it's like: oh this is so simple and easy it should work perfectly for teaching

      but from my experience, most of my learning came from "whats this?" "how do i make a thing like this?"

      this doesn't provide a way to accomplish that or to promote curiosity

      I think same applies to basic CS courses teaching bits and bytes, it's not really useful to know what bits and bytes are if you don't understand what they're even used for or why you should know what they are

      however, this is just my subjective point of view, maybe it differs for others.

  • stymaar 3 hours ago
    For those wondering the difference with scratch, it's on the about page:

    > About Snap!

    > Snap! (formerly BYOB) is a visual, drag-and-drop programming language. It is an extended reimplementation of Scratch (a project of the Lifelong Kindergarten Group at the MIT Media Lab) that allows you to Build Your Own Blocks. It also features first class[1] lists, first class procedures, and first class continuations[2]. These added capabilities make it suitable for a serious introduction to computer science for high school or college students.

    • biofox 3 hours ago
      Scratch already allows you to create custom Blocks and features lists. This seems like a perfect example of reinventing the wheel (and fragmenting development communities).
      • striking 3 hours ago
        Snap implemented these features and others long before Scratch had. To my memory it might have been a decade earlier.
      • DonHopkins 3 hours ago
        Actually there is a large historical overlap between the two communities -- warm, collaborative, always giving credit where due. Different goals, lots of feedback both ways.

        Jens Mönig was on the Scratch Team (invited by Mitch Resnick). BYOB was presented at Scratch@MIT 2010 explicitly to merge ideas back into Scratch, not to fork the community:

        https://scratched.gse.harvard.edu/resources/announcing-byob2...

        Berkeley has kept showing up at Scratch conferences (Amsterdam 2015, Bordeaux 2017), and the Scratch forums hosted BYOB/Snap! discussion for years:

        https://scratch.mit.edu/discuss/topic/4455/

        So "NIH syndrome," "reinventing the wheel," and "fragmenting the community" is pretty much the opposite of how these two actually interact.

        Documented cross-pollination:

        BYOB => Scratch: custom blocks (Scratch 2.0 took command blocks only, not reporters/lambda). That was an explicit goal:

        https://en.scratch-wiki.info/wiki/Snap!

        Scratch => Snap!: browser rewrite timing influenced by Scratch 2.0 plans; Morphic via John Maloney; CC-licensed costumes/sounds used under license.

        Shared people: Jens (Scratch Team => Snap! lead), John Maloney (Scratch/Morphic; GP session with Jens at Scratch2015AMS), Bernat Romagosa (Snap!, MicroBlocks, Snap4Arduino -- Bordeaux, Snap!Cons).

  • jc4p 3 hours ago
    I've been spending a lot of time with my nephews working on Scratch and Snap.

    They also attend local classes and their teachers switched from Snap to this which is way simpler and stickier with my nephews: https://www.microsoft.com/en-us/makecode

    • crushinator 2 hours ago
      Yeah, my nephew loved scratch but he's endlessly devoted to make code. I got him a little Gameboy thing that can play the games he builds, and he keeps sending me games of his and then mercilessly mocking me for not being good at them :(

      A couple years ago I went through Flexbox Froggy with him out of curiosity, and the really interesting thing was that he was able to complete all the levels but only by dictating to me what to write, because his eye hand coordination wasn't yet up to the task of typing. He has a laptop now and he's getting better but his fingers just don't work very quickly and accurately yet. It's such an interesting thing developmentally that the visual coding approach is helpful for.

      • dr_kiszonka 2 hours ago
        What device did you get your nephew? When I was looking for one, those listed on the Make Code website were pretty bad and expensive (or unavailable). I would love to find an affordable retro handheld like Miyoo or Anbernic with Make Code support.
        • crushinator 2 hours ago
          I got the Elecfreaks Retro Arcade for Education, I'm sure it's not as bulletproof as an actual Gameboy so he uses it with his parents around rather than taking it everywhere with him, but it works!
      • corysama 1 hour ago
        Roughly how old was your nephew when he started using MakeCode?
        • crushinator 1 minute ago
          I think four for scratch junior with help, and then make code at six? He wasn't able to use either of them independently at first, it's a learning process.

          But it's different for every kid! He was a very early reader and he's autistic, one of the markers of his presentation of which is being ahead of some developmental benchmarks and behind on others. If you have the resources, those kids coding clubs are all over these days and they do a great job of making it a fun, social activity for a certain type of dorky kid.

  • anguishe 3 hours ago
    Nice! I did a few chapters of this when I was learning.

    I'll have to add it to my list to go and check out any new updates/features they have.

    I can NOT wait to get my little one into something like this!

  • smlacy 3 hours ago
    I guess universities suffer from NIH-syndrome just as much as big tech does.
  • k2xl 2 hours ago
    Question (serious) - Why teach kids programming anymore?
    • utopiah 1 hour ago
      The same reasons we keep on teaching kids to read, write, do math, sketch, take photos, etc ... because it is fun, empowering and important.

      Most of them will never become professional actors, authors, mathematicians, artists, photographers, etc ... and yet they will rely on those skills, on their own or combined, pretty much every single day of their lives.

    • jayknight 1 hour ago
      Why build pine wood derby cars? Why paint pictures? Or take photographs? Why memorize poetry? Why build things with Legos?

      Because it makes your brain think through problems, breaking them down to the point you can build a solution from the smallest pieces. AI may be a big part of the future, but we need to maintain our own human creativity and problem solving skills, and learning the tools that are available will help us to build and create useful things throughout our lives.

    • SamBam 1 hour ago
      I'm a software engineer turned public middle school science teacher.

      At the moment, I would never encourage any of my students to go into software engineering. It seems to me that's rapidly becoming a field where a small competitive handful will be making millions and everyone else will be unemployed.

      That said, I have no problem teaching some programming. We're going to be making autonomous greenhouses soon, with windows that open or whatever, and they'll be using Scratch to program their micro:bits.

      Anything that empowers you to do stuff is a good thing.

    • bigfishrunning 1 hour ago
      Programming encourages analytical thinking, and also if no-one learns to program it'll become magic, and that'll be a major societal step back.
    • elviejo 1 hour ago
      Why do we teach them to add and multiply we have calculators?

      Why do we teach them to read, we have text to voice?

      Why do we teach them to broom, we have Roombas?

      Why do we teach them to do the dishes, we have dish-washers?

      </sarcasm>

    • vatsachak 1 hour ago
      Because programming is fun
  • chrisjj 2 hours ago
    > inviting

    My first attempt to place a statement (play sound at Hz) failed with a Type Error.

    Android Chrome.

    • gs17 1 hour ago
      It's an odd quirk of Snap that they never cleaned up. Some blocks have a "friendly" error message. Delete a variable and uses of it get "Hmmm... a variable of name 'name' does not exist in this context". That one just regurgitates the JS error when it should say "You need to add and select a sound to play a sound".
  • DonHopkins 2 hours ago
    https://news.ycombinator.com/item?id=38016554

    [...] I'm also a huge fan of Snap!, which has all the advantages of Logo (Lisp without parenthesis) and Scratch / eToys / Squeak / App Inventor family of block based visual programming languages, but all the power of Scheme.

    If you know Scheme, then it's easy to think about Snap!: it's just Scheme with a visual block syntax, but with some functions renamed to make them easier to learn, plus all the stage and turtle graphics stuff from Scratch, running in a web browser!

    I didn't realize until watching in amazement as Jens Mönig used his own creation, that it also has full keyboard support, so you can create and edit programs without using the mouse!

    It's much easier to teach Scheme to kids by teaching them Snap!, because the user interface is so much better than a text editor.

    I attended Snap!Con2023 in Barcelona recently, and we discussed some interesting possible extensions to Snap:

    Grammar defining blocks. Right now you can create your own custom vocabularies of blocks that fit together in particular constrained ways, by writing JavaScript Snap! extensions. Develop a set of blocks for visually defining new grammars and vocabularies of custom parameterizable blocks.

    For example, a grammar for representing plants with seeds, roots, stems, leaves, flowers, petals, etc. You can assemble and edit them manually by dragging and dropping from a palette, or write programs that generated and interpret and transform them, and pass them around as data, for example as instructions to the embroidery machine to sew, or logo turtle to draw.

    Turtlestitch - Coded Embroidery:

    https://www.turtlestitch.org/page/about

    Ken Kahn led a discussion about integrating LLMs like ChatGPT with Snap!. He's the developer of eCraft2Learn for teaching kids AI programming. Ken recently made some cool Snap! extensions for integrating LLMs with the speech synthesis and recognition system, and orchestrating conversations between different characters.

    Snap!Con2023: Creative uses of Snap! blocks using large language models like GPT:

    https://www.youtube.com/watch?v=d2rNGsbzkXI

    Enabling children and beginning programmers to build AI programs:

    https://ecraft2learn.github.io/ai/

    But when it comes to LLMs, code generation, and code understanding, JavaScript has two huge insurmountable advantages over Snap! or any other block based visual programming languages:

    1) First of all it's extremely well known, by both humans and LLMs.

    2) And second of all, there's typically no efficient and faithful way to textually represent block based programs in a way that ChatGPT (or humans) can easily understand and generate.

    Of course you could just dump out the XML or JSON save file, but that wastes your token budget, and doesn't work well, because the LLM doesn't inherently understand the syntax and semantics of save files the way it deeply groks JavaScript.

    You need to define some equivalent text based language to serialize and deserialize your visual programs, or define some equivalency to an existing language, so you can translate back and forth without loss.

    Like Relax/NG has an XML syntax and also a simple concise human readable syntax, both which can express the same things.

    But no matter what equivalent language you come up with to serialize your block programs into, it'll never be as well known as JavaScript (unless it IS JavaScript).

    I think Snap! could take advantage of its equivalency with Scheme, and you could just parse Scheme into Snap! blocks, and the other way around. And ChatGPT knows scheme pretty well, though it's not as ubiquitous and standard as JavaScript.

    Logo would not be as good as Scheme, since it has ambiguities, because you need to know the number of parameters a function uses in order to parse it, since it's essentially Lisp without parens. [...]