Tuesday, May 20, 2025

Comments on Color

Recently, I read this piece "Why Is the World Losing Color?" The thesis is that people who use color are using more shades of gray and fewer vibrant reds, yellows, greens and purples. What the body of the essay doesn't say, but the graphs maybe do say, is that blue is on the rise again after a recent pinch.

Pink drama

My first thought when I read the article was, “Yes, good!" This is the true aesthetic: grays, a blue hint, and generally desaturated. But then I realized that my own aesthetic conception was, in fact, me following the crowd.

The Gray Chapter

After receiving a swag shirt from work that is a wonderful, vibrant purple, I had determined that the astral color of 2025 was to be purple. And so, in fact, it has been.*

2025 astral purple, disguised as a flower

* This statement has not been evaluated by the FDA.

After quite a bit of focus on hearing, sound and music (say, 2000-2023) I feel like my attention has shifted -- no, not shifted -- broadened to include more of the visual. After getting an APS-C digital camera, the latent became actual and I have been teaching myself to be a photographer. And a videographer. And in the Wizard Peter act, a generative artist.

Oh, give me green

Color has become much more important to me. And the digital visual art has fed back into my perception. I think of photography and my camera as teaching me to see. To see in different ways, to shift my perspective (geometrically) and alter my sense of color qualia. To really open my brain to know what my eyes are seeing, which I actually find quite difficult.

I have consciously been chasing a “taste” in my photography. And it's born in a similar place to my writing on izzzzi, which has expanded to a series of recent posts here -- the germ of a thesis that I am different and that I have a distinct and valuable perspective. (In the trivial case, my perspective is valuable to me. (And, darn it to the (red (and yellow)) fiery hell that Dante wrote of, that's enough!))

Red and yellow then came to be, reaching out to me

So I chase some elusive and developing aesthetic in my photography, videomaking and generative art. Photography is really the parent of the other two, the more basic art form, upstream in the evolutionary family tree. Not really, but that's a helpful simplification for my purposes here. The still photograph has elements of composition and perspective; it is the raw geometry of a three-dimensional world projected into a finite, two-dimensional rectangle.

Composition and perspective are decoupled from color enough that one might accidentally slide into some Platonic declamation that the monochrome photograph is sufficient to capture form. But that's not quite it. The same photograph may be well-balanced in its color form, while being a chaotic mess in black-and-white, or vice versa.

Beauty in form

I have no illusion that the taste that I'm chasing is somehow novel in the scheme of humanity. And I'm not really trying to push any artistic boundaries per se. But having chased novelty and global-to-humanity boundaries in other domains, I come to these newer-to-me art forms with a quiet confidence that my distinct perspective (and a righteous soul*) is enough. 

* This statement has not been evaluated by the FDA.

Color has the thrilling property of simultaneously seeming to be entirely objective, while in fact being irreducibly subjective in some sense. No one has been able to fly a thought-spaceship out of the event horizon of the thought-blackhole of whether or not you and I experience the same thing when we both look up at the blue sky: is my "blue" the same qualia as your "blue"? 

True blue

Probably there's a strong argument to be made for the case that most people all perceive the same colors in the same way based on our brains all being similar and black-box observations of our color perceptions are usually close. But other species have photoreceptors for infrared and ultraviolet and surely their inner experience of light with a dominant wavelength of 625-750nm is not isomorphic to what we call “red.” The experience of redness is intrinsically limited to beings with certain kinds of eyes and certain kinds of brains.

And there’s a wide range of variation in eyes and brains, even among humans. So the joys of color perception and color harmony are mine. Not mine alone, but perhaps little aspects are special to me, or at least unusual.

All-natural color wheel

But at this point, do I fly at this article with guns blazing, either in favor of vibrant hues, or perhaps in alliance with the Almighty Grayscale army? I don't know. This question is a bit too generic anyway; different situations call for different palettes. But at least, I can have the cultural-situational awareness that I'm playing tag with the zeitgeist when I dial back the saturation slider.

Saturday, May 17, 2025

Perception, Anxiety and Noise, for me

When I was younger and more ignorant, I had the impression that Platonically-ideal perception was possible. For example, I had the impression that I heard what was exact reality. But also, from my teens on, I was deeply disturbed by tinnitus and a condition they called “hyperacusis,” that is, pain caused by sounds. Paradoxically, I was also deeply into music and music making. I have much more peace about this bizarre dilemma now, having learned much in the past decades about my perception, the noise therein and the anxious feelings that certain sensations seem to cause.

Once I read someone describe hyperacusis as a not-real condition. Noise in perception seems to me like a confused, torrential mixture of real and non-real, to the point that a clear distinction may not be entirely possible. But for the feelings of pain that sound could provoke, perhaps hyperacusis was a placeholder term to tide me over the quarter-century before I would learn a more subtle, accurate description of my perceptual experiences. Somewhere in between pain caused by loud sounds (hyperacusis) and emotionally-neutral hearing lies misophonia, a concept that I recently learned from Scott Alexander. Scott describes misophonia as belonging to the world of mental health rather than a medical issue with the sense of hearing. Perhaps if misophonia had been an idea within reach in my teens, I would have taken on that label instead of "hyperacusis." But neither hyperacusis nor misophonia exactly describe my relationship with sound, although both are helpful categories.

For a long while, my tinnitus was bothersome to the point of provoking anxiety. The noise in my ears was a near-constant suggestion that my hearing was broken somehow. When I was in my 20s, I got a hearing test which revealed a dip in my right ear’s frequency response around 6 kHz. This dip served as “objective confirmation” for my fears. As the years unfolded, my relationship with anxiety broadened and deepened, in the sense of facing more distress, but I also began reaching better states of peace with a variety of causes of distress. Later hearing tests continued to show no significant hearing impairment, but still the right-side 6 kHz dip. Now I see the dip as a benign non-standard feature of Peter the human, like the congenital funny bumps on my skin on the inside of my right wrist.

Comment from Hacker News:

there is a weird 'information hazard' component to tinnitus. It's like losing 'the game'.

“The game” in this context refers to a juvenile social game where one loses the game if one thinks about the game. The more I thought about tinnitus, the more I gave in to sound-aversion / hyperacusis and hid in a quiet room with foam earplugs in, the more distressed I felt. If I relax and ignore the constant sound in my ears, then the anxiety loses its power. Perception, meaning and emotion dance together; they have no fixed, definite or unchangeable relationship.

I think my hyperacusis was disassembled in part by me detangling the many various sensations of pain in and near my ears. Having foam earplugs in my ears for long enough causes my ear canals to ache (this is so so so bitterly ironic!). Earplug-ache is not the same as pain caused by my unprotected ears hearing too loud a sound (whatever exactly that smorgasbord of sensation is for me). Having over-ear headphones or earmuffs on can eventually cause the area around my ears to ache, or, depending on the design and fit of the headphones / earmuffs, the outer ears (the pinnae) can also be sore. Different designs of earplug / headphone are possible and each design has a different comfort profile over time. And none of this has anything to do with sound per se, it’s all to do with my touch-sensations in and around my ears. 

Defense against sound does have a practical aspect. Damage to the hearing system is a real possibility. I maxed out the practical defense side. I have earplugs that are custom molded to fit my ear canals and acoustically designed for flat frequency response (“musician’s earplugs”). I have three different sets of noise cancelling headphones that I use on trains / planes / wherever. I have earmuffs for use with power tools. My smartwatch has a sound level meter. I avoid loud concerts — this one has come at a high cost to me, though. My sound aversion also stopped me from participating in playing loud music. Perhaps I could have joined a rock band as a teen instead of hiding in my bedroom with earplugs in! This is one of my great regrets in life, but when I’m a bit more gentle with myself, I see a self that is simply cut from different cloth. I was not meant to be a guitarist in a touring rock band, for some non-theistic value of the word “meant.” 

The COVID pandemic lockdowns was also an interesting natural experiment for me + loud sounds. I stopped being around PA systems, airplane noise, crowd noise, etc. for a long period of time, giving me an opportunity to “reset” my relationship with loud sound. This actually granted a new positive emotional valence to the social event with loud music. Many things rapidly changed at once, but one happy change that has lasted is that I am less reactive to loud sounds now than I was before the pandemic.

Meditation on sound has been helpful for my decoupling perceptions of sound with emotion. The meditation instruction to listen without judging or creating meaning has been helpful for me to be less reactive to unpleasant sound, both from the external environment and the tinnitus that I perceive as being from within me. The therapy work that I have done starting with meanings and emotional triggers has made me realize that some sounds are bothersome because of what they mean rather than what they sound like. For example, if I hear a child yelling, that’s not necessarily bothersome, but if I hear the same yell from my own child, then that same sound has much more power. In some ways, this is a trivial conclusion: the gunshot sounds in a movie are fun, but a gunshot sound from the street in front of your house is literally an emergency. But many sounds are both bothersome to me in the realm of perception and in the realm of meaning. The yelling child sound is pretty annoying, even if it came from a speaker during a movie (I would turn the volume down).

Detangling perception, meaning and emotion for sounds has been helpful to me. Meditation has been one avenue and emotion-meaning work has been another. Now, I have started to notice the subtleties of my perception of sound in a more finely grained way. Another strange perceptual quirk has entered my awareness. Certain sounds, especially the loud, transient sounds with sudden onsets seem to provoke touch / proprioceptive-like sensations. Some sounds hit me, but not like being punched with a fist, more like crashing my torso into a gym mat. What is this? Am I reflexively tensing collections of muscles when I hear certain sounds? Do I actually have sound-to-touch synesthesia? Am I actually noticing something that is common to many people’s experience, but they usually ignore (as is the case, I think, for tinnitus and noise in the visual system)? Perhaps this bodily sensation is connected to my experiences earlier in life that I called “hyperacusis”, which is pain caused by sound. 

Back to noise: I hear stuff in silent rooms. I also see dynamic textures in perfectly flat colors. I see colors and textures when my eyes are shut in a dark room. Some of the noise that I see is actually myself: for example, the white blood cells wandering through the capillaries in eyeballs. I’ve heard that some kinds of tinnitus are actually the ear hearing the body, perhaps even the sounds caused by neural activity. 

The noise in my visual system never bothered me as much as my tinnitus. I wonder why the hearing-modality noise bothered me so much while the sight-modality noise didn’t. I care a lot about both senses, although hearing has always been my favorite. I think it’s because I developed a cycle of fixation and anxiety about tinnitus (and I noticed the tinnitus first). But my default-state equanimity about my visual perception noise actually gives me courageous motivation to chill out about tinnitus. 

For a while, I had recurring “referred pain” sensations in my wrists and hands. (Fortunately a skilled physiotherapist managed to fix this.) The referred pain caused a lot of anxiety, while it was there, 2012-2019, but for a long time I hovered between catastrophizing that it would end my career and delaying doing anything about it. The referred pain was really in my body and not only my mind, at least I think so, because it got better with treatment focused primarily on the body. The referred pain was so full of noise that it couldn’t quite be pinpointed exactly where it hurt. At one point, I was trying to communicate my pain to a doctor, so I put a dot on each point that hurt with a marker. The dots were all over my hands, never in exactly the same place twice.

I don’t get phantom smells, and I often have the experience of “not smelling anything right now.” Side note: I did lose my sense of smell, twice, during the same episode of having COVID. And, my mother is anosmic: she cannot smell. She can taste just fine -- a difficulty for uneducated theorists of the senses. I am glad to be able to smell. Maybe if I worked harder at smelling, I would start noticing the noise of smell perception; I assume noise is like certain views of God in that it is omnipresent.

I find the philosophical need to reject the Platonic ideals in their more conventional forms. When I was in college, I tried to shock people by saying that I didn’t believe in numbers. Now, I try not to wallow in that thought-blackhole: whether or not numbers are “real” is not a question that I can help answer and the result makes no difference to me. But whether or not I am constantly and vividly hallucinating a haze of unreal perceptions seems a lot more important! “Hallucination” carries a strong negative valence. But it’s also the wrong description, in my case. Even the most vivid of migraine auras and the loudest ear-ringing are clearly distinguishable as not-real for me. Instead, what I think I’m perceiving is a signal from reality plus sensory self-noise.

Reality doesn’t come as a convenient mixture of signal plus noise. (No Platonic ideals!) Even the current through a conductor has some intrinsic noise due to the thermal motion of the electrons. Noise is part of reality. I’m part of reality. And noise is part of me. I’m part of the noise. I am noise (partially). And there’s no reason to be concerned about that. 

Why am I writing this essay? Surely, my perception, my experience of the world is actually different to the bulk of humanity. The so-called-real and the so-called-not-real tango in my perception, hopefully guiding me to wise action and happiness, but there are no guarantees.

Saturday, May 10, 2025

The Thought-Blackhole

After too much thought, I conclude that the free will vs. determinism dichotomy is an example of the “thought-blackhole” concept that I’ve been sketching: an idea that draws in thought and thinkers, but for which progress is impossible. All effort on a thought-blackhole is wasted.

A view of the Milky Way supermassive black hole Sagittarius A* in polarised light

A view of the Milky Way supermassive black hole Sagittarius A* in polarised light

What else could be a thought-blackhole? Well, it depends a lot on who you are. If your name is Terence Tao, then there are a lot of tough math problems that aren’t thought-blackholes to you. But anything that’s worth Terence’s time is a thought-blackhole to me!

The opposite of a thought-blackhole is a situation where one has thought-leverage. If you have thought-leverage, then a relatively small effort in thinking can have a super-proportionate positive impact on the world. Thought-leverage usually requires you to be part of a team that’s part of a well-functioning organization, for you to be using powerful tools and for you in particular to have specialized insight or skill for the specific problem at hand. And thought-leverage is going to be about something small. A key to thought-leverage is the ability for teams to reason about a large problem in a systematic way that allows them to decompose the whole into manageable parts. You’re going to crack a nut-sized problem, perhaps one that no one has cracked before. 

However, an individual may be unable to contribute to entire subjects, entire schools of the academy. I am going to remain eternally stuck if I ever try to take on the history of the longbow in France during the 30-years’ war, or actually, the history of war, or maybe even I’m going to be ineffective at “history” entirely full stop. But that’s not quite a thought-blackhole, because there’s no irresistible attraction for me to study longbow history. 

But what would you think if all your friends talked constantly about longbow history, and newspapers everywhere published articles on longbow history, relatives regularly fought over the dinner table at holidays about longbow history, friendships commonly ended over disagreements on longbow history — and yet, no one ever got closer to some kind of practically useful knowledge from all this? Like, say, no one could build a period-correct longbow, or even recognize one in a photograph?

OK, so substitute “longbow history” with a currently divisive but multi-decade political problem (I'm sure you can think of at least one). It would be enormously desirable to find an effective solution for that problem! Everyone seems to have opinions! Interested people and the problem itself seem to demand thought from me! But, for most matters of this kind, there’s no way I can think up anything novel and useful. Such problems are blackholes for my thought, sucking energy in, giving nothing in return. (Hopefully, there's someone out there with thought leverage on each specific, thorny political problem, who can translate effort into positive change in some way that's a lot faster and more effective than voting every so often and complaining to their friends!)

In summary, a thought-blackhole has these two defining properties:

  • It has a gravitation-like attraction. One naturally falls into thinking about it.
  • No amount of thought makes any material progress on the matter. 

After having identified that a topic is a through-blackhole for you, what should you do? Here are some suggestions:

  • Consider why the topic is attractive to you.
  • Be practical: figure out what you can do about the topic, however small. Then do that and move on.
  • Be impractical: if it’s fun to think about, then go ahead! It’s appropriate to play computer games sometimes, and throwing time down thought-blackholes is not a priori less worthy entertainment.
  • Join a gang. We have few problems that can be solved by the lone scholar, but many that could (in principle) be solved by gangs, scenius collectives and teams.

These steps may be difficult and perhaps may involve reaching levels of enlightened self-control that are not possible to continuously sustain. In particular, for me, the “move on” instruction can be difficult. If a thought-blackhole is bothersome, but keeps coming back, then the situation reduces to the therapy-based playbook on how to manage intrusive negative thoughts. 

A key part of the therapeutic strategy, for me anyway, is acceptance. Whether by free will or the determination of fate, it’s best to accept that sometimes I will spend my precious hours trying to unravel whether it’s free will or determinism that decides how I spend my hours.


Thanks to Alec Doane for his feedback on a draft of this essay and his advice on what to do about thought-blackholes.

Friday, March 21, 2025

Debugging

Debugging is the process of correcting the mismatches between a formal system and reality, through acquisition and application of intimate knowledge of a system's implementation, intimate knowledge of the relevant part of reality and a reflective self-awareness surrounding both. Software running on a computer is a typical formal system, and that's what I will focus on. Similar principles apply to debugging electronics, mechanical systems and abstract mathematics.

Bugs are mistakes. Bugs are oversights. Bugs are fundamental misunderstandings. Bugs are Black Swans. Bugs are software. We can re-frame feature development in terms of the bug class of missing functionality. Therefore, the entirety of software development can be viewed as a process of debugging.

A bug, but not an issue

Every principle in software engineering must bow to making it work. Ergo, debugging is the work of software development.

Reality ain't no formal system

At least one program has no bugs: the program of zero length. It has no features. It’s the same in every language. It takes no time to execute and requires no memory. It has no dependencies. It requires no one to maintain it. But most programs have bugs. (Not all non-empty programs have bugs. I’ve seen some pretty robust “Hello, world” implementations.) 

Bugs are perversive because useful programs are formal models of parts of reality, and no formal model can fully encompass reality’s confounding infinite complexity. The software system that you're working on must take one more step toward reality: you have to fix a bug. Here's how:

  • Build knowledge of the system (like reading the code)
  • Build knowledge of the self (like bending your mind around the code)
  • Build knowledge of reality (often by talking to people)

Somewhere in the interplay of these three cords of knowledge lie the hiding bugs. Once found, the self can cause the system to accord better with reality.

Finding bugs

Programming is a paragon of rational thought, at least, until a bug appears. I have often had the feeling that a bug "defied the laws of physics;" even if the fact of the matter is that the rational computer system is really rational, debugging feels like an encounter with the irrational. Actually, to debug is to encounter one's own irrationality. Often the discovery of the root cause of a bug is a sudden experience where the irrationality reduces to a point: “Oh! Here’s the problem. The program transgresses reality in this one part.”

The substance of debugging is identifying where the bug is. In the difficult cases, the bug is not where you expect, so you spend hours pouring over the wrong piece of code. Bugs hide, but they cannot run. Therefore, you must approach a bug in your own code as if you are seeing an undergraduate's code for the first time. Do not assume. Be free of bias. Assuming competence is wrong. Assuming incompetence is wrong. Be open to anything. Sometimes you can spend all afternoon chasing the bug, only to find that the code is correct and the bug was in your understanding. That bug was in you. In most cases, the code is incorrect, but I consider that the locus of every bug extends to the debugger's mind. 

To find the elusive bug, get outside of yourself. Stop and do something else for a while. Relax. Describe the problem to someone else, even a toy monkey. Give up and go home. Take a warm shower. Read a journal paper. Meditate. Take a nap. Debugging is only a conscious process in the worst case.

The Hamming distance between success and failure is small. When you catch an elusive bug, sometimes—even usually—the fix is blindingly obvious, banally trivial and terribly short. Tiny bugs have a kind of post-hoc invisibility to them. Countless times I find that, an hour after fixing an elusive bug, I had forgotten what the root cause was! Isolate the exact code change that fixes the bug and put that change—and only that change—into a single commit and write a clear commit message “Blindingly obvious, banally trivial and terribly short fix for a highly elusive bug.” Then, rehearse what went wrong mentally to yourself, or write down: the presenting problem was X and I spent a long time looking at file Y but actually the root cause was a minor typo in file Z which was obvious in hindsight.

One-liner bugs cause millions of dollars of damage.

Hiding bug

A systematic approach to debugging?

Programming has every appearance of being a fully logical and systematic process. Could debugging be approached systematically, too? In The Debugging Mindset, Devon H. O'Dell has some great ideas on debugging systematically. He writes:

Through continued learning, malleable views of problems, and effective use of tools, you can become successful in debugging. Still, some insist that debugging is more of an art than a science. I think we can dispatch this idea entirely. It is clear that debugging requires learning, and the scientific method is specifically designed to yield new knowledge. The method, summarized: (1) Develop a general theory of the problem. (2) Ask questions leading to a hypothesis. (3) Form a hypothesis. (4) Gather and test data against the hypothesis. (5) Repeat.

And:

Forming a sound hypothesis is important for other reasons as well. Mental models can be used to intuit the causes of some bugs, but for the more difficult problems, relying on the mental model to describe the problem is exactly the wrong thing to do: the mental model is incorrect, which is why the bug happened in the first place. Throwing away the mental model is crucial to forming a sound hypothesis.

Approaching debugging from a systematic point of view is necessary, using tools is necessary and discarding bad mental models is necessary. Systematic debugging is necessary: if you can’t be systematic, then you probably can’t do software engineering at any level of competence. But I would still contend that debugging has artistic qualities. 

Consider this quote from the book “Free Play,” by improvisational violinist Stephen Nachmanovitch (p. 73):

In practice, work is play, intrinsically rewarding. It is that feeling of our inner child wanting to play for just five minutes more. 

This compulsive side of practice is especially easy to experience in the new art of computer programming. The program we write is itself a responsive activity, which talks back to us in real time. We get into a loop of conversations with the program, writing and rewriting it, testing it, fixing it, testing and fixing again until we get it right, and then we find more to fix. The same applies to practicing an instrument or painting or writing. When we’re really doing well and working at our peak, we show many of the signs of addiction, except that it’s a life-giving rather than a life-stealing addiction. 

To create, we need both technique and freedom from technique. To this end we practice until our skills become unconscious.

Once you’ve fully internalized a systematic approach to debugging, you might find that sometimes it doesn’t work! To overcome certain problems with systems, you have to enter the world of the meta-systematic, as David Chapman expounds here. For example, the senior software engineer must be ready to fix the meta-bugs, the problems in the way that an organization approaches software engineering. But even before that point, we have to face the non-systematicity that's intrinic to anything involving people.

Beautiful bug, not to be fixed


Software is about people

We write software for our customers! Customers, even if non-paying, are people. The larger context of any software system includes people. Often, we write software in teams larger than me, myself and I. Much of what constitutes "reality" for a software system is squishy human wetware.

The bug may be truly unfindable inside the source code of the program—even if you can get outside yourself enough to see the program for what it really is. You may not know enough about the users, the team, the organization. You may be blissfully unaware that your program is riddled with agonizing problems that hurt your users every day. Fixing bugs is a social process that involves talking to people.

The 10x engineer (if they exist) doesn't type ten times faster. But wise engineers develop a deep understanding of what people need and focus their effort on the most impactful bug fixes (which may be missing features). A lot of effort can be spent on coding / debugging that doesn't make much difference to the customer. It might be uncomfortable to leave the realm of the formal system, walk away from your desk and listen to people mumble their contradictory desires. But that's the riverhead of software value.

A ladder of debugging techniques

Bugs are so pervasive that any artificial limitation to debugging will eventually be a hinderance. Therefore, I accept debugging in all its forms, contingent on those forms producing desirable results (assuming we're not doing anything unethical along the way, of course). 

Instead of insisting that debugging should be systematic, or even more high-mindedly claiming that debugging should sometimes be meta-systematic, let's consider that all tools are ours to use in appropriate contexts. Here's a ladder classification of these techniques:

Each rung of the ladder goes meta to the previous rung. The higher rungs are more difficult to accomplish, but they add to the previous rung rather than replace it. 

There's a time and a place for asystematic debugging! When you're tired and frustrated and you just gotta do something, heck yes, comment out the line of code that throws the exception and run it again! Copy that answer from Stackoverflow. Ask the LLM to write your code! Hopefully, by the time you have completed a degree of formal training, you have other tools ready, too, because asystematic debugging won't reliably converge.

And after you've been programming for a decade, hopefully you've developed some kind of "taste" for software and an appreciation for the humanistic aspects. Hopefully, you've put a smile on someone's face enough times to know that that's what software's for.

Debugging infinity

The treadmill of debugging goes ever on. Fixing one bug causes or reveals another. We chase reality with our formal system of software, but we will never get there. I find the eternal parade of security bugs particularly bothersome, but they're really the tip of a deep, monstrous iceberg. We humans will always live with bugs. Bugs in software, bugs in law, bugs in society, bugs in our minds. 

But we keep on running, invigorated by the progress seen so far, joyful at the prospect of fixing one more bug. Make it work! Align the formal system just a little bit closer to reality, using every trick availble, by learning about the system, yourself and reality, for the benefit of people.


Not a bug, a feature

Appendix: an incomplete bestiary of debugging heuristics

  • Heuristic: you aren't looking at the bug! Unfortunately, you can only look in one place at a time, but this heuristic is to encourage you to look somewhere else.
  • Put a breakpoint at the start of main() and step through your whole program. Unfortunately, this approach takes a long time, but eventually you'll eventually be looking at the bug. Usually, when I try this, I get impatient and I end up letting the program execute past the bug. Maybe the realistic version is that you do a kind of random search through the program by guessing where the bug is and trying to stop shortly before the bug then step into it. Making multiple unsuccessful attempts to step into the bug is ok. It’s the one successful attempt that matters. 
  • Heuristic: software in layers (lasagna code). Bottom layer is physics, then silicon fab process, then mask level design, then gate level design, then processor architecture, then assembler code, then 'high level' language (e.g. C) [via a compiler], then sometimes 'higher level' languages (e.g. Python) [via an interpreter], then libraries, then application-specific abstractions, then application logic. Each layer is an abstraction with a certain amount of leakiness. If you're working in the application logic layer, then you will probably also need intimate knowledge of the application-specific abstractions. If you're working in an interpreted language, then you will probably need some knowledge of the workings of the interpreter. If you're working in a compiled language, then you will probably need some knowledge of the compiler. If you’re programming in Objective-C, then read the source code of the Objective-C run-time.
  • Bugs in the configuration. 
  • Bugs in the build process.
  • Heuristic: put abort() at the start of main(). If it doesn’t crash, then your program isn’t actually running. This really helps if you're running entirely the wrong program.
  • Reduce the program down to the minimal form that still reproduces the bug. Create a new branch and start removing code. Ruthlessly remove features and functions until you have the shortest possible program that still has the bug. Unfortunately, you still have to fix the bug, but now there’s less code to search through and puzzle over.
  • Human executed genetic programming.
  • Oblique Strategies: Prompts for Programmers
  • Debugging Zen, by Ben Ramsey


Escaping bug

Special thanks to Ed Blomquist for his comments on drafts of this essay.

Saturday, March 8, 2025

New Music: "The Colorful Path"

Wizard Peter’s first album takes us on an alchemical journey of creation, joy, horror and self-transformation. Check it out on Bandcamp!


Here we walk
The Colorful Path
Green to the left
Now red on our right
Blue and purple underneath

Betwixt virtue and villainy
There’s darkness all ‘round
Yet ye cannae mis-tread
With Wizard Peter
As your alchemical guide

As our footprints
(the inverse space)
Change the path
The path also does
Change our selves




Genesis



Tohu wa-bohu תֹהוּ וָבֹהוּ
Bewildered and astonished
All begins
χάος, nihil
Ma 間 et Śūnyatā
One divided by zero
The infinite plane
Swirling excitations
Of four fundamental fields
Ringing out 
Every direction
But definitely just
Forward in time
Eternally 
We are hiding between
Detailed initial conditions
Shrouded ‘neath
Liminoid depths
Alakazam! emerges
World and WIZARD
Shimmering star
Blinding shining
Serpent-slaying
Chaoskampf
Dirt below
Water around
Heavens above
I AM
W0RD
MEAN1NG
EXI2T3NCE
Life but a single flash
As first, so at last
O Sophia throw
Seven Archons
Hellward to
Eonic abyss
Await Hawking’s prophesy
Magnanimous final crunch
Or entropic
Universal heat death
Here ending galaxies 
Black holes
Evaporate
They say
“Play that again”
“Nay,” quoth
Lizard Pete
“It’s only 
Beginning”

French Suite No. 5 in G Major, BWV 816: VII. Gigue