Older blog entries for jdybnis (starting at number 12)

9 Sep 2002 (updated 31 Jul 2003 at 00:39 UTC) »
Testing Software Can Make it Easier to Prove Correctness

raph mentions Dijkstra's quote that testing can only show the presence of bugs, never their absence

Implied in this is that if you develop a formal proof that a program is correct, then the testing becomes superfluous. But in fact, some types of testing can reduce the burdon of developing the proof.

Instead of proving that a program is always correct, you prove a weaker condition. That is: if the program is correct in one case then it is correct in all cases. Then you write a test to establish that the one case you did not prove actually works.

One specialized version of this technique is, using a proof to establish the induction step of a proof by induction, but then writing a test in order to establish the base case.

30 Jul 2001 (updated 31 Dec 2002 at 07:49 UTC) »
sjanes71 and gary are right, directories suck.

Directories are a conflation of the distinct, and sometimes conficting, requirements of naming and classification.

For naming, we want identifiers that are globally unique and stable over time.

For classification, we want categories that are meaningful and can change over time.

The two sets of requirements are conflicting. In particular, we want categories to have globally unique identifiers, but we can not assume that they will have one globally-unique and unchanging meaning.

A lot would need to be done to replace the current system of directories in UNIX. It has a lot of inertia. Practically every program that interfaces with files expects them to be addressable with some variation of /foo/bar/baz. Plus it took a long time to create the stable, fast, and scalable implementations of the system that we have today.

22 Jun 2001 (updated 15 Sep 2002 at 20:43 UTC) »
xcyber: sort the tables then compare them.
15 May 2001 (updated 15 Sep 2002 at 20:45 UTC) »
ksandstr: what do you mean by an idempotent function?
8 Feb 2001 (updated 15 May 2001 at 02:57 UTC) »

Had a disappointing weekend, where I brought my new computer to an all night quake gathering, only to discover my computer would not run quake!

After hours of forcing other people to swap parts of my computer into their systems, I gave up hope of figuring out what was broken. I spent most of the night playing SSX on a playstation someone had thoughtfully brought with them.

The next day, during a second marathon troubleshooting session I discovered that my ASUS A7V motherboard + GeForce 2 + Win2k were not playing nice. The reason I didn't discover it earlier, was that everyone else had a GeForce 2 too. I should have installed Linux. :)

Anyway, I bought a new motherboard. Now everything is fine and dandy.

And I must say, Cygwin has a pretty slick install program put togeather.

27 Jan 2001 (updated 31 Jul 2003 at 00:48 UTC) »

graydon:Yes, I think the right question is: "why isn't '() coerced to #f." More generally, why isn't the coerce-to-boolean form specialized for every type? The whole idea of everything being coerced to #t except for #f, in a way already violates the disjointness of types. If the system were totally pure, it would raise an error when anything other than a boolean constant is tested for truth. So, there is already a coerce-to-boolean form for each type; it just happens to be a constant function. I don't think it is any worse to define a more interesting coerceion function, different for each type.

Cognitive Illusions

I saw an interesting lecture yesterday on cognitive illusions in human/computer interaction; these are places where the mind incorrectly applys a hueristic to come up with a solution, instead of using logical thought.

One place this pops up is conditional probability. Write down the solution to the following problem before you check the answer.

Your friend has two rabbits. One of them is a girl. What is the probability the other one is a girl too?

For now, I've put the answer at the bottom of notes on my account page, because I can't figure out which of the allowed tags will make background black to do the hidden text trick.

Update: sarum is right, your friend wouldn't pick the rabbits randomly. So lets say, your friend has a rabbit that just had two children.

If you don't believe the answer, think about these other two problems, and how they are different.

There are two rabbits in a cage. The bigger one is a girl. What is the probability the other one is a girl too?

Update: and to clarify this one too, this question is not about rabbit physiology.

There are two rabbits in a hat. You pull one out, it is a girl. What is the probability the other one is a girl too?

Really tough to wrap your mind around, huh? If you still don't believe me, I'll make you a truth table.

26 Jan 2001 (updated 26 Jan 2001 at 05:39 UTC) »

Since Scheme seems to be a topic of discussion lately, maybe someone could answer a question for me.

Why is #f distinct from ()? For a language pushing minimalism, it seems unessesary.

Compare the following Scheme code to the same function in CL.

(define (breadth . trees)
  (if (null? trees) 
      (cons (map car trees) 
            (apply breadth 
                  (apply append (map cdr trees))))))
(defun breadth (&rest trees)
  (and trees
       (cons (mapcar 'car trees) 
             (apply 'breadth 
                    (apply 'append (mapcar 'cdr trees))))))

BTW, that person that was pestering me for a homework solution kept calling and emailing me, up to the day it was due, but I think someone else gave them help. Sheesh!

22 Jan 2001 (updated 19 Nov 2002 at 02:32 UTC) »

just venting

21 Jan 2001 (updated 21 Aug 2002 at 06:10 UTC) »


12 Jan 2001 (updated 26 Jan 2001 at 05:38 UTC) »

I'm going to buy a new computer in the very near future.

I'm will be doing some Java programming, and I want to try out some of the new free IDE's. The ones that are written in Java themselves, are painfully slow on my Pentium II 233 w/ 128MB RAM. So...

The system I'm planning on putting togeather is:

  • AMD Athlon 850Mhz
  • Asus A7V, VIA KT133 motherboard
  • 512MB PC-133 SDRAM memory
  • IBM Deskstar 75GXP 45GB HD
  • AOPEN GeForce 2 MX AGP vidio card (only $99!)
  • I'll salvage the NIC's, sound card, and CDR/W from other machines. And it will have no floppy. <Yes!>

    Including the case, tax and shipping it's going to cost just over $900. Which I think is pretty good.

    Update: I bought it all; spent $903 and change. Only I forgot to buy a fan, and you don't run an Athalon without a fan. Doh! So I've been using my same old computer, while I've had this kickass machine sitting on my floor for over a week. :)

  • 3 older entries...

    New Advogato Features

    New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

    Keep up with the latest Advogato features by reading the Advogato status blog.

    If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!