Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Technology IT

Don't Count Cobol Out 274

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."
This discussion has been archived. No new comments can be posted.

Don't Count Cobol Out

Comments Filter:
  • by schwaang ( 667808 ) on Friday September 19, 2008 @06:40PM (#25079515)

    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 [sacbee.com] and nobody can touch it.

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

  • by nawcom ( 941663 ) on Friday September 19, 2008 @07:01PM (#25079727) Homepage

    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 [99-bottles-of-beer.net]

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

  • Re:Wasn't BASIC (Score:5, Informative)

    by VGPowerlord ( 621254 ) on Friday September 19, 2008 @07:10PM (#25079833)

    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 [wikiquote.org]

  • Re:GOODBYE WORLD (Score:3, Informative)

    by geekoid ( 135745 ) <dadinportland&yahoo,com> on Friday September 19, 2008 @08:26PM (#25080649) Homepage Journal

    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.

  • by Actually, I do RTFA ( 1058596 ) on Friday September 19, 2008 @10:20PM (#25081553)

    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.

  • by red_dragon ( 1761 ) on Friday September 19, 2008 @10:36PM (#25081661) Homepage
    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.
  • 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.

  • by Hal_Porter ( 817932 ) on Saturday September 20, 2008 @06:24AM (#25083677)

    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 [wikipedia.org]
    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.

  • Cobol is cool :) (Score:2, Informative)

    by clueless_geek ( 947733 ) on Saturday September 20, 2008 @08:31AM (#25084113)
    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...

FORTRAN is not a flower but a weed -- it is hardy, occasionally blooms, and grows in every computer. -- A.J. Perlis

Working...