Geeks With Blogs


The Wrecking Bawl Destructuring query language, one keyword at a time. February 2007 Entries
historical tidbit of the week
You may know that former United States presidents John Adams and Thomas Jefferson both died on the 50th anniversary of the signing of the Declaration of Independence, July 4th, 1826. But did you know the following?: Jefferson was Adams' vice president. Until the passage of the 12th Amendment in 1804, the runner-up in the presidential elections became the vice president. Jefferson and Adams became enemies during Washington's presidency, and even more so during their own presidencies, but became good ......

Posted On Wednesday, February 28, 2007 5:44 PM

The More You Know (cue music): SQL Query Analyzer
If you've never passed a date as a parameter to a stored procedure while attempting to use the debugger in SQL Query Analyzer, you probably don't know that the date must be in a certain format (ain't nothin' but an ODBC thing) in order for things to work. If the date is not in the format [YYYY-MM-DD] or something similar (my new motto: dashes not slashes, or hyphens not... nothing really rhymes with hyphens), then you will get an error like this: [Microsoft][ODBC SQL Server Driver]Invalid character ......

Posted On Tuesday, February 27, 2007 7:30 PM

another T-SQL gotcha
One funny (or annoying) thing about T-SQL is that it does not allow you to declare variables (or create temp tables) with the same name in mutually exclusive units of code. Here's an example of what I mean: DECLARE @test bitSET @test = 0 IF (@test = 0) BEGIN DECLARE @monkey int ENDELSE BEGIN DECLARE @monkey int END If you run that in Query Analyzer you'll get the following message: Server: Msg 134, Level 15, State 1, Line 11The variable name '@monkey' has already been declared. Variable names must ......

Posted On Monday, February 26, 2007 11:33 PM

quote of the week

"I wanna see movies of my dreams."      

- Built to Spill


Posted On Monday, February 26, 2007 4:08 PM

environmental information of the week
Some stuff about biodiesel: biodiesel sales in the United States increased from 500,000 gallons in 1999 to 75 million gallons in 2005 biodiesel comes in many forms, and is often mixed with petrol diesel (a mixture containing 20% biodiesel and 80% petrol diesel is called B20) biodiesel reduces net carbon dioxide emissions by 50-70% when compared to gasoline, and by 70-80% when compared to petroleum diesel, depending on whom you ask and on the energy used to manufacture it harmful emissions in general ......

Posted On Friday, February 23, 2007 11:26 PM

"reality show" idea of the week
Cameras follow around Gary Coleman as he acts as bodyguard for Britney Spears.

Posted On Friday, February 23, 2007 3:43 PM

battle of the week

Posted On Thursday, February 22, 2007 3:16 PM


In case you don't already know, a sign that the person speaking is full of it:  They say that something will "embolden the enemy."  Don't you just love grade-school diplomacy?

Posted On Wednesday, February 21, 2007 11:35 PM

AbstractConstraint - inheriting Rhino Mocks objects to override comparisons
As you may have discovered, there are certain objects in .Net are not easily comparable. For example, if you create two objects of type StringDictionary and add exactly the same keys/values to both and then compare them, it will say they're not equal. This can be a problem when unit testing. Here's some sample code in C# that should help you compare the StringDictionary and FileInfo classes using Rhino's AbstractConstraint class. public class StringDictionaryConstraint : AbstractConstraint { private ......

Posted On Wednesday, February 21, 2007 8:42 PM

historical tidbit of the week
Few people know that the Titanic and the Lusitania were not the greatest maritime disasters in history. During a span of a few months in 1945, prior to the end of World War II, several large ships were sunk, resulting in a loss of lives far greater than anything before or since. January 30th, 1945 - A passenger ship named Wilhelm Gustloff is hit by three torpedoes from a Soviet submarine in the Baltic Sea, and between 5,000 and 9,400 people are killed. April 16th, 1945 - A luxury ocean liner named ......

Posted On Wednesday, February 21, 2007 4:20 PM

