On formatting SQL code

  • TomThomson (3/28/2016)


    Lynn Pettis (3/28/2016)


    diamondgm (3/26/2016)


    The results should be visible here

    If the BI gods do their thing, the report should update hourly

    You should also be able to download the data by clicking on the ellipsis of any of the cards and electing to export data.

    The downloaded format will be csv

    Says we need an account to log in and see the results, or at least that is what happens when I clink on the link provided.

    Try https://onedrive.live.com/redir?resid=4D0361FD49E9910!17467&authkey=!ALpeWykjDf2k2zU&ithint=file%2cxlsx, no login needed.

    Yea, I got that when I read further down, plus the OP PMed me with the info.

  • robert.sterbal 56890 (3/28/2016)


    With 61 responses here are some basic stats:

    ....

    ....

    It would be nice to have a chart of years vs format-score, plus maybe 5 year moving average. but I'm feeling to lazyto make one and to lazy to import the data from office 365 (?) to office 2013.

    Or a weighted average (weighted by years) - of course I'm in favour of that because it would naturally swing towards the sort of number picked by Jeff and me, as we are older than most of the rest.

    Tom

  • Eric M Russell (3/28/2016)


    The stored procedure I'm currently tasked with refactoring reads like a 20 page short story by Clive Barker.

    You have my deepest sympathy.

    I wrote some of that sort of mess (:blush:) in Fortran in the 60s, had to cope with some of that sort of mess written in assembly and in S3 (an Algol 68 dialect) in the 70s, and struggled against a lot of that in C++ rather later on. Things of that size are almost always ill-conceived and full of bugs.

    That's probably why I became a stickler for building code out of small individually testable units.

    Small units have worked well in every language I've been involved with. Large units have never worked in any of them.

    Tom

  • TomThomson (3/28/2016)


    Eric M Russell (3/28/2016)


    The stored procedure I'm currently tasked with refactoring reads like a 20 page short story by Clive Barker.

    You have my deepest sympathy.

    I wrote some of that sort of mess (:blush:) in Fortran in the 60s, had to cope with some of that sort of mess written in assembly and in S3 (an Algol 68 dialect) in the 70s, and struggled against a lot of that in C++ rather later on. Things of that size are almost always ill-conceived and full of bugs.

    That's probably why I became a stickler for building code out of small individually testable units.

    Small units have worked well in every language I've been involved with. Large units have never worked in any of them.

    Some of the dashboard items up on Power BI (no moving avg, sorry) - https://onedrive.live.com/redir?resid=4D0361FD49E9910!17469&authkey=!ADivg4tDQOAKccM&v=3&ithint=photo%2cPNG

  • Lynn Pettis (3/28/2016)


    I had a coworker at a previous employer where I was actually writing PL/SQL :sick: that had TOAD set up to format the code the way he liked it. I never got around to it but I could have done the same for myself.

    His idea was that each developer could format the code the way they preferred and when he would look at it he would format it to his preference. He also suggested checking the code into SVN unformatted. Not sure if I would go that far, but I do agree that code needs to be formatted to be easily read by humans and that a company should have a standard that all developers adhere to when writing code.

    I believe that a developer can view and write their SQL, or any other code, in whatever style that they prefer but MUST check it in in the company standard formatting. This allows for developer freedom but ensures a consistent code base.

    It is easier to use the company standard and that is best to use with anyone not yet applying a style. Perhaps also for new starters regardless of experience.

    Gaz

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

  • +1 for strict coding but I am at a site that has locked down access to those links. 🙁

    Gaz

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

  • camel case, with the first letter capitalized

    FYI That's called Pascal case.

    Gaz

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

  • diamondgm (3/29/2016)


    TomThomson (3/28/2016)


    Eric M Russell (3/28/2016)


    The stored procedure I'm currently tasked with refactoring reads like a 20 page short story by Clive Barker.

    You have my deepest sympathy.

    I wrote some of that sort of mess (:blush:) in Fortran in the 60s, had to cope with some of that sort of mess written in assembly and in S3 (an Algol 68 dialect) in the 70s, and struggled against a lot of that in C++ rather later on. Things of that size are almost always ill-conceived and full of bugs.

    That's probably why I became a stickler for building code out of small individually testable units.

    Small units have worked well in every language I've been involved with. Large units have never worked in any of them.

    Some of the dashboard items up on Power BI (no moving avg, sorry) - https://onedrive.live.com/redir?resid=4D0361FD49E9910!17469&authkey=!ADivg4tDQOAKccM&v=3&ithint=photo%2cPNG

    Well done! Love the dashboard. I hadn't yet played with the Datazen stuff that was integrated into the stack (only did some standalone dashboards after they were acquired) and it looks great. Thank you for putting it all together, awesome visual and very informative too.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • diamondgm (3/29/2016)


    TomThomson (3/28/2016)


    Eric M Russell (3/28/2016)


    The stored procedure I'm currently tasked with refactoring reads like a 20 page short story by Clive Barker.

    You have my deepest sympathy.

    I wrote some of that sort of mess (:blush:) in Fortran in the 60s, had to cope with some of that sort of mess written in assembly and in S3 (an Algol 68 dialect) in the 70s, and struggled against a lot of that in C++ rather later on. Things of that size are almost always ill-conceived and full of bugs.

    That's probably why I became a stickler for building code out of small individually testable units.

    Small units have worked well in every language I've been involved with. Large units have never worked in any of them.

    Some of the dashboard items up on Power BI (no moving avg, sorry) - https://onedrive.live.com/redir?resid=4D0361FD49E9910!17469&authkey=!ADivg4tDQOAKccM&v=3&ithint=photo%2cPNG

    Thanks for putting this together. Clearly presented results.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • diamondgm (3/29/2016)


    TomThomson (3/28/2016)


    Eric M Russell (3/28/2016)


    The stored procedure I'm currently tasked with refactoring reads like a 20 page short story by Clive Barker.

    You have my deepest sympathy.

    I wrote some of that sort of mess (:blush:) in Fortran in the 60s, had to cope with some of that sort of mess written in assembly and in S3 (an Algol 68 dialect) in the 70s, and struggled against a lot of that in C++ rather later on. Things of that size are almost always ill-conceived and full of bugs.

    That's probably why I became a stickler for building code out of small individually testable units.

    Small units have worked well in every language I've been involved with. Large units have never worked in any of them.

    Some of the dashboard items up on Power BI (no moving avg, sorry) - https://onedrive.live.com/redir?resid=4D0361FD49E9910!17469&authkey=!ADivg4tDQOAKccM&v=3&ithint=photo%2cPNG

    It looks like you had fun putting it together. 😉 Nice work.

  • I was glad to see the average up at 4.25 and not down around 1.5.

  • It looks as if I am able to share the report publicly (for free while the feature is in preview), but not the dashboard as I thought I could.

    The report is a little messy, but here it is - https://goo.gl/pQK2IS

    Have had someone from outside our organisation try to view it, and it worked.

  • diamondgm (3/29/2016)


    It looks as if I am able to share the report publicly (for free while the feature is in preview), but not the dashboard as I thought I could.

    The report is a little messy, but here it is - https://goo.gl/pQK2IS

    Have had someone from outside our organisation try to view it, and it worked.

    Page is permanently stuck on "hour glass" equivalent so dynamic loading in background must be blocked where I am at i.e. this is a "me not you" scenario but others may be unlucky as well.

    Thanks for the effort. I will look at it when I get home.

    Gaz

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

Viewing 15 posts - 31 through 45 (of 56 total)

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