• SQLRNNR (3/18/2014)


    dwain.c (3/18/2014)


    Oh God Steve, don't get me started!

    Good editorial!

    Oh please - get started Dwain 😉

    If you insist Jason. 😛 Bad code can be judged on many levels (some of which previous posters have alluded to):

    - Doesn't meet the functional requirements

    - Generally meets the functional requirements but is riddled with defects when it reaches UAT (and/or SIT).

    - Isn't fast

    - Isn't pretty (Make it Work, Make it Fast, Make it Pretty[/url])

    - Is unmaintainable (for some of the reasons mentioned above)

    - Is not extensible (but not too extensible so as to be developed out-of-budget)

    - Doesn't have full functional coverage. For example, perhaps the development team didn't want to add a "delete transaction" button because that would have been too difficult, so instead the package comes with a support contract that allows for those cases where a delete is required but handled by "painstaking" analysis/scripting

    IMHO, a lot of this comes out of two issues:

    - Software engineering (a somewhat laughable term, again IMHO) has yet to achieve the level of maturity that other engineering disciplines have long ago achieved, despite 40+ years of practitioning.

    - Instruction in software development, usually in a university or possibly a company specializing in training, is rarely conducted by expert software developers. "Those that can do, those that can't teach."

    Now you see why I suggested you don't get me started.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St