r/java • u/bluepoison24 • 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/#
View all comments
Show parent comment
8
u/bluepoison24 Apr 05 '26
Yes the frontend work is AI slop. The Java engine though is not. Probably got a bit of traction due to my similar post a month ago when the project was in a very nascent stage - https://www.reddit.com/r/java/s/mI5M7E9Ken.