=================================================
BC: Do you ever look at your own code and think, "What the hell was I doing here?"
AW: No, I guess I don't.
BC: Wow! I confess that I tend to write comments for my future self. I know that when I come back to code I've written, I often don't recall instantly what the problem at hand was or how I solved it. Now you've got me thinking that maybe I'm just in the wrong language. When you're at this higher level of abstraction, maybe it's easier to see your intent.
In terms of debugging your code, obviously the power of a terse language such as K or Q is that, presumably, it's easier to find bugs by inspection. How do you debug them?
AW: In C I never learned to use the debugger so I used to never make mistakes, but now I make mistakes and I just put in a print statement. K is interpreted, so it's a lot easier. If I'm surprised at the value of some local at some point, I can put in a print, and that's really all I do.
BC: That works well when you have deterministic inputs. What if the nature of the problem is just less reproducible—for example, if you were in an event-driven system where you had a confluence of events that led to a problem?
AW: It has been 20 years now that I've had Wall Street customers—they're doing 2 billion transactions a day and they have trillion-row databases—and in those 20 years, there was one time where we couldn't reproduce the bug. That was nasty. I knew the kinds of operations that they were doing and I finally found it by just reading my code.
=================================================
I can't believe, well I guess I can, and have to, that people out there can be this good. Is there something missing from the reality painted here?
In general, Mr. Whitney seems like a freakin' genius, and I'm gonna take a stab at learning some K just to see what it provides. For those interested, from a previous thread today about Mr. Whitney's work, is Kona an open source implementation of K: