Are the posted questions getting worse?

  • Dennis Jensen wrote:

    In fact C can be as fast or faster than Assembler and I think this is partially because of highly advanced compilers for C.

    As C compiles into an Assembly File it can't be faster than Assembler, at best the same.

    Assembly instructions are the instructions on the CPU.

  • ScottPletcher wrote:

    OK.  Let's both write a report with control breaks.  I'll do it in COBOL ... in an hour or so.  (Good COBOL programmers had templates for each major type of program and would start from that.)  Your C program will take days (and will still have bugs in it).

    COBOL, when written properly (structured and following best-practice rules, such as separate paragraphs for I/O), is also the most maintainable language.

    One huge advantage COBOL also had was that you could move any data as just bytes (using a GROUP level number), whereas generally in other languages each char / numeric / binary value would have to be moved separately.

    The advantages you point out are nothing that is intrinsic to COBOL all languages if properly formatted are just as easy to maintain as COBOL, they just require a lot less lines of code to do the same thing.

    As for the challenge, to be fair, you would have to write it from scratch using no templates at all because if you get to use templates then I get to use libraries and I can guarantee you I can write that report in less than an hour without bugs if I use libraries.

    Further with the right libraries C can manipulate data in numerous ways including Bytes or Words or Blobs.

    As for structure, again properly formatted C is a well defined in form and is just as easily maintained as any other properly formatted code.

    Heck SQL can be a nightmare if it is horrible formatted or not formatted at all. I know this as I am having to clean up some very badly formatted SQL and remove their hidden bugs because no one could see them as the lack of formatting made them next to impossible to see. I am also writting SQL Formatting and Coding Standards for our team.  Which sadly is I think the seventh group of programmers that I have had to write Standards for. I am not sure why coding groups choose not to implement group Standards but it is the first thing I ask to see when joining a team. As code with group Standards can be easily maintained by all the programmers on the team.

  • Jonathan AC Roberts wrote:

    As C compiles into an Assembly File it can't be faster than Assembler, at best the same.

    Assembly instructions are the instructions on the CPU.

    Johnathan that was not my claim, that was a claim by someone much more knowledgeable than I and they had facts to back up their claim. I would share the article with you but that would require me stumbling across it once more.  I had the same initial opinion that you have, but facts are facts.

    Further let me ask you if all languages are compiled into Assembly and thus as you say the same. Why then if you have a need for speed you should use Assembler or C to code that in?

  • Dennis Jensen wrote:

    ScottPletcher wrote:

    OK.  Let's both write a report with control breaks.  I'll do it in COBOL ... in an hour or so.  (Good COBOL programmers had templates for each major type of program and would start from that.)  Your C program will take days (and will still have bugs in it).

    COBOL, when written properly (structured and following best-practice rules, such as separate paragraphs for I/O), is also the most maintainable language.

    One huge advantage COBOL also had was that you could move any data as just bytes (using a GROUP level number), whereas generally in other languages each char / numeric / binary value would have to be moved separately.

    The advantages you point out are nothing that is intrinsic to COBOL all languages if properly formatted are just as easy to maintain as COBOL, they just require a lot less lines of code to do the same thing.

    As for the challenge, to be fair, you would have to write it from scratch using no templates at all because if you get to use templates then I get to use libraries and I can guarantee you I can write that report in less than an hour without bugs if I use libraries.

    Further with the right libraries C can manipulate data in numerous ways including Bytes or Words or Blobs.

    As for structure, again properly formatted C is a well defined in form and is just as easily maintained as any other properly formatted code.

    Heck SQL can be a nightmare if it is horrible formatted or not formatted at all. I know this as I am having to clean up some very badly formatted SQL and remove their hidden bugs because no one could see them as the lack of formatting made them next to impossible to see. I am also writting SQL Formatting and Coding Standards for our team.  Which sadly is I think the seventh group of programmers that I have had to write Standards for. I am not sure why coding groups choose not to implement group Standards but it is the first thing I ask to see when joining a team. As code with group Standards can be easily maintained by all the programmers on the team.

    Dennis Jensen wrote:

    ScottPletcher wrote:

    OK.  Let's both write a report with control breaks.  I'll do it in COBOL ... in an hour or so.  (Good COBOL programmers had templates for each major type of program and would start from that.)  Your C program will take days (and will still have bugs in it).

    COBOL, when written properly (structured and following best-practice rules, such as separate paragraphs for I/O), is also the most maintainable language.

    One huge advantage COBOL also had was that you could move any data as just bytes (using a GROUP level number), whereas generally in other languages each char / numeric / binary value would have to be moved separately.

    The advantages you point out are nothing that is intrinsic to COBOL all languages if properly formatted are just as easy to maintain as COBOL, they just require a lot less lines of code to do the same thing.

    As for the challenge, to be fair, you would have to write it from scratch using no templates at all because if you get to use templates then I get to use libraries and I can guarantee you I can write that report in less than an hour without bugs if I use libraries.

    Further with the right libraries C can manipulate data in numerous ways including Bytes or Words or Blobs.

    As for structure, again properly formatted C is a well defined in form and is just as easily maintained as any other properly formatted code.

    Heck SQL can be a nightmare if it is horrible formatted or not formatted at all. I know this as I am having to clean up some very badly formatted SQL and remove their hidden bugs because no one could see them as the lack of formatting made them next to impossible to see. I am also writting SQL Formatting and Coding Standards for our team.  Which sadly is I think the seventh group of programmers that I have had to write Standards for. I am not sure why coding groups choose not to implement group Standards but it is the first thing I ask to see when joining a team. As code with group Standards can be easily maintained by all the programmers on the team.

    Use any libraries you want, they won't help you all that much.  Let's see your C program for the report with control breaks, no chance it takes "less than an hour".  C is not designed for reports, COBOL is.  I guess you're not familiar with report writer.  It's literally just a few lines of procedure code to generate a complex report.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • below86 wrote:

    If you ever had to deal with Assembler then COBOL would look like the futuristic flying car.  When I was in college they taught us both Assembler and COBOL.  I had to use both early in my career.  I even had to convert an Assembler program to COBOL because there wasn't many of us that knew it.   Now Assembler is a dinosaur, 1947 I believe.  I have great empathy for anyone who would have to deal with that language now.  How about some BASIC code?  Who remembers that?   But COBOL again looks futuristic compared to BASIC.  IMHO

    When I started with assembler I did not have fancy compilers like MASM but coded in Hex.

    I too have programmed in several flavours of BASIC and one of my last projects before I left that particular company was to convert a BASIC program with over 20 overlays to .NET, not something I would like to repeat.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Dennis Jensen wrote:

    Jonathan AC Roberts wrote:

    As C compiles into an Assembly File it can't be faster than Assembler, at best the same.

    Assembly instructions are the instructions on the CPU.

    Johnathan that was not my claim, that was a claim by someone much more knowledgeable than I and they had facts to back up their claim. I would share the article with you but that would require me stumbling across it once more.  I had the same initial opinion that you have, but facts are facts.

    Further let me ask you if all languages are compiled into Assembly and thus as you say the same. Why then if you have a need for speed you should use Assembler or C to code that in?

    Dennis Jensen wrote:

    Jonathan AC Roberts wrote:

    As C compiles into an Assembly File it can't be faster than Assembler, at best the same.

    Assembly instructions are the instructions on the CPU.

    Johnathan that was not my claim, that was a claim by someone much more knowledgeable than I and they had facts to back up their claim. I would share the article with you but that would require me stumbling across it once more.  I had the same initial opinion that you have, but facts are facts.

    Further let me ask you if all languages are compiled into Assembly and thus as you say the same. Why then if you have a need for speed you should use Assembler or C to code that in?

    Not all languages are compiled into assembly, some languages are "interpreted" that means each line of code is read by an interpreter at runtime and then converted to assembler/machine-code then the instructions are sent to the CPU. This is obviously a lot slower than compiled languages.

    Assembler is basically machine code but is just about humanly readable.  For example, for x86 assembly mov  $1, %rax  is the instruction to move the value of 1 into the RAX register, in machine code it would be written as 48 C7 C0 01 00 00 00 there is a 1 to 1 mapping of assembly to machine code. If you were to write something complicated in assembler it would be virtually unmaintainable. If you were to write it in machine code, well only a computer with the right chip and maybe Rain Man could understand it.

    All .NET languages compile code into a Common Intermediate Language (CIL) aka Microsoft Intermediate Language (MSIL) which is then converted to machine code at runtime with just-in-time (JIT) compilation.

  • And you now have COBOL in the .NET world, so it is evolving.

     

  • Lynn Pettis wrote:

    And you now have COBOL in the .NET world, so it is evolving.

    The first time I saw that, I kind of fell out of my chair.  I think it may fall into "Just because you can, doesn't mean you should"

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Michael L John wrote:

    Lynn Pettis wrote:

    And you now have COBOL in the .NET world, so it is evolving.

    The first time I saw that, I kind of fell out of my chair.  I think it may fall into "Just because you can, doesn't mean you should"

     

    Doesn't mean you shouldn't either.

  • I think you're both saying "it depends"

  • Well, here is a new one.

    While reviewing design standards with a set of contract developers we pointed out that any object needs to be qualified with the schema of the object.  The exact sentence in the documentation is:

    When creating a database object, or referring to an object in code, the object name needs to be qualified with the schema in two-part naming.

    They submitted about 100 scripts for review.

    The create tables scripts are all like this:

    CREATE TABLE schema_TableA ( ...

    CREATE TABLE schema_TableX ( ...

    I guess we need to clarify the documentation.

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Michael L John wrote:

    Well, here is a new one.

    While reviewing design standards with a set of contract developers we pointed out that any object needs to be qualified with the schema of the object.  The exact sentence in the documentation is:

    When creating a database object, or referring to an object in code, the object name needs to be qualified with the schema in two-part naming.

    They submitted about 100 scripts for review.

    The create tables scripts are all like this:

    CREATE TABLE schema_TableA ( ...

    CREATE TABLE schema_TableX ( ...

    I guess we need to clarify the documentation.

    I'm thinking that you need to be more clear on the job description that you use to hire people... a LOT more clear.  For more than just the most obvious reason, this is some scary stuff you just posted. 😀

    --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 wrote:

    I'm thinking that you need to be more clear on the job description that you use to hire people... a LOT more clear.  For more than just the most obvious reason, this is some scary stuff you just posted. 😀

    Hire?  These are all contractors.  We send out a "we need this done" request and they give is people.

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Monkeys, typewriters and Shakespeare.

    -------------------------------------------------------------------------------------------------------------------------------------
    Please follow Best Practices For Posting On Forums to receive quicker and higher quality responses

  • Michael L John wrote:

    Jeff Moden wrote:

    I'm thinking that you need to be more clear on the job description that you use to hire people... a LOT more clear.  For more than just the most obvious reason, this is some scary stuff you just posted. 😀

    Hire?  These are all contractors.  We send out a "we need this done" request and they give is people.

    Three words.... BWAAA-HAAA-HAAA!

    Michael L John wrote:

    I guess we need to clarify the documentation.

    Apparently so! 😀  Lordy!

    I'm not telling you anything new but I have to say it out loud for others.  You need to do code reviews early and often, even if the code is all in-house.

    --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 - 66,361 through 66,375 (of 66,815 total)

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