THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | Join | Help
in Search

Adam Machanic

Adam Machanic, Boston-based independent database consultant, writer, and speaker, shares his experiences with programming, performance tuning, and optimizing SQL Server 2000, 2005, and 2008, in conjunction with related technologies such as .NET.

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 03, 2011 3:38 PM by Adam Machanic

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

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
 

T-SQL Tuesday #021 ??? Inelegant Yet Educational | Noel NOT NULL; said:

August 9, 2011 9:09 PM
 

Noel said:

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

http://noelmckinney.com/2011/08/t-sql-tuesday-021-educational/

August 9, 2011 9:11 PM
 

SQL SERVER – Use INSERT INTO … SELECT instead of Cursor « Journey to SQLAuthority said:

August 9, 2011 9:32 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!   http://tekstlogik.blogspot.com/2011/08/making-mistakes.html

August 9, 2011 10:34 PM
 

T-SQL Tuesday #21: Bad Decisions | Bob Pusateri - The Outer Join said:

August 9, 2011 10:56 PM
 

Robert Matthew Cook said:

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

http://www.sqlmashup.com/t-sql-tuesday-21-a-day-late-and-totally-full

August 10, 2011 1:32 AM
 

T-SQL Tuesday #21 – Oh crap… | sqlity.net said:

August 10, 2011 3:14 AM
 

T-SQL Tuesday #21 – Temporarily permanent hacks | David Curlewis said:

August 10, 2011 5:54 AM
 

Ricardo Leka said:

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

:D

http://leka.com.br/2011/08/10/t-sql-tuesday-21/

August 10, 2011 8:22 AM
 

T-SQL Tuesday #21 – 9 Tips to avoid the HACK title « SQL Feather and Quill said:

August 10, 2011 8:29 AM
 

Matt Nelson said:

August 10, 2011 8:32 AM
 

Jack Vamvas said:

August 10, 2011 8:39 AM
 

A Tale of Coding Horror - T-SQL Tuesday #21 | A Wandering Mind | Joshua Feierman said:

August 10, 2011 8:40 AM
 

Colleen Morrow said:

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

http://colleenmorrow.com/2011/08/10/t-sql-tuesday-21-crap-code/

August 10, 2011 8:40 AM
 

alohn84@gmail.com said:

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

http://www.sqlfeatherandquill.com/2011/08/10/t-sql-tuesday-21-9-tips-to-avoid-the-hack-title/

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

August 10, 2011 8:44 AM
 

T-SQL Tuesday #21 – Depois arrumo esse c??digo,,, | Blog do Leka said:

August 10, 2011 9:42 AM
 

Tim Mitchell said:

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

http://www.timmitchell.net/post/2011/08/10/t-sql-tuesday-er-wednesday-crap-code.aspx

August 10, 2011 9:56 AM
 

T-SQL Tuesday #21: It’s easy to be lazy « TroubleshootingSQL said:

August 10, 2011 10:06 AM
 

Jes Borland said:

August 10, 2011 10:24 AM
 

TSQL Tuesday - Crap Code | SQL RNNR said:

August 10, 2011 10:34 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

http://bit.ly/qaRIiH

August 10, 2011 10:38 AM
 

Rich said:

Thanks for hosting Adam.

Here's my brief contribution!!

http://richbrownesq-sqlserver.blogspot.com/2011/08/t-sql-beware-hardcoded-switch.html

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.

http://interflextech.com/blog/post/2011/08/07/Crap-Code-Total-Disclosure.aspx

August 10, 2011 10:58 AM
 

Matt Velic said:

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

http://mattvelic.com/tsql-tuesday-21/

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
 

T-SQL Wednesday #21 – Wait For It…Wait For It… | Doug Lane said:

August 10, 2011 12:00 PM
 

Doug Lane said:

August 10, 2011 12:01 PM
 

T-SQL Tuesday #21: ???This Ugly Hack is Only Temporary??? | Airborne Geek said:

August 10, 2011 12:28 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
 

T-SQL Tuesday #21 – Bringing Ugly Back | SQLSoldier said:

August 10, 2011 2:57 PM
 

Robert L Davis said:

August 10, 2011 2:58 PM
 

T-SQL Tuesday on Wednesday said:

August 10, 2011 3:47 PM
 

K. Brian Kelley said:

August 10, 2011 3:53 PM
 

Ryan Adams said:

I didn't see a pingback so here is mine. http://www.ryanjadams.com/2011/08/t-sql_tuesday_wednesday/

August 10, 2011 4:01 PM
 

Rob Volk said:

Here's mine, I think you'll regret it...I sure do:  http://weblogs.sqlteam.com/robv/archive/2011/08/10/t-sql-tuesday-21-crap.aspx

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 :)

http://www.nigelpsammy.com/2011/08/too-much-of-good-thing-can-sometimes-be.html

August 10, 2011 11:52 PM
 

T-SQL Tuesday #21: Crap Code | Erin Stellato | Erin Stellato said:

August 11, 2011 1:17 AM
 

Adam Machanic said:

August 15, 2011 3:13 PM
 

My First TSQL Tuesday » said:

August 22, 2011 9:56 AM
 

Robert Pearl's Blog said:

Holy Crap! What in the world are we talking about today? Well it’s TSQL Tuesday #21 , and we’re posting

September 7, 2011 3:24 AM
 

Jack Vamvas's Blog said:

The theme for T-SQL Tuesday 21 is reveal your crap to the world . Like anyone, we all have significant

September 9, 2011 10:07 AM
 

TSQL Tuesday #026 – Second Chances | Dave's SQL Blog said:

January 3, 2012 9:12 AM
 

T-SQL Tuesday Topics – Febuary 2012 « Voice of the DBA said:

February 7, 2012 11:43 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About Adam Machanic

Adam Machanic is a Boston-based independent database consultant, writer, and speaker. He has been involved in dozens of SQL Server implementations for both high-availability OLTP and large-scale data warehouse applications, and has optimized data access layer performance for several data-intensive applications. 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 "Expert SQL Server 2005 Development" (Apress, 2007) and "Inside SQL Server 2005: Query Tuning and Optimization" (Microsoft Press, 2007). Adam regularly speaks at user groups, community events, and conferences on a variety of SQL Server and .NET-related topics. He is a Microsoft Most Valuable Professional (MVP) for SQL Server, a Microsoft Certified IT Professional (MCITP), and a member of the INETA North American Speakers Bureau.

This Blog

Syndication

News

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement