Friday, April 13, 2007

Does Science Provide any Real Answers?


Gentle reader,

Despite what you may have been led to believe in science class, physicists don't have all the answers, though not many of them seem able to admit it.

In all my time in high school science, not once did I hear a physics teacher say the following:

"This theory provides a model of what is going on, but what is actually going on may be quite different. We don't really know."




Too bad, because that would have helped me realize that science, and physics in particular, is in the business of providing MODELS, not true understanding.

Physicists, over a period of hundreds of years of trial and error, have stumbled
upon some mathematics that, when applied to the behavior of objects, can model and predict the behavior of those objects. They tried this theory, and that theory, and each time compared the theory with the experiment. Along the way (and this is rarely emphasized) thousands of theories that didn't fit the experimental data were thrown into the garbage can. Once in a great while, a scientist came up with a theory that seemed to fit the data. Even more rarely, a theory was devised that not only agreed with the experimental data, but also, amazingly, correctly predicted things that hadn't yet been measured. Einstein's theories of special relativity and general relativity are two examples.

But do these mathematical theories and models give any real understanding of what is going on?

Well, not really.

Take gas pressure, for example. The mental picture we are all given in science class is of a bunch of little particles all bouncing around and pushing on the side of bottles to create pressure. It's a nice, convenient model. However, if you look deeper, you run into quantum mechanics which says that actually, particles sometimes behave like waves. Tiny particles are governed by strange laws and they behave irrationally. This means that the model we have of little particles bouncing around and pushing on things while convenient,
tends to sweep under the covers what is actually going on.

Now take gravity. The picture we are given in this case is of two bodies such as the sun and the earth attacting one another. Do you remember receiving an explanation of WHY they would choose to do that? Didn't think so. And, it turns out that this naive picture may not be complete anyway. If you dig deeper, you will find out that the theory of general relativity tells us that the attraction can be modelled by looking at a type of geometric curvature in four-dimensional space-time. Similarly, we have models that explain electrostatic attraction but they don't tell us WHY particles with a
positive charge attract those with negative charge (and try asking a science teacher what charge actually IS).

Richard Feynman, a very good (and sadly dead) theoretical physicist, once said that nobody understands quantum mechanics. Since quantum mechanics seems to accurately describe the behavior of small particles, and big things (we are told) are made of lots of small particles, this effectively means that nobody REALLY understands ANYTHING in our physical universe.

To give another example that you don't often hear mentiond, physics explains nothing about life. You can plug numbers into any equation you like, even a so-called "theory of everything", and you will not be able to explain why, if person A farts, person B laughs. Until you can do that, my fine feathered friends, I would argue that you don't really have a theory of everything.

So if you had a tough time in science class, don't worry. Perhaps your brain was hurting because you were trying to truly understand things that aren't understood, even though the teacher might have been pretending
that they were.

And if you couldn't follow along and understand the theory or the model they were trying to teach you? Well, remember that you were trying to understand a theory that was created by a person of genius after many years of careful study, and most probably after they had thrown out many other similar theories.

So the fact that most people don't understand physics is, well, understandable.


Time for today's quote, in honor of Kurt Vonnegut, a man who made my life harder to understand yet easier to live:

I have told my sons that they are not under any circumstances to take part in massacres, and that the news of massacres of enemies is not to fill them with satisfaction or glee. I have also told them not to work for companies which make massacre machinery, and to express contempt for people who think we need machinery like that.
-Kurt Vonnegut

Until the next time, gentle reader, I remain,

Your friend,

Buford Twain

Saturday, April 7, 2007

C++ Mostly Sucks


Gentle reader,

If you have absolutely no interest in programming computers, you can safely skip this article. Rest assured, you will have lost nothing.

For the rest of you geeks...

I recently spent a couple of painful hours trying to rekindle my long-dormant interest in the C++ programming language. To give you an idea of my history with this language, many years ago I was part of a team proposing a switch from fortran77 to C++. I started learned the language back then and, as one does when one is learning a new language, I read books and wrote some small programs. Even back in the early 1990's, C++ was far more complicated than fortran77. After spending some time with the language I gave a talk to a group of Fortran users about the learning curve that people would encounter when making the switch from fortran to C++ and I estimated that it would take 6 months for people to learn C++. After the talk I was told by others who were more experienced than I was that my estimate was probably too short. In retrospect, they were absolutely right.

My main motivation for getting back into C++ was (and still is) a growing interest in game programming. It is difficult to avoid C++ because it has been used so extensively in that field. Well, I started to look at some game code and quickly remembered the reason I had abandoned C++ many years ago. Quite simply, the code looks like gobbledygook. Code in C++ is so full of artifacts (ampersands, asterisks, underscores, to name a few) that it just gets in the way of understanding the business logic.

I understand why C++ is widely used to implement low-level features like device drivers. It is a natural fit for such applications. However, coding extensive business logic in C++ is cruel and unusual punishment for yourself and for anyone who follows in your footsteps trying to understand your code. A programmer should be able to look at the code and quickly make sense of it. This requires clear variable names and uncluttered language constructs.

