Live data from Hacker News

I made a debugger that draws the state machine of the program

i.imgur.com

31–40 of 62 posts

Re: I made a debugger that draws the state machine of the program

#31
post #23
post #20

Earlier quoted context omitted.

There used to be an IDE called "Together" that supported bi-directional transformation between source code and diagrams. Although it sounded like a really cool idea, it didn't take off. Seems text is best (maybe because it supports incompatible hierarchies better).

Thanks for the info, I'd never heard of that IDE before. With its common name it's been impossible to find screenshots so far. > Although it sounded like a really cool idea, it didn't take off. That could have been because it was bought by Boreland, who had a history of 'not succeeding' with projects, whose focus was elsewhere, who lost key staff at an important point, and then were bought out and mismanaged from the…

porker, try searching for TogetherJ which was the Java specific version of Together. I may have even used it back around 2000 but don't remember much other than the name.

Re: I made a debugger that draws the state machine of the program

#32
post #20
post #17

Earlier quoted context omitted.

Apple Swift and Unreal Engine Blueprint both have amazing state visualization tools built in. See: https://docs.unrealengine.com/latest/images/Engine/Blueprint... I think a deep visual debugging tools are going to be 'built in' in future in much the same way that HTTP primitives were recently with node and string manipulation was with Python 2.

There used to be an IDE called "Together" that supported bi-directional transformation between source code and diagrams. Although it sounded like a really cool idea, it didn't take off. Seems text is best (maybe because it supports incompatible hierarchies better).

Text probably serves better because code is often too complex to visualize in some cases, and in others to comprehend generated visualized code.

Think about algorithm that switches values by using temporary variable for example. By looking at text, it's pretty simple to construct the flow follow the values traveling from one variable to other. But if you put it in 2D graphical interface, it becomes very problematic and hard to follow. I would imagine it would be easier if there was like a movie where value would move from one box symbolizing variable to other. But that would make it difficult to edit.

Another way would be to visually represent only change, but then it would be same as textual representation, only more redundant.

Re: I made a debugger that draws the state machine of the program

#33
post #27

Also, if anyone's interested, I need some help porting it to different platforms. If you can swim in the clusterfuck of x86 for a bit to port it to ward that would be awesome, or even getting working with gdb this could be an actual tool.

might as well attach a src link here too: https://github.com/r0nk/ward

Re: I made a debugger that draws the state machine of the program

#34
post #3

That is absolutely awesome. I used to have something like this: a pair of very fast dacs hooked up to the 16 address lines of my computer and another dac hooked up to the databus. It allowed me to look straight into the memory of the machine as the processor was accessing it, quite a powerful tool. Yours is nicer though (and with todays memory size I'd hate to think about the quantity of data that passes in a split s…

That reminds me of the old story of people having a audio speaker connected to the address but of their mainframe so they could detect error conditions by the sounds being made.

As I recall, it was a radio that was tuned to the Kilohertz band. This was before the FCC was so careful about computers emitting radio waves. A computer that has a clock cycle measured in Kilohertz can emit radio waves in the Kilohertz band.

This makes "music" of a sort, especially when the program running does many things repetitiously. In the early days of computing, multiplication was implemented as repeated addition. Memory access also had a particular pattern of repetitive circuitry.

This provided a base repetition that humans recognize. When code was stuck in a loop, or repeatedly accessed the same range of memory locations, the operators could hear the pattern and know something was wrong.

Re: I made a debugger that draws the state machine of the program

#35
post #20

Earlier quoted context omitted.

There used to be an IDE called "Together" that supported bi-directional transformation between source code and diagrams. Although it sounded like a really cool idea, it didn't take off. Seems text is best (maybe because it supports incompatible hierarchies better).

Text probably serves better because code is often too complex to visualize in some cases, and in others to comprehend generated visualized code. Think about algorithm that switches values by using temporary variable for example. By looking at text, it's pretty simple to construct the flow follow the values traveling from one variable to other. But if you put it in 2D graphical interface, it becomes very problematic a…

[deleted]

Re: I made a debugger that draws the state machine of the program

#36
post #20

Earlier quoted context omitted.

There used to be an IDE called "Together" that supported bi-directional transformation between source code and diagrams. Although it sounded like a really cool idea, it didn't take off. Seems text is best (maybe because it supports incompatible hierarchies better).

Text probably serves better because code is often too complex to visualize in some cases, and in others to comprehend generated visualized code. Think about algorithm that switches values by using temporary variable for example. By looking at text, it's pretty simple to construct the flow follow the values traveling from one variable to other. But if you put it in 2D graphical interface, it becomes very problematic a…

Actually I can think of a simple way to visualize that.

The debugger actually displays what I call a folded lattice, meaning that execution starts at the top and goes down, so representing what your talking about would simply look like ">" with lines. It would need some representation of data flow, however, which it currently doesn't have.

Re: I made a debugger that draws the state machine of the program

#37
post #3

That is absolutely awesome. I used to have something like this: a pair of very fast dacs hooked up to the 16 address lines of my computer and another dac hooked up to the databus. It allowed me to look straight into the memory of the machine as the processor was accessing it, quite a powerful tool. Yours is nicer though (and with todays memory size I'd hate to think about the quantity of data that passes in a split s…

That reminds me of the old story of people having a audio speaker connected to the address but of their mainframe so they could detect error conditions by the sounds being made.

Been pondering something like that for networking.

A while back i read about a guy who had set up his phone so that it would play certain tones when it detected APs while walking around town. This based on their signal strenght, security settings etc.

This got me thinking back to my analog modem days, and how i could tell if i was getting a good connection or not depending on the noise it would make during the handshake.

What i was thinking was setting up a sniffer, and hook that up so certain tones would play based on packets passing by.

I sometimes wonder if modern computing is too reliant on one human sense, vision. More mechanical devices can give us early warnings about developing issues based on sounds and vibrations.

Re: I made a debugger that draws the state machine of the program

#39
post #8

Here's one for Python. http://pythontutor.com/ It shows the variables, and allows you to step forward and backward. Great for explaining programming to new people who haven't grokked computing yet.

The author, Philip Guo, is part of the HN community as pgbovine.

Re: I made a debugger that draws the state machine of the program

#40
Shameless self-plug: Me and a friend developed a Java debugger [1] that visualizes (Java) programs with UML class and sequence diagrams [2]. It isn't actively developed anymore, but the demo version [3] (along with Help -> Tutorial) can still be used to give it a try.

It was quite an involved & fun project as we used Java VM Tool Interface directly instead of using JDI and the layout algorithms for the diagrams are quite fancy too :)

[1] http://www.jbixbe.com [2] http://www.jbixbe.com/VisualTour.html [3] http://www.jbixbe.com/download/jar/jbixbe.jar

Post reply on HN