4 ms·
I think the culture within COBOL is equally backwards. As someone else said, it’s targeted at people who’s main skill isn’t software engineering, but understan
by sonthonax 6y ago
I think the culture within COBOL is equally backwards. As someone else said, it’s targeted at people who’s main skill isn’t software engineering, but understanding of business logic.
I was once spoke to a consultant who in a past life fixed big COBOL projects. He said that one of the common technological and organisational challenges he faced was getting people to use ‘malloc’. Apparently there are COBOL programs that just SEGFAULT when the input reaches a certain size, and some developer has to change an array allocation size. COBOL developers would be hostile to the idea of dynamic memory allocation, and he’d have to explain that the rest of the world had been doing that for the last 30 years.
- kitd 6y agoI remember having a "malloc" moment moving from fortran to c. "You mean ... I can just ask for more memory?!"
- kergonath 6y agoInterestingly, since Fortran 90, using dynamical allocation is much more developer-friendly than in C (I know, low bar). Fortran’s allocatable variables can’t leak memory, can’t be used after being deallocated, and can’t be deallocated twice. Bounds checking is also trivial and all decent compilers have a flag to do it automatically.
- necheffa 6y agoThe only problem is that the rest of the language is developer unfriendly, plus you have old school FORTRAN programmers who think it is perfectly acceptable and modern to use statically allocated arrays on the stack just because they aren't COMMON blocks.
- kergonath 6y agoFair enough. The language has quite a bit of bagage and some habits are hard to break. That said, it is not unpleasant to use for numerical codes, when you’re not working with people stuck in 1977 (so, no common blocks, everything in modules, decent array syntax, etc). It fits its niche quite well, with Python for everything else.
- pletnes 6y agoInterestingly the language doesn’t define stack/heap allocated so sometimes there’s a compiler flag to put «stack arrays» on the heap, since implementations are free to choose anyway.
- pletnes 6y agoYou can do that in Fortran, too, since 1990ish. Out of curiosity, when did you last write Fortran code?
- kitd 6y agoThis was F77. Never had the joy of F90
- hyperman1 6y agoThe SEGFAULT is even a bigger problem than the resizing. Some COBOL dev came in and proclaimed they could do a websites just like anybody else. I asked what they did when input became too big. ”Oh well. The transaction will dump a bit, and then the duty operator will find some dev to look at it and increase the buffer” was the response. The whole security aspect of the buffer overflow was completely alien to them. The idea that a random internetizen would try to attack the site was unthinkable, let alone they might come from another country. A botnet? of internet connected stuff? That happens only on TV. Besides, with 4 billion IP adresses, the chance an attacker found us was minuscule. Lucky for me they tried to sell that theory to the infosec team, then got shouted at for half a hour.