Archive for December, 2008

Be nice to me. I donated blood…

So I donated blood for the first time today.  All went pretty well except for the fact that I moved my arm after they lined things up and caused them to misfire on the first arm.  The second arm went off without a hitch, but I was pretty disappointed by the fact that I lost in my race with a coworker next to me.  I like to win at things.  So I thought about posting pics of my arms, but upon further review, it’s pretty gross so I won’t.

2008 Chicago Bears Eliminated

I guess I am not too surprised.  The bears love to finish seasons just well enough to get a crap draft pick and still not make the playoffs.  Bright spots are Forte looks amazing for the future, Grossman should be gone by next season, and some of the younger additions to our secondary have promise going forward.  Sad things are that the Bears likely think Orton is the quarterback of the future and will not go out and find a real starter, no playoffs, Urlacher is developing a pretty bad attitude, and our d-line has ceased to exist.  Here’s to what the season could have been and to a good season in 2009.  Could be worse, they could be the Lions.

One more thing.  Mike Brown will probably be done after this year, but I will keep hoping the guy comes back for another year or at least stays involved with the organization in some way.  This guy is has the attitude you’d like to see in all players.

mikebrown.bmp

Ebay Review Process - The Real Solution

So the original review process was on Ebay was awful since as a buyer, you were practically handcuffed into leaving positive feedback for sellers in the fear they would retaliate with a negative feedback for you.  The clearly recognized this with their recent change where sellers can only issue positive or neutral feedback to a buyer.  This may solve some problems, but there are still several flaws in this process.

  1. A buyer sometimes DESERVES  negative feedback if they are a pain in the ass, don’t pay, or any other number of reasons they make the transaction a living hell.
  2. With this system I still find that sellers absolutely will not leave me feedback 90% of the time until they have received my positive feedback.  This pisses me off.  As a buyer, if I pay instantly, I have done my part and it is really in the seller’s court after that to make the transaction successful going forward.
  3. They can still leave a neutral as retaliation, and to be honest, I want all positives.  A neutral may not be a negative, but you bet your ass it still draws attention to what supposedly happened.

Here is my proposed solution.  A seller is required to leave feedback before the buyer leaves theirs.  This would required the seller to leave an honest note about whether or not the person paid on time and did their part, without taking what the buyer left them as feedback into consideration.  Once the seller has left their feedback, the buyer would then have permission to leave feedback for the seller.  This is the order the transaction takes place, so why not the feedback?  Yes, some might point out that this could give the same opportunity to the buyer to leave retaliation feedback.  I argue that in the sales industry, the customer generally gets the benefit of the doubt and an online retailer or seller should conduct themselves similar to that of a department store when dealing with customers.  Anyone else have thoughts on this or some ideas they figure to be more productive?

Transact SQL StripNonNumeric Function

I was looking to scrub some phone fields that allow for some dirty varchar values at the moment, so I needed a tool to strip non-numeric values from the existing data to determine which records had legit phone numbers and which did not.  Here is a quick function I wrote to help me with this in case anyone needed something similar. I included both the StripNonNumeric function and a more generic StripPattern function that you can use to basically do the same thing, but strip any pattern you like.

SQL:
  1. CREATE CREATE dbo.StripNonNumeric(@value AS VARCHAR(MAX)) RETURNS VARCHAR(MAX) AS
  2. BEGIN
  3.     DECLARE @len AS INT
  4.     DECLARE @pattern AS VARCHAR(5)
  5.     DECLARE @result AS VARCHAR(MAX)
  6.    
  7.     SET @len = LEN(@Value)
  8.     SET @pattern = '[0-9]'
  9.     SET @result = ''
  10.    
  11.     WHILE @len> 0
  12.     BEGIN
  13.         SET @result = @result + CASE WHEN SUBSTRING(@value,@len,1) LIKE @pattern THEN SUBSTRING(@value,@len,1) ELSE '' END
  14.         SET @len = @len - 1
  15.     END
  16.     RETURN reverse(@result)
  17. END
  18.  
  19.  
  20. CREATE FUNCTION dbo.StripPattern(@value AS VARCHAR(MAX), @pattern AS VARCHAR(100)) RETURNS VARCHAR(MAX) AS
  21. BEGIN
  22.     DECLARE @len AS INT
  23.     DECLARE @result AS VARCHAR(MAX)
  24.    
  25.     SET @len = LEN(@Value)
  26.     SET @result = ''
  27.    
  28.     WHILE @len> 0
  29.     BEGIN
  30.         SET @result = @result + CASE WHEN SUBSTRING(@value,@len,1) LIKE @pattern THEN SUBSTRING(@value,@len,1) ELSE '' END
  31.         SET @len = @len - 1
  32.     END
  33.     RETURN reverse(@result)
  34. END