site Search Results
Results for: Andrew Koenig
Order the NEW
Discounted Dr. Dobb's Developer Library DVD 6
Purchase the fully searchable DVD for $59.95 - a 60% discount! Features
21 years of Dr. Dobb's Journal, 15 years of Sys Admin
magazine, 14+ years of C/C++ Users Journal, 1 year worth of Dr.
Dobb's Digest, podcasts, videos and more! Order Now.
Good enough for homework?
Even if the algorithm didn't work, it was "good enough for homework." - Design
Why don't we check for overflow?
In my last note, I talked about an example of an abstraction with significant flaws that has stuck around because it is generally considered to be "good enough." I also said I would give other examples of such abstractions. Here is one such example. - C/C++
A Simple Matter of Conversion
Suppose you write a program that prints the value of the floating-point literal 0.1 in the programming language of your choice. Do you think it will actually print 0.1, or will it print something like 0.10000000000000001? Can you be confident in your answer without trying it? Suppose you print the value of a floating-point number and then copy that output into a program as a floating-point literal. Will the value of that literal be exactly equal to the floating-point number that you printed? Can you be confident in your answer without trying it? Surprisingly, the most useful answers to these questions have not only been understood for more than 20 years, but these answers have even been implemented efficiently, and made available free of charge. Nevertheless, most programmers do not even know that these solutions exist, and most programming-language implementations do not use them. - Design
What can we do about finger-pointing?
I have paid for software from two vendors; the two software packages will not work together; and each vendor blames the other. - Design
Abstraction Quality Is Important
Whoever provided the abstraction in the first place has an easier time of it this way, but only at the cost of shifting some of the implementation work to all of its users, who must then repeat it. - Design
Two rights sometimes make a wrong
Dealing with these side effects often requires creating ad hoc exceptions, and these exceptions can create their own vulnerabilities. - Design
Beta-testing Two Related Products Together
if you are using the beta version of A, you must also use the beta version of B... - Design
When the interface programs the user
If you are using a keyboard with aftertouch, you can control how a note sounds after you have already started playing it. - Design
The high cost of broken tools
- Design
Programs That Transform Their Own Source Code; or: the Snobol Foot Joke
There is a collection of jokes at various places on the Web, for example Susan Stepney's How to Shoot Yourself In the Foot, that invites you to compare a C program for shooting yourself in the foot with programs in other languages. The C program is straightforward; those in the other languages have extravagantly elaborate effects. Except Basic, which manages only to soak your trousers with a water pistol. I was reminded of these jokes by Christopher Yeleighton's reply What about reflexion? to my New Year's resolutions about how to choose a programming language. Christopher asked whether I would use a language where I can't determine the contents of a function at run time. I do use such languages, but that's not interesting, so I'm going to show you how I program in one where I (almost) can. It's a beautiful and wonderfully mutable language called Snobol4, which enables you to pump out new statements at run time like a sausage-maker gone berserk, except that sausages are not executable. I hope that my article will teach you enough Snobol to understand the Snobol version of the foot joke.
- Design