Show HN: Futurecoder – A free interactive Python course for coding beginners (futurecoder.io)
- 100% free and open source (https://github.com/alexmojaki/futurecoder), no ads or paid content.
- No account required at any point. You can start instantly. (You can create an account if you want to save your progress online and across devices. Your email is only used for password resets)
- 3 integrated debuggers can be started with one click to show what your code is doing in different ways.
- Enhanced tracebacks make errors easy to understand.
- Useful for anyone: You can have the above without having to look at the course. IDE mode (https://futurecoder.io/course/#ide) gives you an instant scratchpad to write and debug code similar to repl.it.
- Completely interactive course: run code at every step which is checked automatically, keeping you engaged and learning by doing.
- Every exercise has many small optional hints to give you just the information you need to figure it out and no more.
- When the hints run out and you're still stuck, there are 2 ways to gradually reveal a solution so you can still apply your mind and make progress.
- Advice for common mistakes: customised linting for beginners and exercise-specific checks to keep you on track.
- Construct a question that will be well-received on sites like StackOverflow: https://futurecoder.io/course/#question
- Also available in French (https://fr.futurecoder.io/), Tamil (https://ta.futurecoder.io/), and Spanish (https://es-latam.futurecoder.io/). Note that these translations are slightly behind the English version, so the sites themselves are too as a result. If you're interested, help with translation would be greatly appreciated! Translation to Chinese and Portuguese is also half complete, and any other languages are welcome.
- Runs in the browser using Pyodide (https://pyodide.org/). No servers. Stores user data in firebase.
- Progressive Web App (PWA) that can be installed from the browser and used offline.
-----------
A frequent question is how does futurecoder compare to Codecademy? Codeacademy has some drawbacks:
- No interactive shell/REPL/console
- No debuggers
- Basic error tracebacks not suitable for beginners
- No stdin, i.e. no input() so you can't write interactive programs, and no pdb.
- No gradual guidance when you're stuck. You can get one big hint, then the full solution in one go. This is not effective for learners having difficulty.
- Still on Python 3.6 (futurecoder is on 3.10)
I am obviously biased, but I truly believe futurecoder is the best resource for adult beginners. The focus on debugging tools, improved error messages, and hints empowers learners to tackle carefully balanced challenges. The experience of learning feels totally different from other courses, which is why I claim that if someone wants to start learning how to code, futurecoder is the best recommendation you can make.
84 comments
[ 3.4 ms ] story [ 160 ms ] threadI'm introducing my 8yo daughter to programming at the moment, she is beginning to play around with Scratch. I'm keeping my eye out some something closer to proper coding though. I think this may be a little too far at the moment, but I may try her out on it with me sitting next to her and see how she gets on!
Is there any way for users to construct their own multiple stage tutorials? (It looks like we can do single questions)
Currently you have the console output, have you considered having a canvas/bitmap output that could be targeted with the various Python drawing and image manipulation apis?
Incredibly generous of you to make it open source!
https://hedy.org/
It's gradual (starts easy but limited, then with progress through levels gets more precise and powerful), and I read that it gets to full blown Python programming.
Theres an excellent talk on the approach by the author:
https://m.youtube.com/watch?v=fmF7HpU_-9k
Edit: +Hedy is designed with kids in mind, as opposed to adults, which I believe future coder and others are more targeted to.
Yes, Future Coder is clearly aimed at adults or older teenagers, and looks really good for them. That was mostly the point of my question about user created tutorials. Using the current tutorial as a basis, but simplifying the language and some of the conceptual stuff would make something that could work for younger kids.
This might work to an extent, but I think it makes more sense to choose a resource that's actually targeted at kids so that it's holistically and fundamentally designed to be the best thing possible for kids. That means features like simplifying the language itself (like Hedy or Scratch) or a game like https://codecombat.com/ to make it fun.
I really hope some kind of GUI to do that can exist one day, but it's definitely a complicated feature that I'd need help from contributors to build. Same for graphical output.
> (It looks like we can do single questions)
I think you're talking about the question wizard. That's for helping people to write good quality questions about their own struggles to post on StackOverflow and similar sites. It's not for making 'challenges' for others to solve.
> Incredibly generous of you to make it open source!
Thank you! I'm really trying to improve the state of education and make the world a better place. I hope that in addition to directly helping users, I can inspire other educators, raise the bar, and help them build similar products. To this end, futurecoder is powered by many open source libraries that I've created which are designed to also be useful in their own right:
Debuggers: these are integrated in the site but also usable in any environment:
- https://github.com/alexmojaki/birdseye
- https://github.com/alexmojaki/snoop
- https://github.com/alexmojaki/cheap_repr (not a debugger, but used by the above two as well as directly by futurecoder)
Tracebacks:
- https://github.com/alexmojaki/stack_data (this is also what powers the new IPython tracebacks)
- https://github.com/alexmojaki/executing (allows highlighting the exact spot where the error occurred, but also enables loads of other magical applications)
- https://github.com/alexmojaki/pure_eval
You can see a nicer presentation (with pictures) of the above as well as other projects of mine on my profile https://github.com/alexmojaki
Libraries which I specifically extracted from futurecoder to help build another similar educational site https://papyros.dodona.be/?locale=en (which does have a canvas output, at least for matplotlib):
- https://github.com/alexmojaki/sync-message (allows synchronous communication with web workers to make input() work properly)
- https://github.com/alexmojaki/comsync
- https://github.com/alexmojaki/pyodide-worker-runner
- https://github.com/alexmojaki/python_runner
But this is just codemirror + pyodide, I'm still building the rest of it.
Also looked at codesters. quobit/awesome-python-in-education: https://github.com/quobit/awesome-python-in-education
Looks like `Ctrl-Enter` works, just like jupyter/vscode.
iodide-project/iodide > "Compatibility with 'percent' notebook format" which works with VScode, Spyder, pycharm, https://github.com/iodide-project/iodide/issues/2942:
Does it work offline? jupyterlite/jupyterlite "Offline PWA access" https://github.com/jupyterlite/jupyterlite/issues/941This is one of the things I regret with how math is taught in France: it stresses way too much the formal part and this is terrifying for children (and teens and everyone except mathematicians).
We have a religious reverence to maths in France. It is better now but used to be simply ridiculous. Unfortunately it still means that some more advanced topics such as derivatives are introduced through definitions (the chapter starts with "be a function f(x) with x in the domain of real numbers, a derivative is a function such that f'(x) = lim h→0 ...").
My son came to me with a WTF? I told him about average velocity transitioning to instant velocity by reducing dt, or about acceleration - and finished by showing that a derivative is a function factory (a function gets in, a completely different, unrelated function goes out). He was then ready for the definition.
Same with physics which is tainted by chemistry, with terminally boring topics introduced first. No wonder that we have less and less STEM students.
I love maths myself but I've made a strong effort to avoid maths in examples/exercises so that the course is approachable to students who don't like maths. The first page is a special exception as it lets users immediately try something familiar (like 1+2) without needing to introduce strings or any other new concepts.
It was an unrelated comment that popped up in my head when reading "my 8 years old daughter is learning to code". And it was a "yay!" - because programming helps with math concepts afterward.
I am not a mathematician (PhD in physics, long time forgotten) so I see maths as a useful toolbox to solve problems I can describe. Some of the tools are wonderful and I dream of them at night (analysis, mostly), and some are blobs I poke with a stick when I have to (algebra, geometry mostly).
The 'NSI' option in high school is a new one, and one of the modern ones. It is useful later (no matter where you actaully study) so I am glad that someone at the ministry is using futurecoder as a reference. When Python was introduced a few years ago, it was done in the typical "let's put some boring theory first to make them hate us" fashion and it is wonderful this is changing.
Thank you! I don't think you were unclear and I didn't read any criticism in your comment, I'm not sure why you thought I did. I was just sharing and adding to the conversation.
I told my children this is something you put data in , it does some magic, and your get some data out. I started with some built-in functions (or functions I wrote and hide) so that they understand the mechanics.
Then they finally asked "can I do my own function?" and, bam, there we were :)
Removing the ceremonial of mathematical correctness helped a lot.
This is also the reason I am sad we do not give children half- (or 3/4-) lies: we tell them something more or less correct so that they can play with it (making sure they do not stumble upon edge cases) and then refine their knowledge.
This is what my math prof on my 3rd year of physics did: he said "I will give you a neat trick I will not explain because it will be super useful to you now. Next year, when you understand it, it won't be of any practical use anymore". I was not traumatized.
It’s frame based editing (draggable statements, free form expressions), and you can do turtle graphics and chatbots. I have 4 free tutorials online, if you want more you can email me, my address is in my bio on here
Its not technically "writing" actual code but given the fact your Shortcut is almost a program or at least a high-level function and that you can combine them to execute more complex tasks, its fantastic for promoting algorithmic thinking and does so in a visually-compelling colorful way.
(Also as I understand it, it can be hard or impossible to contribute works to the public domain before automatic copyright terms expire in some countries, and that is the justification for CC0.)
Which is true, but not spelt out clearly by breck, and it's kind of annoying for it to be phrased by breck in a way that leaves unclear whether it's merely a semantic nitpick or an actual suggestion that the author should've done something more to waive rights over the work. (I don't think it's the latter; I'm unaware of anything more the OP could do to "fix" this "problem" other than kill himself, and I'm not certain if even that would be sufficient in all jurisdictions.)
What intentions are left for Breck? Straight up plagiarize into a new website called futurecoders.io? Does he want to humiliate? Mutilate? I don't know what Breck's point is.
This version is meant for maximum user privacy. firebase has been disabled completely so you can't sign up or login and nothing is stored online. There's also no google analytics.
The code is in https://forge.aeif.fr/futurecoder/futurecoder.forge.aeif.fr It's essentially just a mirror of the main repo with its own build process and configuration.
Being for licenses, no matter how permissive, is being in support of the idea of Intellectual Slavery. Public domain or it's not 100% free.
Hopefully in the future we'll pass a Constitutional Amendment, and end Intellectual Slavery as we did its superset https://breckyunits.com/the-intellectual-freedom-amendment.h...
> but there are more tools for Python these days
I can't comment on what exists or what's possible in Ruby, but futurecoder does indeed have a lot of specific magical features that I wouldn't know how to replicate in any other language.
* Think Python 2nd Edition (or How to think like a computer scientist. More recently, "Learn python the right way" based on same book.)
* Fluent Python 2nd Edition, Ramalho
* Python Distilled, Dave Baezley
1. It doesn't seem to work in Microsoft Edge when the default Enhanced Security is turned on. You might need to ask people to turn that off. I'm not sure about a workaround. It panics with insufficient stack space.
2. How does it pay its own bills? If you get bored with it, what will happen to it? I'm sure Codecademy has a revenue strategy.
Just curious!
2. Because it all runs in the browser (thanks to Pyodide) it's just some static files, so it's extremely cheap to host. I can keep it going long after I'm bored with it. If I die or something and the site literally goes down, someone else can easily host it. There's already a slightly customised mirror of the French site hosted here: https://futurecoder.forge.aeif.fr/
tried the code playground, but seems there is no intellisense?
i think that would be very useful to learning
Here's my favorite explanation why: https://cseducators.stackexchange.com/a/634
Here's another similar discussion: https://cseducators.stackexchange.com/questions/5777/python-...
There are many steps that do require entering exact code, but that's because in those cases the code itself is the whole point, not just the output. In most cases they're in places where new concepts are being introduced, so jumping to exercises wouldn't make sense. Often you're even being asked to enter code that does something 'wrong' so you can see common mistakes in action.
Steps that require exact code are always explicitly labeled as such under the 'Requirements'. In most cases the code that needs to entered is given exactly in the text in one piece. When it isn't, the Requirements will always contain extra clarification for the instructions. And if that isn't enough, it's still always possible to look at the solution, although for that kind of step it shouldn't typically be needed.
Your comment sounds very similar to the most common kind of feedback I used to get from users who found the instructions unclear and got stuck. I recently made a major update to the user interface to solve this problem, including the stuff in the paragraph above. If you've used futurecoder before it's possible you haven't experienced this yourself. If you can't see it right now, you may have old content cached, hard refresh the page in your browser. Also, the new features haven't been translated yet so they're only available on the English site.
In the first tutorial, at some point you have
> word = ‘Hello’
> your_name = ‘Somename’
> word + your_name
‘HelloSomename’
Now the course asks me to fix it so it says ‘Hello Somename’. My first approach was to enter
> word = ‘Hello ‘
This fixed it, but the course wasn’t happy. Instead I needed to type word + ‘ ‘ + your_name.
Previously in the course, the course stated that all following three solutions were correct for introducing the space:
‘Hello ‘ + ‘World
‘Hello’ + ‘ World’
‘Hello’ + ‘ ‘ + ‘World’
Because of that feedback, I thought it was confusing that one had to use the third solution in that later part of the course.
Hope that feedback helps. Otherwise, I think this is course absolutely fantastic! Congratulations on creating something so special!
Edit: excuse the weird ticks; I’m writing this comment on an iPad
Then based on this hint, clicking around I managed to reveal the tutorial (showing up on the right). So it seems that there is a bug in the navigation or maybe the "just code" link on the landing points to the wrong place.
- Start learning (see the tutorial content)
or
- Just code (you don't need to learn, you just want to use the editor/shell as a simple scratchpad/playground with some enhancements)
The links are working as intended, but maybe I need to make them clearer.
It was actually the first translation to be finished 100%, although now it's fallen behind to 91% as new English text was added. The reason it's not listed on the site alongside French and Tamil is that after it was finished, it was never proofread, so it never became officially ready :(
> I’d be up to the challenge of helping translate
Yes please!!!
Information about translating is here: https://github.com/alexmojaki/futurecoder/wiki/How-to-write-...
The task to finish and proofread the Spanish translation is recorded here: https://github.com/alexmojaki/futurecoder/issues/371
Show HN: Futurecoder – A free online interactive Python course - https://news.ycombinator.com/item?id=28737779 - Oct 2021 (24 comments)
- A new 'assistant' UI that prevents users from getting stuck on instructions they found unclear, which was the most common complaint.
- Can now be translated to other languages.
- Available in 3 other languages.
- Can now be used in Safari.
- Can now be used offline.
- Can now be used in China.
- A new course chapter about dictionaries.
- A 'Stop' button to interrupt running code.
- Output is shown in the console as it's produced.
- time.sleep() works correctly.
- Ctrl+Enter keyboard shortcut to run code.
- Lots of small improvements and bug fixes.
BTW, to monetize this, you might create module-specific tutorials (like Pandas, Pygame, etc.) and implement a "pay what you want" system where $10 or more buys 5 modules.
To run multiple lines of code, use the editor, not the shell. If you only see the shell, it's because it's hidden at the beginning of the course for beginners. See the table of contents (https://futurecoder.io/course/#toc) and skip to the page "Variables > Writing Programs" or after.
Or click the 'fullscreen' icon in the top right to enter 'IDE' mode in which everything is enabled, as the debuggers are similarly introduced gradually. Equivalently, go to https://futurecoder.io/course/#ide, or click "Just code" on the homepage.
The issue for tracking multi-line input in the shell is here: https://github.com/alexmojaki/futurecoder/issues/268
It's something I'd like to have, but it's not a high priority, and I don't think it needs to be.
One interactive component that we use heavily that might interest you for futurecoder is what we call an interactive walkthrough: https://www.learncs.online/best#interactive-walkthroughs. It's like a video but preserving the interactive nature of a playground. Students really like them, and enjoy the opportunity to hear multiple explanations for the same concept when they're stuck. (We're working on popping this out for external use, and have a library in the works that you may be able to integrate with a bit of work.)
I have no idea what your educational background is, but if you ever want a stable position that supports your educational innovation, consider applying for a teaching faculty job: https://go.cs.illinois.edu/teaching-faculty-hiring. (Currently our openings require a Masters degree.) We need more creators in computer science education.
Awesome! I've only seen one other place doing something similar: https://scrimba.com/
This is definitely better than ordinary videos, and I like the point about multiple explanations. Although I do personally prefer that futurecoder rarely shows/tells without actually forcing users to run code and see for themselves, so they always have to be engaged. Even when they're told the exact code to run, they occasionally get asked to predict what the output will be, to make sure they're paying attention.
> I have no idea what your educational background is, but if you ever want a stable position that supports your educational innovation, consider applying for a teaching faculty job: https://go.cs.illinois.edu/teaching-faculty-hiring. (Currently our openings require a Masters degree.) We need more creators in computer science education.
It'd be great if I could be paid to work on futurecoder or something similar full time, and I've tried finding a way to make that happen before. But now I've just started a dream job at https://ought.org/ (working with AI, not education) and it'd be very hard to compete with that.
I don't have a Masters and I prefer to create things that are infinitely reusable rather than teaching directly. But thanks for the suggestion!
Yup. I agree with this approach. However, I think that in some ways this is a weakness of the side-by-side format you're using, since it seems to lean toward more content per example to offset the playground consuming half of the screen area. On https://learncs.online/ we also prefer a "show not tell" approach, but because we're interleaving the text and the playgrounds, sometimes the text between two playgrounds is extremely minimal: "Let's see what happens when we try it another way."
But there is something nice about the side-by-side format.
> Awesome! I've only seen one other place doing something similar: https://scrimba.com/
Yeah, Scrimba makes it weirdly hard to figure out what's going on, given that some of their early examples just have slides popping up everywhere and no actual text editing. I had to fast forward a bit to get to an editing example. And while I think their integration with (I assume) embedded VSCode is really cool, there's a bit of that "seated at the controls of a 747" feeling immediately with their courses, which I think can be a bit frightening for beginners. We like to keep things really compact for a while, and don't have students work in a full IDE until halfway through the semester. (This also avoids the problem with too much IDE help too early, which you referenced in another comment.)
Also: teaching directly can be done by creating things that are infinitely reusable :-).
One minor annoyance for me was that the animation for a correct answer - the exploding confetti - was a bit over the top. Like "OK, yeah, chill out, all I did was get the answer right to an easy question". I just find it too much to see that every time, but maybe that's just me.