Turn Out the Lights

  • People want craftsmanship if they don't have to pay for it. They're prepared to pay for flat pack quality that will last until they are in a new job

  • He did. I had to refactor the code whenever he needed help.

    Thank God for Red Gate tools.

  • Henry B. Stinson (1/18/2016)


    Also, if programmers were not allowed to write SQL code.

    In my experience i've noticed that when people writing SQL code are not programmers the result is often a disaster. There are certainly some programmers who should never be allowed to write SQL, but usually those programmers should never be allowed to write any code at all.

    Do you really think that an idiot who can't or won't learn to write decent SQL is going to be willing and able to write decent Haskell or C# or Python or javascript, or that someone who can't cope with the complexity of relational database concepts is even remotely likely to be able to grasp the concept of unification in logic programming, for example, or understand what cut is for in Prolog?

    Tom

  • Ed Wagner (1/18/2016)


    Personally, I'm one of those who won't "turn out the lights" on my servers. In my mind, having a system available and performant trumps the cost of electricity to run the servers. Like Jeff said, the wasted SAN storage is acceptable, and I'll throw in the space wasted by multi-MB email. The same people want to turn down the CPUs on database servers? No way.

    On the topic of who pays for it, if non-IT people pay for it and are allowed to make the decision to turn down the CPUs and idle the disks, does anyone on earth think that these sample people won't complain when a user complains that a site is slow? Again, no way.

    There's waste everywhere. Bloated HTML and XML lead to wasted bandwidth. Junk code leads to wasted CPU and memory. Improper data types, XML and poor decisions all lead to to wasted disk space. The only solution is to design and write well. As an example, a procedure taking 600 ms isn't a big deal to anyone because a site is fast. Then again, if it's run 75,000 times a day that works out to 12.5 hours of CPU time every day. If you find and eliminate that nasty scan that's consuming most of the time and get it down to 80 ms per run, you're down to 1:40:00 per day in total CPU.

    I must apologize if this has turned into a soap-box, but efficient code is a passion of mine. I find examples of simple date filters done in a non-SARGable manner, implicit casts and a host of other sins way too frequently and nobody ever has the time to address them unless there's a fire right now and it must be addressed right now. The normal solution is a 45-email chain to say we need more hardware. I'm all for adequate hardware, but no amount of hardware can forgive all sins. I'll end my rant on that note.

    I like your rant. You should continue it. 😀

    From what I've seen, something over 75% of C++ code is bloatware - doing stuff for the sake of doing it, or in order to build a code empire (I hate middle managers who do that) rather than because it is sensible stuff to do. Train the C++ programmers not to burden the wheel with lovely decorations thet imped its function, or even to use the perfectly good wheel that they can get for 5% of inventing their own vastly inferior wheel, and you may discover that you have lots of sare CPU capacity. Much the same applies to Java. And it certainly applies to SQL generated by ORMs and other such foul processes.

    Maybe it applies to all languages, but perhaps people who write in functional languages like Haskell or one of the MLs or someing based on CSP or CCS or a logic-programming language tend to be much less wasteful - the ones I've known certainly have been.

    Tom

  • TomThomson (1/25/2016)


    ...some programmers who should never be allowed to write SQL, but usually those programmers should never be allowed to write any code at all...

    Too true.

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!

  • TomThomson (1/25/2016)


    ...the complexity of relational database concepts...

    I'd argue that the concepts are not that complex at all. That is why it is so shocking and disgraceful how much lack of understanding there is. The concepts are easy to grasp but, of course, it can get more complex. Usually it is not and the value is in experience as opposed to intelligence.

    Do let me make it clear that I don't think that anyone can do the jobs that those of us on this forum, and peers elsewhere, do but that it is not an elite intellectual exercise.

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!

  • Gary Varga (1/26/2016)


    TomThomson (1/25/2016)


    ...the complexity of relational database concepts...

    I'd argue that the concepts are not that complex at all. That is why it is so shocking and disgraceful how much lack of understanding there is. The concepts are easy to grasp but, of course, it can get more complex. Usually it is not and the value is in experience as opposed to intelligence.

    Do let me make it clear that I don't think that anyone can do the jobs that those of us on this forum, and peers elsewhere, do but that it is not an elite intellectual exercise.

    Well, of course I agree with you. That's why I think someone who is too dim or too lazy to learn to understand the relational model and write code adapted to that model is too dim or too lazy to be a programmer in almost any language. I suspect you agree with me on that, too.

    Tom

  • TomThomson (1/26/2016)


    Gary Varga (1/26/2016)


    TomThomson (1/25/2016)


    ...the complexity of relational database concepts...

    I'd argue that the concepts are not that complex at all. That is why it is so shocking and disgraceful how much lack of understanding there is. The concepts are easy to grasp but, of course, it can get more complex. Usually it is not and the value is in experience as opposed to intelligence.

    Do let me make it clear that I don't think that anyone can do the jobs that those of us on this forum, and peers elsewhere, do but that it is not an elite intellectual exercise.

    Well, of course I agree with you. That's why I think someone who is too dim or too lazy to learn to understand the relational model and write code adapted to that model is too dim or too lazy to be a programmer in almost any language. I suspect you agree with me on that, too.

    I think what you said is mostly true.

    There are always exceptions though. I think it is POSSIBLE that someone might be too dim or lazy for relational, but still quite competent elsewhere. As an example, I could be viewed as too lazy to learn Java when in reality I simply despise the concept of garbage collection and an interpreter. I can write code that is quite good and far, far faster, without having to rely on something else to make decisions for me. Despite my views I could learn it, I simply don't want to waste my time - hence lazy.

    Now we all know that language is a preference. If you like Java, simply substitute something else and I am sure you can make it mean something similar. 🙂

    Dave

  • djackson 22568 (1/26/2016)


    TomThomson (1/26/2016)


    ... That's why I think someone who is too dim or too lazy to learn to understand the relational model and write code adapted to that model is too dim or too lazy to be a programmer in almost any language. I suspect you agree with me on that, too.

    I think what you said is mostly true.

    There are always exceptions though. I think it is POSSIBLE that someone might be too dim or lazy for relational, but still quite competent elsewhere. As an example, I could be viewed as too lazy to learn Java when in reality I simply despise the concept of garbage collection and an interpreter. I can write code that is quite good and far, far faster, without having to rely on something else to make decisions for me. Despite my views I could learn it, I simply don't want to waste my time - hence lazy.

    Now we all know that language is a preference. If you like Java, simply substitute something else and I am sure you can make it mean something similar. 🙂

    "If I like Java"??? What sort of lunatic do you think I am, to like that load of rubbish!! I've seen one project destroyed by the decision to use Java instead of something sane, and watched the Java part of another one get absolutely nowhere, and spent a lot of effert convincing managers not to let it anywhere near anything important.

    I do like garbage collection though. I can't imagine working in a functional language or a logic language and handling storage myself - in fact as soon as you are working in a high enough level language that you don't have to handle storage yourself you will find that garbage collection of some sort goes on (there's certainly some in SQL Server, for example). And some interpreted languages are rather useful - for example javascript, several(?all?) Unix shells, and the machine codes of quite a lot of hardware. Indeed the whole concept of microcode is about having interpreters.

    Tom

  • TomThomson (1/26/2016)


    Gary Varga (1/26/2016)


    TomThomson (1/25/2016)


    ...the complexity of relational database concepts...

    I'd argue that the concepts are not that complex at all. That is why it is so shocking and disgraceful how much lack of understanding there is. The concepts are easy to grasp but, of course, it can get more complex. Usually it is not and the value is in experience as opposed to intelligence.

    Do let me make it clear that I don't think that anyone can do the jobs that those of us on this forum, and peers elsewhere, do but that it is not an elite intellectual exercise.

    Well, of course I agree with you. That's why I think someone who is too dim or too lazy to learn to understand the relational model and write code adapted to that model is too dim or too lazy to be a programmer in almost any language. I suspect you agree with me on that, too.

    Consider your suspicions confirmed 😉

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!

  • TomThomson (1/26/2016)


    djackson 22568 (1/26/2016)


    TomThomson (1/26/2016)


    ... That's why I think someone who is too dim or too lazy to learn to understand the relational model and write code adapted to that model is too dim or too lazy to be a programmer in almost any language. I suspect you agree with me on that, too.

    I think what you said is mostly true.

    There are always exceptions though. I think it is POSSIBLE that someone might be too dim or lazy for relational, but still quite competent elsewhere. As an example, I could be viewed as too lazy to learn Java when in reality I simply despise the concept of garbage collection and an interpreter. I can write code that is quite good and far, far faster, without having to rely on something else to make decisions for me. Despite my views I could learn it, I simply don't want to waste my time - hence lazy.

    Now we all know that language is a preference. If you like Java, simply substitute something else and I am sure you can make it mean something similar. 🙂

    "If I like Java"??? What sort of lunatic do you think I am, to like that load of rubbish!! I've seen one project destroyed by the decision to use Java instead of something sane, and watched the Java part of another one get absolutely nowhere, and spent a lot of effert convincing managers not to let it anywhere near anything important.

    I do like garbage collection though. I can't imagine working in a functional language or a logic language and handling storage myself - in fact as soon as you are working in a high enough level language that you don't have to handle storage yourself you will find that garbage collection of some sort goes on (there's certainly some in SQL Server, for example). And some interpreted languages are rather useful - for example javascript, several(?all?) Unix shells, and the machine codes of quite a lot of hardware. Indeed the whole concept of microcode is about having interpreters.

    Whilst I understand djackson's point of view, I agree with Tom that given a high enough level of abstraction coupled with the lack of requirements for a high performance app (this does not mean non-performant just not high performant) then a language with a garbage collector is a valid choice as is automatic type loading as used by both Java and .NET. Just like I would not expect to have to integrate with a windows message pump anymore. I can do, and have done, low level coding before but for most applications the extra cost does not outweigh the benefits.

    Gaz

    -- Stop your grinnin' and drop your linen...they're everywhere!!!

  • This has gotten way off topic and has become a rant on something not even related to SQL Server.

  • Henry B. Stinson (1/27/2016)


    This has gotten way off topic and has become a rant on something not even related to SQL Server.

    Heh... they're just talking about a different kind of "light". 😀 And rants are good. It helps prevent murder. 😛

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

  • Jeff Moden (1/27/2016)


    Henry B. Stinson (1/27/2016)


    This has gotten way off topic and has become a rant on something not even related to SQL Server.

    Heh... they're just talking about a different kind of "light". 😀 And rants are good. It helps prevent murder. 😛

    Well then to bring it back, I have issues with some languages due to their inefficiency and how much electricity that wastes.

    🙂

    Dave

  • djackson 22568 (1/27/2016)


    Jeff Moden (1/27/2016)


    Henry B. Stinson (1/27/2016)


    This has gotten way off topic and has become a rant on something not even related to SQL Server.

    Heh... they're just talking about a different kind of "light". 😀 And rants are good. It helps prevent murder. 😛

    Well then to bring it back, I have issues with some languages due to their inefficiency and how much electricity that wastes.

    🙂

    Not just the languages but how the languages are used, as well. My favorite example is a 3rd party document handler that we have. We only handle several thousand documents a day but there are parts of that code that do an index seek lookup a half billion times in an 8 hour period to find a document. Even if we had the CPUs and the Drives setup to use less power, that one "tiny" little thing would keep them roaring.

    And, yes, there are a significant number of pork chops in the near future of that particular company. 😛

    --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 15 posts - 16 through 30 (of 40 total)

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