• Jeff Moden (5/25/2014)


    Eirikur Eiriksson (5/24/2014)


    Must say that I'm slightly puzzled. I have read my post over and over but I cannot find neither any implicit nor explicit suggestions of ignoring good coding or working practices. And most certainly, if that is the impression left by my post, it is not the intention. Could someone help me out here if that is the case?

    😎

    It was this... particularly the bolded part...

    [font="Arial Black"]Start by getting something working[/font], test it against the requirements and improve if needed. This way, you can hopefully avoid another pitfall which is premature optimization.

    I've become quite sensitive to how such advice is worded because it's been my very unpleasant experience that "getting something working" frequently means making all character based columns NVARCHAR(4000), all integer columns NUMERIC(18,0), using While Loops and scalar functions, single row triggers, single row non-crud stored procedures, 6 or 8 levels of stored procedures, views of views, functions of functions, testing it against 10 rows (because the While Loops they know how to write take too long to build a couple million rows of test data), and then calling it "good enough". And, when you challenge someone on why they coded in such a fashion, they give you this big ol' s4it-eating grin and say "pre-optimization is the root of all evil". The quoted saying is correct... how they've applied it is not.

    I've also found the words "test it against the requirements and improve if needed" can also be misconstrued because people are rarely, if ever, given either performance or scalability requirements and that opens up a whole world of excuses for crap code. :pinch:

    I didn't mean for you to take it personally. I just thought it needed some clarification that folks like you and me take for granted as to what the "something" to get working should be.

    Thank you Jeff for the explanation, I do see your point. :Whistling:

    😎