2 minute read

I have been looking for a way to practice algorithms that feels less like a treadmill. Grinding problem after problem never worked for me — the knowledge stayed flat, and the practice felt like something to finish rather than something to keep.

So I built Karma Coding for myself. It is a small file-system practice system, and its one idea is that every hint points back to your own past solutions — a knowledge graph built from code you have already written.

Each challenge lives in its own folder: a challenge.md describing the problem, an input.txt and expected.txt for testing, and a test.sh runner. Nothing exotic. The hints are where it gets personal. Every hint names a technique you used in a previous challenge you already solved, references that exact folder, and leaves a spot to paste in your own code from that solution. For example, a hint for a string problem might remind you of the hash set you wrote in Contains Duplicate, and ask how you could count character frequencies with the same pattern.

The hints never hand you the answer. Because the code in them is yours, you can’t skim past it. The mentor in this system is your past self.

The test runner is deliberately dumb. It finds whatever solution file you wrote, pipes the input in, and compares the output to the expected result. Pass or fail, then back to the problem.

And there are no scores, no streaks, no leaderboard — the practice is the point.

The name comes from Karma Yoga: acting wholeheartedly, without attachment to the result. That is the intention behind the whole thing, and it is a practice I can keep showing up for.

You can checkout the project here: https://github.com/dong0085/karma-coding

Updated:

Comments