Tuesday, November 6, 2007

Fish Tank, The Beginning


















As time goes by, kids develop along certain predestined paths. We are now fully in the pet phase of Zack existence. This is the time when there is no animal, no matter how gross, that Zack would not enjoy having for a pet.

That being said, he's always wanted a fish tank ever since seeing Finding Nemo. Well, Deb and I finally broke down and bought twenty-nine gallon fish tank. But its not just a clear, water-filled, piece of furniture with pretty fish in it. Its a money disposal unit as well. Just put money in and watch it vanish.

Because you can't just have a tank sitting on a table. Oh no. You need a stand, a filter, a heater and special little rocks that go at the bottom. I wonder how fish in the wild survive without special little rocks but I'm assured by the pet store people that special little rocks are important to fish survival.

Now, I'm a fantasy nut so when it came time to decorate there would be no pirate ship, palm trees and treasure chest in my tank. Oh no. I had to have a castle and, being me, I had to have a big one. I still haven't added up how much the fish tank and its accessories cost, but I'm thinking its close to $500.

I'm sensitive to sum since the new computer monitor I want costs half that amount. I could even have an aquarium screen saver with real water filter noises coming out of my computer speakers as well. I'd never have to worry about belly up fish unless I programed it to have belly up fish. But I digress.

The steps to setting up a fish tank include buying it, the filter, the heater, the special little rocks, the castle, and the stand. You set this up in a nice location (which you'll want to change but only after you have 100 lbs of water in the tank), turn the filter on, and wait for two days.


















I'm not really sure about the two days thing but I'm told by the same guy that says I need special little rocks that the water needs to filter for a while before I add any fish to it. I wonder how long water in the lake has to sit before the fish can swim in it.

So I waited for two days and added my first five fish (just a few minutes ago). You start with cheap fish that you won't cry over when they go belly up (whether programmed or not). The kind I purchased are called Platies. I have two Micky Mouse Platies, one gold and yellow Platy, one gold/orange Platy and one Blue/Gray Platy. I'm sure Zack will name them appropriately but there working names are Micky, Minnie, Sunrise, Tangerine, and Rebel.

These 'seed' fish are hardy and serve a very important purpose. Each fish carries with them a set of bacteria that help break down fish waste. Since these little guys are tough, they can survive in a new tank long enough for the bacteria colony to take up residence in the special little rocks. Once the colony is established, less hardy yet prettier fish can be added to a balanced ecosystem.

The whole process takes about three weeks. After that you take a water sample in and they test the ammonia levels and let you know if other wimp fish can live in your tank.

I'd also like to add a few live plants to the tank but the pet store folks tell me its better to get the tank established first before adding them. They promote algae growth and so you need to know what you're doing before adding them.

I feel a little sorry for the starter fish. They have a tough job and an uncertain future. They are the tank trail blazers giving their all for the others that follow.

I'll keep you updated on who goes belly up first (my money's on Rebel).

Thursday, October 25, 2007

Failure to Recover

I have really old computers. You may think this odd with my being in the tech industry but I never go out and buy 'the next big thing' until it is superseded by at least two more 'next big things'. Its analagous to never buying a new car and letting someone else pay the 'drive off the lot' fee.

My personal computer has been a Dell Inspiron 8100 for some time. This thing is at least 6 years old and had begun to show its age. I run linux on my personal machines since it runs faster and in a smaller footprint than MS stuff and trends toward more reliable.

I like linux and I like the Ubuntu brand of linux for my personal use. Its reliable and easy to use without the normal issues of upgrading found in MS products. I did, however, get bit when I tried to upgrade from 7.04 to 7.10 (Feisty Fox to Gutsy Gibbon). The darn upgrade hung halfway through hosing my laptop. So, I created a 7.10 CD on another machine, mounted it on my laptop and proceeded to recover the files to my external USB via a combination of tar and gzip (also known as a tarball).

I wiped the disk on the laptop and proceeded to restore my data. This is when horror struck. The tarball was corrupt. The reason, I suspect, is that my usb is formated for the old windows FAT file system which has an upper limit of 4 GB. The tarball was bigger than that.

I tried everything I knew to try but I couldn't get past the corruption. Googling only brought back windows solutions to the corrupt tarball. I thought this very odd. Either I was missing something obvious or no one else had run into this issue.

