THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

Adam Machanic

Adam Machanic, Boston-based SQL Server developer, shares his experiences with programming, monitoring, and performance tuning SQL Server. And the occasional battle with the query optimizer.

T-SQL Tuesday #21 - A Day Late and Totally Full of It

TSQLWednesday“This ugly hack is only temporary,” you think. Six months later, a coworker curses your name, sacrificing a chicken to any deity that will help expedite your getting struck down by lightning, a school bus, or both.

Crap code. We’ve all seen it. We’ve all created it. We’re all guilty. Yes, even you. Sometimes our crap is purposeful—the ugly, “temporary” hack. Sometimes we produce crap because we simply don’t know any better. But there is no excuse good enough. As professionals, we must strive to rid ourselves of bad habits. And the only way to learn the difference is to see lots, and lots, and lots of examples.

That’s where you come in. This month’s T-SQL Tuesday challenge: reveal your crap to the world. Why is (or was) it crap? Why did you do it? And how did you learn from your mistake?

I’m posting a day late, and the subject matter may require a bit of thought, so I’m slightly changing the rules—temporarily, of course.


Here’s what you need to do.

  • Write a blog post talking about your crap. This doesn’t mean that your post should be crap. Two wrongs, in this case, do not make a right!
  • Your post must go live some time between 00:00:00.00 GMT and 23:59:59.99 GMT on Wednesday August 10, 2011
  • Your post must contain the T-SQL TuesdayWednesday logo from above and the image should link back to this blog post.
  • Make sure that a link appears in the comments section below, either via a trackback or a manual comment. I’ll take all of the posts that are reported and write a round-up.

Even better…

  • Include a reference to T-SQL Tuesday (or Wednesday) in the title of your post
  • Tweet about your post using the hash tag #TSQL2sDay
  • Consider hosting one of these. Ask me how.

Enjoy! Here’s hoping for a truly cathartic blog event.

Published Wednesday, August 3, 2011 3:38 PM by Adam Machanic



merrillaldrich said:

Great topic :-). I love it.

August 3, 2011 2:44 PM

K. Brian Kelley said:

Love the updated graphic.

August 3, 2011 3:48 PM

Adam Machanic said:

Thanks. Graphic design service is available at a very modest rate!

August 3, 2011 4:04 PM

Alexander Kuznetsov said:

For consistency, I would suggest fixing the hash tag too: #TSQLWnsDay.

August 3, 2011 4:06 PM

Adam Machanic said:

We'll keep the usual hash tag. Don't want to lose conversations due to this change.

August 3, 2011 4:13 PM

Rich Brown said:

Great topic and loving the graphic too!

I think my main issue will be the agony of choice!!

August 4, 2011 4:08 AM

Nigel Sammy said:

I think I am in Rich's situation... too many to choose from :)

August 7, 2011 7:04 PM

Adam Machanic said:

Rich and Nigel: the fact is that we're ALL in that situation. What separates the professionals from the amateurs? The ability to be self-aware enough to KNOW that we're in that situation!

August 7, 2011 10:00 PM

Dave Morrison said:

Adam makes a good point between armatures and professionals. As I understand it there are four levels of "understanding / progression"

