Friday, October 31, 2008

Cacti helper: CachedResponse

If you are looking for consistency or a theme here, you're in the wrong place. That's something you will find elsewhere. This is another one of those geek entries.

For many years I have had a serious affinity for cacti and it's underlying cousin rrdtool. Before that, I was pretty fond of MRTG -- the predecessor of rrdtool. I spent the requisite time graphing the performance of computers and routers -- you know... the normal stuff.

But that's so cut and paste. There's no challenge. At some point in time I got started playing with graphing other things. My first big project was taking the opensource financial package gnucash and creating about 70 different graphs on various financial aspects. But over the years I have graphed huricane progress (actually weather buoy data), doggie potty training, prepaid cell phone statistics, TiVo statistics, various Netflix usage statistics, usage statistics for my ISP (since I have a montly data cap) -- just to name a handful. I am a graphing weenie.

The original processing of gnucash processing occurred on a 166Mhz processor. It used to take 30 minutes to crunch the gnucash file and spit out stuff -- and that is before I added "features" to track more things. Needless to say, I couldn't use the "normal" cacti mechanisms that would process the file every 5 minutes. Add to this the fact I had 70-something graphs and god only knows how many distinct data sources. I needed a way to process once, read many.

What I originally came up with was a "recipe." I processed the data, wrote perl code on the fly, then wrote a "read my data" bit of code that included the on-the-fly perl code and spit out answers cacti could understand. This code would re-process the gnucash file every 12 hours or so.

I then cut and pasted this bit of code many many times as I developed other applications to process things that didn't fit the normal cacti model.

The bad side of this was that every time I hit something new and different, the cut and paste code diverted from the original. And there were multiple copies of it, each with tweaks. Want a new feature? You have to add it 10 times to 10 bits of diverging code.

So, I finally developed a library to handle this.

Introducing: CachedResponse...

The whole idea here is that you write one script that creates data. And you write a second script that spits cacti-approved data. The library marries the 2 and manages the cache. It provides cache statistics. It rebuilds the cache in the background when it is out of date. It notifies you via SMTP when things fail.

Anyway, if you want it, let me know. I would post it to CPAN, but there is such a limited audience... and it is pretty beta.

Right now the performance is well... not nearly as good as before. My cacti run queue used to take about 45 seconds. And now it runs about 70 seconds. Sure, I could make it more parallel, but that isn't really a benchmark. [BTW: those spikey things in the graph are bugs where I accidentally spawned a zillion subprocesses.] I expected a performance drop. Before it was a simple file include and now it is a chatty disk operation. I would like to think it is more robust though. Before when things hiccuped, the graph would stop. Now little errors don't stop it -- and all errors generate an email.

Thursday, October 30, 2008

Howl O weener thoughts

In general, in addition to being a cheap ass bastard, I am also a lazy ass bastard. I can be all sorts of different bastards when I try.

When it comes to Halloween, I usually err on the side of laziness. One year I cut arm, leg and head holes in a garment bag and went as "Sam Sonite." Another year I draped myself in Christmas garland and lights and went as "Kathy's Christmas tree.[1]" There was only one year that I actually planned ahead. That was the year I went as "John Boy.[2]"

So when Ellie Mae mentioned a pet costume contest, nothing came to mind. And I wasn't all that thrilled about going.... until she told me two of my favorite celebrities were going to be contest judges: Bill and Star. If you don't know Bill and Star then that means you didn't watch the summer reality show "Greatest American Dog." I watched -- mostly because I am a dog nut. But once it started Ellie and I were hooked on Bill and Star. Both were so likable.

So, being a lazy ass bastard... and a big kiss up, I immediately came up with the easiest and best costume. We went as Bill and Star.

Here you see me, my little buddy Arlo posing in costume with Bill and Star.I might also mention that my pandering made them add a category for the judging. Here is Arlo modeling his winning T-shirt for 3rd prize in the "let's just make something up" category.


[1] The previous year Kathy had a halloween party and we noticed she still had her Christmas tree up. Yes, from the previous year. No, it was not an artificial tree.

Sunday, October 26, 2008

You just cant make this stuff up

In a comedy of errors, our power feed and broken power pole suffered a second, almost deathly blow this evening.

You would think our power feed would have been fixed, seeing as it has been broken for six weeks. However, reliable electricians are just not as easy to find out in the sticks. A local guy has been forgetting about me and putting me off for 6 weeks.

