Live data from Hacker News

Ask HN: COBOL devs, how are AI coding affecting your work?

news.ycombinator.com

151–160 of 190 posts

Re: Ask HN: COBOL devs, how are AI coding affecting your work?

#151

Earlier quoted context omitted.

I feel like people who can't get AI to write production ready code are really bad at describing what they want done. The problem is that people want an LLM to one shot GTA6. When the average software developer prompts an LLM they expect 1) absolutely safe code 2) optimized/performant code 3) production ready code without even putting the requirements on credential/session handling. You need to prompt it like it's an…

Exactly this. Not sure what code other people who post here are writing but it cannot always and only be bleeding edge, fringe and incredible code. They don't seem to be able to get modern LLMs to produce decent/good code in Go or Rust, while I can prototype a new ESP32 which I've never seen fully in Rust and it can manage to solve even some edge cases which I can't find answers on dedicated forums.

There are wide gaps in:

1) the models people are using (default model in copilot vs. Opus 4.5 or Codex xhigh)

2) the tools people are using (ChatGPT vs. copilot vs. codex vs. Claude code)

3) when people tried these tools (e.g., December saw a substantial capability increase but some people only tried AI this one time last March)

4) how much effort people put into writing prompts (e.g., one vague sentence vs. a couple paragraphs of specific constraints and instructions)

Especially with all the hype, it makes sense to me why people have such different estimates for how useful AI actually is.

Re: Ask HN: COBOL devs, how are AI coding affecting your work?

#152

Compliance is usually the hard stop before we even get to capability. We can’t send code out, and local models are too heavy to run on the restricted VDI instances we’re usually stuck with. Even when I’ve tried it on isolated sandbox code, it struggles with the strict formatting. It tends to drift past column 72 or mess up period termination in nested IFs. You end up spending more time linting the output than it take…

To be fair, I would not expect a model to output perfectly formatted C++. I’d let it output whatever it wants and then run it through clang-format, similar to a human. Even the best humans that have the formatting rules in their head will miss a few things here or there. If there are 40 years of undocumented business quirks, document them and then re-evaluate. A human new to the codebase would fail under the same con…

Formatting isn't just visual, in pre-79 COBOL or Fortran. It's syntax. Its a compile failure, or worse, it cuts the line and can sometimes successfully compile into something else.

Thats not just an undocumented quirk, but a fundamental part of being a punch-card ready language.

Re: Ask HN: COBOL devs, how are AI coding affecting your work?

#153

Earlier quoted context omitted.

To be fair, I would not expect a model to output perfectly formatted C++. I’d let it output whatever it wants and then run it through clang-format, similar to a human. Even the best humans that have the formatting rules in their head will miss a few things here or there. If there are 40 years of undocumented business quirks, document them and then re-evaluate. A human new to the codebase would fail under the same con…

With C++ formatting is optional. A better test case for LLMs is Python where indention specifies code blocks. Even ChatGPT 3.5 got the formatting for Python and YAML correct - now the actual code back then was often hilariously wrong.

A quick search finds many COBOL checkers. I’d be very surprised if a modern model was not able to fix its own mistakes if connected to a checker tool. Yes, it may not be able to one shot it perfectly, but if it can quickly call a tool once and it “works”, does it really matter much in the end? (Maybe it matters from a cost perspective, but I’m just referring to it solving the problem you asked it to solve.)

Clearly it isn’t just “broken” for everyone, “Claude Code modernizes a legacy COBOL codebase”, from Anthropic:

https://youtu.be/OwMu0pyYZBc

Re: Ask HN: COBOL devs, how are AI coding affecting your work?

#154
post #13

I really wouldn't want any vibe-coded COBOL in my bank db/app logic...

How many banks really use COBOL? Here in central Europe it seems to be Java, Java, Java for the most part. Since many years actually.

ECB is mostly COBOL and Fortran. The interfaces are Java, but not the backend.

Re: Ask HN: COBOL devs, how are AI coding affecting your work?

#155

Earlier quoted context omitted.

