Slashdot Mirror


Don't Count Cobol Out

Hugh Pickens writes "Although Turing Award-winning computer scientist Edsger Dijkstra once said, 'the use of Cobol cripples the mind; its teaching should, therefore, be regarded as a criminal offense,' Michael Swaine has an interesting entry to Dr. Dobb's Journal asserting that Cobol is the most widely used language in the 21st century, critical to some of the hottest areas of software development today, and may be the next language you'll be learning. In 1997, the Gartner Group estimated that there were 240 billion lines of Cobol code in active apps, and billions of lines of new Cobol code are being written every year. Cobol is a key element in the realization of modern distributed business software architecture concepts — XML/metadata, Web Services, Service Oriented Architecture — and e-business."

9 of 274 comments (clear)

  1. Cobol defeated da Terminator by schwaang · · Score: 5, Informative

    Gov. Schwarzenegger ordered a cut in pay to California state workers, and was told that it would be impossible to implement because the payroll system is in Cobol and nobody can touch it.

    Sounded like political bull to me, but then again...

    1. Re:Cobol defeated da Terminator by Actually,+I+do+RTFA · · Score: 2, Informative

      Gov. Schwarzenegger ordered a cut in pay to California state workers, and was told that it would be impossible to implement because the payroll system is in Cobol and nobody can touch it.

      Correction, Gov. Schwarzeneggar wanted to partially defer pay to California state workers, and pay them in the next quarter. That's what was impossible. And yes, that seems like it would be a lot of work, even if the language wasn't an issue, with the possibility of breaking quite high.

      --
      Your ad here. Ask me how!
    2. Re:Cobol defeated da Terminator by red_dragon · · Score: 5, Informative

      000100 IDENTIFICATION DIVISION.
      000200 PROGRAM-ID.     KILL-SARAH-CONNOR.
      000300
      000400*
      000500 ENVIRONMENT DIVISION.
      000600 CONFIGURATION SECTION.
      000700 SOURCE-COMPUTER. SKYNET.
      000800 OBJECT-COMPUTER. T-800.
      000900
      001000 DATA DIVISION.
      001100 FILE SECTION.
      001200
      100000 PROCEDURE DIVISION.
      100100
      100200 MAIN-LOGIC SECTION.
      100300 BEGIN.
      100400     PERFORM UNTIL SarahConnorIsDead.
      100500         FIND SARAH CONNOR.
      100600         SHOOT SARAH CONNOR.
      100700     END-PERFORM.
      100800 MAIN-LOGIC-EXIT.
      100900     EXIT.

      --
      In Soviet Russia, Jesus asks: "What Would You Do?"
    3. Re:Cobol defeated da Terminator by AKAImBatman · · Score: 4, Informative

      The 2600 only has TWO sprites. The missiles and the ball are 1-bit graphics and thus aren't really counted as "sprites". So there are 5 movable objects. Then there's the playfield. The playfield plots rather long lines (4 pixels per bit IIRC?) at fixed locations. Of course, there wasn't enough memory to store an extra 20 bits to fill the screen. That would be too easy. Instead, the [i]same bits[/i] were reused to draw the second half of the scanline. You could have the playfield repeat or you could have it mirror the bits. But if you wanted to actually have a full-width playfield, you had to "race the beam".

      And by "race the beam" I mean that you would time the processor cycles just right so that you would replace the bits in the registers immediately after they were written to the screen. Since you were working with only 2 1/2 bytes, and you could only write a full byte, that became somewhat challenging. Especially since the 6507 CPU was clocked at 1/3 the speed of the TIA chip. For every three pixels plotted, you'd get one CPU cycle. To add insult to injury, even the shortest instruction still used 2 CPU cycles. And God help you if you crossed a page boundary while reading or writing memory. The extra cycle you incurred would be enough to throw off the entire program and cause nothing but garbage to get written to the screen!

      Making things even more difficult was the way you moved sprites around. There was no way to say "show this sprite at location X". Instead, you had to use one scanline to mark the approximate pixel location of the sprite (remember, 3 cycles per CPU clock), then use the location counter function to advance the position forward or retard it backward by a few pixels. And by a few, I mean 0-3.

      As a result, you had to become a master at timing everything. You counted the cycles, you watched the memory locations, and you figured out how to beat the machine at its own game. Which (oddly enough) is more or less how the system was designed to be used. By the end of the 2600's lifetime, developers had pulled incredible graphics out of the system. Some were done with the assistance of special cart hardware, but most of it was simply the ingenuity of the developers.

    4. Re:Cobol defeated da Terminator by Hal_Porter · · Score: 3, Informative

      Yup, maybe me laugh when I saw it because I was writing 6502 assembly at the time

      http://en.wikipedia.org/wiki/MOS_Technology_6502#6502_in_popular_culture
      In the science fiction movie The Terminator (1984), starring Arnold Schwarzenegger, the audience at one point is treated to a view through the T-800 Model-101 robot character's eye/camera display with some 6502 assembly/machine code program fragments scrolling down the screen. The program was listing the Apple ][ Disk Operating System (DOS) 3.3 disassembled program listing. Also shown is the output from a run of an Apple ][ checksum program called KEY PERFECT 4.0, published in Nibble magazine.

      --
      echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
  2. Re:Why is Cobol hated? by nawcom · · Score: 5, Informative

    Can someone give me a side-by-side example of C and Cobol program or statement to do the same thing which would illustrate why Cobol is so "evil"?

    C (No bells or whistles): http://99-bottles-of-beer.net/language-c-116.html

    COBOL (or as I call it, COBALD): http://99-bottles-of-beer.net/language-cobol-1820.html

  3. Re:Wasn't BASIC by VGPowerlord · · Score: 4, Informative

    No, I just switched his COBOL quote out for the BASIC one on my whiteboard at work on Monday.

    The BASIC one is

    It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

    See: Wikiquote

    --
    GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  4. Re:GOODBYE WORLD by geekoid · · Score: 2, Informative

    000010 IDENTIFICATION DIVISION.
    000020 PROGRAM-ID. HELLO-WORLD-PROG.
    000030 AUTHOR. TIMOTHY R P BROWN.
    000040*The standard Hello world program
    000050
    000060 ENVIRONMENT DIVISION.
    000070
    000080 DATA DIVISION.
    000090 WORKING-STORAGE SECTION.
    000100 01 TEXT-OUT PIC X(12) VALUE 'Hello World!'.
    000110
    000120 PROCEDURE DIVISION.
    000130 MAIN-PARAGRAPH.
    000140 DISPLAY TEXT-OUT
    000150 STOP RUN.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  5. Cobol is cool :) by clueless_geek · · Score: 2, Informative

    i am 20 something... i code in cobol for a bank... its their core banking solution... a microsoft system that was to integrate with the Mainframe was unable to handle the speed with which data was posted to it...(the mainframe is 39 years old, surpring a new language on a new platform couldn'thandle it LOL... an earlier attempt to migrate the system to java failed when the new application was twice as slow with only a portion of logic .. ) we are short on good cobol developers... thankgod we have a team of folks from india who are now busy coding in cobol and earning big bucks... yes cobol is old ... yes it is museum material but it does the job and combine it with mainframes ... the speed and reliability is unmatchable...