One area where clutter really gets in the way when reading C++ code is iterators. Iterators are clumsy, and looping over them is just plain ugly. Java used to have a similar problem, but that was solved with the introduction of a new language construct that I call the "for each bee in the beehive" construct. That construct makes code look more like English. Such code will be easier to write and, more importantly, easier to read.

As part of my effort to rekindle my interest in C++ I also picked up Bjarne Stroustrup's "Programming C++" 3rd edition. That book is a monster. It is enough to frighten away most computer science students because it is jam-packed with language details that are beyond what most "normal programmers" will care about. Apologies to Mr. Stroustrup but it is also not the most entertaining read. The feeling that I got from cracking this book and spending some quality time with it was "Goddamn it, life it just too short to be messing with this poxy language. I can be far more productive in Java (for big programs) or Python (for little ones)."

Sweet Jesus, spare me the details and let me get some frigging work done.

I realize that there is a ton of existing C++ code out there (much of it virtually intractable, pun intended) and there will be ample work for many years to come for those masochistic enough to thoroughly master C++. However, until all other programming jobs are dried up (I am guessing, never) I will continue to avoid C++ where possible when writing my applications.

Instead, I will write code in languages that are
a) easier to learn
b) more enjoyable to use
c) more readable
d) more productive

As for writing games? Well, it turns out that it's possible to write excellent games for most platforms using Java. And so for now, I am going to give that a try. I can keep myself amused, and hopefully, with the passing of time, C++, at least for business programming, will fade into oblivion. One can always hope.

On to today's quote. It's from the protagonist of C++ himself:

There are only two kinds of programming languages:
those people always bitch about and those nobody uses.
-Bjarne Stroustrup

To which comes the rejoinder:

Please create a programming language where there isn't quite so much to bitch about.
-Buford Twain

Until the next time, gentle reader, I remain,

Your friend,

Buford Twain

Just for once, be a big fat LOSER


Gentle reader,

It is rare that a day passes without news of people lying, cheating and stealing.

From secretaries to politicians to CEOs, why does it seem that dishonorable people are everywhere?

I wonder if one reason might be that we are taught from an early age the importance of winning above all else.

Winning at baseball.

Winning at soccer.

Winning at football.

Winning at school.

Winning at college.

winning at your job

winning the dating game

Winning, winning, winning, winning, always frigging winning.


It is no coincidence that "LOSER!" is a particularly harsh insult in the US and elsewhere.

When we are told to win at all costs (and make no mistake, we get this message from an early age and it never stops), it is not surprising that many people bend and break the rules to live up to those demands. Which means...

Students cheat on assignments and tests.

Soccer players elbow each other and pretend to be injured.

Parents cheat to help their children succeed.

Teachers cheat on behalf of their children so that their school gets a good grade.

People lie on their resumes to get a job.

Salespeople lie to get people to buy things.

Companies lie in commercials to get consumers to buy things.

Politicians lie and manipulate to get people to vote for them.

Scientists bend the truth (lie) to get grants or gain prestige (their version of winning).

And so on. It never ends.


What is the real outcome of all this winning and who is better off as a result?

Well usually, if someone wins, someone else loses.

Many religions have the concept of the "golden rule" - don't do to other people what you wouldn't want done to you.

It's a simple rule, but it gets trampled in our quest to win everything.

At the end of the day, we are all going to the same place. A hundred years from now, who will care that we "won" these things?

I respectfully disagree with the premise that we must win everything.

In particular, when faced with a choice between winning, and being honorable, why not consider choosing the latter? At least once in a while. We poor losers will thank you.


Time for today's quote:

"I believe in aristocracy, though - if that is the right word, and if a democrat may use it. Not an aristocracy of power, based upon rank and influence, but an aristocracy of the sensitive, the con-siderate and the plucky. Its members are to be found in all nations and classes, and all through the ages, and there is a secret understanding between them when they meet. They represent the true human tradition, the one permanent victory of our queer race over cruelty and chaos. Thousands of them perish in obscurity, a few are great names. They are sensitive for others as well as for themselves, they are considerate without being fussy, their pluck is not swankiness but the power to endure, and they can take a joke. "
-EM forster


Until the next time, gentle reader, I remain,

Your friend,

Buford Twain

Wednesday, April 4, 2007

Are you Middle Class or Working Class?


Gentle reader,

Do you consider yourself Working Class or Middle Class?

I am guessing that you answered what the vast majority of people in the US would answer: "Middle Class!".

But, what does that mean, and how do we define the "Middle" and "Working" classes"?

Let me suggest a very simple definition of Working Class, based on one simple test:

You belong to the working class if the majority of adults in your household *need* to work for a living in order to make ends meet.

I think this is a reasonable definition. Why? Because as soon as the percentage of working adults
in a household rises above 50% life becomes more about survival than "the pursuit of happiness". To use the vernacular: "It Mostly Sucks (TM)". Even if you enjoy what you do, your time is no longer your own. Well, aside from those 2 weeks of vacation (assuming that you even get that much).

