How to organize your kotlin programming supplies

Three JDK folders, two copies of the same SDK, and a Gradle cache holding dependencies for a project you deleted last spring — that is what a Kotlin setup looks like after a year of good intentions. Organising it is less about buying containers and more about deciding, once, where each kind of thing lives so that nothing accumulates by accident.

Give every JDK and SDK a name you can say out loud

Version managers exist because installing runtimes by hand leads to the folder problem above. Whether you use one or place each JDK in a clearly named directory, the rule is that the name states the version and the purpose: jdk-17, jdk-21-for-android, and so on. Then tell the project which one it wants in its build configuration, so opening a repository does not depend on whatever the shell happened to export that morning.

Write the mapping down in one note — project, runtime version, build tool version. It is the file you will want after six months away, and the one nobody ever creates.

One folder per project, one readme that says how to run it

A folder that begins with a readme saves more time than any filing system. Four lines are enough: what the project is, which runtime it needs, the command that starts it, and the command that runs the tests. Put the same four lines in the repository description so they show up when you are browsing rather than cloning.

Keep experiments in a separate directory from anything you care about. Side projects that live next to real ones are how half-finished copies of the same code appear three directories apart.

Prune the caches on a schedule, not on a hunch

Gradle and the Kotlin compiler both cache aggressively, and those caches are the largest things on the disk after a year. Clearing them is safe but expensive; the point is to know where they are and how big they have grown. Check the size monthly, clear when the growth is unexplained, and leave the cache alone the week before a deadline.

  • Keep one archive folder for old project snapshots rather than ten copies on the desktop.
  • Store credentials and signing keys outside project folders, and never in a repository.
  • Label external drives by what is on them, not by when you bought them.

Keep notes where the work happens

A short list of commands you had to look up twice belongs next to the code, not in a browser bookmark you will never reopen. Examples are compiling a single file, running one test class, and printing the dependency tree. An error message and its fix, pasted into a note file, will pay for itself the second time the same build fails.

The test of an organised setup is simple: hand the laptop to someone else, ask them to run one project’s tests, and watch where they get stuck. Every pause marks a missing label.