Thursday, December 24, 2009

There is no sense of humor on the North Face

I was just read about how the North Face is suing the South Butt. The South Butt is a parody line of clothing started by Jimmy Winkelmann, a college freshman at the University of Missouri.  The South Butt clothing line features a logo that is a clever spoof of the ever present North Face logo.

I’m not a lawyer and nor do I play one on TV, but it sounds the South Butt was a clear and obvious parody and would be protected by the fair use laws.  Parody is a fair use, even when done as a commercial venture.  That has been taken all the way to the Supreme Court.  In Campell v. Acuff-Rose Music, Roy Orbison’s publishers tried to sue 2 Live Crew for their song “Pretty Woman”, which parodied Orbison’s “Oh, Pretty Woman”.  The Supreme court ruled that the 2 Live Crew song was protected by § 107 of the Copyright Act of 1976.

This is just a dumb move on the part of North face.  I don’t know how Winkelmann’s venture crossed the North Face radar, but I’m sure it didn’t much exposure until the North Face lawyers got involved.  That caused a Streisand Effect, generating tons of publicity for the Butt Face.  Now the North Face looks like a bully with no sense of humor.

When you compare the two logos, you can clearly see the difference.

NorthFaceLogo

versus

SouthFaceLogo

The South Butt logo is clearly parodying the North Face logo.  I can see the need for the North Face to protect their logo.  That logo is the identifying marker for their product line.  When someone is wearing a North Face jacket, you are aware of the brand from 30 feet away.  The South Butt does not dilute the North Face brand.  It make fun of it, but that is protected by law.  There is no upside for North Face with this suit.  They will most likely lose their case and will ahve wasted time on and money on a pointless venture.  If by some bizarre luck they actually win, then they will look like bullies.  Either way, lots of bad publicity for them.

My daughters wear North Face jackets.  It’s a status symbol for their age group.  If the North Face continues with this suit, I’ll think twice before I buy anymore.  I may just buy a Butt Face jacket for my own amusement.  I’ve already become a fan of their Facebook page.

Friday, December 18, 2009

Getting the list of databases that a user has rights to from SQL Server

We have a few applications that let the user select the database connection details.  It’s for SQL Server 2005/2008 and they can pick the server protocol, server name, and the database.  Once they select a database server, the user selects the database from a pick list selection.  We filter that list to only show the databases that are applicable for that user and application.

The first thing we do is get the list of databases.  We want to only display the databases that user can access and filter out the system databases.  There are a few ways to get the list of databases from SQL Server.  There is a system stored procedure named sp_helpdb or you can go right to the same tables and views that sp_helpdb uses.  The latter matter is more efficient, but you want to make sure that you are using the system views instead of the system tables.  Microsoft has deprecated access to the system tables and has published a list that maps the system tables to the system views on this MSDN page.

The system view that we want to uses is sys.databases.  This view will give us a list of all (well nearly all and close enough for our purposes) of the mounted databases.  This includes the system databases and databases that the user may not actually have rights to.  We can filter out the system tables by excluding them by name,  We can use the has_dbacesss() function to filter out the tables that we don’t have access to.  The has_dbacess('databasename') function will return 1 for databases that the current connection has access to, or 0 for no access.  That give us the following T-SQL for getting the list of databases:

select Name 
from sys.databases
where (has_dbaccess(name) > 0)
and name not in ('master', 'tempdb', 'model', 'msdb')
order by 1

If your user account has access to different types of databases and you want to filter the list to provide only the databases that your application supports, then you can go one step further.  Find a table or view in your database that is fairly unique.  If all of the table names are pretty generic, just create with unique name and make a use for it later.

The following SQL statement can be executed from an application to get a filtered list of databases in one call to the server.

create table #TempTable(dbname nvarchar(128));
declare @AppDatabase nvarchar(128);
declare cr cursor for select Name from sys.databases where (has_dbaccess(name) > 0)

open cr;

fetch next from cr into @AppDatabase;

WHILE @@FETCH_STATUS = 0 begin;
execute (' insert into #TempTable(dbname) select Table_Catalog from [' + @AppDatabase + '].INFORMATION_SCHEMA.TABLES where TABLE_NAME = ''GeoZoneEdge''');
fetch next from cr into @AppDatabase;
end;

deallocate cr;

select dbname from #TempTable

drop table #TempTable


The use of semicolons makes it easy to send the set of the t-sql commands as one command to the server.  you would replace the string “yourtablenamehere” with the name of the actual table or view you were trying to match.   By sending a set of commands as a single batch, we get the power of a stored procedure with actually having to have a stored procedure.  The blank lines are there for readability, you can run that as a single execute command and get back a result set.

The first few lines create a temp table to store the database names collected from sys.databases.  We use a cursor to iterate through result set from sys.databases so that we can check each database for the existence of a table that we know will be in our application’s database.   For each database name in that result set, we use the INFORMATION_SCHEMA.TABLES view to check for the existence of a specific table in that table.  Since we doing that lookup for each database, we need to construct the SQL statement at runtime, as shown in line 10 in the listing above.  Each select statement the produces a result, logs the database name into the temporary table.  Then we just return the results of the temporary table.

It looks involved, but it executes fast and the calling application only needs to make one call to the SQL Server to collect the data.

Monday, November 09, 2009

This Day in Epic Fail: November 9th, 1876

This Day in FAIL

Lloyd Header of Cleveland Ohio discovered that he needed at least one more lesson in riding his High Wheel bicycle.  The term “taking a header” was named after him.

image courtesy of Do-While.com

Thursday, October 29, 2009

I’m now a MCP

A couple of weeks ago I went away to a “boot camp” to prep for a set of Microsoft certification exams.  After a few years of plugging away at .NET programming, I got budget approval to take a class to prep for the MCTS ASP.NET 3.5 certification.  I’ve always wanted to do it and every now and then we get a RFP that has a line item about having MCP’s on staff.

There are two exams, the first one is 70-536 (Microsoft .NET Framework – Application Development Foundation).  The second one is 70-562 (Microsoft .NET Framework 3.5, ASP.NET Application Development).  When you pass both, you get the MCTS certification.  From there, you can take additional exams for more certifications.

I’ve been doing .NET programming for a few years, but it’s been pretty much self-taught all the way.  One of the goals of getting the MCTS certification was to learn where my strengths and weaknesses are.  About 2 years ago, we bought a self paced training kit for the MCPD exam.  After spending some time with the books and practice exams, I knew I needed some serious prep time and with out any interruptions.

I’m easily distracted by bright shiny objects.  I have the attention span of a mal-adjusted 4 year old.  This exam prep time would not be done at home or in the office.  I needed to get away from here.  After a brief search on the Internets, I found a company that offered “boot camp” courses.  Training Camp offered a 7 day boot camp course for getting the MCTS ASP.NET certification.

They provided a seven day schedule of instructor led review, labs, and self tests. Their package included hotel accommodations, training material, two exam vouchers, plus breakfast and lunch.  The training material included the Microsoft Press self-paced training guides.  The 70-536 guide weighed in at 750+ pages, while 70-562 was a bit bigger at 1000 or so pages. The price was reasonable, compared to sessions offered by other vendors.

I made arrangements to take their course at their PA location.  I planned on renting a car and driving down from Albany.  Accommodations would have been at the fabulous Fernwood Hotel in Bushkill, PA.  The training would have been at the Training Camp facility, not far from the hotel.

After paying for the course, they sent back a list of videos to watch to prepare for the class.  They were not from the TrainingCamp company, but freely available from www.asp.net.  You can find them here.  That felt a little bit cheesy, but on the other hand they didn’t need to reinvent the wheel.

A week before the course was supported to begin, they canceled it.  They didn’t have enough people confirmed for the course.  They did have one in Orlando, starting the following week.  So it was off to Orlando.  Suprisingly, this ended up being a good thing.

The training was in the hotel that I would be staying in, the Marriott Courtyard out at the Orlando airport.  Since this was a remote location for Training Camp, they were using laptop computers.  It’s much easier to ship laptops around than desktop computers.  We were issued the laptops on the first day and we got to hold on to them 24/7.  This meant, we could use the laptops to study the labs and self-tests in our hotel rooms after dinner.  If I had gone to the PA session, I would have use the PC’s in their labs.

The instructor was top notch.  If you ever go for training through Training Camp, ask for the sessions taught buy Bill Chapman.  Just google “Bill Chapman MCT”, he knows the stuff and knows how to teach it to you.  He was a big reason why I passed the exams.  The man has more certifications than I knew even existed.  I think Microsoft makes up imaginary certifications just to trick Bill.  It wont work, he’s that good.

We started at 8am every morning.  After lunch, we would go to around 5pm.  Then we were cut loose to find our supper.  After dinner, We were expected to study the exams and take the practice exams, with lights out at 10pm.  It was very draining. By 10pm on the first few nights, my brain was toast and I went to bed.  No TV, no touristy type of things.  Just studying.

We spent 3 days on the material that would be in the 536 exam.  The fourth day was exam day.  We had 18 people in the class, on the fourth day the first 10 of us trooped in to take the exam.  The exams are scored from 0 to 1000, with 700 being the passing score.  Based on the practice exams, I was running at at 85%-95% correct.  I felt good walking into the exam.

And then I got hammered with the actual exam.  The license agreement that I accepted when I took the exam precludes me from discussing any of the questions, but I can say that the material on the test did not match what we had been prepping for.  There was considerable overlap, but there was a lot of stuff that I had not seen before.  I passed the exam, but it was not pretty.

Apparently, as we found out afterwards, Microsoft had updated the exam the week before.  They do that, not often, but enough to keep the exam current.  They focus the questions more on the newer technologies and start dropping the questions on the older material.  We just had the misfortune of getting a new exam before the study material had caught up.  Only two of us passed that exam.  After the exam, we were handed the second exam study guide with the instructions to start reading it.  That took care of Thursday.  Friday morning, we would tackle ASP.NET.

Most of the people who had failed the exam opted to spend their remaining time studying for that exam and then retake it on the final day, instead of taking the second exam.  We had two exam vouchers, you can retake a failed exam.  According to the instructor,the 536 exam is one of the harder Microsoft exams.  If I had failed it, I think I would opted to retake it and study for 562 on my own time.

We had Friday and Saturday to review the materials for the second exam.  I woke up on Friday with a bad cold.  Headache, runny nose, sore throat, body aches, it was not a good way to start the day.  We ripped through the prep book at high speed.  We had the afternoons and evenings to do the labs and take the practice exams.  I don’t do too much work with ASP.NET, I really needed the study time.  I was so wiped out from the cold, I went to bed right after dinner on those two nights.  On Saturday, I took the practice exam a few times and scored in the 35% to 40% range, well below what I needed to pass.

We had all Sunday morning to prep for the exam.  We had to start the exam by noon at the latest, but you could take it anytime after 8am..  I woke up Sunday morning feeling physically horrible, but mentally fit.  I had the choice of taking the exam now or go home with the test voucher and take it at a later date.  I decided to take the exam now and if I failed it, to find out where my weak points were and retake the exam later.

I went in to take the exam right after breakfast.  I went in with a bag of cough drops, no sense bothering the other people taking their exams with my hacking.  The exam proctor smelled the cough drops and asked for one.  On the way into the hotel, a bug had flown into her mouth and she wanted something drastic to get that taste out of her mouth.  Personally, I would have gone for something a little less toxic tasting, but it worked.

One of the lessons that Bill had drilled into us was if if you think you will fail the exam, you will.  I went in with the attitude that I will pass this exam.  And I did.  It wasn’t my best score on a test, but it was a passing score and that’s what counted.  I had now earned the MCTS certification.  I went back and thanked Bill and then went to airport to get an earlier flight home.

The boot camp wasn’t cheap, but I know I wouldn’t have passed the exams without attending it.  The instructor was excellent and being away from home without any distractions allowed me to study without interruption.  Being able to study in my room was a nice bonus, if I ever do one of these things again, I would try to it in the same way.

 

MCTS(rgb)_1102

When HTML encoding can bite you

I’ve been using TweetDeck to follow Twitter.  It’s a great app, but it has some quirks.  Like it’s ginormous memory usage.   Another is how it renders the text of a tweet. I’ve seen a few tweets go by where the text had HTML escape sequences instead of the text. 

This tweet is an example: http://twitter.com/KristiGustafson/status/5231052312

It should display as:

City shelves happy hour: Many of you will be glad we aren’t this city — they’ve shelved their.. http://bit.ly/10QmUr

In Tweetdeck, it displays as:

City shelves happy hour: Many of you will be glad we aren’t this city — they’ve shelved their.. http://bit.ly/10QmUr

A screenshot of that tweet:

td

If you view the link on Twitter, you’ll see the text the “right” way.  I couldn’t figure out what was wrong.  I posted a message in the TweetDeck support site and they couldn’t replicate the problem.  Then I looked at bottom line of the tweet.  It has been posted to Twitter from TwitterFeed.  I had never heard of TwitterFeed, so I signed up for an account.

TwitterFeed is a free service that can scan your blog’s RSS feed and look for new blog postings.  It can then post the first 100 or so characters from the post to your Twitter and/or Facebook accounts.  And that’s where the problem occurs. 

HTML and XML use escape sequences to define special characters.  What you see rendered in the browser is not literally the same text in the source for that page.  Literal characters like “<” and “>” have special meaning in XML and HTML.  To display those characters on the page, they needed to be encoded as &lt; and &gt; respectively.  It’s all magic that goes on behind the scenes, you usually are never aware of it.

When TwitterFeed gets the latest post from your blog, it’s pulling it from the RSS feed and the text is encoded with the right escape sequences.  They then call the Twitter and/or Facebook API to post that text.  They are sending HTML/XML encoded text to functions that are expecting plain text.  When Twitter displays that new blog posting as a tweet, it’s including the encoded text.  Your browser sees that encoding and decodes it back again.  Facebook on the other hand displays the text encoded.

TweetDeck isn’t a browser, it’s a desktop or mobile application.  It renders the tweets as plain text and assumes that the API call that it suing to get tweets from Twitter is sending back plain text.  So the question is where is it broken.  I’ve only seen this problem with entrties posted by TwitterFeed, I would be the first place I would look.  I think they will need to a HTML decode on the text that they are scraping from the RSS feed and send it as plain text to Twitter and Facebook API’s.

btw:  Kristi Gustafson is worth following, even if her text is getting mangled by TwitterFeed.

Wednesday, October 07, 2009

Fess up when you made a mistake

I was working on a installer project for a new tool that we will be releasing this fall when I hit the most odd error.  Right after the installer started up, it would bomb out with an error message that the some files that it need were missing.  And it only happened when I called a command line app that I wrote from within the installer.  If I commented out the code that executed that app, the installer ran as expected.

Ok, so your first thought would be what is that command line app doing?  It wasn’t my first thought.  It was tested code and it worked just fine in some other installer projects.  That was a rookie mistake and I should have known better.  The app does a few things.  It was designed to cache the settings of an installed app and restore so that if you do an upgrade in place, the settings are migrated from the old version to the new version.  Plus it has code to clean up extra files left around from previous installers.

After beating my head against the wall for day on it, I contacted the technical support for the installer.  They asked for a sample project and I sent one in.  While I was waiting for a response back tech support, I continued to play around with the installer.  This tool (InstallAware) has been rock solid for me since I started using it, it had to be something that I was doing wrong.

I looked at source code for my command line app and sure enough, under the right conditions, it would delete the files that the installer was using to install the actual app.  That wasn’t good.

Actually it was good, the mistake was in my code which meant I could fix it.  Which I did and my installer did what it was supposed to do.  I would rather fix my own bugs than be dependent on another vendor fixing their bugs.  I had switched from Wise For Windows to InstallAware because it forever to get fixes from Wise.  They released a new build about once a year.  if they didn’t fix the bug and you didn’t have a work around, then that bug became a feature.

Meanwhile, I still had an open support case with InstallAware.  I immediately logged into their support site and I closed out the support request.  I added a brief note explaining that this was self-inflicted and explained why my code was turning in on itself.  A short while later I received a brief note from one of their support engineers thanking me for the explanation.

I think the courtesy message to tech support is the right thing to do.  First of all it’s just common courtesy, it’s wrong to waste their time tracking down your bug after you have resolved it on your own.  Plus it’s going to help me if I need support from this company again.  If they had spent time tracking down a problem that was caused by my own carelessness, they would be less likely to help out with a legitimate support request.

Thursday, October 01, 2009

I don’t care who signs a petition, Roman Polanski is a convicted sexual predator who needs to do his time.

I’ve never subscribed to the “Hollywood Elite” theory about radical liberals being in charge of Tinseltown, but I do think more attention is paid to people who lean to the left.  And too much attention is being paid to the people who signed the petition demanding the release of convicted child molester Roman Polanski.  Would they do the same thing if his name was Roman Ray Polan and was a Dade County dish washer?  I don’t think so.

Polanski was arrested by Swiss police when he tried to enter Switzerland because of an outstanding 1978 arrest warrant.  He was to attend the Zurich Film Festival, where he would have been honored with a Lifetime Achievement Award for his film work.  Representing the Zurich Film Festival, Debra Winger made the following comment:

“We hope today this latest (arrest) order will be dropped. It is based on a three-decades-old case that is dead but for minor technicalities. We stand by him and await his release and his next masterpiece.”

I have no idea what if anything, was going through their minds when they signed the petition.  Roman Polanski plea bargained the charges of having given alcohol and drugs to a 13-year old, and then allegedly sexually assaulted her down to being guilty for having sex with a minor.  He then fled the country to avoid sentencing.  Those are the facts, no one has been unjustly accused here.

I have never heard of sexual assault being described as a minor technicality.  He took a 13 year old child, gave her drugs and alcohol and then sexually assaulted her.  It wasn’t statutory rape, the victim had testified that she pleaded with Polanski just to take her home.

I don’t buy the argument that it’s been 30 years and that it’s time to let it go.  Polanski was a fugitive from justice for the last 3 decades, he actively avoided going to locations where he could be expedited from.  He could have done his time and resumed his career decades ago.  He probably would received a one year sentence, would have been paroled long before the year was up.

That worst part of all of this is that the victim has to relive what happened to her all over again.  While Polanski was living openly in a country that refused to extradite him, she had to rebuild her live, knowing that he had got away without paying consequences.  The only good part for her was that he had already plead guilty, she doesn’t have to testify again.

I hope that the authorities in Switzerland ignore these people and honor the US extradition request.  The Swiss do not need to take a position one way or another about Polanski’s fate.  They just need to honor a legal expedition request.

Personally, I’m sad to see some of those names on that petition.  I don’t want to see their movies anymore.

Here’s the list as of the time of this posting:

Abderrahmane Sissako, Alain Corneau, Alain Jessua, Alain Terzian, Albert Gauvin, Alejandro Gonzalez Inarritu, Alexander Astruc, Alexander Payne, Alexandre Arcady, Alexandre Desplat, Alexandre Tylski, Alfonso Cuaron, André Buytaers, André Larquié, Antoine Aronin, Arielle Dombasle, Asia Argento, Barbet Schroeder, Bernard-Henri Lévy, Bertrand Tavernier, Betrand Van Effenterre, Buck Henry, Camille Meyer, Candice Belaisch-Goldchmit, Carine Sarna, Charlotte Silvera, Christian Carion, Christian Gion, Christophe Barratier, Claude Lanzmann, Claude Lelouch, Claude Miller, Corinne Figuet, Costa Gavras, Cécile Telerman, Danis Tanovic, Danièle Thompson, Darren Aronofsky, David Heyman, David Lynch, Davide Homitsu Riboli, Diane Kurys, Diane von Furstenberg, Djamel Bennecib, Dominique Crevecoeur, Elie Chouraqui, Elsa Zylberstein, Emir Kusturica, Etienne Faure, Ettore Scola, Eugenia Varela Navarro, Fanny Ardant, Fatih Akin, François Margolin, Gabriel Auer, Gaelle Lancien, Georges Dybman, Gianluca Farinelli (Cinémathèque de de Bologne), Gilles Behat, Gilles Jacob, Giuseppe Bertolucci , Giuseppe Tornatore, Guillaume Stirn, Gérard Lenne, Harmony Korinne, Henning Carlsen, Isabelle Adjani, Isabelle Huppert, Jacques Bral, Jacques Fansten, Jacques Richard, Jan Kounen, Jean-Charles Tacchella, Jean-Jacques Annaud, Jean-Jacques Beineix, Jean-Loup Hubert, Jean-Marc Ghanassia, Jean-Paul Dayan, Jean-Paul Rappeneau, Jean-Paul Salomé, Jean-PierreMarois, Jean-michel Carre, Jeanne Moreau, Jerry Schatzberg, Jessika Cohen, Johanna Gozlan, John Landis, Jonathan Demme, Joël Farges, Julian Schnabel, Just Jaeckin, Jérôme Cornuau, Katarina De Meulder, Kent Jones (World Cinema Foundation), Ladislas Kijno, Laurence Roulet, Laurent Heynemann, Liria Begeja , Louis Garrel, Luc Barnier , Luc et Jean-Pierre Dardenne, Marc Guidoni, Marc Sandberg, Marco Bellochio, Margaret Walker, Marie Nieves Perez Neël, Mario Martone, Mario Monicelli, Martin Scorsese, Mathieu Celary, Michael Mann, Michel Ferry, Michel Ocelot, Michele Placido, Miguel Courtois, Mike Nichols, Milan Kundera, Monica Bellucci, Morgane Beauverger, Nadine Trintignant, Nathalie Faucheux, Neil Jordan, Nelly Kaplan, Nicolas Mauvernay, Nil Symchowicz, Olivier Assayas, Olivier Soares Barbosa, Paolo Sorrentino, Pascal Bruckner, Pascal Thomas, Patrice Chéreau, Patrice Leconte, Patrick Bouchitey, Patrick Braoudé, Patrick Mimouni, Paul Auster, Paul Boujenah, Pedro Almodovar, Philippe Corbé, Philippe Radault, Pierre Forciniti, Pierre Jolivet, Radovan Tadic, Radu Mihaileanu, Raphael Rebibo, René Gainville, Richard Pena (Directeur Festival de NY), Robert Hossein, Roger Kahane, Rosalinde et Michel Deville, Salman Rushdie, Sam Gabarski, Sam Mendes, Sandra Nicolier, Scott Foundas, Serge Toubiana, Souleymane Cissé, Stephane Allagnon, Stephen Frears, Steven Soderbergh, Taylor Hackford, Terry Gilliam, Thierry Frémaux, Thierry Kamami, Tilda Swinton, Tom Tykwer, Tonie Marshall, Tony Gatlif, Vinciane Lecocq, Walter Salles, Wes Anderson, William Shawcross, Wim Wenders., Wong Kar Waï, Woody Allen, Xavier Beauvois , Yamina Benguigui, Yann Moix, Yasmina Reza, Ysabelle Saura Del Pan

Thursday, September 17, 2009

You always need to read your bank and credit statements

It was with some interest that I read today’s “The Advocate” column in the Times Union.  A man had $400 taken out of his credit union account and the credit union wasn’t going to give it back to him.  He has an account with the State Employees Federal Credit Union (SEFCU).  Another SEFCU member was making a bill payment over the phone and mistyped her account number.  It ended up being his account number and the money was taken from his account.

The guy was on vacation and did not get his bank statements in a timely manner.  When he noticed the error, he contacted SEFCU and they declined to reverse the transaction because he did not notify them within a 60 day window of the transaction.  He contacted the Advocate (Cathy Woodruff), who was able to reach an upper level marketing manager who was able to get the transaction reversed in a few hours.  The manager said that the transaction could have been reversed if the SEFCU member had asked for a manager.

That’s ridiculous, the service representatives that originally handled the case could have easily waved the 60 day period limitation.  It’s just an arbitrary time limit that SEFCU had set, nothing more.  If you think about this, it’s really SEFCU’s fault that they allowed the transaction to go through in the first place.

The woman who typed in the wrong number had made a simple mistake entering in the account number.  There should be enough security in SEFCU’s over the phone banking where you should only be able to access the accounts that you actually have access to.  If you think about, that’s a huge security hole in their system.

Hypothetically speaking, you could open an account with SEFCU today and make payments from other people’s account by lopping one digit of your own account number.  it may work, it may not, but apparently the SEFCU over the phone banking system will let you do that.

You really have to examine your bank statements each month with a fine toothed comb.  And that goes for your credit cards too.  Nearly two years ago, something similar happened to my checking account with Citizens Bank.  You can not count on the bank to protect your money, you have to monitor the transaction for your own fiscal safety.  And if you get caught in a jam like this, contact your local consumer affairs person at the newspaper or TV station.

Thursday, September 10, 2009

Wireshark work around for Windows 7

I do a fair amount of programming at the socket level and Wireshark is one the tools that I use to test the data going over the wire.  Wireshark is a free application that analyzes packets going across the network.  It knows about the different protocols and can display the data with a nice GUI front end.  It’s a cross platform tool, and I hit a small snag when I went to Windows 7.

To capture the packets, Wireshark uses pcap, which is an API for capturing network data.  Unix/Linux systems use a libpcap library, Windows uses WinPcap.  When you install Wireshark under WIndows, the installer checks to see if WinPcap is installed and if it’s not, it runs a bundled installer for the latest version of WinPCap.

When I installed Wireshark on my Windows 7 box, the installer was unable to install WinPCap.  It displayed the following error message:

This version of Windows is not supported by WinPcap 4.1 beta5.

Oh, the joy of using a new version of Windows.  There is a work around.  Download the WinPcap installer from here and install it first.  When you install it, run it in Vista compatibility mode. 

  1. With Explorer, Right-click on the installer and select “Troubleshoot compatibility”.  This will bring up the “Program Compatibility” dialog.
  2. Select the second option, “Troubleshoot program”.
  3. Under “What problems do you notice”, select the first checkbox, “The program worked in earlier versions of WIndows but wont install or run now”.  Then press the “Next” button.
  4. Under “Which version of Windows did this program work on before?”, select “Windows Vista”.  Press the “Next” button.
  5. Under “Test compatibility settings for the program”, press the “Start the program…” button.  This should allow you to install WinPCap.
  6. After the installer has completed, press the “Next” button on the “Test compatibility settings for the program” dialog.
  7. On the “Troubleshooting has completed. Is the problem fixed?” page,  select “Yes, save these setting for this program” to close out the “Program Compatibility” dialog

At this point, you should have WinPcap successfully installed and you can now run the Wireshark installer.  The Wireshark installer will detected that WinPCap is already in place and you can complete the install.

Tuesday, September 08, 2009

Blocking spam that appears to come from your own email address

At work, I get a lot of email where the sender has spoofed the email address so that it appears to come my work email address.  It’s annoying and our corporate email filter doesn’t catch it.  I did find a way to block it with a close to 100% success rate.  What I did was to create an email filter in the email application that traps those messages.  I’m using Outlook 2007, but the technique should would work for any email client that has decent filtering.  Here’s how I created the rule (using an obviously fake email address of a known spammer):

1.       From the Tools menu, select “Rules and Alerts…”

2.       From the “Rules and Alerts…” dialog, press the  “New Rule…” button.

3.       Under “Start from a blank rule” section, select “Check messages when they arrive” template.

4.       Under the dialog for “Which condition(s) do you want to check?”, select "with specific words in the message header"

5.       Click on “specific words” to open the dialog box that allows you to enter the search criteria.  I entered the following list, you would enter what matches your junk email and each line is entered in separately:
X-Barracuda-Envelope-From: sanford.wallace@spamking.com

From: <sanford.wallace@spamking.com>

6.       After closing this dialog, press “Next”

7.       On the “What do you want to do with the message?” dialog, select the following actions:
mark it as read

clear the Message Flag

move it the specified folder

8.       Click on "specified" and select the "Junk E-mail" folder.

9.       Click the “Next” button to the Finish rule setup dialog.

10.   Name the rule and set "Turn on this rule".  There is also a checkbox “Run this rule on messages already in “Inbox”.  You can set that checkbox to test the new rule.  If you have lots of messages in your inbox, create a new folder and copy some of the spam into that folder.  Then select that folder and edit the rule.  The “Run this rule…” checkbox will now list the name of the selected mail folder.  Your rule will run much faster on a mail folder with just a few times in it.

 

As you edit the settings, Outlook will display a text representation of the rule as you configure it.  It should look something like this:

Apply this rule after the message arrives
with ‘X-Barracuda-Envelope-From: sanford.wallace@spamking.com or From: <sanford.wallace@spamking.com>‘ in the message header
clear the message flag
  and move it to the Junk E-Mail folder
  and mark it as read

You may need to tweak the rule a bit to match the right messages, but it’s fairly robust.  If you want to allow email from your own address, add an exception to the rule and have the exception match some specific text in your message header or your email signature.

Friday, August 28, 2009

When Page Up and Page Down behave oddly in FireFox

I was viewing a web page with Firefox 3.5.2 the other day and I noticed the Page Up and Page Down keys were not behaving the right way.  Instead of scrolling, the page would flash a bit, but nothing really would happen.  I could still scroll with the mouse, but it bugged me.  Bugged me a lot.

I did a bit of searching and discovered an odd little feature.  Select “Options…” from the “Tools” menu.  On the “Advanced tab”, select “General”.  There is an option, “Always use the cursor keys to navigate within pages”.  If that option is set, the cursor keys can be used to select text on the page instead of navigating the page.

By default, that option is not set.  However, you can toggle it on and off by pressing the F7 key.  And I must have pressed that key at some point and toggled that feature on.  Once I cleared that setting, I could use the Page Up and Page Down keys to navigate the page again.

Thursday, August 27, 2009

Looking forward to Delphi 2010

I just got the email from Embarcadero with the access code to get my copy of RAD Studio 2010.  Almost all of our products that are Delphi based are compiled with Delphi 2007, I’m looking forward to working with 2010 flavor of Delphi.  We do a lot of .NET development, but there is still a need for WIn32 code and Delphi has been a really good development platform for us. 

I’ve had a software assurance contract since Delphi 7.  I don’t jump to next compiler just to get the next compiler, but I do want the new version to be able to evaluate the new version and see if the benefits out weigh the cost of porting to that version.  We chose not to use Delphi 2009.  We had just completed a painful upgrade to Delphi 2006 from Delphi 5 the year before.  The Delphi 7 port was easy because it supported Delphi 2006 components, but Delphi 2009 would have been major undertaking.  We still face the same porting challenges with Delphi 2010, but I still want to evaluate it and that port/no port decision.

Of course the fun part is waiting for the 3rd party vendors to release their updated controls.  We use a fair number of 3rd party packages.  The biggest ones are DevExpress, ReportBuilder, and JEDIDevExpress already put out a notice that they are a few days away from a release that will support RAD Studio 2010.  I’ll be able to do a lot more testing with.  There is no new information from Digital Metaphors about an update to ReportBuilder, but I would expect it fairly soon.  The roadmap page for the JEDI VCL shows that they intend on supporting Delphi 2010, but only sometime in 2009.  My guess would be that any component pack that supports Delphi 2009 should be fairly easy to port to Delphi 2010.

We have a fair number of components that have been either abandoned by the developer or we chose to keep at a specific version.  Those components, I had ported to Delphi 2006/2007 back a few years ago.  Delphi 2009 was a big change and it will probably take more work, but it shouldn’t be that bad.  I may make the decision to drop some of the lesser used components and replace them with equivalent components from DevExpress or JEDI.  We use Abbrevia library that was open sourced by TurboPower when they exited the market.  It has a Delphi 2009 port, that should be an easy one to port to Delphi 2010.

Wednesday, August 26, 2009

I haven’t seen gas that cheap since the Carter administration

Our local supermarket chain, Price Chopper, has been running a promotion this summer in combination with Sunoco.  The more you spend, the greater the discount will be on your next gas fill up.

This is how it works: For every $50 you spend, you earn 10¢ off per gallon of gas on the next fill up.  The nice thing is that they track all that you are spending.  If you spend $75.00, you get a 10¢ discount on the first $50.00 that you spent, plus you have $25.00 towards the next discount level.  When you get the fill up, the discount maxes out at 20 gallons, so you can’t take your fleet of Brunomobiles and fill them up in one shot.  But it can add up.  If you are paying by credit card, you just have to swipe your AdvantEdge card before you start pumping gas.  If you pay by cash, you just let them swipe the card at the time of payment.

I had been racking up the discount points this summer without paying too much attention to it.  A couple of weeks ago, I stopped into Price Chopper and bought some ice for a party. My current discount was printed on the receipt and it was $2.20 per gallon.  Some of the discount was due to expire at the end of the month, so it was time to cash in.  The discounts expire two months after they are earned, so it was use it or lose it.

The Stewart’s near my house sells Sunoco gas and the receipt here shows how much I paid to fill up my tank.  I paid 59.9¢ a gallon.  I paid a little bit over $8 to fill up a car.  That was just stunning.  That price takes us back to the year 1977.  On a side note: if you factor in the inflation rate, that price in 1977 is not that far off from what we are paying today.

Now I’m back to 0 on the discount, but since we usually buy all of our groceries at Price Chopper, it shouldn’t take too long to get that discount back up.  I don’t know how long they will be running this promotion, but it’s a pretty good one.

Monday, August 24, 2009

Why it can be good to build a PC instead of buying a prebuilt one.

After installing Windows 7, I wanted to install Windows Virtual PC.  Windows Virtual PC requires that your machine support hardware virtualization.  My home development machine is about two years old and I wasn’t sure it it support hardware virtualization.  I have an AMD X2 64 4800 with an Asus MSI-SLI Deluxe motherboard.  With AMD, the virtualization technology is called “AMD-V’.

AMD provides a tool that will tell you if your machine supports AMD-V.  I downloaded and ran it.  It gave me a message that my motherboard needed a BIOS patch to enable AMD-V.  On surface simple enough, patch the motherboard and off you go. 

I was hesitant on flashing the motherboard with a patch.  My motherboard’s BIOS was working just fine and there is some risk involved with flashing the BIOS to a new version.  If something goes wrong during the flash process, you can brick the motherboard.  Or you could find out the new BIOS makes your system worse.  Plus, I had no idea if a new version actually would enabled AMD-V.

Fortunately, Asus has a decent support forum and I was able to post a message asking about hardware virtualization.  Within an hour, I received a detailed response that the new BIOS versions did enable hardware virtualization and a list of steps on how to flash the BIOS.  I’ve flashed motherboard BIOS or two before and I pretty much know that drill, but it’s nice to get that level of support.  He did recommend clearing out the existing BIOS settings, which is always a good thing to do whenever you update the firmware of an electronic device.

I grabbed the latest BIOS from the Asus site.  I also grabbed the current version, just in case something went wrong wrong and I needed to go back to the old BIOS.  My motherboard had a flash tool built it and it could access a USB thumb drive before the booting the OS.  I copied the BIOS files to the thumb drive and rebooted. 

As it booted up, I pressed the Delete key to jump into the BIOS setup screen.  I selected the flash utility and picked the current BIOS file.  After a few minutes, the new BIOS was installed.  I cleared out the CMOS settings for the BIOS and rebooted.  I went into the BISO setup again and a had a few new options.  One of which was AMD Virtualization, which was enabled by default.

The next step was a reboot.  Windows came up and all was good.  I ran the AMD tool and it said that AMD Virtualization was good.  That was pretty painless.  When I got this machine 2 years ago, I had it built from a hand picked list of components.  I’ve had good luck with Asus motherboards and I wanted one where it would be easy to update and upgrade.  Plus I wanted a decent power supply.  When you buy an off the shelf PC, you don’t get to pick the components, other than the capacity and number of items. 

I used to do the actual assembly, but I’ve found it easier to have it assembled by the place where I buy it from.  That way they can make sure that all of the parts fit together and nothing is missing.  If something is DOA, they’ll find it when they assemble and test the system.

Sunday, August 23, 2009

Using uberOptions to extend the functionality of Logitech devices

A few weeks ago, I picked up some Logitech mice that were on sale as “dented box” items on the Logitech site.  They were new mice, but their boxes had some minor damage and they were half off.  I grabbed a VX Revolution and a MX Revolution.  The VX was for the family computer that the kids use, and the MX was for my home development machine.  The VX is a notebook model and it’s smaller size fits the kids hands quite nicely.

The MX Revolution was to replace my MX 700 mouse that I’ve had a few years. The 700 was one of the best mice I have ever used, but I had some issues with it.  First off, Logitech did not provide Vista drivers for it. While it worked just fine with Vista, it was only as a standard mouse and the extra buttons could not be used.  The other problem was that the rechargeable batteries had worn out to the point there they would only last for a few minutes.  I could easily find replacement batteries, but I missed the extra functionality of the 700.  Plus I wanted a mouse where the mouse wheel with the “tilt” support for left/right scrolling.

From time to time, Logitech runs “dented box” sales on various products.  If you have right coupon code, you can get a new product with a full warranty.  If you use the site techbargains.com, type “dented logitech” into the search box on the main page, you’ll get a list of the current dented box specials on the Logitech site, plus coupon codes for additional savings.

Both the VX and MX Revolution mice have a little button located just south of the scroll wheel.  By default, it’s mapped to a search function.  Select a word, press the button, and a new browser instance is launched with the selected word passed the search engine.  For some people that may be a cool feature, but I found it just maddening.  With the Logitech SetPoint software that comes with each mouse, you can reassign the mouse button functionality to other behavior.  On the VX, I was able to set the search button to be a middle click button.  I like being able to middle click a link on a web site and get that link opened in a new tab, leaving the existing web page right it I was reading it.

You would think that you could do the same thing with the MX Revolution as you could with the VX Revolution. Oddly enough, while you could assign the middle click function to many of the buttons on the MX, it was not an option for the search button.  I don’t know if that was by design or by error, but it was irritating.  Since the SetPoint configuration software is bundled with all of the current Logitech input devices, the button definitions are not hard coded into the application, but must be read from some set of configuration files.  If I could find where they are located, I should be able to copy the missing MX definitions from the VX settings.

I went on to Logitech’s support forums in search of tips for locating and editing the SetPoint files.  After doing some searching, I found references to something called uberOptions. Rich Owens put together a package called uberOptions, a new set of SetPoint configuration files that greatly expand the options that you can assign to the buttons.  He has modified the files for a large list of keyboards, mice, and trackballs.  The current list of devices plus the installer for uberOptions can be found at http://uberoptions.net/.  It installed and worked just fine with WIndows 7 64 bit.  After I installed it, his default setting for mouse had mapped the search button to the middle click function.  Well played Rich, well played indeed.

[Edited on 8/31/2009]
If Rich Owens’ main site is down, he has a mirror site.

[Edited on 9/8/2009]
Richard Owens sent in an updated link to his site, http://uberoptions.net/, this replaces http://www.mstarmetro.net/users/rlowens/.

Saturday, August 22, 2009

Offload TCP processing to the network controllers under Vista, Server 2008, and Windows 7

After upgrading my home PC to Windows 7, I was decided to see if my motherboard/CPU combination support hardware virtualization.  You need hardware virtualization support if you want to run Windows XP Mode or Windows Virtual PC.  I have an XMD Athlon X2 with an Asus M2N-SLI Deluxe and I’m not sure if that combination supports hardware virtualization.  I’m pretty sure the CPU does, but I don’t yet yet know about the motherboard.

I decided to check the  Asus support forum to see that motherboard supports hardware virtualization and while reading through the forum, I found an a post about tweaking the network settings for a boost in performance.  The TCP/IP stack in Vista has the ability to offload some of the network processing to the network controller, if the network controller has that capability.  Out of the box, Vista disables that feature to prevent problems with controllers that don’t support that feature.

From what was posted in the Asus forum, this motherboard does support that feature.  This motherboard is based on the NVIDIA nForce 570 chipset, which included dual Gigabit LAN controllers.  If you are doing CPU intensive tasks, you can gain some performance benefit by offloading the TCP processing to the network controllers.

Vista refers to this setting as the “Chimney Offload State”.  It’s easy to check and set this value.  if you have a newish motherboard with a Gigabit speed network controller, this should work for you.

To change this setting, do the following:

  1. Open an elevated command prompt.  Either right-click cmd.exe and select “Run as Administrator” or press the Start button, type “cmd” and then hold the left shift and left control keys while pressing the enter key.
  2. Check the current status of the Chimney Offload state by running the following command:
    netsh int tcp show global
    The possible values for that state are: disabled, enabled, default
  3. Run the following command to enable Chimney Offload state
    netsh int tcp set global chimney=enable

Before making the changes, check your current broadband speed.  I like the one at speedtest.net, but the others are fine.  Then after making the change, check it again.  If the performance takes a hit, set the state back to it’s original value.  Not only did it work for me, I did get a slight, but measurable, download speed increase.

Before enabling Chimney Offload:

546138390[1]

After:

546142573[1]

These tests were run a few times before and after the modification.  I picked the average score each time.  That helps even out any existing network traffic that would affect the results.  Going from 17.42 MB/s to 18.70 wasn’t a huge increase, about 7%; but I’ll take it.  There are other settings that you can tweak.  Some are mentioned in the forum posting, and they are also documented in an article in speedguide.net as well.  You don’t often get a free lunch, this is a good one to take.  This setting works for Vista, Server 2008, and Windows 7.  I still don’t know if I can get hardware virtualization, but this was an interesting diversion.

[edited on 8/24/09]
As it turns out, my CPU and motherboard do support hardware virtualization, it just took a little work.

Wednesday, August 19, 2009

A work around for Delphi 2007/2009 with Windows 7 64 bit

I just installed Windows 7, 64 bit edition so that I could code and test against this new operating system.  Visual Studio 2008 installed and ran without any incident, but I hit a snag with Delphi 2007.  Delphi 2007 installed just fine, but it would die when you ended a debugging session.  An assert error would get thrown and after you cleared the dialog, Delphi would be terminated.
The error was thrown by bordbk105N.dll and had the following text:
Assertion failure: "(!"SetThreadContext failed")"
in ..\win32src\thread32.cpp at line 412
Continue execution?
That was followed by a “Yes/No” set of buttons.  It didn’t matter which choice you made, it was pretty much game over for Delphi at this point. After getting this happen 3 times in a row (even with Delphi launched with “Run As Administrator”), I decided to check the Internet and see if this was unique to me and if there was a fix.
I checked Google and found a few hits.  One of them led me to a blog written by Olaf Monien, a German developer with close ties to the Delphi R & D department.  His post, “Delphi 2009 / Windows 7 / 64 bit Debugger Crash Workaround”, described the issue in great detail.  Apparently an incorrect call is being made to the SetThreadContext API call.  The debugger dll has an assert call based on the return value SetThreadContext().  It’s odd that production code went out with asserts enable, that’s usually used during testing.  Some people traced through the debugger code and found that if a single byte is changed in the dll, you could get by this error.  This byte changes the logic so it ignores the return code from SetThreadContext() and never hits the assert code.  You can read about how they came up with that idea here.
An enterprising programmer named “LordByte” wrote a handy little utility that will patch the debugger dll for both Delphi 2007 and Delphi 2009.  Olaf is hosting the patch tool on his blog and This file found a permanent home at Embarcadero and you can download it from Delphi_2007_2009_WOW64_Debugger_Fix.zip.  This works but you now have the added risk of actual errors being returned from that call to SetThreadContext() being ignored.  Since the alternative is an unusable Delphi, it’s a risk I’m going to have to take.

[Edited April 22nd, 2013]
While I no longer use Delphi, I hate to see a broken link.  I updated the download link for the debugger patch to it's current home at Embarcadero.

Monday, July 27, 2009

When installing apps in a Terminal Server or Citrix environment

When you install an application on a Windows Server running Terminal Services or a Citrix server, the user should go into Add/Remove programs and run the installer through “Add New Programs”.  It sounds clunky, but there is a reason for this.  Microsoft virtualizes the location of the Windows directory under terminal services.  Each user has a private copy of the Windows folder.  This allows applications that assume they are the only user to see only their own copy of the folder.

If an application calls GetWindowsDirectory(), you usually C:\WINDOWS or C:\WINNT.  Under Terminal Services, a call the GetWindowsDirectory will return something like C:\Documents and Settings\currentusername\Windows.  If you need to install a shared component in a folder off of the Windows folder, then you will not want the virtualized folder.  You want to use the actual C:\WINDOWS folder.

Installer authoring tools like InstallAware use GetWindowsDirectory().  This is by design, in a multi-user environment, you want to make sure that the users don’t installed components that could adversely affect other users.  If you want to get the actual Windows directory, you can call GetSystemWindowsDirectory(), it will return the actual Windows directory.  When you run the installer through “Add New Programs”, Terminal Services is place into install mode and GetWindowsDirectory will return the actual directory instead of the virtualized directory.

If your installer requires that you have the correct folder for the GetWindowsDirectory, I would suggest comparing the results of GetWindowsDirectory and GetSystemWindowsDirectory.  if they do not evaluate to the same folder, then you know that you are running under Terminal Services and that Terminal Services is not in install mode.  At the point, you can display a dialog and suggest to the user to run the installer under “Add New Programs” and then exit gracefully.

Wednesday, June 17, 2009

Facebook does not need a “dislike” button

With just about everything you get to see view in Facebook, there’s usually a button or a link displayed as “like” associated with the topic.  If you click that button, the person who posted that link gets a little note on his Facebook page that you liked what ever it was that they had put up.

When I first saw the ‘like” button, the first thing I thought of was my TiVo remote with it’s “Thumbs Up” and “Thumbs Down” buttons.  You can thumb up or down a program while you are watching it.  This information gets stored on the TiVo and it uses that information to pick shows it think you might like to watch.  A completely optional feature, but very cool none the less.

With the TiVo ‘Thumbs Down” feature in mind, I wondered why there wasn’t a “dislike” button.  If you believe in Sturgeon’s Law (ninety percent of everything is crap), then there is going to be stuff on Facebook that you won’t like.  Since they let you express your approval with the “like' button, why not be able to express your disapproval?

I’m not the only one who has wondered about that.  There’s at least one poll on Facebook that asks “Should Facebook get a dislike button?”  if you have a Facebook account, you can hit that poll from this link.  I saw it because a friend of mine had already voted “Yes”.

Voting “Yes” was my initial inclination, but I decided to think about it for minute.  The more I thought about it, the more convinced I became that it would be a bad idea to have a “dislike” button.  It would be a tool for expressing a negative opinion and that’s not what Facebook is about.

A large part of the early appeal of Facebook was that it was closed community.  If you want to see someone’s Facebook page, you had to be a member of Facebook and probably need to be a “friend” as Facebook defines it) of that person before being able to view that page. 

Since you have to have a Facebook account to access Facebook user pages, there are no anonymous users on Facebook.  If the Facebook administrators catch you using a fake name (like the way a certain B-List actress did last winter), they will disable the account.  What ever you do on Facebook, it will always be associated with your account.

If you could click a “dislike” button for something that a friend had posted, your friend is going to know you didn’t like what they had posted.  No one is going to want to see a little thumbs down image next to the picture of their new kitten/cat/tattoo/etc.  There will be a percentage of users who will be offended when their post is disliked.  That can lead to bad feelings between the two people and add a negative tone to the Facebook experience.

If you feel strongly against something, you can still leave a comment and express your opinion.  That can actually be helpful.  If you wanted to press the “dislike” button on something because you found it inaccurate or offensive, you can actually write why you feel that way.  Constructive criticism means a lot more than a little image of thumb pointing down.  Some people will still be offended by critical posts, but now you will have a starting point to discuss it.  So I’m not taking that poll and I’m hoping that Facebook doesn’t implement a “dislike” feature.

Monday, June 15, 2009

Checking to see Microsoft Report Viewer 2008 SP1 has been installed

We are updating the installer for one of our applications and that app now requires the Microsoft Report Viewer 2008 Service Pack 1 to be installed first.  The fun part is determining if it’s installed or not.  Usually, I check the registry keys to see if an application is installed.  If the user has installed the Report Viewer as a separate application, you’ll find it under the key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Report Viewer Redistributable 2008 SP1

If you want to read a value from that key, look for VersionMajor.  It should be a DWORD value of 1.

Of course that’s not the only way to get Report Viewer SP1 installed.  If you have Visual Studio 2008 and you have applied SP1, then you’ll have Report Viewer SP1 as part of the Service Pack.  Under that scenario, you wont have the “Microsoft Report Viewer Redistributable 2008 SP1” key. 

What you need to do is to check to see if VS 2008 SP1 is installed.  That key is located at

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\InstalledProducts\KB945140

If you want to read a value for that key, look for string value for “PID”.

[Update on 6/16]

From the home office in Latham, NY, a reader sent in the suggested to also check the registry for 64 bit based machines.  On 64-bit editions of Windows, the Report Viewer Redistributable runs in 32-bit more.  It sees a virtualized version of the registry.  The actual registry location is

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Report Viewer Redistributable 2008 SP1

Note the “Wow6432Node”, that tells that it’s a 32 bit application installed on a 64 bit OS.

Tuesday, May 26, 2009

If this isn’t the first sign of the apocalypse, nothing is. (Jon & Kate & American Chopper)

A few months back, I posted this as a joke.  Now I’m seeing pictures like this floating across the Internet:

The Gosselins riding with the Tuetuls

It looks like Kate is riding off with Paul Senior and she’s the only one that looks happy.  I think it was for some TLC promotion, not an actual episode of either one of their shows.

Monday, May 11, 2009

Tag your junk mail before it gets sent to you.

Even though we live in the world of tomorrow, we still get junk mail.  The old fashioned kind made of out paper and stuff like that.  Junk email annoys me, but physical junk mail is just a waste of physical resources.   I try to prevent junk mail from being sent at all, but sometimes it still comes in.  What seems to invariably happen is that I’ll get junk mail from some company that I have not had a prior relationship with.  They probably bought my contact information from some other company.

I came up with a little trick to make that mail easy identifiable so that it can be recycled without ever having to open up.  Whenever I register for something online and it asks for my title, I put in “Disposable”.  When that mail comes in and my title is printed on it, when I see the work “Disposable” on it, I know I don’t have to spend any time on it.  At our office, the receptionist delivers all the mail.  I’ve told her that if something comes in for me and it has “Disposable” printed below my name, she doesn’t have to bring it to me.

Thursday, April 30, 2009

A followup to my post about SC Johnson not manning a customer hotline.

A few days ago, I posted about my experience trying to get a hold of customer support after my dog ate some ant bait.  SC Johnson has a contract with a health and safety clearinghouse that is manned 24/7.  I have spoken to those people and they are very professional.  Their phone number is not listed on the ant traps.  The number that is listed, goes directly to SC Johnson.  When I called that number, I got a recorded messaged that they were closed and to call back Monday through Friday, between the hours of 8am and 6pm (CST).  That’s all I remembered hearing when I called that number.  When I called SC Johnson on Tuesday, they insisted that the emergency contact number was on the message.  I don’t remember hearing that at all.

I received a call today from a physician from the Health and Safety hotline.  He had been contacted by SC Johnson after someone had read my blog posting.  They asked him to clarify with me that the SC Johnson hotline did list the emergency number.  I thought that was pretty odd as the clearing house was not responsible for the SC Johnson hotline.

I am willing to concede that an emergency number may have been at the end of the message.  If it was on the message, it did not play soon enough and I thought the call was over.  I still maintain that the number for the Health and Safety hotline should have been printed on the ant bait station and on SC Johnson’s product web page for the ant bait.  For this particular bait station, the dosage of the poison was below the level to cause any ill effects with my dog.  If I had a smaller dog (or puppy) and that dog had eaten all of the bait traps, there could have been a problem.

Tuesday, April 28, 2009

If you sell poison, I think your customer hotline should be manned 24/7

A couple of weeks ago, we had some unwanted visitors coming in from under the front door.  Pavement ants.  You know, Tetramorium caespitum.  They are tiny and they come from under the door frame.  It usually happens every year at about this time.  I usually spray around the outside of the house with a pesticide and the problem goes away.

This year, that didn’t work.  I did some research online and found that spraying outside was needed, but only part of the treatment.  Another part was to put down ant bait traps indoors, near where they come in.  They provide a poison that the ants take back to nest, eliminating the source of the problem.  That was a bit overkill, but the since ants were not taking the hint it was time to take it up a notch.

Last Sunday I went to the local lawn and garden shop and bought some Raid® Double Control Ant Baits.  The bait stations were very effective.  After placing the four bait stations near my door, the was a surge in ant activity (“treats for us?”) around the bait stations.  After a couple of days, the ant activity dropped down to nearly zero.

We left the bait stations at the door all week.  On Wednesday, one of the bait stations disappeared.  For some reason, that didn’t trip the alarm circuit in the back of my head.  Ant traps typically don’t move by them selves.  I figured that the housekeeper had vacuumed one of them up.  That was my mistake, I should have paid more attention to this.

Cut to Saturday.  I was mowing the lawn when Anne ran out to get my attention.  I shut off the mower and she said that the dog had just tried to eat one of the ant traps.  She had grabbed it from her before the dog could ingest the contents of the trap, but we now knew where the other trap had gone.

Now we had to figure out what to do with the dog.  She’s a 60lb Lab, so she’s a good size.  Still, poison is not a recommended part of her diet.  I grabbed one of the remaining bait stations and flipped it over.  It had a 800 number to call as the customer hotline.  So I called the number and received a recorded message that they were closed and to call back on Monday during business hours.

This is poison, you can’t have a consumer hotline that is only available during regular business hours.  What if It had been a toddler that ingested the poison bait?  I knew that I could call an emergency animal hospital over in Latham, but I decided to do some basic research on the Internet first.

The active ingredient of the bait station was something called “Avermectin B1”.  I searched “avermectin” and discovered that dogs find it tasty and this problem occurs more often than you would expect.  I found numerous pages like the following:

Thanks for the advice! I called the e-vet and they gave me poison control numbers. I called them and because the active ingredient in the spikes are 0.05% avermectin, which according to them is only poisonous if he were to consume 30 of the spikes. The biggest concern they said was the plastic. Thankfully, Wally didn't eat the plastic part.

That was from a Labrador chat board called “Labrador Retriever Dogs Chat Forum Board”.   You figure that the ant spike would be the same amount of poison, if not not more than the bait station.  Apparently Avermectin is commonly used to treat fleas and worms on dogs and small doses will not harm the dog.  In fact, that’s one of ingredients for heartworm pills.

We were a lot calmer after reading a few pages with the same stuff.  After three days since the last “tasty treat”, the dog is showing no signs of illness.   We just know now that we can’t put out bait stations anymore.

I’m not terribly thrilled with the SC Johnson company.  If you sell a chemical that is designed to kill other creatures, you should have a 24/7/365 support line.  It doesn’t have to be monitored by humans all the time.  A properly designed phone tree (“Press 1 if a pet ingested a Raid® Double Control Ant Bait”) would have helped.  At the very least, we would have know than the dog was not in serious danger and we would not have to induce vomiting. 

If you call during business hours, you do get a phone tree before you get a human.  I called this morning to find out why this product doesn’t have a hotline on the week end.  I was told that there is a 24/7 Health and Safety hot line and that number is (866) 231-5406.  It’s not run by SC Johnson, it’s a clearing house for emergency information. 

Because of the toxicity of the bait station, SC Johnson is not required by law to have that number anywhere on the packaging.  That’s just wrong.  When your pet (or a child for that matter) eats some poison, you need to find out how toxic it is immediately.   You would think that number would be on the home page for the bait stations, but it’s not.  I was able to use Google to search the SC Johnson site afterwards and I found it on their Material Safety Data Sheets (MSDS) home page.

At any rate, the ants are gone and the dog is still here.  I’m not sure what I’m going to do if this happens next year.  It would be really nice if they came out with ant bait that dogs would not eat.  I doubt that would happen as there are very few things that a dog wont eat.

Tuesday, April 21, 2009

Remembering Alivia Lovell

