Chicken And Egg Problem

A ChickenAndEggProblem is a more prosaic way of describing a BootStrapping problem.

The first C compiler writers had a variation on the ChickenAndEggProblem. They needed to write C compilers. C made a great language for writing C compilers. Of course, you couldn't actually compile your first C compiler until you wrote a C compiler. This sounds like a paradox, but it really wasn't. You would simply build up a compiler from a hybrid of C and assembly, perhaps even hand assembling some of the C. As your compiler got better, you'd eventually port more and more of the compiler to C. Eventually you'd have a C compiler written completely in C, which could compile itself. Each C compiler could then give birth to better C compilers.

[C evolved from B [see BeeLanguage], which already had a compiler written in B. However, that compiler was a rewrite of a B compiler written in TMG, and the compiler for the implementation of TMG used was written in an assembly language for the PDP7. I assume the assembler ultimately derived from a 'hand-assembled' program. See DennisRitchie's account at http://www.cs.bell-labs.com/who/dmr/chist.html.]

A similar situation exists with machine tools. To cut an accurate thread you need a thread cutting lathe, that depends on an accurate thread.

Another ChickenAndEggProblem is described on UnitTestingLegacyCode. You have a piece of legacy code. It is highly unmodular. You want to write unit tests for the code. You could unit test the code if it were more modular. You could make the code more modular if you could safely refactor the code. You could safely refactor the code if you had unit tests on the code.

-- SteveHowell

In other words, DeadLock.

A ChickenAndEggProblem is a non-existent present problem. We have both, so we can go from chicken to egg or egg to chicken depending on which we desire.

With the Legacy Code situation, it sounds like you want to change the Legacy Chicken into a Modular Chicken. The problem is that the chicken that exists in the interim is neither. Changes that are designed to create the Modular Chicken affect what is left of the Legacy Chicken. You must write a unit test for a Remains of the Legacy Chicken, and then for the modules that make up the Modular Chicken. At least, that is the approach I would take. You would know what parts of the Legacy Chicken's code you were modularizing, so it should work. Especially if you KnowWhatYouAreDoing?. Or you can JustStartOver? and create the Modular Chicken from scratch.

Eggzactly.


Between "which came first, the chicken or the egg?" and "pulling one's self up by one's own bootstraps", I'm not sure which is the more prosaic and which the more poetic. Both are examples of self-referential dependency, indicators of feedback dynamics resisting system changes, and the hallmark of really hard problems. To solve, you need a little bit of imperfect chicken, a little bit of imperfect egg, or a boot with at least part of a person in it, and a whole heap of patience and resolve.

I think the latter is more poetic.

I'm not sure if anyone has ever demonstrated the possibility of actually pulling oneself up by one's bootstraps, as opposed to half up, which is all I can manage. I can, however, visualize it being successful (the trick being to impart enough momentum from the pull that it lifts you onto your feet). I can also visualize it being futile, if one attempts, whilst on one's feet, to lift oneself off the ground by pulling on the bootstraps (always assuming that there are no pulleys involved, just straps connected to boots in which are feet)

Conversely, as regards chickens and eggs, this has always struck me as a question of semantics. We know we have chickens and eggs, so there is no resonance in this image with possible futility. We just speculate futilely on the defining characteristics of chickens and their eggs. If we believe that chickens evolved, we wonder whether an almost-but-not-quite-chicken could lay a genuine chicken egg, or must the first genuine chicken have hatched from an almost-but-not-quite-chicken-egg. Since the First Genuine Chicken would probably (I guess we'll never know for certain) have interbred with almost-but-not-quite-cockerels, she might very well have had hatch from her first egg (by some reasoning, the First Genuine Chicken Egg) something which was not a genuine chicken. This is neither straightforward nor useful. Accordingly, I prefer to adopt the alternative reasoning and maintain that, by my convention and inherent in my definition, an egg from which hatches a genuine chicken is a genuine chicken egg and therefore the First Genuine Chicken hatched from the First Genuine Chicken Egg, so the egg came first.

On the other hand, if you believe that chickens were created, the Creator could have created the first chicken(s) live or as eggs. Had I been the architect, I would have reasoned that creating them live would be consistent with the more straightforward approach to be adopted for viviparous animals, so the chicken would have come first.

[Of course the truth is that there is no such things as genuine chicken, it's a classification humans made up. By the time we called them chickens, they were already "genuine" chickens, so the chicken came first. Find out who named the chicken, and you'll have your first chicken. Before that they were just birds, that evolved from other birds, and they had been hatching from eggs for eons while continuing to evolve.]

Exactly. The ChickenAndEggProblem simply boils down to CreationVsEvolution? - the chicken was first if Creationism applies, the egg was first if Evolutionism applies. It's therefore only still a problem if (like me) you believe in BothCreationAndEvolution?. But only if you believe in both creation of chickens and simultaneous evolution of non-chickens into chickens, which is an unusual position bordering on the perverse. Perhaps I'm perverse then :) Actually, that's a good point, so I probably fall into the EggFirst? camp then.

In either case, you either have an egg with a chicken in it, or a chicken with eggs in it. Darwin indicated that the most adaptive survive, and anyone can see that a chicken can flee from danger, whereas an egg cannot. Which strongly suggests, according to both Darwin and Creationists, the chicken came first. It may be that in the future, when everyone gets their chickens in a row that both will see the truth. :) -- DonaldNoyes

Which brings up several other questions:

[I'd also like to mention, it's illogical to believe in both creation and evolution, they aren't compatible. So you aren't perverse, you're just irrational.]

Interesting statement. Can you provide a clear-cut, water-tight reasoned argument as to why they're incompatible? In particular, assuming evolution to be true, prove to me that it is not the case that the world was created at 16:03 on 1823-07-12.

[How about because that's only 181 years ago? If you need more reason than that, I await a better question.]

I can't tell if you're being flippant or if you simply don't understand the point. I would claim that an omnipotent being could have willed the universe as we know it into existence at any time, making it appear to have been there all the time. In this case we have creation. Since evolution (of sorts) has been demonstrated over periods of time on the order of decades, we also have evolution. For you to claim that evolution and creation are not compatible you have to prove that the universe as we not it was not brought into existence at some point in the comparatively recent past. If you can't, then creation and evolution are mutually compatible because I have produced a model of how they can co-exist.

[Guess I missed your point, but it's an interesting one. I don't agree with your definition of creationism, since in my book, creationists believe in the bible/genesis/Adam and Eve thing. That is clearly not compatible with evolution. If you define creationism as simply a deity willing the universe into existence, but in a manner that makes evolution appear to be true, then I'll concede that you may have a point. The thing is evolution has been demonstrated, Not true. Variations within species has been demonstrated. No species has been demonstrated to vary into a new species. -- BrucePennington it has supporting evidence, creation on the other hand is nothing more than wishful thinking, I could just as well say the universe was created by purple unicorns only 5 years ago, and be on the same footing as creationism. It is nothing more than wild speculation with absolutely no supporting evidence. Boy, I get tired of hearing this lie. There is a compelling, not just a lot, compelling amount of evidence supporting the truth of the Bible, and thus, creationism. -- BrucePennington Evolution is a theory, creationism isn't. A theory that by it's very definition isn't falsifiable, isn't a theory, it's a wish.] Creationism and biblical literalism are two different things. What you are talking about is often referred to as "young earth creationism", but other variants exist. Moreover, there is compelling evidence supporting the evolution of species, which creationists either ignore or hold was deliberately "planted" by the divine creator (see below).

If we accept that an omnipotent being created the universe full of evidence that it was older than it is, we can apply that model to any observation. Objects do not attract each other; an omnipotent being moves them toward each other and makes it appear that they attract each other. Matter is not made of atoms; an omnipotent being makes us think they are. This is a modified form of solipsism, based on the existence of the self and one other being (the omnipotent one). What is the purpose of investigating any aspect of nature if it could all be the work of some trickster god? If what we observe isn't evidence it all becomes magic.

So if I understand you correctly, you're saying that it could be true, it's just that you think things would be pretty pointless if it were and you choose not to believe that. It appears that your assertion that evolution and creation are incompatible is a consequence of your personal belief system. You appear to accept that in the belief system I presented above we do in fact have both creation and evolution.

I'm saying if it is true there's no point in holding any believe system. There's no point to the scientific method. There's no point discussing anything. Everything could be a trick, even evidence for or against the trickery. There's no way to find out.

Now push back the moment of creation to 500 million years ago, and add to the model that the omnipotent being has not interfered after the moment of creation. Now it does make sense to investigate the universe and we have creation and evolution. I think this suffices to show that your claim that they are logically incompatible is wrong.

If we accept the initial deception we have no reason to think the omnipotent being hasn't interfered for any period of time. Any theory can be trumped by the deceptive god model. I'm not the person who said evolution and creationism were logically incompatible. I'm saying that if we accept this hybrid model we discard any ability to build and test other models.

[Careful, guys...there are many kinds of creation theories, not just one. The most popular ones do tend to directly conflict with evolution (e.g. every fossil in existence was created by God when he created the universe 4000 years ago), but at the opposite extreme there are some people who go even further than the above example and say "God created the big bang and then stopped participating in the universe" (in all seriousness) and call that a creation theory. If you're going to argue, define your terms first, otherwise you'll never know whether you truly disagree, or its just because you're thinking of different examples. So, what do you mean by "creation" and which part of it do you mean conflicts? Specifics.]

Assuming you can discuss these things on wiki, and there's a point in discussing them at all, and if there's a point in that one further needs to assume that there's a point in discussing them on this wiki. All of them increasingly dubious assumptions.
The ChickenAndEggProblem is not so clear cut as CreationVsEvolution?. If God created a chicken, He could easily have created an egg for it to hatch from. He could have even created chicken and eggs at the same time (an instant clutch.) As for evolution, the 'first' chicken could have been in an egg, but is the egg a chicken egg or is it not? Suppose a non-chicken bird normally lays blue eggs but suddenly, the bird lays white eggs, and from the eggs spring forth chickens. We could say the egg came first since both the egg and chicken were new. Now consider if the eggs had been still (non-chicken) blue? Both creation and evolution can resolve down to both answers.

No. The question doesn't require the egg to be specifically "chicken" in type, so the egg (of some type) came first according to evolution. For this to hold for the creation theory would be bizarre.

Here's a cute quote from the evolution camp:

A chicken is just an egg's way of making another egg. -- unknown


The Talmud (2nd-6th century C.E. compendium of Jewish law and philosophy) contains an interesting discussion about how the first blacksmith's tongs were made. A blacksmith's tongs need to be made of iron, but how can a blacksmith make a new pair of iron tongs without an existing pair of tongs to handle the molten iron with? The sages concluded that God himself must have made the first tongs during the six days of creation, at twilight just before the seventh day.

Very telling. The Talmud authors couldn't conceive of using rocks, sticks wrapped with wet towels, bronze tongs, etc., so the answer must have been divine intervention.


It seems to me obvious that the tongs just evolved into tongs. The principles and formation rules for tongs making evolved from the big bang. It took 2.5 billion years to form them, and another billion or so for man to find them as portrayed in :

A fable: "The Tongs, the first shotput, the first blacksmith was a woman and Factories were made by men and women in one day."

 "and the evening and the morning were a day"

Curiously while two of our ancestors were playing catch rocks (the forerunner of the shotput)(it was a big heavy rock) over a fire in a cave, noticed a pair of tongs resting beside the fire. Puzzled (they had never seen the tongs there before, so they tried to figure out what they were and why they were there. They both shrugged their shoulders (they did that then to express dismissal) and went back to playing catch. Then another one of them picked up the tongs, looked at them and decided to use them in the ongoing game of catch. He (the first to use the tongs was a man) tried to intercept a throw from one to another, high over his head, but in the act of doing so, dropped the tongs and the rock tumbled into the edge of the fire. One of the players tried to retrieve the stone from the fire using the tongs, and in doing so, found that the rock had melted and that with the tongs, she (the first blacksmith was a woman) could shape the rock into another form. When the fire had gone out the next morning, it was discovered that what she had formed was the first anvil, and beside it rested the first sledgehammer. (will wonders ever cease?) That is why the first blacksmith shop and most thereafter were in caves or buildings. There is magic in a covering they figured. Interestingly while it took evolution 2.5 billion years to form a tool, man made the first factory overnight. :) -- DonaldNoyes

Related: WriteJustOneTest MockObject UnitTestingLegacyCode


EditText of this page (last edited November 21, 2014) or FindPage with title or text search