quote of the week
"I don't want to achieve immortality through my work... I want to achieve it through not dying."
- Woody Allen

Posted On Tuesday, February 20, 2007 5:58 PM

environmental information of the week
Of everything that Americans throw away: 55% ends up in landfills 31% gets recycled 14% is burned Here's our garbage broken down by category: 79.9% is paper products 28.0% is yard trimmings 21.9% is food waste 19.8% is plastic 16.1% is metal 12.4% is glass 10.9% is wood the remaining 21.9% is anything not mentioned above ......

Posted On Thursday, February 15, 2007 7:50 PM

"reality show" idea of the week
Video cameras follow all the major presidential candidates around, recording them interacting with their families, getting their makeup applied before speeches, pandering to the rich, ignoring the millions of Americans living in poverty, taking illegal campaign donations, etc.

Posted On Wednesday, February 14, 2007 6:37 PM

SQL Server 2005 - new discoveries
I just discovered a couple differences in the way SQL Management Studio (SS2005) creates change scripts versus Enterprise Manager (SS2000). The first is that SS2005 places a GO statement after each BEGIN TRANSACTION. SS2005 also replaces 'user' with 'SCHEMA' for level0type when calling sp_addextendedproperty. I'm not exactly sure what the first one accomplishes, but I imagine the second one is because schemas mean so much more and are so much more useful in SQL Server 2005. That reminds me, what ......

Posted On Tuesday, February 13, 2007 7:45 PM

a celebrity for president - why not?

Posted On Tuesday, February 13, 2007 5:11 PM

unit testing: .Net mock object frameworks

Does anybody have an opinion on which of these frameworks for creating mock objects is the best?  What do you like or dislike about each?

  • NMock
  • DotNetMock
  • EasyMock .NET
  • Rhino Mocks
  • TypeMock .NET
  • NUnit Mocks
  • NMockLib
  • Attach
  • Posted On Tuesday, February 13, 2007 4:06 PM

    battle of the week

    Posted On Tuesday, February 13, 2007 3:40 PM

    historical tidbit of the week
    According to local legend, and despite the saying, Seattle was not actually "built on the backs of seamstresses." Supposedly it was actually built on the backs of prostitutes, many of whom declared themselves to be seamstresses for tax purposes, and who charged $5 for an "all-night alteration." Even though Tacoma was the more logical place for a metropolitan area, being at the junction point of two major railroads, it was in a dry county, so people would make the hike up to Seattle for booze and ......

    Posted On Monday, February 12, 2007 10:58 PM

    extracting a complete zipped archive using C#
    I struggled with this for many hours, partly because I wanted to use a class native to .Net 2.0, like GZipStream or DeflateStream, but neither one appeared to be able to handle extracting all directories and files from an archive rather than one single file. So I ended up using SharpZipLib, which seems to work nicely. Here's a code sample if you're looking to decompress an archive with more than just one file (don't forget "using ICSharpCode.SharpZipLib.Zip... public void ExtractAll() { // uncompress ......

    Posted On Friday, February 9, 2007 5:18 PM

    George Lucas a mail-bomber??

    Why did he decide to name a character in Star Wars "C3PO"?  Think about it...




    Posted On Thursday, February 8, 2007 6:48 PM

    quote of the week
    "I have never made but one prayer to God, a very short one: 'O Lord make my enemies ridiculous.' And God granted it." - Voltaire* *Yes, I'm aware Voltaire's been dead for a long time, the quote of the week does not need to be a quote that was made during the current week ......

    Posted On Thursday, February 8, 2007 4:33 PM

    predictions for this year
    • The Colts will win the SuperBowl by a score of 24-17.
    • Somebody will realize that the odds of a Democratic presidential candidate who is either black or female winning in the South are not much better than the odds of O.J. Simpson returning to the NFL.
    • Earth's mean temperature will rise.
    • No cats will be harmed by ALF.
    • Windows Vista will have bugs.

    Posted On Friday, February 2, 2007 9:47 PM

    Copyright © Alex Bransky | Powered by: