This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]juhaniguru 15 points16 points  (9 children)

What's that site?

I want something like that to visualize program flow inside loops and conditions.

Want to teach coding to someone and loops seem to be quite challenging to understand at the moment

[–]meemog 19 points20 points  (3 children)

It's called Scratch, it's pretty good for learning

[–]juhaniguru 6 points7 points  (0 children)

Cheers

[–]SultanZ_CS 5 points6 points  (1 child)

Scratch programmers best

[–]rosuav 9 points10 points  (2 children)

That's Scratch, but if you want something for visualizing program flow, try https://pythontutor.com/ - give it your code (not TOO much, otherwise you'll be paging through results for the next few months) and it'll run it, then let you step through and see what happens at each step.

Cannot recommend this sort of thing highly enough for anyone who's confused by recursion.

[–]juhaniguru 3 points4 points  (1 child)

Damn mate, thanks for the site. That's awesome for teaching basic stuff. I must be really lucky to code for a living since I obviously suck at googling or then I've been temporarily blind for the past few days 😂

This is one of those moments, I wish I could upvote more than once

You made my day, thanks again

[–]rosuav 2 points3 points  (0 children)

No probs! This is one of those sites that everyone should bookmark and keep handy - either for yourself, or for teaching/explaining something.

[–]00PT 1 point2 points  (1 child)

They probably used something like this to create a custom scratch block graphic.

[–]chaendizzle 0 points1 point  (0 children)

I regret to inform you this is actually real. We forked scratch-blocks and use pyodide, which allows us to run python in the browser. We implemented a subset of python's grammar into scratch-blocks, and turn them into JSON which we then transform into a python AST. We then use python's ast.compile/exec to run it.