Gauging slackerness via code samples

  • I was reading Steve's article on Productivity and Accountability and his observation "that people that don't want to work hard, don't" reminded me of a discussion I was in a couple weeks ago: "is it possible to gauge work ethic based on a random sampling of someone's code?" Curious to see which way people lean on this.

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • I would say no. Random code samples are a poor method, simply because a lot of what we do *is* simple and doesn't need a lot of exposition or intricate algorithsm.

    I'm more interested in how often their code has to come back from QA for technical (not business oops we meant this) reasons, or if the DBAs know their name and groan because of the lack of effort put into optimizations.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • I would say that "it depends". I do think to that to some extent you can tell a lot about a person by their code. I don't however think you can tell about their work ethic. I know plenty of people who work really hard and produce incredibly sloppy and poor performing code. I know others that hardly work but their code is super fast and pretty enough to hang in a museum. I know which person I prefer to follow when I have to debug stuff though. 🙂

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Evil Kraig F (3/8/2013)


    ...the DBAs know their name and groan because of the lack of effort...

    Funny, this is what prompted the discussion.

    Sean Lange (3/8/2013)


    I would say that "it depends". I do think to that to some extent you can tell a lot about a person by their code. I don't however think you can tell about their work ethic.

    Maybe work ethic was the wrong word choice.

    The discussion I was involved in didn't key on messy, poorly performing code but rather on routinely taking shortcuts and not following best practices. Things like data types not matching underlying tables, using "SELECT * INTO #TblName", and omitting even the simplest of comments in multi-step processes (pet peeve). Repeat offenders raise a red flag as lazy coders to me.

    _____________________________________________________________________
    - Nate

    @nate_hughes
  • RP_DBA (3/8/2013)


    The discussion I was involved in didn't key on messy, poorly performing code but rather on routinely taking shortcuts and not following best practices.

    Depends on the best practice. I routinely omit RI for example because I find it frustrating down the road a lot of times. I use it only when it's absolutely required.

    However...

    Things like data types not matching underlying tables,

    Okay, THAT'S lazy.

    using "SELECT * INTO #TblName"

    Guilty, depending on circumstances

    , and omitting even the simplest of comments in multi-step processes (pet peeve).

    Also guilty. Most T-SQL is self explanatory. The only time I put in comments is when I feel the code doesn't explain the reason. Most of my comments are about the business reasons really odd algorithms are required, not about the code itself. If I'm breaking established patterns or obvious coding techniques I'll also comment for the reasons so if someone inherits it they don't just remove it when I did it for optimization, not clarity.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • I've found that it's gross ignorance in that people haven't been trained as to all the reasons why you should format your code and include thoughtful/meaningful comments.

    I've found that it's gross incompetence usually caused by gross ignorance that amplifies the problem.

    I've also found some real live brainwashing caused by a grossly incorrect interpretations of things like the "Agile Manifesto" and Knuth's famous words about pre-optimization being the root of all evil. That brainwashing also includes stupid things like hitting the schedule no matter if the code is right or not.

    But I've not found it's because of "slackerness" because it takes a hell of a lot of energy to fight that hard against doing it right. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply