There are few topics coming up so often as lamentations about the problem of programming, bugs and its inadequate contemporary solutions. Many approaches were tried and attempts to reinvent everything up from the bedrock. These and others try to improve by making the virtual or meatspace machines more elegant and are very useful.

But I also identified other problems. My own working memory is consistently incapable to hold basic building blocks of all languages and environments used in a project. This leads to frequent google excursions and inevitable distractions. Thus I'm trying to avoid using too many diverse parts for the project and find web UI development (which needs HTML, CSS, JS and graphics to work together) rather impenetrable.

Also, my mind is barely able to navigate source code in text form. Sometimes I find myself scrolling up and down in vain, only because I'm trying to locate some other synonym that is actually used. Realized I am orienting myself in the text visually, using shapes of the paragraphs and outline clues. So things like folding do not help, just introduce more confusion as they cause the "shape" to change. Outline views are better but they are fixed by whatever rules the IDE developers thought everyone needs. Time to look elsewhere.

Enter Leo editor. It allows all text source files to be sliced and diced any way you need into tree outline. Its ability to have copies (clones) of one piece of text in more places allows to have the same code organized both in one task tree and in multiple external source files. It allows literate programming in any language. However I hate to admit I'm not using it to full potential because it's easy to run into problems with externally modified files. User needs to figure out the workflow in relation to external changes and stick to it. Leo is very extensible, able to run unit tests and user-defined python scripts with access to outline. Most I like is the ease to import existing code into Leo and ability to keep up with external changes. Many other literate programming tools are incompatible academic exercises pretending that whole world around is obsolete.

It's human nature to be always on lookout for better stuff. Thus a gem named DRAKON editor appeared on my radar. It has interesting backstory as a byproduct of Russian space shuttle development. The claim that engineers were able to write the source code themselves piqued my curiosity, together with easy to learn rules and ability to generate source code in Python (as well as several other languages).

I'll write more about my experience using it later. Just in short - generated code may use goto or similar constructs if the diagram can't be represented by if/else tree. This has following consequences I'm generally OK with. First, it really forces you to keep your code structured into smaller parts so that whole diagram fits on the screen at once and generated code stays penetrable for debugging. Second, it's best to use only for most complicated parts of business logic. For these, the ability to get up to speed quickly later outweighs the disadvantages. I've even been able to fix some bugs by directly deducing from the logs and diagram what exactly happened, this is mostly impossible with classic source code after weeks or months have passed.

I dream about a way to use all these tools in integrated manner, having source code manageable both as the outline, as diagram, as text, and still be able to exchange it with rest of the world. Yes, I'm that weirdo who prefers to cobble unmatching pieces together instead of redoing everything from the ground up.