Bear through the story for the revelation at the end.

When I was in college I was an avid chess player. I was pretty much the dominant chess player at my high school so finding some real competition at college was quite refreshing. What I hadn’t anticipated, was that some of the competition might be better and smarter than I was. The problem with youth, especially one used to being the top dog and conquering all that came before him at this game, was you start to wrongly think you’re invincible until someone comes along that just cleans your clock like it’s nobody’s business.

I’m sure you can see the parallels to business where someone dominating the market can incorrectly think they’re invincible and become complacent, same thing, different day.

But the story isn’t finished yet.

After being beaten at chess over and over by the same person, and after coming close to getting him a time or two but not being able to secure a win, I decided it was time to cheat. Not cheat really but throw him off his game and I could theoretically get a slightly unfair advantage. Anyway, the next time our chess club met for a friendly little game, I got there early and set up my distraction, a tape recorder with some prerecorded comments tucked away under the table with a remote control in my hand to play these comments on demand. I moved to place him in check as early as possible in the game so I could start the side-show and sure enough, I managed to get his king open and put him in check, pressed the remote control and the room filled with the sounds of a laugh track and me yelling “YOU’RE IN CHECK! WHAT A DUMMY! CAN’T YOU PLAY?” and the whole room fell apart laughing. Suddenly all eyes were on our game, I did the check laugh track a few times, my opponent was sweating bullets and lost his first game to me ever.

The point of the story is sometimes all you need to do to get an advantage against your competitor is to completely baffle them with bullshit.

This can be as simple as rolling out a new feature that your competition doesn’t have and promote the hell out of it like it’s the most important thing in your software just to throw them off their game as they won’t understand it and think you know something they don’t. While you have them distracted you can hit them with your real new big feature, where you think the money is, so they’ve been scratching their heads over your previous move when you move in for the kill. Now they have no good answer for customers and have to play catch-up just to get back to an even playing field.

If you can successfully manage to baffle the competition with bullshit and get them on the run, don’t stop, keep them on the run until you’re positioned to move in for the kill and CHECKMATE! they are done, less market share, crippled.

Just don’t fall for such tactics yourself and know when you see a snow job vs. something serious.

The water condition in California is critical, has been an issue a couple of times in the 25 years I’ve lived here including rationing. Yet the politicians won’t do anything to keep us from getting into a real crisis mode until it’s too late to pull back from the blatant waste of water for a desert state. Don’t upset the people, give them what they want just to get votes when anyone with half a brain knows what we’re doing is ultimately unsustainable and is just as big of a ticking time bomb as the fault lines that criss-cross this state causing non-stop quakes.

Reminds me of how the airline industry didn’t want to inconvenience passengers until thousands paid the price the day planes flew into the Twin Towers.

However, if the California drought and water crisis, the worst which has exceeded 200 years of drought, gets too far out of control it will impact millions and not only destroy the state’s economy but perhaps put the entire nation in the toilet. The worst part is we won’t have the water left to flush that toilet. Without abundant supplies of water you can’t grow food year round in California nor can you keep millions of people alive. If the water goes, so goes the people because we’ll get gouged when bottled water prices skyrocket as it actually gets imported instead of just filtering the local tap water from the fountain at the mall. People will be in for a big shock.

Obviously we won’t survive a 200 year drought without drastic measure like desalinization plants, the power infrastructure to power such operations, and more. It’s technically all possible and based on the history of this state having easily sustained 10-20 year droughts the fact that nobody is addressing the issue before it’s too late boggles the mind. True, the eco-freaks won’t be happy but you can’t make them happy no matter what you do so fuck ’em. They rest of us wouldn’t mind continued prosperity and an infrastructure to support basic human needs like food, drink and sanitation as a minimum.

A little background helps about now as I live in the wonderful land of California near San Francisco in some of the best weather on the planet with my city sitting in a micro-climate that averages about 70F all year. You can drive in any direction from my house and hit other micro-climates that are always colder or hotter than hell so on a warm summer day where it’s about 80F it can be a chilly 65F on the SF coast or 100F in San Jose. Crazy shit!

