Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible improvements for visual representation of debug frames #579

Open
5 tasks
pdawyndt opened this issue Dec 22, 2023 · 0 comments
Open
5 tasks

Possible improvements for visual representation of debug frames #579

pdawyndt opened this issue Dec 22, 2023 · 0 comments

Comments

@pdawyndt
Copy link
Contributor

pdawyndt commented Dec 22, 2023

These are possible changes to the visual representation of the debug frame, that need some experimentation to see if they indeed turn out to be improvements for students when interpreting the result of their implementation:

  • represent string like lists and tuples (but with characters as elements); the benefit is that all Python sequences (strings, lists, tuples) are represented the same way and that character indexes are explicitly represented (students need these to properly reason about their code; e.g. helps to spot off-by-one errors); the downside is that it takes more horizontal space, especially for long strings.
  • put indexes of sequences outside the rectangles containing the elements (I would suggest below the squares as the datatype is already on top of the rectangles) and put the data type of the sequence elements where the indexes are if those elements are inlined (we might even experiment if dictionaries could be represented similarly in some cases, putting the keys where the indexes are for sequences; sets could then be represented as sequences without indexes)
  • detect grid-like representation (nested sequences - two levels - with inner sequences all having the same length) and represent them as a grid; benefit: more compact representation then sequence dereferencing other sequences and closer to mental model of a grid; row and column indexes can be added to the grid; also render two-dimensional numpy arrays this way; here's an artistic impression:
    image
  • always show the data type to the top left of the value when inlining the value (otherwise the datatype has to be infered from the representation)
  • support numpy multidimensional arrays and pandas data-frames as a data types for visual rendering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant