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.

I was right

Earlier this year I was standing in Newark Penn station waiting for a train. There must have been some sort of alert, because there were around twenty cops standing around, many in full body armor with automatic weapons. I commented to my coworkers the next day that given the frequency of unjustified police shootings I thought I was more likely to be shot by a cop than be the victim of a terrorist attack.

Well, Wired magazine seems to agree with me:

http://www.wired.com/news/technology/0,71743-0.html?tw=wn_index_12

Look at their "color coded chart" at the bottom of the article.

People killed by terrorists: 3147
People shot dead by law enforcement: 3949

Today's Perl test

For your viewing pleasure, here is today's cat implementation from a candidate who claimed to know Perl.


#@/usr/bin/perl

use strict;
use warning;

P

Crap

I don't want to go to work today. it's 8am and I have to leave at 8:45 and I'm just not in the mood.

I feel like work on my project has stalled. I'm still getting stuff done but I don't feel like anyone else is (or they're running at half speed). Very annoying.

Well, off to work...

Monday, September 11, 2006

Double MPEG Compression

While working with Paul on MemVidia, I did a bit of work on understanding the effects of double MPEG compression (in particular the effects on loss)

Sumbled across this really good article by Hany Farid on detecting double MPEG detection from a forensics standpoint, with the intent of detecting tampering.

http://www.cs.dartmouth.edu/farid/publications/acm06b.pdf

Sunday, September 10, 2006

Sunday

Had a pretty good weekend. Today met up with Kyle for the first time in four months. Lunch at Bertuccis. Helped her with her CV and resume.

Have a bunch of scheduling to do tomorrow for the next phase of my project. Fun fun. Going to see if I can take Friday off so I can spend a three day weekend in Philly with Vikki.

Going to bed early tonight.

Saturday, September 9, 2006

Thursday, September 7, 2006

Huh?

If asked who I felt were the most influential individuals were in my life when I was young, I would have a pretty short list:

1. My father
2. Charles Wissler
3. Charles Gimbel (my high school Chemistry teacher)

These are the people who gave me my work ethic, who motivated me to work hard. These are the people who taught me to pay attention to details -- to have extrodinarily high standards for quality. Though not intentionally, they also taught me that it was ok to be a nerd.

I have not spoken to Mr. Gimbel since 2004, and stumbled across a couple of his letters last night when doing some cleaning. Figured I would see what he is up to, so I did a quick Google.

Found some tax records from Brevard county where he listed as a self-employed Internet Marketing Consultant. Now I myself know a thing or two about the Internet, so I figured I would dig a little deeper. I found this:

http://www.cgi-etech.com/default.html

I'm speechless.

Here is my mentor putting himself out there as an Internet Marketing Consultant, with a three page website that was built with the website builder that come with GoDaddy Hosting.

Wednesday, September 6, 2006

Six Degrees of Kevin Bacon

Except in this case it's me and not Kevin Bacon.

Me -> Vikki -> Vikki's sister Cortney -> Rob Q.

Scary.

Cats and Perls and Developers

So I spend a good portion of time interviewing job candidates. It can be hard sometimes to find competent individuals, so I am always looking for ways to filter them out.

A few months ago, I started giving a Perl test when people come in to interview. It's not supposed to be hard -- it's just an attempt to see if somebody actually knows Perl, since it seems like everybody puts it on their resume.

I ask people to write a Perl implementation of the UNIX utility cat(1). If they don't know what cat it, well that says something in and of itself. It's only supposed to take a couple of minutes, and those of you who know what cat is will recognize it's a really simple tool.

Here's how I would typically solve the problem, bearing in mind that this is a conservative approach:

#!/usr/bin/perl

if (!defined($ARGV[0]) {
die "Usage: cat <filename>";
}

open INFILE, $ARGV[0] or die "could not open file";
while (my $line = <INFILE>) {
print $line;
}
close INFILE;

That took me about a minute to write. Short and simple. Clear and concise. Perl guys like Dan or Joe or Dmitri might show off a bit and give a more clever answer like the following:

#!/usr/bin/perl
print while <>;

An answer like this demonstrates a particularly good understanding of the language (understanding $_, implicit behavior of "<>" when not providing a file handle, etc.). It's shorter than my implementation because it takes advantage of some of the more obscure aspects of the language (nobody would do it this way in production code because it's too hard to follow).

Then there is what I get from actual interview candidates. Now that you have seen a couple of reasonable approaches to the problem, here is what I got from the last candidate. Note that I am giving him the benefit of the doubt and cleaning up the indentation. The rest if verbatim. I kid you not, this is a real answer from a candidate who claimed to know Perl.

#!/bin/perl
if (#? == 0)
echo Usage cat files [...]
fi

foreach (filename)
if (-f filename)
cat filename
fi
end

Yeah, notice the lack of curly braces and dollar signs? He actually attempts to call the UNIX cat utility from inside his own implementation of cat. It almost would pass as a bash script.

I'll be providing the works of other fine candidates from time to time, as many of them really are pretty funny.

Tuesday, September 5, 2006

The Accidental Expert

So about a month ago I got sucked into this project. They needed help and the only way we were going to come close to the deadline was if I jumped in and helped get the actual implementation working. My role up that point was simply advisory -- assist in design and architecture. The reality is that I never claimed to be the subject matter expert, and I saw my role as rather temporary, to lend a hand to a project in jeopardy.

Well the project is pretty much on track now (after three 65+ hour weeks), and they are in bug fix mode. The project is in test, and the original developers have a list of outstanding issues to fix, but they are essentially edge cases and there is little left of significant risk. That said, I figured I would be moving on to something else now -- get back to the mainline development I was doing before I got pulled away.

I was informed today that this is going to be my project through the end of the year. Now that the core functionality is in place, I have been asked to start the second phase of feature development to make the product have everything necessary to sell to a wide audience. This means mapping out the new functionality and expanding the framework to do more that the bare minimum required to say the product works. It means extending the product from proof-of-concept to production.

My initial reaction was surprise. I really hadn't considered staying on this project for longer than would be necessary to get it to a stable point. While I have been driving the project for the last month, making design decisions and defining the development work items for the other developers, I had not really taken the time to learn about SQL Server. I spents days in front of MSDN and TechNet solving problems and answering questions about a product I never really took the time to understand.

Surely there must be someone more qualified than me to do this? I just came on to help out in a crunch.

Unfortunately the answer is 'no'. I inadvertently became the resident expert on all things SQL Server.

I'm not against the idea in principle. It is good business for me to embrace the project and see it through to General Availability. But if I'm going to make this my full time responsibility, then I guess I should learn something about SQL Server.

So I bought a book tonight.

The upside is that having read about 100 pages of the book tonight, I now have a MUCH better idea of what we have been trying to accomplish from a user standpoint. I can see the pitfalls the product is trying to address. And I can see potential things we can do to make the whole process better. Up to this point, I had been tunnel-visioned on getting the product stabilized, not giving much attention to the high level goals.

It could be interesting - I can make this thing kick ass.

In other news, I bought a couch on Saturday. It will be delivered this upcoming Saturday. And I took advantage of work closing early on Friday to get my New York driver's license.

Friday, September 1, 2006

New Shower Curtain

Vikki got me a cool new shower curtain



Now you may be asking, why is there a shower curtain on my blog? But the real question is:

Why isn't there a shower curtain on your blog?