Show HN: I built a programming language for beginners
dip-lang.org
dip-lang.org
Turtle graphics helps people deconstruct problems into smaller parts - the essence of programming - and abstract over your solutions to solve more general problems. As a second step I use some IoT board with Scratch so people can turn on LEDs or react to sound which makes them motivated.
My first teaching 20y ago was with Java and it was a disaster. People struggled with the tool, syntax errors, semantics, braces and in the end could write some Java programs but did not understand what programming was about and could not solve their own problems.
+ Several submissions on one day.
I'm not a beginner, so maybe I'm wrong here, but it doesn't look that much simpler than python to me.
In particular, I think “The above line is Dip's way of letting you know that you've created a function called greet” moves too fast, even if your beginners have math training. It likely won’t be clear to beginners that this is similar to functions in mathematics, and it introduces too many new things (what’s that -> about? What is print?)
I would teach users about variable assignment and reassignment (assuming those can be done from the REPL, but if they can’t, fix that first) before introducing functions. That way, you can introduce functions as helping against having to repeatedly type the same characters.
You probably can find a way to introduce print before functions, too (e.g. as a way to show multiple items on a single line)
The suggestion to sit with absolute beginners going through the tutorial is great. I expect it would uncover tripping points you aren’t aware of.
Edit: I also think using a calculator as the example program isn’t a good choice. New users already have a better calculator the moment they start the REPL.
I have seen "start coding in a day" courses, that used Python (a robust language) to teach complete beginners from scratch.
In fact, I once attended a demo of a scholastic programming courseware app that had most of the people in the room (primarily K-12 teachers in their 30s) doing "Hello World" Python apps in about fifteen minutes, and understanding what they did, in about half an hour.
It was all in the presenter and the design of the site.
I have no idea if the app ever took off. That was about three years ago.
That program teaches variable assignment, loops, conditionals, mathematical comparisons, input and output. It teaches the difference between numbers and strings too. But it’s also a short program, fun to play, and easy enough for people to hack so they can alter stuff on there to subtly change its behaviour (eg the messages printed to screen, the range of numbers randomly generated, etc).
I’ve had good success using that program for a range of different age groups and capabilities.
Edit: just to add, we would cover the basics about variables etc first before moving on to that game. But that would be the first “useful” program they’d write.
I'd gently suggest having a bit more explanation as to things like syntax and whatnot, on the front page (I had to dig into the documentation to find it), but I am an experienced programmer, so what I want may not actually be good for the project.
What really started it for me, was a HeathKit (remember them) programmable calculator that I brought in the 1970s.
So now, I (re)introduce you to Dip, a small project I’ve been working on, which also happens to be a programming language targeting beginners. I’ve tried to make the syntax easy to understand, and also tried to make the language easy to read and write for complete beginners. I've tried to eliminate a few issues the Python language has (such as indentation and error messages), though it is up to you to see to what extent Dip succeeds. I’ve also tried to allow Dip to communicate with Python, so users are not limited to Dip’s features, because the way I see it, Dip is not meant to compete with Python, and does not aim to, but I think Dip’s simpler syntax and error messages might be useful to beginners in some cases and get them up the learning ladder, and I would love to see Dip being used as a stepping stone by the Python community, learning the ropes using Dip, and then moving on to Python.
You can look at Dip’s website at dip-lang.org.
I would love your feedback on how I could improve the language.
Also, if you wish to contribute to this small venture of mine, feel free to help me with the core language or the site on Github.
Here you go: https://github.com/raghavnautiyal/Dip/
I also disagree with the assumption that your own language makes it easier to understand the concepts of syntax.
If it's just JS and people can watch a video about "what does let do in javascript" on YouTube or google "what's a loop in javascript" that makes it easier to understand these basic concepts if you have access to a big variety of explaining the same thing from various angles. I don't think having a "fake" language to learn it is making it any easier. There's a reason people learn JS or Python in school where there's also a lot of editors / resources that can be used even if they are curated in a way to help a total beginner.
Presenting a FUNCTION to a beginner IS overwhelming (even tho you wouldn't feel overwhelmed as an avid developer).
Advice: Sit down with actual beginners and watch them trying to start a project using dip language. you'll learn so much about how far away from 'beginner friendly' you are (from a practical pov) :(
What true beginner programmer is even going to know what this means?