Last October, our company constructed 8 playhouses that were donated to some patients at the Center for Childhood Cancer and Blood Disorders at Albany Medical Center.  We do something like that every year.  It’s partly a team building exercise and partly a way a way to give back something to the community.  We put them together at the New Scotland Armory, across from the AMC.  Later on they were delivered to the homes, courtesy of Bennett Contracting.

While we were assembling the playhouses, the children were brought in to see the playhouses.  It was a pretty emotional scene for all of us.  I remember one little girl, cute as button. She was very shy and but she was excited about getting a new playhouse.  We just found out that Alivia Lowell passed away from leukemia last week at the age of 4.

Alivia's Clubhouse.

(click on the picture for more information about Alivia)

My heart goes out to the Lovell family.

Thursday, March 19, 2009

Natasha Richardson

I was shocked when I first heard about the tragic accident that took the life of Natasha Richardson.  I am finding it hard to accept that a small fall could cause a fatal brain injury.  While the privacy of her family out weighs everything else, I do hope that they announce the results of her autopsy. 

There haven’t been any details about the accident itself.  I wonder how much force was involved.  I can remember two other high profile skiing accidents that involved fatal brain injuries.  There was Michael Kennedy’s fatal collision with a tree on the slopes of Aspen, back in December of 1997.  That was followed by Sonny Bono’s tragic death a week later under similar circumstances.  Speed does kill, a helmet could saved their lives.

I’m wondering if Richardson had a pre-existing condition.  She could have had a brain aneurysm.  That could have triggered the fall, or more likely, the fall made the aneurysm worse.  My father had a brain aneurysm once and he had many of the same symptoms that Richardson had reported.  He was lucky, surgeons were able to clamp the aneurysm before it caused any permanent damage to his brain.  With Natasha Richardson, a blood vessel that was already leaking started opening up after the fall and by the time they got her to the hospital it was already too late.  My heart goes out to her sons and her husband, this is a a tragic loss.

Wednesday, March 18, 2009

What to do before your camera is stolen

I just read about a guy in Poland who bought a camera on an on-line auction and it came with a memory card with someone’s travel pictures. He figured that the camera had been or lost or stolen. Based on a picture, he guessed the owner was from Australia.  So he registered as a new member on a Australian photography web forum and solicited the members for help. 

With a little bit of sleuthing, they tracked down the owners and sent them their pictures.  The last few postings on the forum indicated that he was trying to get his money back from the auction site so that he could send the camera to it’s rightful owners.  You can read the full message thread here.  It’s a great story about how good people can be.

If I ever lose a camera, I hope that happens to me.  I would pay a reward to one back.  If not the camera, at least the memory card.  You can always get another camera, but you will never get back the memories that were recorded by that camera.   One that you can do is place a file on your memory card that would provide your contact information in case someone comes across your card.

Just create a text file with a file name of something like “If found.txt” and with add something like the following text:

This memory card was from a camera that was lost or stolen.  I will pay a reward and cover the costs of shipping to get this memory card back, with no questions asked.  Please mail the card to this address:

John Smith
123 Main St
Springfield, NY 12345
USA

If you include a return address, I will send a money order to cover the cost of shipping and for your time. If you would prefer alternative arrangements you can email me at someaddress@something.com

thank you



It’s simple enough to do and it could get you pictures back if you lose camera on vacation.

Thursday, March 12, 2009

Getting back the Ctrl-N shortcut with SQL Server 2008’s SSMS

After I installed SQL Server 2008, I noticed that the Ctrl-N keyboard shortcut in the SQL Server Management Studio (SSMS) no longer worked.  What it’s supposed to do is to open up a new query tab.  In my install of SSMS 2008, the Ctrl-N key did nothing.  Pressing Ctrl-N was burned into my brain. It was a serious context switch for me to have to select a menu item or press a button to get a new query tab. 

A friend of mine gave me a simple tip that fixed it.  Change the keyboard layout to “SQL Server 2000” and then back to “Standard” and that will restore the default keyboard mappings.  That fixed it and I belatedly found it documented here, here and here.  I don’t know why I didn’t check the series of tubes for the answer, it was pretty obvious how to fix it.

To change the keyboard mappings, select Tools->Options from the SSMS menu and then go to Environment->Keyboard.  From that spot, you can change the keyboard layout.  Change the layout and press the “Ok” button to save the changes.  Then, repeat the steps and select the standard layout and press “Ok” again.  That will set the default keyboard mappings, which will include the Ctrl-N mapping.

Sunday, March 01, 2009

And the Chess King is gone

2009 Me: And by 1995, the last Chess King had closed it’s doors for good.

1979 Me: And you thought that was a bad thing?

2009 Me: Well, it was a store that was around back in 1979.  It was once of those places we would have to walk by on the way out of the mall.

1979 Me: I didn’t shop there.  Please, please don’t tell me that I shopped there in the future

2009 Me: No, we never did.  Well, we walked in, and we walked right back out without buying anything.

1979 Me: Thank you.  Or thank me, or us.

2009 Me: But we did go through a phase in the early ‘80s where we wore skinny ties….

Wednesday, February 18, 2009

Have you had any bizarre IM messages from a person with “coho” in his screen name?

I was moving some Visual Studio projects around when an odd AIM window popped up.  It was from someone named “limbercoho” and the message was “Hail, Fellow”.  I usually close unsolicited AIM messages without even looking at them.  There are other ways to get in tougc with me, I view anything unsolicited from AIM or MSN with more than a little suspicion.

At that momemt, my PC was busy moving files around, so I had a some spare bandwidth and decided to see what was going on.  I responded back with “Hail” and it got a little wierd:

limbercoho: Hail, fellow!
me: Hail
limbercoho: hail?
me: Yes?
limbercoho: hell yes?

It didn’t take long to realize that something was just not right.  Going on the assumption that limberoho was some sort of whack job, I decided to do a Google check on that name.  The second hit was on Nixie Pixel’s blog, List of AIM Fish Bots – Salmon, Coho, and Trout.  There is an organization called “Project Upstream” that created the robotic fishbots.

The fishbot takes two random IM users and sends a greeting to each one and then connects each user to each other user.  They don’t see the other person’s screen name, they see a fishbot generated name like LimberCoho or BakedCoho.  Basically a random word plus “coho”.  Previous incarnations used “Salmon” and “Trout”.

Once I figured out what was going on, I IM’d the link from Nixie’s blog.  Understandably, he responded back with “I’m not going to click that link”.  That made sense, I wouldn’t have clicked a link that a stranger had send me.  So I explained what was going on and he asked how to block it.  That would be the annoying part, you can’t block randomly generated names.  There is an opt-out mechanism, but you wouldn’t know about it unless you knew what was going on.  The Project Upstream site does not mention, but someone claiming to be part of Project Upstream posted the instructions The Missing Hat’s LiveJournal site:

Opt-out support introduced
Greetings, hat missers. We are Project Upstream.

We have chosen to provide you with a new ability. You may now send a message such as "$optout" to any of our robotic fish. This will permanently prevent all Project Upstream communications from reaching your account.

Some additional information can be found on the Wikipedia entry for TheGreatHatsby.  That seems easy, but unless you know how to look for that sort of thing, you’ll never figure it out on your own.  It’s an interesting idea, connecting two complete strangers using social networks.  The flaw is that most people are not going to know anything about Project Upstream and and they are going to think that other person is up to no good.  There should be some information about the project in that opening message.  You could make a new friend, but it’s more likely to freak the other person out.

I chatted with the other person for a few minutes and we exchanged Twitter accounts.  It turns out that we really have nothing in common and we doubt that we will keep in touch.  It’s an interesting experiment and I think I’ll stay in it for a while.

The other thing to remember is that you are not directly connected to the other person.  Your message goes to the fishbot and the fishbot relays that message to the other user.  The same would be true for other user.  That’s great because if you don’t want to have an IM conversation with the other person, that person has no way of making contact with you again. 

That does raise an interesting privacy concern in that the fishbot is monitoring both sides of the conversation.  It needs to do that to relay the conversation and to be able to handle the “$optout” request.  But, what are they doing with that information?  The web site for Project Upstream only tells you how to opt in, there is nothing about privacy issues or how to opt out.  Just remember the security issues if you decide to play with a robotic fish.