unconscious incompetence (You're rubbish and you dont know it)

concious incompetence (You're rubbish but you're aware and working to improve)  

concious competence (You're ok at it but you have to put a lot of effort in)

unconscious competence(You're very good and it just happens naturally without much effort)

Just my tuppence :)  

August 9, 2011 12:33 PM

Noel said:

Here's my contribution in case track-back fails, thanks Adam!

August 9, 2011 9:11 PM

Adam Machanic said:

There I was. A freshly printed bachelor's degree in Computer Science tucked under my arm, I walked into

August 9, 2011 10:00 PM

Rob Farley said:

First, an apology. I haven’t blogged for the last couple of months, except for T-SQL Tuesday events .

August 9, 2011 10:32 PM

Rob Farley said:

August 9, 2011 10:33 PM

Michael Irwin said:

Ace idea. Here's a confession and a warning!

August 9, 2011 10:34 PM

Robert Matthew Cook said:

Thanks for bringing it home this month Adam.  Here is my contribution:

August 10, 2011 1:32 AM

Ricardo Leka said:

A contribution from asleep guy sitting at the back of the room on the righthand side from your perspective...


August 10, 2011 8:22 AM

Matt Nelson said:

August 10, 2011 8:32 AM

Jack Vamvas said:

August 10, 2011 8:39 AM

Colleen Morrow said:

My contribution to T-SQL [Tuesday|Wednesday].

August 10, 2011 8:40 AM said:

In case the ping back doesn't work - here's my entry:

Great Topic - thanks for hosting/coming up with the idea and throwing the curveball of a Wednesday

August 10, 2011 8:44 AM

Tim Mitchell said:

Doesn't appear that my pingback worked, so here's a link to my contribution:

August 10, 2011 9:56 AM

Jes Borland said:

August 10, 2011 10:24 AM

Robert Pearl said:

Finally!  My blog entry is up!  I would've had it earlier, but crap hit the fan.:-O  Here is the link.  Thanks, Adam!

T-SQL #21 - Yes, Today is Wednesday

August 10, 2011 10:38 AM

Rich said:

Thanks for hosting Adam.

Here's my brief contribution!!

August 10, 2011 10:50 AM

Bill said:

August 10, 2011 10:54 AM

Ken Watson said:

Here is my entry. Not my code, but instruction, nonetheless.

August 10, 2011 10:58 AM

Matt Velic said:

Hey Adam, here's my contribution on nested views.

August 10, 2011 11:10 AM

merrillaldrich said:

August 10, 2011 11:30 AM

SSIS Junkie said:

I recently returned to a client at which I last worked back in 2006 and, as you might imagine, that gives

August 10, 2011 11:36 AM

jamiet said:

August 10, 2011 11:39 AM

Doug Lane said:

August 10, 2011 12:01 PM

Paul White said:

August 10, 2011 1:26 PM

Aaron Bertrand said:

Yes, Adam is right : we've all written crap code (the topic of this month's T-SQL Tuesday Wednesday.

August 10, 2011 2:42 PM

Robert L Davis said:

August 10, 2011 2:58 PM

K. Brian Kelley said:

August 10, 2011 3:53 PM

Ryan Adams said:

I didn't see a pingback so here is mine.

August 10, 2011 4:01 PM

Rob Volk said:

Here's mine, I think you'll regret it...I sure do:

August 10, 2011 6:35 PM

Nigel Sammy said:

I am not sure if I am late for this t-sql event but it is 11:50 pm here in Trinidad. If I am late I understand.

However if I am not then you can add my blog post to your list as the last post for the event :)

August 10, 2011 11:52 PM

Adam Machanic said:

August 15, 2011 3:13 PM

Rajib Bahar said:

Whatever happened to this? Did you discontinue it or merge it into different initiative?

August 8, 2012 12:41 PM
New Comments to this post are disabled

About Adam Machanic

Adam Machanic is a Boston-based SQL Server developer, writer, and speaker. He focuses on large-scale data warehouse performance and development, and is author of the award-winning SQL Server monitoring stored procedure, sp_WhoIsActive. Adam has written for numerous web sites and magazines, including SQLblog, Simple Talk, Search SQL Server, SQL Server Professional, CoDe, and VSJ. He has also contributed to several books on SQL Server, including "SQL Server 2008 Internals" (Microsoft Press, 2009) and "Expert SQL Server 2005 Development" (Apress, 2007). Adam regularly speaks at conferences and training events on a variety of SQL Server topics. He is a Microsoft Most Valuable Professional (MVP) for SQL Server, a Microsoft Certified IT Professional (MCITP), and an alumnus of the INETA North American Speakers Bureau.

This Blog


Privacy Statement