4 ms·
COBOL on Wheelchair
- rbanffy 12y agoYou may want to use a more appropriate font. https://github.com/rbanffy/3270font https://github.com/rbanffy/3270font
- ch4s3 12y agoWasn't this called Cobol on Cogs before? Or is that another joke framework?
- agnokapathetic 12y agoCobolOnCogs [1] was purely a joke, this is an actual framework (also a joke, but with actual functioning code [2]). [1]: http://www.coboloncogs.org/INDEX.HTM http://www.coboloncogs.org/INDEX.HTM [2]: https://github.com/azac/cobol-on-wheelchair https://github.com/azac/cobol-on-wheelchair
- brudgers 12y agoWhenever I read COBOL I am always amazed...well...that I can read it and get some gist of what is going on with relative ease. I don't really want to participate in all the ceremony that goes into writing COBOL, but the end product is often more intelligible than code in some other languages I don't know.
- vezzy-fnord 12y agoCOBOL (or perhaps these days Cobol, lower-case) just received a new edition of its standard last year. By far its most major overhaul was in 2002, with the introduction of OO and recursion. Not to say that you should be quick to build your startup on COBOL, but the present language is pretty tolerable. Most of the COBOL that actually runs, I think, is 74-era code, however. That is certainly painful. It could always be worse, however. It could be MUMPS.
- tolle 12y agoMost places that has kept its code "up to date" seems to run on the 85 standard with some newer stuff that was added in 89. End-ifs and such wasn't part of the language until then. The companies that hasn't put that much love into their COBOL code usually runs some home brewed version of a earlier standard.
- vezzy-fnord 12y agoPreviously discussed here: https://news.ycombinator.com/item?id=6950646 https://news.ycombinator.com/item?id=6950646. Most famous for its potentially offensive name. The project itself hasn't been updated since its initial commit. Would've been funny to go on with it for at least a little while.
- Ovid 12y agoEx-COBOL developer here. In case anyone is wondering if something like this could ever be the "killer app" of COBOL that launches it into modern fame and glory, the answer is "oh god, no." COBOL isn't a modern language by any stretch of the imagination. For example, advanced math is something that it's particularly bad at. Or do you want to sort some data? Yeah, COBOL will let you sort some data, only if you specify the damned file containing the unsorted data, the file that will hold the data while it's being sorted, the file that will contain the sorted data (http://www.tutorialspoint.com/cobol/cobol_internal_sort.htm http://www.tutorialspoint.com/cobol/cobol_internal_sort.htm). Want to sort an array into another array? Screw you. However, there's one thing that COBOL is very bad at: unstructured text. Guess what 99% of the Web is? For example, in their sample code they show this in the working storage section: 01 the-values. 05 COW-query-values occurs 10 times. 10 COW-query-value-name pic x(90). 10 COW-query-value pic x(90). Guess what "pic x(90)" means? The "x" means it can contain any data (not just alphanumerics), but the 90 means it must be 90 characters long. In other words, if you have color=blue in your query string, "color" will be 90 characters long (probably padded with 85 spaces), and "blue" will be the same (probably padded with 86 spaces). Thus, when someone else declares color as "pic x(80)" (note the 80 versus 90), even if the color submitted is "blue" for each, one might be 80 characters long and the other might be 90 characters long and if you don't like it, too bad. Have fun comparing them. COBOL is still the world's most popular programming language, though, if you look at it in terms of lines of code. Sadly, COBOL programmers are aging and there are fewer devs to maintain their programs (I started hacking on COBOL when I was 30 and I was the youngest developer in my department!).
- kyllo 12y agoI work at a company that is in the middle of a massive COBOL -> Java migration project. The core transaction processing system has 1.3 million lines of HP3000 COBOL that is pre-compiled to 13 million lines of Micro Focus COBOL, so that code can be compiled to run on UNIX hardware (using a mainframe emulator framework). So although I'm not a COBOL dev myself, I deal with the issue you describe constantly. Want to give an inventory item an identifier that's longer than 36 characters? Too bad! That field in the legacy system is PIC X(36) so it will get truncated to that length if it's longer (and of course, padded with spaces if it's shorter, so there are lots of String.trim() calls in our Java code).