AI is pretty bad at Python and Go as well. It depends a lot on who uses it though. We have a lot of non-developers who make things work with Python. A lot of it will never need a developer because it being bad doesn't matter for what it does. Some of it needs to be basically rewritten from scratch. Over all I think it's fine. I do love AI for writing yaml and bicep. I mean, it's completely terrible unless you prompt…

If it's bad at python the most popular language what language it's good at? If you see the other comments they're basically mentioning most programming languages

One thing copilot seems to be good at for me is python. Other, older languages like VB.NET I found it struggled with.

I did find (weirdly) that it improved when running on WSL rather than windows.

However I did get it to code a script for downloading SharePoint files and even got it to reduce the dependencies down to built-ins which was a massive time saver

Re: Ask HN: COBOL devs, how are AI coding affecting your work?

#156
post #139

Earlier quoted context omitted.

If it's bad at python the most popular language what language it's good at? If you see the other comments they're basically mentioning most programming languages

But that was a huge assertion in itself. I’m personally having amazing results with Python in Opus 4.5, so this is very contextual.

Agree. It’s excellent at python all round. If it lays out things how you want it to is a matter of preference and usually requires prompting it to restructure. That’s the standard way you work with AI code gen though, it’s iterative and requires testing. If you do it well it can be specified up front as a style guide set of instructions

Re: Ask HN: COBOL devs, how are AI coding affecting your work?

#157
post #5

No humans understand COBOL, no AI understand COBOL.

Total BS. Cobol is well documented and actively developed. I bet you didn't even TRY to write single program for it... Stop spreading FUD

Sarcasm is difficult to grasp on the internet, but some people apparently have more visceral reactions to their misunderstanding than others.

Re: Ask HN: COBOL devs, how are AI coding affecting your work?

#158
post #31

I see it as a complete opposite for sure, I will tell you why. it could have been a threat if it was something you cannot control, but you can control it, you can learn to control it, and controlling it in the right direction would enable anyone to actually secure your position or even advance it. And, about the COBOL, well i dont know what the heck this is.

This is amazing! Thank you for confirming what I've been suspecting for a while now. People that actually know very little about software development now believe they don't need to know anything about it, and they are commenting very confidently here on hn.

People that actually know very little about software development now believe they don't need to know anything about it, and they are commenting very confidently here on hn.

That reads like mission statement of HN.

Re: Ask HN: COBOL devs, how are AI coding affecting your work?

#159

Heard an excellent COBOL talk this summer that really helped me to understand it. The speaker was fairly confident that COBOL wasn't going away anytime soon. https://www.youtube.com/watch?v=RM7Q7u0pZyQ&list=PLxeenGqMmm...

There are many in-house tools (say at banks) where Java code generates... COBOL. It's wild: in the video you linked it's explained COBOL was meant for machines that don't exist anymore so COBOL is running inside emulators.

So you have Java code, generating COBOL code, that's then run on an emulator emulating an old IBM system that was meant to run COBOL. It's just wild.

Some of the tools are even front-facing users (bank employees): at times you can still see at some banks an employee running an app in a monochrome green-on-black text terminal emulator that is basically COBOL.

It's weird, just weird. But legacy code is legacy code. And if you think COBOL's legacy is bad, Java is going to dwarf COBOL's legacy big times (for Java is typically used at the kind of places that still use COBOL and it's used way more than COBOL).

So in the future, heck, we may have a new language, generating, inside an emulator emulating current machines/OSes, Java code that is going to be code generating COBOL code (!), that's then going to be run in an emulator.

Re: Ask HN: COBOL devs, how are AI coding affecting your work?

#160
post #150

Earlier quoted context omitted.

First of all, that conference is right down the road from me, and I never knew about it. So, thanks for sharing! My first job was working at a credit union software company. I designed and built the front-end (windows applications, a telephone banking system, and a home-banking web thing) and middle-tier systems (VB.NET-based services). The real back-end, though, was an old COBOL system. I remember helping the COBOL…

How did you call COBOL from VB.NET? Was it just a matter of shelling to COBOL and writing out text files that VB.NET consumed, or COM interprocess calls, or what?

You can check with the GnuCOBOL project, It works on Windows,MAC/Linux. Open Source and free. The discussion on the sourceforge page would be a good place to ask! https://sourceforge.net/p/gnucobol/discussion/
Post reply on HN