In other words...

If you are a parent in a single-parent household and you need to work then using this definition
you belong to the Working Class, irrespective of the particular job that you have.

And, if you belong to a 2-parent household and both need to work to meet expenses then your
family is Working Class.

I don't know about you, but I find that it is becoming tougher to make ends meet than 10 years ago. House prices have increased, heating and gasoline are more expensive. Wages haven't really risen much, in real terms (adjusted for inflation). Many families are finding that they need both parents to be working. I think that in the future, a lot people who thought that they were middle class are going to find out that they are really Working Class.

And on to the quote for today:

If you give me six lines written by the most honest man, I will find something in them to hang him.
-Cardinal Richelieu

Until the next time, gentle reader, I remain,

Your friend,

Buford Twain

Tuesday, April 3, 2007

UK and USA: Compare and Contrast



Gentle Reader,

I thought I would write down some things I had noticed about living in the UK and USA.

I moved from England to the US about 20 years ago and have remained in the US the whole time since (about another 20 years) except for a 2 year stint in Italy.






Here are some of the reasons I left the UK:

* Different rules for different people - the worst case being the royal family and privileges awarded by virtue of birth. WTF?
* Constant grey skies. Maybe this is changing or will change soon with global warming?!
* The depressing feeling at times that "nothing is possible".
* Felt very crowded, especially London, where I used to live. Listen to the song "Waterloo Sunset" by the Kinks to get an idea what I mean.
* People often seem pessimistic ("mopey"), they spend a lot of time complaining, with not much "get up and go".
* I sometimes felt unsafe. I was mugged a couple of times.
* I was awarded a scholarship for study in the US that at the time paid about the same as my full-time working salary in the UK. So that decision was a no-brainer...

Here are some reasons I am glad I live in the USA:

* The feeling that "anything is possible"
* I can actually afford a reasonably sized house and back yard with a bit of space. (No, I don't live in California or NYC).
* The weather is usually interesting (lots of snow in winter, lots of sun in summer, storms in-between)
* Easier to find an interesting job (I am in IT)
* Americans like the British (it's the accent thing, which seems to more than outweigh our bad teeth, haha)
* The women are more attractive (!) I never thought I'd be so chauvenistic. But there you go, sometimes I surprise myself.
* People are generally very optimistic. They get things done and have a "can do" attitude.
* America helped to liberate Europe during WWII. Americans led the allied invastion of Normandy. Near where I live there is a memorial featuring a life-sized bronze replica of a man crouching behind one of those criss-crossy metal beam structures that the Germans placed all over the French beaches.
It brings a tear to my eye imagining the courage of the people who overcame such terrible odds as they made their way up those beaches against the relentless machine-gun fire.
* I feel more independent, less "babied" than in the UK
* The US seems less bureaucratic, less intrusive into my life
* The US seems to be more of a meritocracy - less emphasis on "pay scales", most jobs pay based on experience and aptitude.
* No annoying UK public school accent (in the UK, public school really means "private school", don't ask me why)
* Still plenty of wide open spaces


Here are some of the reasons I sometimes wish I were back in the UK:

* I have many UK-based friends - for some reason I found it much easier to make friends in the UK, maybe that's because you make friends easier when you are young?
* Weather is usually very mild, assuming you live somewhere vaguely in the South.
* Despite its reputation, the food is generally better in the UK (at least, you don't have to work quite as hard to get good food).
* The UK has reasonable public transportation (trains, buses).
* You can often get places by walking, The USA is too focused on use of the car.
* Healthcare for all, as opposed to healthcare tied to your job
* Better (different?) sense of humor. People are "quirkier"/funnier in general. Bit of a sweeping generalization there, but...
* More vacation days! The USA is pitiful in terms of vacation days (unless you work for the US federal government, interestingly)
* More of a safety net if you lose your job. I have lost my job in the US and it's genuinely frightening how quickly things can go downhill.
* Seems like the education system may be better in the UK (I have been gone a while though and it could have deteriorated by now). On the other hand, nothing of use is taught in school, to paraphrase Oscar Wilde.
* Geographically closer to the relatives on my side of the family who live in England and France.
* Pubs! As opposed to sports bars. You can have a conversation in a pub. Beer is better in the UK as well by the way.
* No George Bush. Oops, there goes my green card application.
* Far fewer religious fundamentalists, far more atheists and free-thinkers. By now you may have figured out that I am god-free.

Here are some of the reasons I may never return to the UK:
* Cost of housing has increased too much. My poor dollars ain't worth very much any more...
* Constant grey skies, feeling that "nothing is possible", crowds, the feeling that I am unsafe...

Before I get too misty-eyed, here is a quote for today:

History continues even though the graveyard is full of indispensable leaders. -Charles De Gaulle

And until the next time, gentle reader, I remain as always,

Your friend,

Buford Twain