Hacker News new | past | comments | ask | show | jobs | submit login
Visualizing Concurrency in Go (2016) (divan.github.io)
282 points by velodrome on Apr 28, 2017 | hide | past | web | favorite | 21 comments



This is very nice. Does anyone have an idea of how to extend the visualization so that they could be rendered based on the actual runtime of a real program?

I have a theory that much complexity could be understood if humans could just see the interactions and the data flowing.

Even if the program took 100X longer to run, if you can see the bug, you can fix it. If you can see the complexity, you can understand it.


This is an oft used technique in gamedev, where instead of print statements we will print out visualisations to the screen, such as bounding boxes, trajectory lines, etc.


He describes that the visualizations are generated by logging the relevant events from a running program, so I'm not sure what you mean by extending it to render based on the "actual runtime of a real program".


I saw the video a while ago - really neat technique, I love the visual differences between patterns. Love that it's written down - far too much great material is locked up, unsearchable, in videos.


That's a really neat way of explaining concurrency model.

I did something similar for Erlang VM http://eddwardo.github.io/elixir/links/2015/11/04/links-in-e... (less advanced). I'd love to see comparison of these two models.


> If I ask you something involving “numbers from 1 to 100” you will have your own image of the series in your head, even without realizing it. For example, I imagine it as a line going from me with numbers from 1 to 20, then it turns 90 degrees to the right and continues to the 1000+.

Actually no, perhaps you're not aware of this, but you have a condition called spatial-sequence Synesthesia. It's a harmless and fascinating condition in which the senses have arbitrary connections to each other (numbers have colours, sounds have tastes). Many people are unaware of it. I've only heard of it because a friend at university (and also a Synesthete) researches it.

https://en.wikipedia.org/wiki/Synesthesia

https://www.psychologytoday.com/blog/finding-butterfly/20110...


Quite a leap to diagnose such a condition over the internet. To me it just seemed like a bad example. His second example works though, if you try to force a visualisation in your mind:

"Another common example is the visual representation of the full year with four seasons"


True, I should say the author "may" have Synaesthesia. But the spacial appearance of a number line is an absolutely textbook example of it. The interesting thing about his choice of example is that's what he perceives and he assumes everyone else also has a spacial representation of numbers.

Most Synaesthestes don't realise there's anything different about their thinking until they hear about the condition. So, I just wanted to make the author (and others) aware of it for their interest.


Synesthesia proper is a whole other level than merely visualising abstractions (which tons of people do, if not everybody)...


It's a spectrum sure and sound/taste effects would be lot more difficult to deal with.

We all visualise abstractions, but adding fixed, and arbitrary, properties (the number line turning at 20) is different and more akin to:

https://en.wikipedia.org/wiki/Number_form


> I recall from very young period of my life that in our kindergarten there were numbers in a cloakroom, written along the wall, and number 20 was exactly at the corner.

Maybe this is why and not Synesthesia?


Childhood experience is thought to be one of the 'causes' of Synesthesia. For instance people who perceive letters as having colours (a is always red, b is blue), often find that these correspond to the colouring of alphabet fridge magnets or toys they had as children.


COoL!

I have tremendous trouble reading a list of color words on a whiteboard, if each is written in a different color from what the word is. E.g. write blue in black; write yellow in red; write red in blue etc.

Extra points - try to say what the color each word is written in, while looking at them. Maybe even harder.


That's the "Stroop effect"


This looks like a useful approach to visualize the interactions​ between different services in a SOA or microservice-based architecture. (You'd need some way for each service to log its send and receive events without the logging slowing everything down though)

In any case, a very cool idea. I really like the use of 3D to fit more nodes into the diagram without it getting unreadable. I think this is an approach that could help with visualizing large graphs in general - it would be cool if there was more research about that.


This is powerful, I wish ideas like that might impact debuggers and provide alternative ways of visualizing code, programs and even whole systems running in production.



This is really cool.

I wonder at what point WebGL craps out. How many concurrent processes can it handle?


This is nice. I'm wondering how you would use it though. Probably you'd start analyzing the diagram at the top, then look at what will happen next, and then the next, etc.

But this is basically the same as just looking at the log.

Am I missing something?


Tony Hoare’s paper is one of the most amazing papers i read (not that i understood all of it).

You can get it at http://www.usingcsp.com/


Great Job!




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: