Saturday, March 28, 2009

The Evolution of Religion

In Texas, where I lived for a couple years during my college years at Texas Tech, there is an ongoing battle between Science and Religion. This battle has been raging long before Charles Darwin, even long before Galileo, and perhaps even before either manner of thinking had any name whatsoever. Cavemen probably bashed each other's heads for having ideas that didn't fit in with the local hierarchy.

But I fit most comfortably with the Science crowd. It isn't because I am smug in the belief that Science has all the answers, or that Religion is obviously flawed, or anything like that. It just turned out that way from many years of working with science, working with computers, and thinking in a kind of cold, binary ON or OFF way. Nearly everything falls into a category of either true or false, and very few things are both or neither.

Religion is not merely a kind of Science, nor is Science merely a kind of Religion. Even though there is a Journal of "Christian Science", that is only a name, not a material fact. Christ, in the form of Jesus himself, would never have called himself a scientist, and certainly the reason why he was crucified was not because of his scientific beliefs. That reason was entirely political -- emotional, irrational, not logical.

Logic is a system of carefully tracking real facts. Facts are observations about the world. Facts should not be confused with Fabrications, which are made up stories, or fictions about the world. Sometimes stories can feel as though they are true, and even contain true facts as elements within the stories. And a story may be entirely filled with facts, yet not be a "true story." The facts must also be be in the correct chronological order and refer to the correct objects in order for a story to be true. Facts which are made up, or misstated are not actually facts at all.

Science is only allowed to work with the evidence in hand -- just the facts. Although sometimes verbally handed down information from long dead relatives can be just as true or factual as anything directly touchable now, there is rarely any way to test it. The test is the element that is missing from Religion. The test is what makes Science work. If something fails the test, it fails to be true, no matter how pious or deified the source of that something may be.

The argument about Evolution, and the reason that it is so vehemently denied by zealots of many religious ideologies, is all about the validity of the information handed down from those long dead relatives. To claim that evolution is true is to call those people liars. And to call them liars is to defame or ridicule the religion they preach. And if the source of the preaching is God himself (or whatever gender) then it is claiming that God is a liar, a supposed impossibility.

Yet, at one time in our history, far before written texts or verbal histories could be compiled (regardless of their validity,) there existed people who could only survive by directly facing the facts of the world. Whether those facts were in the form of harsh weather, ferocious animals, jealous rivals, volcanic eruptions or whatever else might befall them -- those distant ancestors were not arguing over the existence of Gods or DNA molecules. They had much more pressing matters before them. If they failed those tests, they died. If they passed the tests, they might survive long enough to have children.

We are the great-great-great-grandchildren (many times removed) of those distant ancestors. It doesn't matter whether they were once apes or were spontaneously created in situ by some God, the fact that we today exist, and we have fragments of history that we can trace back many thousands of years in the past means that our ancestors were at least existing that many thousand years ago. We have evidence of those people living at the very minimum of 11,000 years ago, which exceeds the old "6000 year history since Adam" theory by another 5000 years.

But we also have evidence of human existence from long before then, including the times when our ancestors more closely resembled apes than modern humans. We still had feet, we still had societies, we were still humans -- but not very smart and not appearing so much in the way we do today. How do we know that they were human? By the same way we can dig up 6 months old bones and determine whether it came from a dog or a cat. Whether the bones are 600,000 years old or 1 year old is only a problem with the quality of the preservation. The details used for classifying a dog from a cat from a human from whatever other animal are still there.

But why do Religion dogmas decry this kind of information in lieu of "the word of God", even in the face of crushing numbers? Because of another kind of logic. That kind of logic has to do with that which is Inferential rather than that which is Deductive. Deductive logic starts with "something" and then eliminates all conjectures which are inconsistent with that "something" existing. If you have a Duck, you can eliminate the conjecture that it is a mammal because of many missing features, and especially the facts that a mammal has no feathers, and a mammal has no wings, and a duck does not feed its young with milk, and so forth.

Inference can create things out of nothing. For instance, given the conjecture that Angels can do anything, however silly, then it follows that at least one Angel can dance on the head of a pin. And it then follows that if one can do that, then more than one Angel can dance there. There are still more inferences to go, such as exactly how many Angels can dance on that pin.

So, although Inference can be very useful, especially if based initially on facts, it is very dangerous when based on fallacy. Many terrible medical "facts" turned out to be untrue, much to the horrendous agony of the unfortunate victims. If one starts out believing that a person is "possessed by demons", then one might then think it is perfectly acceptable to drive out those demons by heating the head of the afflicted person, thereby making it too uncomfortable for the demon to remain.

Science is also guilty of many horrors. Science has no claim on morality. Just because something is true does not make it sane or desirable. Atomic bombs are perfectly logical and scientifically sound ideas, but their usage is reprehensible. So, too, are medical experiments on concentration camp prisoners, children or any other captive person -- even upon hapless animals. The ends are used to justify the means, but torture is no less agonizing just because the result yields better gas mileage.

Religions started out being Governments. It is not clear, since there is nothing written down, nor even any oral culture from those days, but the very first ideas about Gods were probably more basic-- such as "the spirit of fruit", or the "god of buffalo" or something like that. They were early attempts at understanding the underlying basis of existence. Knowledge yielded power, and power builds upon itself.

Science is much like that early kind of "religion" in that it seeks to understand the underlying reality, and thus to gain power in that knowledge. With science we can grow more crops in barren lands, clean dirty undrinkable water, defeat our most troublesome enemies, and so forth. It gives us great power. Yet, with that power there must be responsibility. Going around willy-nilly blowing things up with atomic bombs is not wise. Wisdom is not merely a collection of facts. Wisdom requires a wide range of perspectives in which those facts co-exist.

Religion also, at one time, attempted to give man wisdom. The wisdom of Solomon, for instance, still holds today regarding the affairs of people, their families, their children, their homes, etc. Solomon was very wise, indeed. There are many analogs to Solomon in other religious texts, from other cultures. With that wisdom Kings could rule over more subjects for longer times, with greater, grander results. Stupid Kings lasted very briefly, and sometimes resulted in the loss of entire civilizations.

Today, Religion and Science are at odds. They should not be, since both can benefit from the aspects of the other which mutually affirm a responsible, moral and true philosophy. To simply blindly stone harlots because of something that was written two thousand years ago is not rational. In some strongly religious cultures, women are punished for the actions of men. Would God really condone such a philosophy? Or would this be the writings of some paternal order of bullies?

Religion would benefit from all aspects of Science -- especially the ability to modify the "writings of God" to fit with observable reality. So many of those writings are the mistranslations of earlier languages -- dead languages which no one living today really understands. The "creation of Adam and Eve" can be construed many ways, allegorically or literally.

But observably, the creation took much, much longer than the Six Biblical days, by a factor of billions of years, and it is unlikely that Adam was just walking around in a daze, whereupon God suddenly created Eve as a companion out of the blue. Observably, man and woman co-existed and Adam was born from a female -- a proto-mother, even if "God intervened" to make Adam somehow a different species than the mother.

