The NickFrac screensaver, or How I Broke My Brain

new topic     » topic index » view thread      » older message » newer message

Hi, all. I have just uploaded the full source and a Windows installer of the NickFrac screensaver to the archive. I would put it forward as having the most ridiculously convoluted code base of any program I have written. It is a prime example of how not to write maintainable code.

Not that it is large, just stupefyingly twisted and difficult to follow. For example:

Languages within languages within languages. Three lexicons are used, Euphoria, assembly and one all of it's own, often all within a single statement.

Multiple parallel versions, there is an almost complete development implementation in DOS.

Self-compiling, it has it's own built-in JIT language and parser and both versions can build portions of themselves into precompiled include files.

Self-modifying at multiple levels, not only is the embedded assembly altered during build time but the assembled machine code is altered during runtime on a per-fractal basis.

Complicated math, comprehensive fractal dynamics analysis expressed in the most primitive low-level fashion.

Why did I do it this way? All for execution performance. The images produced require not one fractal plot but many hundreds of complete fractal plots superimposed one on top of another. Any other method would be too slow for a screensaver.

So now I want to return to this code, extending it to a more full-featured fractal explorer. Trying to read the code, let alone understand what I was doing is as difficult as if I had never seen it before and makes my brain hurt. Very little of it makes sense and I expect it is up for a rewrite once I rediscover it's secrets.

Nick

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu