r/java • • Apr 05 '26

I built an engine that auto-visualizes Java algorithms as they run

I’ve always found it annoying that you have to use specific frameworks just to see an algorithm in action. I wanted to build something where you could just write:

​int[] arr = {5, 2, 8, 1};

arr[0] = 10; // ← automatically visualized

​I ended up "hacking" the JVM using a Java Agent to inject visualization callbacks into the bytecode.

​Why bytecode? It doesn't matter if you write arr[i] = x or arr[getIndex()] = compute(); at the bytecode level, it's all just one instruction. This makes the visualization incredibly robust.

Try it here: https://www.algopad.dev/#

Code - https://github.com/vish-chan/AlgoFlow

61 Upvotes

17 comments sorted by

View all comments

Show parent comment

3

u/_Mr_Rubik_ Apr 05 '26

I will try it next week. It is curious that all three webs has the same colors, styles, etc. My frontends vibe coded don't look all the same.

1

u/bluepoison24 Apr 06 '26

I asked Claude to make the landing page less AI-generated like and it changed it. I hope you like the new landing page :D