Religion overlooks so many things which simply don't make sense. In my early years, my mother wanted me to read the Bible and "be religious." OK, let's read the Bible. (I had read it for many years before then, but I needed to satisfy my mother's need, so...) Anyway, everything was fine-- In the beginning, Let there be light, Heaven and Earth, creation of the Adam, naming all the animals, etc. And then Eve, the Garden of Eden, Cain and Abel. Then Cain slew Abel -- whoops! God cast Cain from the Garden of Eden -- Whereupon he went to the Land of Nod -- where he MARRIED! STOP! Hold everything.

I asked my mother, "So, who did Cain marry? His sister?"

She answered, "Don't question God."

But I just asked again, "Well, if it doesn't make any sense, why am I believing this? Just because somebody tells me to believe it? -- as if someone commanded me to 'paint the wall green' or 'throw rocks at squirrels', that kind of command?"

The problem is, to a person who works with Science day in and day out, the test of logic is the overwhelming force. Stories and fables, no matter if they are the word of God or the word of comedians, must meet a minimum reality test -- else they are just so much babble. If the stories fail the test, if they are irrational, no amount of arguing and demanding can force me to believe them.

No one, no Church, no University, no person -- has the authority to override a logic test. The very best someone might succeed in is to make me pretend to believe something that I don't really believe. But that is all. And that is a shallow victory, yet a victory that has been sought by Religion for eons.

On the other hand, whatever facts or philosophies I believe to be true, having passed whatever tests of logic I implemented, or tests implemented by others greater than myself -- are a private matter. I can't force people to believe those things unless they have passed their own system of tests. If they choose to bypass logic and use some other means of testing reality, fine. But pardon me if I stand far away from those people while they handle chemicals and smoke cigarettes.

Monday, March 9, 2009

IDE, IDE, IDE, the IDEs of March

This is the story of installing a billion software development environments, and which ones gave me fits and which ones I will continue to use, at least until I am too dead to program anymore.

First of all, as the most basic "IDE", there is the Unix Makefile and the GNU compilers. This includes the infamous VI or EMACS (or whatever grim editor of your choice...). I have been using this kind of environment for decades, ever since the early Unix days, especially when the GNU compiler was available for most of them, and the "gdb" debugger (or something like it) existed. Yes, this kind of world is grim, but there is an elegance to it and a reliance on human intelligence that cannot be equaled by anything else, so far.

But it has the terrible drawback of being clunky. There are much better editors nowadays, and even make file makers, automakes, and so forth. Yet, the clunkiness will never go away, and you spend a lot of effort tweaking makefiles and all the dependencies and the order of object files and libraries. It is a pain in the butt, even on a single Unix/Linux machine. It is awful when you start making everything machine and OS independent.

VC6.0 through VS2008 and .NET. In recent years I've had to put up with Microsoft's IDE for a lot of programming. The early ones were pretty grim, and mostly made you get buried in complex object systems that assured your life would be a giant Microsoft Pain In The Butt Object forever. The later versions, especially now that there is the "CLI" or Common Language Interface, it is even worse than ever. Managed Code may be all the rage, but it is just crappy programs that result from it, unless you are running the fastest, most memory endowed machines on Earth. Some people are, so they don't notice how piggy the stuff is.

Many people LIKE Microsoft, and all it's complexities and sludgy software that puts Quad Core boxes on their knees. It does have an extensive, extremely robust functionality, and I cannot fault the standards of programming that Microsoft has set. As long as their companies buy all the tools and fast machines for them to develop on, who cares about anything like cost and power consumption. Now, there is C# (sort of a C++ version of Visual Basic) and all the C#pies in the world pray at the alter of Microsoft, once again.

My biggest complaint with .NET was when I tried to write photograph processing software using .NET. What a nightmare. It made accessing the pixels of any particular image file almost impossible. So I wrote a low-level processing module to do the heavy lifting and used .NET to do all the weird Microsoft GUI stuff. It kind of went -- thunk thunk thunk as it processed images.

Onward. GTK+2.0. On my two personal Linux boxes, one a modern Dell laptap with openSUSE 11.1, the other an old clunky Thinkpad 600e with Ubuntu (Xfce). They are able to use a variety of IDEs, despite the slowness of Thinkpad, as well. That poor little thing could never run the VS2008 crap, but it runs all the others (which I list below) OK. I also used a Redhat 64bit server for one contract, but no IDE -- straight makefiles for that dude. Things worked good, though. GTK+ is a very extensive, complex GUI tool kit (GTK == Gimp Took Kit) that was used to write the Gimp Image editor. Very, very complicated, and lots of low level C stuff, but it writes high performance programs.

Eclipse.A one-time IBM product -- now Open Source. I like Eclipse for Java things pretty good. It makes good code, it is fairly elaborate in helping with editing, finding bugs, automatically fixing certain things and debugging. It makes Java programs that run identically (or nearly so) on all Linux boxes and all Microsoft boxes. Eclipse also has a C++ interface (perspective, it's called), but it isn't so elaborate or useful as the Java related stuff. Eclipse is a bit intense for the Thinkpad, but the programs created by it run very nicely on the Thinkpad 600e. I was able to write decently performing image processing routines directly in Java that worked adequately, if not lighting speed.

Netbeans. I also like Netbeans. I have used it to make some Java based web pages and stand alone Java programs that are pretty tight and portable. It also allows C++ and (with some difficulty) is able to make portable code, within limits. It does not involve any particular GUI for C++, so you are on your own there. I used GTK and a few extra tools to make GTK somewhat easier. But GTK at it's easiest is NOT easy. It is fast, however. It is probably possible to mix wxWidgets into Netbeans, but I have not tried yet. Especially on Microsoft, where the most difficulty getting those things to all play together lies.

Anjuta. This is a very cute Linux program, and it has some nice interfaces to other things like GTK/Glade and other programming aids. I actually liked using it, except that it wouldn't run on Microsoft without a massive effort, and it sometimes crashed in the middle of very complicated work. Although I thought at first I could get it to work on Microsoft, it would be very difficult.

Code::Blocks (using wxWidgets or GTK). This program is my favorite, so far. Mainly because I am a C++ guy (not C# nor .NET -- real C++). Also, it has a swell widget maker interface that is nearly as clever as the VS2008 Forms editor. The main difference is the resulting code is WAY faster with Codeblocks and wxWidgets than .NET. I'm sure there is some reason why .NET is used by a lot of Microsoft coders, but they don't care if it runs on Macs or Linux. With wxWidgets it runs on virtually ANY computer with some kind of C++ and graphics subsystem to support it's GUI.

I cannot say Codeblocks is easy to setup. Some cases are OK, such as if you just use the wizard to create a new project on Linux, everything is a snap. On Microsoft I had to try about 4 different configurations to get wxWidgets to work (finally just using VC9.0) but for GTK programs I use another thing (MinGW C/C++). I'm not sure why it had to be so difficult, but there were a few things I just resorted to using a text editor to fix underneath the hood. And when I copy program elements from Microsoft to Linux I have to be very careful to ONLY copy the source files and not the setup files.

However, after I get it all working, and get the Debug vs Release stuff all in focus, it works very well. And the resulting programs are very robust and attractive, and they obey whatever standards of GUI behavior exists on whatever system they reside on.

So, in the IDEs of March, Codeblocks wins. Yet I still like Eclipse for Java, whenever I need that kind of thing. And I also like Netbeans for some things. In fact, it would REALLY nice if someday there was some kind of virtualized IDE that ran all those things simultaneusly and could use the best features of each one whenever the Software Project of the Day needed it.

Someday, perhaps, but so far it is nice just to have something that I can write truly portable code on any system I'm using, and run it directly in C++.

I have recently tried Qt. Although it is commercial, except for a crippled "free" version, it seems nice enough. I is limited on Windows to a non-VC++ world, and that bothers me somewhat. But I'm still impressed with it.

Now, I will have to get my hands on a Mac OS/X system, and really make my life complicated. I don't mind so much if I have to jump through hoops or whatever, but I will use wxWidgets (and hopefully something like Codeblocks) to do the GUI stuff, no doubt about it. I just don't want to pay for a Mac right now.

Anyway, that's my 2 cents on the IDEs I've used. I'm sure there are others, and some people love one over another, different than me. But once I've spent time learning something that works as well as Codeblock, Eclipse and Netbeans, it is hard to bother with anything else.

Sunday, March 1, 2009


I am recovering from pneumonia. I have had it before, I most likely will have it again. I never wrote about it before, however, except as a brief note to someone in email. I never thought of it as what it is.

Pneumonia is a murderer. It kills you. It has no mercy. It has no regard of agony, nor respect of stature, nor any other ethic. It just wants to kill you as quickly and thoroughly as possible. The only weapon in the battle against it is the very most powerful antibiotics known to man. If your immune system is weak and your access to these antibiotics is blocked, you are dead. There is no coming back from the brink. You must either kill the bacteria that fill your lungs or they will kill you.

A worse form of pneumonia is caused by viruses. Usually, even in today's high technology, there is no cure for that. You are just dead. It is only a matter of time. Perhaps some manner of draining your lungs of fluids -- but keeping the rest of you hydrated -- might buy some time, But for a virus to die, your own immune system must do the killing. Very few drugs can kill a virus without also killing the host.

So I feel lucky I only got the bacterial kind, some form that takes advantage of a cold or flu virus that brought you to your knees first. It then colonizes very rapidly, In just a few hours the disease can double and quadruple to the point where it begins to effect your oxygen. In a few hours more it can become hugely populated, beyond counting, to the point of clogging your lungs. Your immune system tries its best to fight it, but only makes things worse. Your lungs fill with liquids, which, unless you can cough that all up continuously, will drown you.

But you cannot keep coughing forever, and your exhaustion will spell doom.

Fortunately I began to feel the effects of oxygen deprivation. I know about such things from scuba diving and from having had pneumonia before. I went to the doctor on my own, as badly as I felt, knowing that something was very wrong. I made it on time. I was not beyond the critical stages. Antibiotics will work, this time. At least I hope so -- I'm not completely well just yet.