I finally found a product for windows called gzrt which restored broken gzip files. It is a C program that comes with a make file. Of course, since I had a new install I didn't have a C compiler so I downloaded G++ the GNU C++ compile then found I was missing the zlib library which I also downloaded.

Once compiled, I lauched it against my corrupted backup
./gzrecover backup2.tar.gz

This made a file called backup2.tar.recover. Since tar doesn't work agianst bad files I used cpio to extract the data.
cpio -F backup2.tar.recovered -ivd

After that all was well. All my precious files came back.

Lessons learned include
1) FAT sucks.
2) Gzip and Tar should allow for more robustness.
3) Thank God for other geeks out there who have run into the same problem and taken the time to find a fix.

Wednesday, October 3, 2007

Learning To Fly

Well, we're off on another Zack sports event: Gymnastics!

Now, to start off, be it known that my son is not the most naturally gifted athlete. True, he can run further and faster that most kids his age and he somehow manages to hit a softball I throw him with his over sized bat. I tell him to use the smaller T-ball bat but he likes the cool red bat with the flame job. His choice of form over function disturbs me. I chalk it up to his two teenage half-sisters who's life revolves around image. But I digress.

Zack likes to go things alone. He doesn't like team sports. Its too much of everyone doing the same thing at the same time. BORING! Zack deplores that for some reason.

At play, Zack goes from place to place in the yard. He enjoys driving his Jeep, riding his bike or trike, throwing and batting balls, feeding the neighbor's horses, or just running around with our dog Milo. Since there are no other kids around he either plays by himself, Milo or my wife and I. Of course, finding frogs and insects is high on his list of enjoyments as well but the thing he loves best is to fly.



Teamwork is a foreign concept to Zack. His soccer experience was a poor one. He didn't like going out on the field. I think it was due to his fear of failure. We encourage, bribed, threatened and pleaded but Zack refused to take to the field during a game.

Gymnastics seemed a better choice for Zack. Its an individual sort of sport that makes use of his drive and energy. Initial signs were encouraging as his first trip to class was met with enthusiasm and, more importantly, participation.

I was out of town his first class. When my wife called and told me Zack had fun at class I almost yelled for joy. Finally we found something Zack liked to do with others. I wanted to see this for myself and went with my wife to see Zack jumping around and hanging from bars.



Zack did go to class and started to play with others. He has problems with staying in line, however. He doesn't stand in many lines and so the concept is foreign to him. Why would you stand in line when there is a perfectly good trampoline with no one on it.

After that class, where the coaches had to wrangle Zack into line, everything changed. He no longer wanted to go to class. He refused to do more than step inside the door. I admit, I was ready to admit defeat and chalk it up to another soccer experience.

Three times we tried and three times we failed to get Zack into class. On the last go around, I had to work and so Debbie took Zack by herself. He refused to go in and so she brought him home. He cried all the way saying he wanted to go back but there seemed no point if he would not participate or even go into the gym. The all-to-familiar soccer feeling set in and I assured myself this would be another bust.

So, we were going to give gymnastics one last shot. This time I was up to bat trying to entice Zack into class. Zack was conflicted about going. First he said he wanted to go then, in the next sentence, said he didn't want to go. Zack was one stressed four year old.

I decided to try. Debbie insisted. To be honest I would have been happy enough to go home but I sucked it up, bought Zack some cheese sticks at Sonic ( that always seems to help ) and drove him to the YMCA.

It started the same; Zack refused to go in. I asked him why. He said the teachers 'looked mean to him'. I looked at the coach. Andrew didn't look that mean to me but I did notice he scowled from time to time.

I told this to Zack. He looked at me with sad eyes and said, "No, he looked me AT me." A thunderbolt of understanding struck. Obviously during Zack's previous line jumping the coach gave him a stern look.

The solution, it seemed, was to get Zack past the 'mean coach' thought process. The male coach had an assistant who was near the door so I motioned her over. "Look Zack, she doesn't look mean to me."

The young Y staffer took the cue and put on a big smile and invited Zack over to his group. Zack didn't want to go so I held his hand as we walked over. The male coach gave Zack a big high-5 as he joined the group and that, it seems, is all it took.

Zack participated for the rest of the class. Yes he still left the line to wander around but this time the coaches were better prepared and asked him to rejoin. I became involved once when Zack said he was ready to leave. I offered one small bribe of visiting the Y pumpkin patch. Other than that, it all went OK.

In the war that is child rearing, this was a victory... and I have photographic evidence.


Sunday, August 5, 2007

