Thursday, September 28, 2006

Crap

I said something really stupid at work yesterday and just got called on it.

Crap.

Wednesday, September 27, 2006

Claritin and Meth

In the last few months it has become more difficult to buy Claritin-D for my allergies, something which I consume like aspirin. In particular, Rite-Aid has it behind the counter and had a sign claiming there was a federal law demanding that consumers provide a drivers license (which they proceed to enter the information into a database). I thought this was interesting, since nobody at Walgreens or Eckerd or even Foodtown ever asks to see photo ID to buy allergy medication. If this is a federal law, how come Rite-Aid collects my information and other major pharmacies do not have such a requirement (we're not talking about the local Mom and Pop pharmacy down the street not bothering to ask for ID).

Turns up there is indeed a federal law restricting the distribution of Pseudoephedrine (the Combat Methamphetamine Act of 2006) which goes into effect on September 30th 2006. Interesting that RiteAid decided to start enforcing a law months before it went into effect. Turns up it got stuck into the Patriot Act.

http://www.fda.gov/cder/news/methamphetamine.htm

What the hell does stopping meth have to do with stopping terrorism? Don't get me wrong, I'm not saying drugs are a good thing, but it just pisses me off when Congress sticks riders into a bill that have nothing to do with the bill in the first place. You know, like combining a bill raising the minimum wage and eliminating the estate tax.

On the flip side, tonight I learned all about manufacturing techniques for methamphetamine. Maybe I'll quit my job and become a drug dealer. Open myself up a little lab in Queens. Got to love the Internet (and Wikipedia in particular)!

Tuesday, September 26, 2006

Long day

Worked from 9am to 9:30pm. Turns up I introduced a bug last Thursday and it was subtle enough that it took all evening to track it down.

Programmers, start your engines!

Here is the function I wrote, with the intention of removing all unused entries from the end of the STL vector called _db (dead entries have their value set to NULL). See if you can spot the problem:

void DagentStateImpl::compact_dblist()
{
if (_db.size() > 0) {
unsigned int i;
for(i = (_db.size() - 1); i > 0; i--) {
if (_db[i] != NULL)
// We've hit a real entry so don't go any further
break;
}
if (i < _db.size())
_db.resize(i);
}
}


If you can spot the bug and want to work in a penthouse overlooking the Flatiron, then you should send me your resume.

I'm also looking for a cleaner solution. I know I could put the resize() inside the loop, which would be much easier to follow, but I didn't want to incur the cost of doing resize multiple times if there were lots of entries to remove when I could just do it once at the end once I knew what the new size should be. A reverse iterator would make the for loop cleaner but I would still need to keep track of the index so I would know what to resize to (which kind of defeats the purpose of using a reverse iterator in the first place).

Saturday, September 23, 2006

Anne 40th Birthday

Today we had Anne's 40th surprise party. Was good to catch up with all the folks from 3Com days.


(L-R Rick, Dan, Ken, Eric, Suhlle, Paul, Anne, Me)

Been a busy week. Vikki came out yesterday. Did Zen Palette for dinner. Had Ben's going away party after work on Thursday (even though now he's not leaving).

Monday, September 18, 2006

“Hotel Minibar” Keys Open Diebold Voting Machines

To add to the drama that is electronic voting, it turns up you can open any Diebold Voting machine with the same key that is used to lock most hotel minibars (and can be bought on the internet for a couple of dollars).

http://www.freedom-to-tinker.com/?p=1064

Most security experts agree that Diebold's approach to security in electronic voting is a joke, but this is a new low.

Also ran across this fun article in Rolling Stone magazine on a statistical analysis of the 2004 election and how the data suggests it is virtually impossible that widespread fraud didn't occur (not that anybody is going to do anything about it)

http://www.rollingstone.com/news/story/10432334/was_the_2004_election_stolen

Even if you argue the article is biased, there is certainly enough raw data there to make you wonder...

Carter and I went to a club tonight and played Magic the Gathering. May perhaps make it a regular Monday night thing.

Sunday, September 17, 2006

Devin goes to Jail

Vikki and I went to Eastern State Penitentiary in Philadelphia on Saturday. It was interesting to see how prisoners were treated here in the U.S. in the 19th and 20th centuries.



Also interesting because it's basically in the middle of Philadelphia. It's less than a mile from the center of the city.



Here's me standing in one of the cells. Tiny, isn't it?

Tuesday, September 12, 2006

Words for the wise

Don't ever start a conversion of major data structure at 7:00pm.

On one hand you don't have to worry about a conflicts or breakage generated because others are working on the tree. On the other hand, it means you don't get to go home.

I started to eliminate DB_MAX_NODE from the dagent source tree. Now I'm regretting it.