Skip to content

Commit fa0418b

Browse files
pgbovinemmmicedcoffee
authored andcommitted
Update project-ideas.md
1 parent a5f10e6 commit fa0418b

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

v3/docs/project-ideas.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -121,26 +121,18 @@ There are (at least) two main ways to implement this feature:
121121
Right now OPT displays one state at a time. For simple algorithms, students often find it helpful
122122
to have the entire state displayed in a table, and will manually insert in `print` statements like so:
123123

124-
<pre>
125-
i = 0
126-
numbers = []
124+
i = 0
125+
numbers = []
126+
while i < 6:
127+
print 'At the top i is %d' % i
128+
numbers.append(i)
129+
i = i + 1
130+
print 'Numbers now: ', numbers
131+
print 'At the bottom i is %d' % i
127132

128-
while i < 6:
129-
print 'At the top i is %d' % i
130-
numbers.append(i)
131133

132-
i = i + 1
133-
print 'Numbers now: ', numbers
134-
print 'At the bottom i is %d' % i
135-
136-
print 'The numbers: '
137-
138-
for num in numbers:
139-
print num
140-
</pre>
141-
142-
Question: Can we augment OPT to provide this sort of "cumulative tabular view"?
143-
All of the data is right there in the trace; it's just a matter of visualizing it properly.
134+
Question: Can we augment OPT to automatically display this sort of "cumulative tabular view"?
135+
All of the data is right there in the trace; it's just a matter of visualizing it sensibly.
144136

145137
For instance (this output is faked, so it's not accurate):
146138

@@ -152,12 +144,15 @@ For instance (this output is faked, so it's not accurate):
152144
3 [0, 1, 2, 3] i = i + 1
153145
4 [0, 1, 2, 3, 4]
154146

147+
In this case, the execution step slider under the code now highlights rows in the table as the
148+
user scrubs through the slider; cool!
149+
155150
The obvious challenge here is scalabiilty, and what happens when there are multiple frames.
156151

157152
Some ideas include:
158-
- having the user manually document (in, say, a docstring) which variables to print to the table
153+
- having the user manually annotate (in, say, a docstring) which variables to print in the table
159154
- only printing the table for one frame at a time
160-
- or maybe nesting frames
155+
- or maybe displaying nesting frames
161156

162157

163158
### Custom rendering API and plugin system

0 commit comments

Comments
 (0)