The Reasons For War Are Often Not Reasoned

Wars are fought by groups, not people. This group can be a state, a county, a city, gang, religious group or a nation. When groups declare war and fight, the dead are called casualties. If a person kills another, the dead are called victims. In either circumstance, people are dead.

The motivations are remarkably similar in both war and murder. A man my be angry at another and therefore decide to kill the other. Similarly, one group can be so angry at another and so decided it must declare war to remove the threat.

Fear is another great motivator for taking another's life. If you fear harm from another to you or those you love then you may decide or be forced into taking another's life. Some would call this noble as a man kills someone threatening his family. Other times it is not as a man shoots another who is simply walking across some property. Likewise nations can go to war for what the fear another nation will do. In WW2 we were attacked by the Japanese but the nation we really wanted to fight was France... sorry, Germany. We feared Hitler and and the rest of the Axis (well, Italy not so much) and needed to get into the war.

Unfortunately, greed is another factor in war and murder. People kill people over possessions and likewise nations go to war over possessions. Whether its middle east oil Afganni uranium nations will sometimes take what they do not possess. Men will do the same killing another for the mere acquisition of property or goods.

Another emotion involved in violence is that of power. If a person or a nation feel untouchable they can often do things that wouldn't enter the mind of someone more vulnerable. Thus a powerful man man order the murder of another just because he feels he can get away with it. Likewise, a powerful nation may not fully consider the ramifications of going to war too easily thinking they are powerful enough to avoid any negative consequences.

Desperation is the final emotion I will consider in the essay. In many ways it is the exact opposite I think it is often the leading cause of criminal murders. Many more people die or lose property due to a criminal or drug abuser in a desperate situation than by organized crime killing someone who became 'inconvenient'.

So, why do we go to war and why to people murder? Murder is simple. One of the previously described emotions comes into play overriding the fear of being caught. War is as simple in a dictatorship or monarchy. The leader simply decides his country will go to war and sends the soldiers to the line. In republics or democracies it becomes a much more complex affair.

First the leaders much convince the rest of the group or the group's representatives of the need for war. At times this is easy such as the case of a sneak attack or the underlying hatred for another group overwhelms all sense of reason. Other times it is more difficult and the leader must build the case for ward.

In the case of either democracy or dictatorship the war can become unpopular if it lasts for long. The length of time for a democratic war seems to be around four years. Dictatorial wars can last longer but come at greater peril of having the government overthrown. Democracies just elect someone from the opposition who ends the war. This is an overthrow or sorts, but without the violence.

And so to go to war, leader's much tap into his group's negative emotions. Note, this doesn't just apply to war. It is often the way leaders motivate there followers. In American politics you see all sorts of examples of Democrats dehumanizing Republicans as baby starving, hate filled religious fanatics. You see similar statements from Republicans calling Democrats socialistic property thieves who want to give all your money to unwed, pregnant Mexican illegal immigrants.

One of the worst examples of this in the last century was Hitler. He preached that the Aryan nation was superior to the rest of humanity. The sub-humans should serve the Aryan nation or be cast into the ovens. He used every negative emotion to convince the German people war was the only answer.

Hitler used race as his tool of choice. This turns out to be a very effective tool for motivation. Humans have a need to feel a part of a group and there are few stronger group ties than race. The South used it as a way to keep Negroes enslaved and the United States used it as a justification to bring civilization to the Red Man. The fact that civilization came at the price of a huge land grab is beside the point.

Family is a stronger bond than race. Many family and tribal feuds happen just by virtue of the fact 'one of them did something to one of us'. The Arabs have s saying that goes something like “Me against my brother, my brother and I against our cousins, me and my cousins against the tribe, my tribe and I against the world.” Other than an interesting insight into the Arab mind, this also sums up man's natural emotions regarding family ties and loyalties.

Leaders use Nationalism, or more correctly regionalism, to trump race if the national identity runs strong. This is the case in the United States but not so much the case in places like Iraq. Nationalism runs strongest in the racial majority as they have seen the greatest benefit but you see nationalism in immigrants and their children who choose to move to a country for a better way of life. Nationalism runs more weakly in the minorities who feel exploited by those in power.

Religion seems to trump all other bonds. It slices across race, family and region. Since many are raised from birth to believe a certain way and, more detrimentally, in certain texts, a clever leader can use those beliefs and text to acquire power to convince a people to perform all sorts of heinous acts.

Note, before the flame wars start please read the following text.

