[-] bterwijn@programming.dev 1 points 3 days ago

The whole point is to practice Python Data Model concepts, it's not a best-way-to-code example, so feel free to hate.

[-] bterwijn@programming.dev 1 points 4 days ago

You are right, in landscape mode it's better, but still not ideal. It's a project I don't have time for now. On the other hand, did you run Python code, in an IDE where the debugger visualizes the whole program state, on your Phone before?

[-] bterwijn@programming.dev 0 points 4 days ago

C is incorrect,sorry. See the "Solution" link for the correct answer.

13

An exercise to help build the right mental model for Python data. The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening:

13

Some struggle with recursion, but as package invocation_tree visualizes the Python call tree in real time, it gets easy to understand what is going on and to debug any remaining issues.

See this one-click Quick Sort demo in the Invocation Tree Web Debugger.

20

Better understand the Python Data Model or Data Structures by memory_graph visualization with just one click:

[-] bterwijn@programming.dev 2 points 1 month ago* (last edited 1 month ago)

Actually running the code? I got to the stage where only AI can help me understand anything ;-)

[-] bterwijn@programming.dev 2 points 1 month ago* (last edited 1 month ago)

Thanks for your feedback, much appriciated.

I agree that an exercise14.rst would be nice, but to save time I've let the code speak for itself now together with the visualizaion. I'll probably revisit and better document the exercises later.

At the Explanation link I try to give a general explanation about Pyrhon mutability (and copy later on), I agree some readers might find it hard to relate that to a specific exercise, but I don't want to write a specific explanation for each exercise.

[-] bterwijn@programming.dev 2 points 1 month ago* (last edited 1 month ago)

Thanks for reporting, should be fixed now.

[-] bterwijn@programming.dev 4 points 1 month ago* (last edited 1 month ago)

The "Solution" link gives the solution to the exercise, the "Explanation" link explains the Python data model concepts behind the exercise. If some parts are hard to understand let me know.

[-] bterwijn@programming.dev 3 points 1 month ago

Yes, that is a surprise to many, in other languages 'x+=y' and 'x=x+y' are the same.

[-] bterwijn@programming.dev 3 points 1 month ago

Thanks, glad it helps you.

53
Python Mutability (programming.dev)

See the Solution and Explanation.

[-] bterwijn@programming.dev 1 points 1 month ago

Thanks for adding. The link I posted should give people a quick animation to directly see what is possible instead of having to read through things first. That GitHub repo link is also on hat page. But you are right that some would probably want to start with the repo, thanks for feedback.

29
Memory Graph Web Debugger (programming.dev)
submitted 1 month ago* (last edited 1 month ago) by bterwijn@programming.dev to c/python@programming.dev

Hi, I'm new, I'd like to share my new Memory Graph Web Debugger that you can use to visualize and debug your Python data structures with just one click. This is an example of a binary tree implementation. I feel this tool could level up Python education. I'm interested in your thoughts about it, feedback welcome.

view more: next ›

bterwijn

joined 1 month ago