And this evening... crash. A second branch has fallen on the power line, making the bubbified tippy electrical feed even more scary to look at. (Excuse the extremely brightened photos... it's dark out.)

Saturday, October 25, 2008

Random quotes from the past

I came across a couple of quotes that really ring true... even though they were from many years ago.

One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary. —Ayn Rand, 1975

Sound familiar?

What about this one:
The excess credit which the Fed pumped into the economy spilled over into the stock market--triggering a fantastic speculative boom. —Alan Greenspan on the cause of the Great Depression

Friday, October 24, 2008

Shame on you Mr Greenspan

It is quite possible that there is nothing in this world more pointless than a Senate or Congressional hearing. It is the ultimate example of the futility of a committee. The same has to be said for the "Why is our Economy going to Hell in a Handbasket" hearings... but at least they are not talking to professional baseball players. [As an aside, I'd love it if someone could pull out their copy of the constitution and point me to where Congress has the authority over the rules of professional sporting events. I used to have a sticky on that page and I just cannot find it now.]

First off: Congress has some nerve asking "why" to the SEC and the Fed. "Congress" is why. And if they didn't know the answer to "why" then why the hell are they in congress in a position of "Economic Policy"?

But the real thing that makes me mad here is Mr. Greenspan himself. In a ridiculous move, Mr. Greenspan, in effect, said that his past history of pushing for deregulation of the economy -- he made a mistake. What? I know the world sees Mr. Greenspan as the chief proponent of the free market. I do not. I hold him to a much higher standard. Mr. Greenspan knows better. Calling himself an opponent of regulation, while holding the position of regulator-in-chief is such a tremendous contradiction that it is likely to make my head asplode. It's like some guy spouting the virtues of vegetarianism while eating a bacon wrapped celery stick. Mmmm. Bacon.

It was the Fed, Mr. Greenspan that set interest rates. Set. Interest. Rates. What bigger control over a lending debacle is there? If you set them too low, then too many people get loans. Some people that can't afford to get loans get them. Some people that can afford to get a smaller loan decide to get a bigger one they cannot afford. The self-regulating businesses [his words] cannot self regulate. What bank can compete with other banks rationally if other banks are loaning out cheaper loans because of the interest rate the Fed sets. The only way to compete with those banks is to lower your lending standards.

I said I hold Mr. Greenspan to a higher standard. This isn't your average idiot economist. First off, the guy is brilliant. Secondly, I have actually read the ideas he held in the 60's -- the very ideas he claims to be rethinking now -- and the very ideas that his job at the Fed was intent on destroying. If you are just starting to rethink these ideas now, then what made you work so hard to destroy them for the past 20 years?

[Later edit: Not that I am the one that gave them the idea, but a couple of hours after I wrote this published something very similar.]

Thursday, October 23, 2008

How to use your nose

  1. grab something stinky
  2. inhale

You would think, as humans, we could memorize those 2 steps. We cannot.

I hate internet rumor. Sure, it can be entertaining -- mostly laughing at the folks that believe it. But there are serious consequences as well. But if the folks involved could just use their damn nose, they could smell the stink.

Let me tell you a story

Once upon a time, I worked at a very big company. I was managing email servers. At the time this company had about 100,000 employees. (Those were the days.) I forget exact numbers and dates, but at the time it is safe to assume the servers I managed handled mail for 20,000+ people (and it is more likely to be 40,000+. I just don't have notes of dates/numbers). So about this time there was an internet rumor that directly affected me. This rumor caused millions of emails to bombard my servers -- enough that the servers had to be upgraded. Before the rumor the servers worked fine. After the rumor they were not enough. The internet rumor cost about $40,000 in hardware.

The Rumor

FYI. In case you didn’t already know. This was sent to me from an attorney friend of KC’s.


Original Message-------

It has recently been discovered that is owned by a flaming liberal and this man is in the tank for Obama. There are many things they have listed on their site as a hoax and yet you can go to Youtube yourself and find the video of Obama actually saying these things. So you see, you cannot and should not trust for anything that remotely resembles truth! I don't even trust them to tell me if email chains are hoaxes anymore.

A few conservative speakers on Myspace told me about a few months ago and I took it upon myself to do a little research to find out if it was true. Well, I found out for myself that it is true. This website is backing Obama and is covering up for him. They will say anything that makes him look bad is a hoax and they also tell lies on the other side about McCain and Palin.

Anyway just FYI . If you continue to use at least be aware of their political leanings as well. Many people still think is neutral and they can be trusted as factual. We need to make sure everyone is aware that that is a hoax in itself. You might try TRUTHORFICTION.COM ---- wonder who owns that . . . . . . . . . .


Let's forget Snopes here for a minute and just look at the mail. Geez, you would think people had never seen the internet before. Okay, though I have mentioned it before lets just go through what makes a good rumor:

  • an authority figure. Usually it is "Sheriff Bradley of Winslow County" (just made that one up myself) or something that just bubbles authority. In this case it is "an attorney friend of KC's". Now this guy is an attorney, so that means he is smart and went through lots of school. And you can trust him because he is KC's friend. Of course, it makes no difference that no one in the chain of this has a clue who KC is.
  • State an absolute fact. "There are many things they have listed on their site as a hoax and yet you can go to Youtube yourself and find the video of Obama actually saying these things. So you see, you cannot and should not trust for anything that remotely resembles truth!"
  • Give a pseudoreference. "you can go to Youtube yourself and find the video of Obama actually saying these things".

Okay, in the real world, if this was factual, you could easily have said this in a way that was provable:

The problem here is they stated no real fact. And they stated no real proof of the fact (though you can find that proof on youtube.) And we know everything on youtube is factual because it is video. I mean just to prove it to you: as I sit here I am eating the popcorn I made with my cell phone.

Full Disclosure

  • I am neither "left" or "right". In fact, I have pretty negative opinions of both.
  • I really like Snopes. In fact, if you go back to my internet rumor story above, I should add to that. Snopes was a huge part of quelling this rumor. I do not know them. They do not know me. But I sent the aforementioned rumor to them and acted as the unauthorized (by management) voice of authority for my company. Within a few hours, my comments were on their web site. I won't say this stopped the bombardment of my server, but I am pretty sure it helped.

In defense of Snopes

I have no earthly idea what the political leanings of David & Barbara are. (Note how I call them by their first names, like we are buddies. I must be a lefty pinko commie too.) In fact, I don't care. I have been reading their site and using it as a reference for many years. Truth doesn't lean left or right. It just is. And falsehood just isn't. I have seen enough "true" and "false" references to both "the left" and "the right" to get the gut feeling that their goal is just to publish fact. I seriously don't think they are slanting the facts. All I can assume is that there are other internet rumors that are false that snopes has marked as such and that this is a smear to make you disbelieve them.

I might also add a bit of irony: Let's just believe the thesis for a minute: "If a liberal owns a media outlet, everything they say is a lie." Okay. Now do the words "Fox News" and "Rupert Murdoch" mean anything to you?

And irony bit number 2: Again, let's believe what the rumor says. Screw snopes. Trust Here's their story on this story.

A Ranty Conclusion

As I mentioned in Polly Ticks there is one facet of this I do not understand. And it bothers me. A whole lot.

Religious folk are typically given "a pass" by our society. They are immediately believable. They are "good". Think how many times you hear "he was a good religious man" in a obituary or as a comment about a poor victim on the news. Its as if "religious" automatically enforces "good."

But I cannot begin to tell you how many times "religious folk" are the ones sending out this type of rumor. And it just is not accidental. It is so formulaic that it is impossible for it not to be intentional. Tell a lie for political gain... so we can get someone in power that is "trusted and religious." Hmmm... Isn't that self disproving?

Or is it just that since the whole concept of religion is an unverifiable source telling you something that is difficult to believe. Maybe these folks are just overly gullible. Gullible is important in religion.

I am not saying the person that sent this to me is lying. Or the person that sent it to them. Or the person that sent it to them... but there is a liar in the chain. And a whole lot of gullibility.

Monday, October 20, 2008

We're Electing the Wrong People

You would think I could let it go. I can't. It's the upcoming election. It's the "economic crisis." It's the 80 gazillion dollar bailout. It's my last post on how taxes work. I can't let it go.

We are electing the wrong people. I don't mean Republicans vs Democrats. I mean they are all wrong. Way Wrong. One party is just a sham for socialists that also want to take away all your individual freedoms. And the others party is a sham for socialists that want to retain some of your individual freedoms. There was a time when it was "economic freedom" vs "personal freedom" -- and each party had a tiny bit of something to offer. But ever since W. has proved to be even a bigger socialist than FDR, "economic freedom" has become a thing of the past. Pundits on the late night talk shows giggle of our naivety -- how we could have been so silly to think "economic freedom" was a good thing way back when. It's a forgone conclusion.

One side promotes "trickle down" economics. The other promotes "bubble up" economics. They both have accepted that taxation is an ever increasing absolute. They just are arguing over who should pay the most unfair amount. Forgotten in the conversation is the fact that money is being taken from people by force and being spent on things they are philosophically opposed to. It would be one thing if we were being forced to buy the things we want. But that, again, isn't how it works.

When all else fails, oversimplify. There is nothing better than taking a complex topic like taxation and government spending and reducing it to a simpler concept -- even if it isn't logically correct. So let's just compare how government works to how real life works, shall we? The most important lesson I ever learned about personal finance was this (and I have ranted many times about it before): It is not what you earn, but what you spend that determines your wealth. I cannot tell you just how important this lesson is. The biggest raise I have ever received in my life was a 40% cut. Ellie Mae and I were living the typical American life. We were not overtly in debt, but we had car loans and house loans. We paid off our credit cards every month. But at the end of the month, we pretty much had spent the same amount we earned -- spent on crap I might add. Usually it was spent in a restaurant or on something that we didn't even have anything to show for. But when Ellie Mae was hating life and decided to leave the corporate hell she was in, we managed not only to get by on 40% less, but to actually get ahead. In about 10 years, I am semi-retired (which, I might add, is a euphemism for unemployed). Better still, I am semi-retired with no loans.

So when it comes to taxes, let me make the same statement: It's not how much tax revenue you take in ... or even who you take it from. It's how you spend it. I get so goddamn angry as they argue over who should pay more or who should get the next tax cut, when the real issue is "why don't you spend less?"

Let's compare my own economic story with those of our various leaders, shall we?

  • After losing the presidential nomination, Hillary Clinton has been reported to be anywhere between $10 - $36 million in debt. (The amount varies with the source and date of the story.)
  • Dennis Kucinich owed almost a half a million from his 2004 attempt at the presidency before he ran up another cool million and change on his 2008 bid.
  • John Glenn reportedly owes $3 million from his 1984 run for president.
  • Failed Democratic presidential candidates from 2008 include: Joe Biden ($1.2M), Chris Dodd ($380K) and Bill Richardson ($317K).
  • Failed Republicans include: Rudy Giuliani ($3.6M) and Mitt Romney ($44M!).
  • Special Bonus Honorable Retarded Mention goes to Joe Biden. This "common man" has reportedly refinanced his home 29 times since 1972. (And let's be clear here... if you owe $730k on your house, you cannot portray yourself as a common man -- even if you do ride the train.) Okay, Joe: when it comes to economics, you're doing it wrong. Firstly, it sounds like you have a tendency to buy more than you can afford. Next, it sounds like you are willing to leverage your soul forever to do so. If you cannot pay off your house in 15-20 years then you just cannot afford it. Can't retire? I wonder why with an eternal house payment on a $3 million dollar home. Maybe you should just vote up a whole bunch of benefits for retirees so you can pay it off. His net worth at age 65 is estimated to be $150k! Dear jebus, keep this guy out of fixing our economy! I say again: You're doing it wrong, Joe. You want a poster child for how we got into a housing bubble? Look no further.

There has to be something wrong here. I might also suggest that the trail of blood leads to the losers, but isn't it possible... or even probable that the winners hedged their winning on debt as well? And who is more likely to be bought or finagled? Someone that is paid in full? Or someone that owes his soul? Let's not also forget that even the "losers" are still generally in public office and are prime candidates for political favors. Let's also also not forget that with millions in debt, the jobs they are seeking are $400k (president) and $165K (congress). While neither of these is chump change, they certainly are not worthy of multi-million dollar risk unless there are other rewards. I say if you cannot afford to get elected for cash (your own or that of donors) then you should be legally barred from running.

And if you cannot afford your own stupid life, you cannot afford to be economically ruling the rest of us. These folks are leveraging the country in the same fashion as they leveraged themselves: We'll just pay for it later. Or someone will. Or there will be some insurance policy that pays off the estate when I die.

Well, when it comes to the life in the USSA, the payment comes from the next generation. I might also add here that the next generation has been brought up to believe that Mom & Dad will pay for everything. (Mom & Dad did it with a credit card.) So they pretty much feel entitled... and we are expecting them to shoulder this burden? I don't think there is a math scholar alive that can make that one work out.

And the bailout? What's the purpose of that? Well, if you listen to the knuckleheads that got us into this mess (and the same ones we are trusting to get us out) the purpose is to get more credit out there. More credit? Someone is not paying attention in class. It seems to me the whole reason we are here is due to too many people taking too much credit.

If you want out of this mess, you need capital. You need cash. You need assets. Promoting debt is no cure. It is an offering of a bandaid to a man that was just run over by a train.

"Gosh, you are really overweight. Can I offer you a slice of pie?"

Sunday, October 19, 2008

One of those poignant forwarded thingies

I got this as a forward from my uncle. There is no real attribution to its origins (so sorry for busting your copyright, whomever wrote it). However, it is a pretty exact model of how our tax system works. Feel free to call it a straw man... but do the math. It isn't quite as made of dried grass clippings as you would claim it is.

I have one and only one criticism of this: it uses tax cuts as the example... and I just don't see any of those coming anytime soon.

Bar Stool Economics

Suppose that every day, ten men go out for beer and the bill for all ten comes to $100. If they paid their bill the way we pay our taxes, it would go something like this:

The first four men (the poorest) would pay nothing.

The fifth would pay $1.

The sixth would pay $3.

The seventh would pay $7.

The eighth would pay $12.

The ninth would pay $18.

The tenth man (the richest) would pay $59.

So, that's what they decided to do.

The ten men drank in the bar every day and seemed quite happy with the arrangement until, one day, the owner threw them a curve. 'Since you are all such good customers,' he said, 'I'm going to reduce the cost of your daily beer by $20. Drinks for the ten now cost just $80.

The group still wanted to pay their bill the way we pay our taxes so the first four men were unaffected. They would still drink for free. But what about the other six men - the paying customers? How could they divide the $20 windfall so that everyone would get his 'fair share?' They realized that $20 divided by six is $3.33. But if they subtracted that from everybody's share, then the fifth man and the sixth man would each end up being paid to drink his beer. So, the bar owner suggested that it would be fair to reduce each man's bill by roughly the same amount, and he proceeded to work out the amounts each should pay.

And so:

The fifth man, like the first four, now paid nothing (100% savings).

The sixth now paid $2 instead of $3 (33%savings).

The seventh now pay $5 instead of $7 (29%savings).

The eighth now paid $9 instead of $12 (25% savings).

The ninth now paid $14 instead of $18 (22% savings).

The tenth now paid $50 instead of $59 (15% savings).

Each of the six was better off than before. And the first four continued to drink for free. But, once outside the restaurant, the men began to compare their savings.

'I only got a dollar out of the $20,'declared the sixth man. He pointed to the tenth man, 'but he got $9.

'Yeah, that's right,' exclaimed the fifth man. 'I only saved a dollar, too. It's unfair that he got nine times more than I!'

'That's true!!' shouted the seventh man. 'Why should he get $9 back when I got only two? The wealthy get all the breaks!'

'Wait a minute,' yelled the first four men in unison. 'We didn't get anything at all. The system exploits the poor!'

The nine men surrounded the tenth and beat him up.

The next night the tenth man didn't show up for drinks, so the nine sat down and had beers without him. But, when it came time to pay the bill, they discovered something important. They didn't have enough money between all of them for even half of the bill!

And that, boys and girls, journalists, and college professors, is how our tax system works. The people who pay the highest taxes get the most benefit from a tax reduction. Tax them too much, attack them for being wealthy, and they just may not show up anymore. In fact, they might start drinking overseas where the atmosphere is somewhat friendlier.

Monday, October 6, 2008

Aww Nuts!

I'd like to take a moment to talk about house building. In particular, choices of building materials and location. And by location, I don't mean zip code. What I mean is where on the lot do you orient the house?
For example: if your lot contains a 250 year old massive hickory tree. I would suggest you build a little bit away from it. This is so you get a chance to view its massive size and beauty.
And on the materials side of things: lets talk roofing materials. A metal roof is the way to go. Lightweight and lasts you years and years.
Now, if you were to take my advice on the metal roof, but ignore my advice on locating your residence -- then you would land right where I am now. I sit and sleep beneath several thousand pounds of harder-than-oak hardwood. And even more importantly, I sit beneath several hundreds of pounds of hickory nuts.
If you've never seen a hickory nut, let me describe it to you. Think of it as a one inch plug cut out of a 2x4. This time of year it is wrapped in a green sheath that is about 1/4 inch thick and still lush. This makes a heavy chunk of wood in the tree dangling above your head.
So, lets review what we have established so far: big ass tree posed to crush me and a ton of little 2x4 chunks all dangling from little brittle threads. This time of year they are starting to fall. It sounds approximately like a gunshot. Sure, you get a little bit used to it. But even if you are used to it, this is a 90th percentile. One time out of ten you are still going to be surprised. It will be when your hands are deep in the electrical panel -- sounding like the pop of a crossed wire. Or when your head is just under the hood of the car, making you jump and bonk it hard. Or when you think you are being sneaky and are stealthily creeping up behind your wife.
Now, let us introduce another variant. If you had such a bit of property already build improbably close to the largest tree in a 1000 foot radius... Don't build a dog pen right next to it. Why, you might ask? Well, dogs (dachshunds in particular) are known to hate squirrels. And squirrels are known to hate dogs. And squirrels are known to get hungry. And squirrels are known to eat nuts. What this creates is a vast amount of negative potential energy: An angry squirrel loaded with ammo sitting 100 feet above an obnoxious dog.

And I live and sleep in the crossfire.