I'm not saying faith is bad. I'm not saying religious texts are bad. What I'm saying is that a clever person, also known as a rules lawyer, can take the portions of the text needed to make a point and ignore the rest which contradicts that point. An example would be an unscrupulous Christian televangelist who used the Bible to con millions of dollars from old widows.

Some religions lend themselves better to violent/immoral manipulation than others. The Koran, for instance, replete with references to killing the infidel is particularly vulnerable to power hungry clerics looking to peddle influence through the death of others. Because religion is often taught from childhood, it is often difficult to contradict with logic and reason.

Seemingly worse these days are the ISMs. An Ism allows you to associate with a group with a common belief system. Indeed, Isms take the place of religion in many lives. While Isms normally start with a reason, rather than a faith, they become a faith unto themselves.

Environmentalist, these days, seems to be the secular world's answer to God. They start with a good premise; we should protect the environment since polluting it is bad and has negative consequences. OK. I don't know many who would disagree with that but the leaders of this movement move to strike down anyone who disagrees with their conclusion. Indeed, the environmentalist leaders use a skillful bait and switch stating that anyone who disagrees with their conclusion obviously disagrees with their premise. Their reaction bears a disturbing similarity to medieval witch hunts.

The environmentalist witch hunt is a microcosm explaining why group leaders (nation, race, religion and ism) use family, race, region, and belief system as motivations. It keeps people from thinking about the consequences of actions and thus makes it easier to lead a group to action; i.e. war.

Nations. religions and movement honor those who fight for them because they must. The motivation of honor, glory and reward, either in this life or the next, does much to motivate a soldiery. As it turns out honor, glory and riches is the best weapon old men have to use on the young to motivate them to fight.

As an interesting corollary, positive emotions such as joy, happiness and love are seldom used for such actions as killing and war. Oh, you hear of the odd case when someone loved another so much they had to put and end to their lives but such cases are rare.

So is there ever a reason for war. I believe there is but the key word is 'reason'. Reason here is used in the thoughtful interpretation of facts vs. finding facts to support the underlying emotions of fear, anger and greed. The only positive reason I can imagine is protection. In theory, democracies fight wars of protection and try to incite changes in unfriendly governments through success and the quality of that democracies ideas not by imposing democracy on others through brute force.

Indeed in Christendom, protection is the only way to motivate a people to war. Since, in theory again, Christians believe in love, peace and charitable giving, Christians cannot support a war that involves greed, anger, fear, desperation, or power hoarding. I think history is full of counter examples but again, we're talking theory here.

So what is my appraisal of war in Iraq and Afghanistan? Americans may say we went to war to 'free' the Iraqi people but most honest individuals will say it is because we feared what Saddam Hussein would do. It was fear that made us attack Iraq just as it was anger that made us attack Afghanistan. When a country goes to war saying it is 'protecting national interests' you can translate that into greed or desperation to hold onto what's theirs. While the American people were sold on the idea of freeing a repressed people and protecting those at home from foreign attack, I feel the stronger motivators were anger and fear but in the end history will be the judge. My fear, however, is that history often is written by the victor so we may never know.

We were ready to support military action because we were attacked. We used our emotions to filter through facts and come to the conclusion that killing other people was a good idea. When war was joined our nation rallied behind the troops and our leaders. Much like the environmental movement, criticism of the operation was stifled by our nations leader using the same tactic. If you disagree with the plans them you disagree with our premise and therefor a witch; i.e. you are unpatriotic.

My conservative friends, at this point, are yelling at the screen calling me a turncoat who let liberal Austin convert this red neck into an anti-war zealot. Well, this isn't really the case.

If we had won the war easily I most certainly would have been part of the crowd celebrating our great victory. Since the war in Iraq hasn't gone well, it gives us time to reflect on what went wrong. I was a strong supporter of the war in the beginning. I still support battling the hatred the Islamist spread if not the way we are doing it. But I feel that violence, is not the answer. It is a tool to make other nations do what is in America's best interest but I no longer hold to the illusion that we went to war for the Iraqis. We went to war because of anger and fear. Freeing the Iraqis and Afghanis was a justification, not a reason.

I believe it turned out the Rumsfeld was wrong to fight the war on the cheap. Too few troops were deployed to maintain peace which gave America's enemies a chance to grow strong. Likewise in Afghanistan, if people like John McCain hadn't insisted on B52 strikes to weaken the Tabliban then we would have never won there. Likewise, in Iraq, we should have deployed more troops to ensure the security there long enough to win the peace.

