u/bluepoison24

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 herehttps://www.algopad.dev/#

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

reddit.com
u/bluepoison24 — 1 day ago
🔥 Hot ▲ 53 r/java

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 herehttps://www.algopad.dev/#

reddit.com
u/bluepoison24 — 1 day ago