|
| 1 | +# Stacktower |
| 2 | + |
| 3 | +> Stacktower is a tool that visualizes software dependency graphs as physical towers, inspired by XKCD #2347. |
| 4 | + |
| 5 | +## About |
| 6 | + |
| 7 | +This blog post documents the journey of building Stacktower - a visualization tool that transforms dependency graphs into stacked tower diagrams. Instead of traditional node-link diagrams with arrows, dependencies are represented as physical blocks where blocks rest on what they depend on. |
| 8 | + |
| 9 | +## Key Topics |
| 10 | + |
| 11 | +- **Dependency Visualization**: A new approach to visualizing software dependencies as physical structures |
| 12 | +- **Graph Algorithms**: Layered graph drawing, crossing minimization, NP-hard optimization |
| 13 | +- **PQ-Trees**: Data structure for encoding permutation constraints efficiently |
| 14 | +- **Barycenter Heuristic**: Fast approximation algorithm for node ordering |
| 15 | +- **Branch and Bound**: Combining exact and heuristic methods for optimal layouts |
| 16 | + |
| 17 | +## Sections |
| 18 | + |
| 19 | +- The Spark: Origin story inspired by XKCD comic #2347 |
| 20 | +- Welcome to the Side Quest: Discovery of the underlying NP-hard problem |
| 21 | +- Finding a Battle Plan: Research into existing algorithms (Sugiyama Framework) |
| 22 | +- Reducing the Problem: Graph transformations to make stacking possible |
| 23 | +- The Evolution of an Algorithm: From brute force to PQ-trees to heuristics |
| 24 | +- The Final Touches: Implementation details and rendering |
| 25 | + |
| 26 | +## Technical Details |
| 27 | + |
| 28 | +The tool is implemented in Go and supports: |
| 29 | +- PyPI (Python packages) |
| 30 | +- crates.io (Rust packages) |
| 31 | +- npm (JavaScript packages) |
| 32 | + |
| 33 | +It fetches dependency data from package registries and maintainer information from GitHub. |
| 34 | + |
| 35 | +## Links |
| 36 | + |
| 37 | +- Source Code: https://github.com/matzehuels/stacktower |
| 38 | +- Author: Matthias Huels (https://huels.ai) |
| 39 | +- Original Inspiration: XKCD #2347 (https://xkcd.com/2347/) |
| 40 | + |
| 41 | +## Gallery |
| 42 | + |
| 43 | +The site includes an interactive gallery showcasing dependency towers for popular packages: |
| 44 | +- Python: openai, requests, pydantic, fastapi, typer |
| 45 | +- Rust: serde, ureq, hyper, diesel, rayon |
| 46 | +- JavaScript: yup, mongoose, knex, ioredis, pino |
| 47 | + |
0 commit comments