Sadly we lost the peace in Iraq and Al-Qaida won. The country was destabilized. Now we require more troops to do what should have been done earlier and we have the Bush administration to thank for it. Fiscal responsibility, in this case, damn near cost us the war.

The American left now sees weakness from Bush's failure and is capitalizing on it. They now use anger, fear, and quest for power to fuzz the issue without seeing the consequences of an early withdraw. We see signs of improvement on the groud as the surge gets under way but you would never know this if you listen to the rhetoric on the left. This is nothing new. Its happened before.

In the Vietnam War the anti-war movement not only took American troops out of the war but cut off all funding to a relatively stable South Vietnamese government. When financial support was cut, the government collapsed and millions of deaths occurred as a result and yet the left celebrates their efforts in ending the war. In a way they have more blood on their hands than those on the right who supported the war.

So by now my friends on the left are cursing me as a 'stay the course' zealot. If you're confused, read on. Even if your not confused, read on. The conclusion is coming soon.

We find ourselves in a dilemma concerning Iraq. If we leave, that country will go through a similar level of atrocities as Vietnam. Millions will die in ethnic and religious cleansing. Groups/Nations that hate us will see weakness and motivate their followers to great violence and spread an ideology of hate on others.

So is there a 'reason' to continue the fight. I submit that yes, there is a reason but the reason had better be for the right reasons, if you get my drfit. We can't fight just to pummel a society into our brand of thinking. If we are to be successful, it must be in the war of ideas where we win not through force of arms. True, you can force a populace to do what you want through force. You can even make them democratic but in the end, if the old ways are still there, it won't make much to bring a people back to its roots of violence and totalitarianism.

It is the hearts and minds that much change and that is the war we should be fighting more effectivly. If we don't, then every American life lost is wasted. But if we can protect the Iraqis long enough for the ideas to sink in, then it will be a victory. Sadly, only time will tell if we have the national will to stay long enough to find out.

And so to conclude:
  • Leaders use negative emotions to lead their followers to negative actions.
  • Conversely, leaders use positive emotions to lead their followers to positive actions.
  • An emotional basis for going to war is bad. It should only be undertaken for protection.
  • Going to war for protection sake involves reason, not emotion.
  • Love, peace and charity should be the underlying principles of a good society, not greed, hatred, and anger.
  • If you hold a gun to someone's head, they will agree with you most of the time but to really change their mind, you have to convince them your ideas are better than theirs.

Thursday, August 2, 2007

Eclipse RCP 2 (a noobs account)

I'm going through the book Eclipse Rich Client Platform by McAffer and Lemieus and have been beating my head against the wall for a bit. In chapter four, they have you create an application named Hyperbola using the Hello RCP template. That all went well as I happily navigated the tutorial.

Now, here comes the part where I'm a bonehead. The book shipped with JDK 1.4 and Eclipse 3.1. The current version I'm using is Java 1.6 and Eclipse 3.3. Like an idiot I decided to try to navigate the book using the more recent distros. After all, who wants to use old stuff.

I noted some differences in my last blog about how things have changed. Well, here's another to add to the list. In chapter four they showed you how your plugin could remember the size and location of its window the last time the plug-in ran. Well, I left that in and spent a while trying to figure out why the tutorial in chapter five wouldn't work.

So, now for what went wrong.

When you use the Hello RCP template to generate a plug-in, it creates several java files. One of these is named ApplicationWorkbenchAdvisor.java. In chapter 4 they had you make the following modifications to that file.

public void initialize(IWorkbenchConfigurer configurer) {
// TODO Auto-generated method stub
configurer.setSaveAndRestore(true);
//super.initialize(configurer);
}

Well, for some reason when you make this change, it never calls createInitialLayout in Perspective.java which is what adds the new view to your perspective. So far I've tried running the configurer.setSaveRestore to true before and after the super class constructor but nothing seems to work.

I did eventually find a work-a-round at CT Armstrong's Blog. You can either delete the workbench.xml file from your target env or go to Run->Open Run Dialog and check Clear under Main->Workspace Data. You'll want to turn this back off or else you'll never save the position and size of your plug-ins window. The final version of my initalize method looks like this.

public void initialize(IWorkbenchConfigurer configurer) {
super.initialize(configurer);
configurer.setSaveAndRestore(true);
}



Good Luck(you'll need it)
Drifter