Anyway, we live in a desert and the Arctic currents chilling the ocean and keeping my house in a Goldilocks zone of weather, a sweet spot of not too hot, not too cold, doesn’t change the fact that it’s still a fucking desert and drier than shit. Just because we’re surrounded by water doesn’t mean it’s usable water, it’s salt water, so unless we do some desalinization all that water I see daily in every direction I turn is ironically deadly and useless.

The wackos that live around here think they live in Kansas City or Chicago and have lush green lawns they dump tons of DRINKABLE water on daily, plus trees that change with the seasons like they do in the Midwest which is a waste of resources cleaning up after that mess plus all the water lost in the piles of leaves that annually die. Nuts!

We should be using native vegetation, stuff that is drought resistant and water friendly. All new landscaping using the water hogs should simply be banished but the politicians don’t have the balls to do what needs to be done. They prefer to be voted into office regardless of whether or not the general population knows what’s good for them because the masses can’t see past their need to water the lawn.


I don’t have a problem with lawns as long as you’re using non-potable water, perhaps drain water run-off or filtered bath water, all perfectly fine to dump on the lawn. But not our fresh drinking water just so your dog has a big plot of green grassland to facilitate dropping a deuce so you can proudly carry it in a steamy plastic bag but I digress.

The bottom line is we’re still below average and even these little showers which will bring us back from the brink of disaster won’t be enough to just use without concern what will happen with next years rainfall.

Even if the reservoirs were overflowing this year it might not be next and the only way to make sure we could sustain a multi-year drought to start with would be to stop dumping it on the ground NOW!

  1. End of green lawns, switch to low-water vegetation and low-water drought resistant trees
  2. Reduce the water allocation per building to what actually supports the people inside, not the piles of decorative plants surrounding the premises.
  3. Start watering existing landscape with recycled non-potable water only
  4. Invest in salt-desalinization plants that can augment our water supply but this should be strictly used only for human consumption or food production, not watering the damn lawns.
  5. Ban all car washes unless they use non-potable water or recycled car wash water.
  6. Any other water waste, BANNED, etc.

More importantly, don’t just let people pave over the previously green spaces because they did that in Phoenix and now the heat escalates every year to record highs putting a massive strain on the grid because the pavement locks the ground heat in and doesn’t release it nightly like it did before allowing a natural cooling process to occur. So in Phoenix they just keep piling on more resources to generate more and more electricity instead of tearing out the pavement and dealing with dusty cars. Fucking morons.

The solutions are simple and most of them inexpensive but since people don’t prefer them, we continue to go head first into an easily averted disaster.

Forget 49ers in the SuperBowl, Dust Bowl anyone?

This is a very simple but very useful function that seems like an obvious feature lacking from the PHP XML class. Typical. This should make adding multiple XML attributes per element a breeze and why an array isn’t what’s passed to xml::writeAttribute() already, or as an option, truly baffles my ass.

Here it is to save you a bunch of time:

function writeAttributeArray($xml,$attr_array)
    foreach($attr_array as $name=>$value )
        $xml->writeAttribute($name, $value);

While it doesn’t look too complicated, it isn’t. Very simple, pass in an $xml object created by XMLWriter and then create an element and assign attributes in bulk with one simple function.



This makes it exceptionally easy to add lots of attributes for XML elements used by some graphics packages, hint hint. Bet you can see where this is going.

When you run the above example it will create the following XML output:

<graph lineThickness="3" showValues="0" numdivlines="4" divLineColor="333333" numVDivLines="10" formatNumberScale="1" rotateNames="1" decimalPrecision="0" anchorRadius="2" anchorBgAlpha="0" numberPrefix="" divLineAlpha="30" showAlternateHGridColor="1" yAxisMinValue="800000" shadowAlpha="50">

Well that’s all for this blog post, we’ll pick up more XML fun later.