Show HN: New visual language for teaching kids to code (pickcode.io)
Pickcode is a new language and editor for getting kids started with coding. The code editing experience is totally structured, where you select choices from menus rather than typing.
I made Pickcode after experiences teaching kids both block coding (Scratch, App Inventor) and Python. To me, block coding is too far removed from regular coding for kids to make the connection. Pickcode provides a much clearer transition path for students to Python/JS/Java. Our target market is middle/early high school kids, and that’s who we’ve tested the product with during development.
On the site, you can do tutorials to make chatbots, animated drawings, and 2D games. We have a full Intro to Pickcode course, as well as an Intro to Python course where you make regular console programs with a regular text editor. There are 30 or so free lessons accessible with an account, and the rest are paywalled for $5/month.
For professional programmers, the editor is probably pretty frustrating to use (no vim keybindings!), but I hope it’s at least interesting to play with from a UI perspective. If you have kids aged 10-14, I’d love any feedback you have from trying it out with them. I love talking to users, reach out at charlie@pickcode.io!
183 comments
[ 4.8 ms ] story [ 246 ms ] threadTangentially, but not so much: I was talking with a 17 yo last weekend. She teached Python herself a couple of years ago and they are teaching it now in her class. She can't understand how her classmates can have difficulties understanding
I asked the value of z to a 30 yo that was listening to the conversation and he first answered 5 + 6, then looked at us, thought again and said 11.The student then told me that some of the other students eventually understood that z takes the value of 11 but their question was "how a machine can do that" and nobody answered to them. I wonder if a little of assembler on a toy CPU could be a better starting point. For example this Machine Code for Kids card game [1] They are selling the cards from the home page of the site (I'm not affiliated with them, I just bought a few decks.)
Or a two bits binary adder with logic gates.
[1] https://punkx.org/4917/guide.html
Do teachers understand coding enough to answer basic questions like that? I'm curious about whether they do.
When you have to correct their code you know their ability.
It wasn’t that hard to learn enough and, given I was cracking writing crack-intros, it has helped me hugely in the modern world. As an example, threading is child’s play because I did VBL interrupts.
However, the institutions today naturally teach something more relevant to getting a job as they did in my day (68k, Turbo Pascal and some C).
I've also had occasional success first convincing them they know how to add "mindlessly", by just manipulating symbols, and then explaining that we can have machines do it mindlessly, too. I don't use those words, ofc.
For example, you might ask them "Imagine you had a younger sibling who couldn't add. Maybe they didn't even know what numbers were. Could you teach them how to add by just telling them what symbols to write down as they looked through the symbols in the addition problem? Maybe there's an index card labeled '6+3' and on it is written '9'. You tell them to look for the correct index card and write down the corresponding symbol."
You can also explain binary to any interested student who is 13+ and then the idea that a machine can do it becomes a lot easier.
This video of Richard Feynman explaining how computers works is very good: https://www.youtube.com/watch?v=EKWGGDXe5MA
He uses a metaphor I've gotten a lot of mileage out of. Imagine you have a clerk who can add and multiply like a regular person. Now imagine there's someone else who knows only how to add and count, but have no idea what multiplication is.
If they can add and count fast enough, it'll look to an outsider like they not only know what multiplication is, but they can do any multiplication problem almost instantly.
Computers are like that: dumb but fast.
If they do something fast enough they give the illusion of "understanding", kind of like movies give the illusion of motion by swapping out still images fast enough.
Because most people are completely illiterate with respect to mathematics. I wouldn't hold high hopes on their ... whatever the opposite of "functional illiteracy" is.
One idea in case you talk to that "17 yo" again. Ask her to ask her classmates to compute "{{2} over {3}} over {4} + {5} over {{6} over {7}} = ?", here's a visual view of this operation with fractions: https://imgur.com/IqhEsmX
I bet the discombobulated by "z = x + y" also get flabbergasted by fractions. If so, it's not they have trouble learning programming. They have trouble learning anything, q.e.d.
sheesh
Maybe, but...
>>The student then told me that some of the other students eventually understood that z takes the value of 11 but their question was "how a machine can do that"
... it's possible their block wasn't math, but they were hung up on the fact that they didn't think a *computer" could do math like that.
> They have trouble learning anything, q.e.d.
I doubt that. There are probably a dozen other more plausible reasons.
If those sorts of people exist then they’d be totally blown away at the capabilities of a pocket calculator.
"... they didn't think a *computer" could do math like that."
Emphasis on "like that" meaning laid out like that. Context can affect people's reasoning. Maybe they've never seen code.
Thanks for sharing the anecdote though. :)
- How does the computer understand that it needs to add
- How can the computer go from these 3 lines of text to "sure, let's add"
- Why does text even mean anything to the computer
- For that matter, sure it can add, but HOW? It's not like it has a pencil and paper.
Because indeed the infrastructure between these 3 lines of text and the addition is not trivial. These are legitimate questions.
I can not imagine that schooling has gone so far backwards with so many advances, or at the least I really hope that it has not. I was not even in advanced math courses and was/am average at best when it comes to math and would have thought the confusion would happen when getting to something like:
where it stops looking like something your entry level high school math class has you doing 30 odd problems a day on.What would happen if you take away the computer and speak strictly in the language of arithmetic? It seems they would have no trouble given the the eventual answer of 11. Perhaps they need to hear that that the computer can automate these operations, how it happens under the hood is a separate question that can be addressed separately. It is a valid question, of course, and perhaps its a sign of fascination. That would be good, but needs to be tempered by patience.
set variable to [value]
change variable by [value]
which imo greatly reduce such ambiguities.
It's probably a better learning experience for kids to be able to get to a point where they can make fun things like games and websites, and then teach them how to improve the correctness of programs.
(Obviously there are some great options for functional creation like elm, but there obviously isnt the same level of available learning resources yet)
As for your more general point: it’s easy to go from functional -> imperative. It’s a lot harder to do the same thing in reverse.
Source: anyone who learned LOGO before BASIC in the 1980s.
I'm a fan of functional programming, but I also sympathize with OP's observation that even python might be too far from the CPU to be a good introduction to computing. It probably depends a lot on the child and the teacher—a functional programming language would probably appeal more to older kids (high school) who are comfortable with math.
[0] https://news.ycombinator.com/item?id=38366268
IMO Python is useful as a didactic tool not so much for teaching kids how computers work as for giving them an emotional experience of "Wow, I can make the computer do things! I'm basically a wizard!" that then might motivate some of them to keep learning about computing.
But yeah, there will also be kids who are already well past that stage and ready for meatier stuff. So probably a combination of approaches is best to provide kids with the level of detail they'll find most engaging.
Anecdotally, I grew up on Logo, Lego Mindstorms, and HTML, and got my early career started in Python before I really dug in and learned about how hardware makes the magic happen because I realized I was going to be handicapped until I knew that.
Trying to please everyone is the road to madness, while acomplishing nothing.
That depends on what one considers to be the best way to introduce computing. I personally think kids are a lot less likely to be engaged by a bottom-up approach (start with "this is what hardware does") than a top-down approach (start with "you can make cool things with it").
https://www.bittwiddlegames.com/lambda-spellcrafting-academy...
The demo is playable in the browser too thanks to Rust + WASM.
Functional programming sits on a difficulty range: spreadsheets on the low-end (debatable but I'll say it!), and on the high-end, well, I think that everything else FP sits there with minor exceptions.
I'm developing a language for numbers that is conceptually closer to spreadsheet formulae than imperative programming or hard-FP, therefore I think hopeful for this kind of task in the long-run. It's "only for numbers", so really think spreadsheet-formula type complexity, but I won't stop anybody from going wild with interpretation.
To see things you pair it with some other language like JS, but code for these "apps" can be simple/declarative and pre-rolled. I have a JS visualization library that will probably be graphical one day.
I'm working on the project website [1]. Following spreadsheet fashion some examples are a little bore, but there is a raycaster rendering to a bar chart and heart shapes, bouncing balls and projectiles, to lighten the mood for early developer-adopters or contributors.
For some more project background: by encapsulating numbers in a language (and not a mad one and one that we can safely and actually run), it can facilitate transparency for numbers. Transparency and education go hand-in-hand. I'm talking about numerical literacy primarily, but I think that too goes hand-in-hand with.. programming on computers.
[1] https://calculang-quarto-site-messing.pages.dev/examples
Personally I wonder what the ultimate goal is. I appreciate furthering education, making connections between different concepts, etc. But starting out with something that is not Python, with the goal of ending up doing Python, seems like a funny way to approach things.
So Pickcode has some value, but not enough that I'm willing to transfer my educational time (and dollars) from other options giving my children the critical thinking skills & love of learning that let them explore and make the connections naturally. Educational materials are in a competitive space!
[1] want to especially mention https://makecode.adafruit.com/, which is really well done as you can even simulate moving the board around to see what accelerometer inputs do in your code.
Another project in this space is Pyret [0]. The Pyret language has been developed with the express intention of taking completely novice programmers, teaching them how to program in a language with reasonable semantics [1], and progressively add language features until they eventually switch to Python. The language is integrated into the DCIC course [2].
The idea of a language that can progressively gain features was (to the best of my knowledge) pioneered by Racket. The idea is that a particular file can be declared at a specific "language level" (I think that's the terminology), which restricts the set of features available to the user. Over the course of the semester, new features can be added as they are taught. The advantage of this approach is that students do not accidentally encounter surprising semantics that they inadvertently internalize to the detriment of their long-term learning.
The Pyret project is actually spearheaded by Shriram Krishnamurthi at Brown University, who was on the original Racket team. His career has focuses on the application of PL theory and tooling to computer science education. One of his most recent publications is particularly interesting with regard to the present topic, which is an experience report detailing what happens when students move from Racket to Pyret and from Pyret to Python [3].
[0] https://pyret.org
[1] While my use of the word "reasonable" is certainly opinionated, what I mean is that Python's semantics are simply unintuitive to many novices. I've forgotten the title of the paper I read that analyzed this, but a related paper is "Python: The Full Monty", which develops a small-step operational semantics for the core Python language. Many of the specific semantics are surprising even to seasoned Python developers! Direct PDF: https://cs.brown.edu/~sk/Publications/Papers/Published/pmmwp...
[2] A Data-Centric Introduction to Computing is a new introductory course at Brown (which is also now being implemented at a few other schools) that seeks to introduce students to computing through tables and data. There's a lot of research backing up the specific methodologies chosen by the authors. https://dcic-world.org
[3] What Happens When Students Switch (Functional) Languages (Experience Report), direct PDF: https://cs.brown.edu/~sk/Publications/Papers/Published/lkft-...
Interesting, I did not know Racket had those connections, although I dabbled with Dr. Racket [1] a while back. It's a pretty fascinating thing to work with, especially from the educational standpoint.
Smalltalk also has ties to education, see Alan Kay's "The Early History of Smalltalk" [2]
Of course when we talk about extensibility in a programming language, I would think early examples are not only Lisp (Racket is a Lisp of course) but also Forth [3].
[1] https://docs.racket-lang.org/drracket/index.html
[2] http://worrydream.com/EarlyHistoryOfSmalltalk/#smalltalkAndC...
[3] http://www.bradrodriguez.com/papers/moving6.htm (this page describes extending the language, but is part of a larger project building a Forth from the ground up...not sure if that counts as extensibility or just a pain point, but regardless building out a Forth seems to be part of the rite of passage, so in my mind that counts as a language that is focused on extensibility. Although not necessarily focused on pedagogy.)
Although the "language levels" I'd mentioned previously are implemented with macros, the underlying concept is a little deeper than that and I don't know of an earlier example of such a system! Certainly the Lisps and Schemes did a lot of macro work, but they did not tailor applications of that work to CS education in the same way (to the best of my admittedly limited knowledge).
1. very visual/non-text (eg: scratch)
2. usability IDE/language tools (what this appears to be)
#1 is fine. But #2, these should be present in software the adults use. But it's not, which is an embarrassing indictment of our approach to computing. The fact that we don't have Victor-esque feedback by default in our IDEs is a blight.
____
Tangent: famously, in the US and much of the western world (for some reason... meaning Disney, mostly), the culture got it into its head that animations are cartoons which are exclusively "for kids", and if you watch animation, you're a kid. But in fact, there's nothing inherent about the medium of animation which necessarily makes it just "for kids", and another culture (Japan) which does not have that cultural assumption got some great art out of it (Anime).
It's weird what we decide is "for kids" and limit ourselves.
Call me old fashioned but I have a hunch that the separated and minimalist approach has value in learning programming. To this day I still find doing things with minimalist tools I am far more productive than my counterparts who hunt and peck through menus and mouse clicks. A big advantage I think it this separation and minimalism primmed my brain to see way to compose tools and ideas instead or relying on what the system tells me I can and cannot do.
I am working on some similar concepts but for music programming:
https://glicol.org
I feel that it would be great if there could be some examples on the landing page directly.
When I try a lesson, I get stuck; The hint is on the right but it's not very obvious; perhaps you can rearrange it like Svelte Tutorial (https://learn.svelte.dev/tutorial/welcome-to-svelte)
for the syntax I am not sure; have you considered using LOGO?
Before I try, before I 'log in', I have no way on the landing page - or navigating around a bit - to find out how much it costs. That knowledge up front would make me as a buyer feel much more trust. To hide that behind UI sign-ups always strikes me as underhanded (forcing someone to invest attention as a sales tactic feels too manipulative to me to consider the service helpful and not a money grab).
Easy fix, just display how much it costs upfront.
I feel like such a mode would be useful for instructors that are working through a problem with their students, ideally without having to go through all the lessons first.
As for students, once they get proficient in a language they'll want to use it to make things -- from what I've seen in other learn-to-code environments kids end up co-opting the later lessons to do so if you don't give a way for them to create new projects.
When we started writing some GDScript he quickly became frustrated by all the typing! His hands are too small to master touch typing. It takes forever to type a variable name + method call + ...
This looks like the perfect balance. Going to check it out!
Might need to get him one for christmas.
https://commons.wikimedia.org/wiki/File:Commodore_PET_keyboa...
https://www.youtube.com/watch?v=2HwmO_GZfzI
Anyway they're fingers can handle normal keyboards super quickly, we could have given him a standard keyboard when he was 2 if there had been a reason.
But whenever I show him "real" programming languages, he's like: I can do all of that with Scratch as well - without having to type all that stuff.
We tried GameMaker and produced some cool results together, but as soon as I turn around, he's back at his Scratch projects.
Sometimes I wonder if it'd have been better had he started with code right away. Like I did back in the days. ;-)
Dear Hacker:
Your son is already doing things kids four years older would be amazed by.
Let him come to "real" programming on his own.
Heck, show him Snap and let him write programs with call/cc in "Scratch". Maybe you can hook him on interesting visual programming projects that require passing around functions as data (like creating a calculator or a model of a computer).
The manual explains how to write an object-oriented system in Snap, so you're really not going to be holding the kid back if you can get him in that way.
The iterated function systems also look cool and can be approached that way. The Beauty and Joy of Computing curriculum has a decently broad and intellectually challenging selection of project that can be done in Snap.
EDIT: I believe Snap can make calls to REST interfaces; you could write the back end and he could do the front end calls and use the data.
I eventually learned html/css which let me build real websites and see them in my browser. At some point you hit a wall with what you can make and are forced to learn js/php/python/etc.
I've been doing super light python lessons with my 3yo and I was wondering why we were moving slower than he seemed capable of in terms of understanding what I was saying but you just made me realize how long it was taking him just to type brackets and quotation marks etc.
I like this project and am looking forward to trying it. I'm starting to adopt a "the more the merrier" mentality with kids programming. Might as well expose them to the dynamic of having a bunch of different languages / workflows to choose from.
why they can't understand "x = 3"?
anyway, heheh, Scratch aims to teach basics concepts of programming to children older than 6 y/o; who knows if Python is easier?
edit: typo... coding =/ programming
in my limited experience basic variable use isn't much of a stretch for a 3yo
Don't you remember reading books as a kid with child characters saying things like "I was pretty good at math class until they started introducing letters to the problems; I don't understand it at all anymore!" Things like that show that variables aren't directly intuitive to all children.
And just pointing out the problem and asking what could be done helped get them on track to think about the issue and ... find several ways that Scratch does allow. Splitting a program into multiple objects / agents for example.
Scratch is way more powerful than first glance or first programs hint at.
I can give you my feedback from when I was 10-11: I was trying to learn RPG Maker 2000 / XP's scripting which was kinda similar to this and got so frustrated by the limitations of the visual editor ( https://steamuserimages-a.akamaihd.net/ugc/27362763067155240... ) that I went straight to learning C and C++, which I pretty much managed to a basic level. trust kids :)
I’m not surprised you moved to C.
(On the other hand, it looks like a super nifty way of having a primitive interpreted language without a parser/lexer)
I feel like visual programming gets a bad rap because of things like this. As an electronic engineer that used to love LabView and life long user of NI Reaktor and Max/MSP, those tools are fantastic if you don’t approach them with an imperative programming mindset.
aha, in the long run I ended up making https://ossia.io which is as VPL as it can get. Yet it still embeds multiple textual languages.
Functional and data-driven / declarative interfaces are only made possible because of the imperative "ugliness" (reality) that supports it.
In order for students to understand computing e2e, they need to understand imperative programming.
In order for students to become capable of designing robust, powerful, and elegant systems, they will need to understand functional/declarative programming.
i=i+1 is just confusing without a good and formal introduction. And once you have that introduction, your most of the way to modelling state in a functional declarative computing model.
I’m a software developer who has assisted my wife’s primary school / kindergarten with programming classes. So somewhat familiar with the problems that exist in this space.
Thanks for sharing
BTW Significant to the ZX81 was the memory saved by storing tokens instead of their text representation. Yes. It had 1k RAM kids - including display memory (no separate GPU). This parsing when entered would also make runtime faster.
Very cool! I wish there were something like this for working adult programmers, a general purpose structured editor for programming languages. When I program the intentions I form are in the first instance semantic (define a function here, check a condition there). Why shouldn't I just directly communicate my semantic intentions to the editor? Why do I have to first serialize my intentions into a string for the editor to then parse, in a error-prone process which introduces the possibility of silly syntactic errors like typos, mismatched brackets, operator precedence errors etc, rather than just semantic incorrectness?
Such an editor wouldn't necessarily have to be keyboard unfriendly any more than Excel is keyboard unfriendly. I guess it could also work something like input method editors for East Asian languages where you type into a "composition window" and make selections from a "candidate window" for insertion.
AIUI, in this case, the major issue is that it is very tempting to try to impose a constraint that all intermediate states the code passes through are semantically valid. However while superficially appealing this turns out to be a crippling constraint. Even the best of us tend to think in somewhat more sloppy terms and then fix up code after the fact, even on a line-by-line basis. Being forced to be completely valid 100% of the time turns out to be a big mismatch. I am inclined to believe this mismatch is fundamental. Only vanishing fractions of a percent of humans, if any, think this way. Even professional mathematicians report that they tend to work this way in practice, in that they tend to leap ahead and then back-fill the rigor, rather than strictly working forward one step at a time, and if even they don't work in this manner, who does?
Programming has settled on semantically-aware autocomplete and suggestions, and that's probably the actual optimum, not just a symptom of some kind of laziness.
It is possible that if somebody really pushed through the development that the problems are solvable, but I'd advise anyone taking it on that if there's any fruit here, and there may well be, it is not low hanging.
As saurik mentioned, the Lisp world through emacs is the closest you can get to this, but again AIUI you can still do anything you want, it's just that you have a lot of tools that encourage "more" semanticness, not that it is enforced absolutely rigidly.
BTW: could provide valid options (perhaps highlighted), not constraints. (...maybe been thought of already)
This really isn't much of an issue in a language with holes as a first class concept, like Agda or Haskell.
Blythe Omnis 7 in ... (checks CV/resume) ...1996 (and earlier), a 'RAD' platform/solution that worked across Windows and Macintosh... (I landed the job because I was the ONLY candidate who had even heard of this software, because I read a short article in a magazine once...)
https://en.wikipedia.org/wiki/Omnis_Studio
Clicking to program with drop-down lists (and popups) just wasn't all that well thought out. So - you would see your program as a listing. When you tried to edit a line, it would popup a modal dialog box, where you could edit... just that one line... Intellisense/code-completion were of course non-existent... ahahahahaha (laughs maniacally)
Man, I think my PTSD is kicking in, I need a drink/smoke or something.
All programming is real programming and this encourages throwing shade on languages and people that are not deemed "real".
One thing I noticed, when I did the rectangle demo, I’d click on the “123” to input a number, but my phone showed the full keyboard, would be nice if it defaulted to numbers for that. (Obvs it’s not designed for a phone but I assume the same on a tablet?)
Overall it fells like this feels like worse parts of both sides: syntax errors of traditional plaintext code editing, and constrained editing ability of structured code editing.
> For professional programmers, the editor is probably pretty frustrating to use (no vim keybindings!)
It is not the lack of vim keybindings that's causing frustration, it's the lack of almost any keyboard input or ability to type in if you know what you are trying to enter and being forced to search for operators within tiny scrollable 3x3 grid. Either the editing should be a lot more constrained with clearly displayed placeholder slots like it is in scratch, or the editor should allow typing in expressions using keyboard.
Consider that the goal of project is helping transitioning from block editing to more practically used programming languages -> I would suggest exploring the second approach. Keep the current menu input method, but when a user presses a key insert or start editing appropriate type token. That is if the expression insertion menu is open and user presses a number key just start editing a number, they would have to use keyboard for entering it anyway if they clicked on number input button in the dropdown. Similar if you press + key, and + is token that's currently available in the insertion dropdown just insert '+'.
Other pain point was editing. At statement level I would say it's reasonable, but expression level any editing felt miserable. In some cases it felt like simplest way of editing is erasing everything, in other moments it felt like some kind of bad Levenshtein distance code golfing. Lets say you have expression `a+b` and you later decide to change it to `(a+b)*c`. Your options are either erase everything and rewrite from scratch or insert '()' before a+b, insert '()' after a+b, erase ) from first parentheses pair, erase ( from second parentheses pair, add * and c. Neither plaintext editing nor good block based code editing have this problem. Also you can't select and copy or move anything except whole statements.
Overall with exception of top level statements, it hardly enforces any structure of code and you can enter almost arbitrary sequence of expression tokens forming an invalid expression.That kind of defeats the point of having somewhat structured non typing based input.
Bug: In chromium the insertion dropdown shows 3x3 grid, but scrolling with mousewheel scrolls by 4 lines. Meaning you can't easily select anything from 4th row like '*'. Can't you just show all the operators? Even on mobile phone there should be enough space to show 3x9 or 5x5 grid.
Bug2: drag and dropping an if statement inside itself caused the page to hangup. Infinite loop? While dragging a statement with nested statements like if or while should highlight the whole block not just the first line.
Re: the fact that syntax errors are possible: it is really really hard to make an editor where invalid states are impossible while trying to make expressions easy to enter. Scratch and other block languages do this by forcing you to write code in prefix order. I want to PLUS 2 and 3, vs in Pickcode where you write 2 + 3, and the expression is in an invalid state before you enter the 3. Rewriting 2 + 3 to 2 + (2 + 1) is really hard when you have to think in prefix notation. One advantage that we have is when there are syntax errors, they are necessarily at the expression level, so in the worst case the student can just scrap the line and start over, vs in plain text where the error message for a mismatched paren could land lines later.
For example in LOGO, you’d just write
In comparison, seems excessive and noisy.Even though technically we could make forward() a method at the top level in the context of a paint program, we chose to make things more OOPy to prepare them for later when students get to the 2D game engine and there can be multiple sprites to control.
Edit: well actually, I want a whole development studio like this for professional development. You are the closest of anything else to my vague idea of what programming should look like. I feel bad for the kids who later will have to move from this to what we call "our software development stacks".
:= is Algol's. Algol had a much bigger European influence than American, and other euro languages like Pascal followed its traditions
TCL ftw!
Python also comes with an implementation: https://docs.python.org/3/library/turtle.html
I agree that the paint prefix doesn’t quite match that conception.
N.B.: I'm using one-based indexing for my links here because that's apparently what early BASICs used [2] :)
[1] https://picaxe.com/basic-commands/program-flow-control/gosub...
[2] https://alandix.com/blog/2021/07/27/a-brief-history-of-array...
I remember that when I had to enter code printed in magazines/books it always seemed the Spectrum was the one that required that particular modification.
(Usually there would be a BASIC listing with modifications for C64, BBC, Spectrum, and other systems. "On line 30 add LET", etc.)
</s>
Totally agree, it was my first thought too on call/var nonsense.
Will give this a whirl with my girls, who are a little bit younger than your target market, and will flick you through any useful feedback.