|
|
Log in / Subscribe / Register

Memory-safe C code

Memory-safe C code

Posted Nov 18, 2025 8:25 UTC (Tue) by taladar (subscriber, #68407)
In reply to: Memory-safe C code by farnz
Parent article: Rust in Android: move fast and fix things (Google Security Blog)

FORTRAN is maybe also not the best example in terms of legacy code bases because it is often used in purely mathematical areas that by their very nature don't change much. Code bases that deal with concerns more closely linked to a changing real world (e.g. regulation, evolving cryptographic algorithms or protocols, parsers of changing file formats or network protocols) would be less likely to be usable unchanged for long enough that people would consider them bug and maintenance free.


to post comments

Memory-safe C code

Posted Nov 18, 2025 9:46 UTC (Tue) by anselm (subscriber, #2796) [Link] (12 responses)

Code bases that deal with concerns more closely linked to a changing real world (e.g. regulation, evolving cryptographic algorithms or protocols, parsers of changing file formats or network protocols) would be less likely to be usable unchanged for long enough that people would consider them bug and maintenance free.

This is why these days, COBOL programmers get to name their own salaries.

Memory-safe C code

Posted Nov 19, 2025 9:28 UTC (Wed) by taladar (subscriber, #68407) [Link] (11 responses)

Which is a good data point to indicate that the companies still using COBOL did wait too long rewriting their code in something else, especially considering that even those COBOL programmers are dying off now.

Memory-safe C code

Posted Nov 19, 2025 9:37 UTC (Wed) by Wol (subscriber, #4433) [Link] (10 responses)

Or that they're happy to pay megabucks to pinch existing Cobol guys, but too stingy to provide a career path to cross-train people into it.

I can understand computer guys being wary of "learning a dinosaur skill", but if it's treated as "just another language programmers are expected to know", and they don't find themselves exclusively on Cobol? Or they take people from other skills who want to get into that sort of thing, and train them up?

The problem, basically, is that Cobol is no longer "sexy", so people don't come into the workforce knowing it ...

Compared to Fortran, programming is a side-line for scientists, and if a scientist is told "learn Fortran" it's not viewed as a career-defining choice.

Cheers,
Wol

COBOL programmers

Posted Nov 19, 2025 9:55 UTC (Wed) by farnz (subscriber, #17727) [Link] (8 responses)

Nowadays, they pay to train people in COBOL because it is cheaper to train a new programmer to do COBOL well than it is to rewrite the code in a newer language. Most people I know who've gone this route paid off their mortgage, then learnt COBOL as a way to get a low-stress, decent pay job to take them into retirement, although there are a few who learnt it straight out of university as part of working for a contracting firm who does COBOL stuff.

COBOL programmers

Posted Nov 19, 2025 13:21 UTC (Wed) by nijhof (subscriber, #4034) [Link]

When I was a PhD student, 1990-something, I started applying for a Cobol job. A fellow student got rejected because he got all answers right on the test...

COBOL programmers

Posted Nov 20, 2025 9:27 UTC (Thu) by taladar (subscriber, #68407) [Link] (6 responses)

Not sure I would consider a job low-stress that involves exclusively work with legacy projects.

Working on legacy projects can be low stress *if* demand on you is low.

Posted Nov 20, 2025 9:49 UTC (Thu) by farnz (subscriber, #17727) [Link]

It's low-stress if you work directly for a company with a COBOL codebase, because the demands are small. The consultancies charge about the same for a month of COBOL work as it costs to employ a person for a year, and thus organisations that would otherwise have to pay for multiple months per year of consultancy time have a huge incentive to keep their in-house COBOL programmers happy.

As, by and large, the COBOL programmers are willing to accept lower salaries (because of the low stress) than similarly experienced programmers working in modern languages, it's obvious to the usual suspects for causing stress that the COBOL programmers should be left alone - there's lower-hanging fruit than the people who aren't the highest paid programmers, and who are responsible for business-critical systems.

COBOL programmers

Posted Nov 20, 2025 14:44 UTC (Thu) by mathstuf (subscriber, #69389) [Link]

I think there's a difference between working with perpetually legacy code rather than code that *becomes* legacy every 6 months. I think I would prefer the former given the choice between the two. Or, maybe, neither and instead decide to be outside more often ;D .

Legacy projects (was: COBOL programmers)

Posted Nov 20, 2025 15:33 UTC (Thu) by dskoll (subscriber, #1630) [Link] (3 responses)

My last job prior to retirement was working on a large legacy codebase that had some... interesting... architectural decisions and quite a lot of technical debt. I spent much of my time cleaning it up and getting rid of technical debt, as well as adding a few new features.

I really enjoyed it. There's something about my brain that enjoys reverse-engineering and cleaning up old code bases. Additionally, the job was pretty chill, my coworkers were great, and there were no crazy externally-imposed arbitrary deadlines. I felt that I ended my career on a high.

Legacy projects (was: COBOL programmers)

Posted Nov 21, 2025 10:12 UTC (Fri) by taladar (subscriber, #68407) [Link] (2 responses)

It sounds like a large part of that enjoyment was in actually being able to change the legacy code though, so it depends a bit on how hard the legacy project drives the idea that any code change beyond the absolute minimum necessary is bad because it might introduce new bugs.

Legacy projects (was: COBOL programmers)

Posted Nov 21, 2025 12:51 UTC (Fri) by Wol (subscriber, #4433) [Link]

I thoroughly enjoy that sort of work too.

A lot of it is cleaning up technical debt - getting rid of all those repeatedly-invented wheels, turning duplicated code into subroutines, writing utility subroutines/macros/programs to maximise code re-use, eliminating dead code, yadda yadda. Writing a retrospective specification !!!

And it's the pleasure of leaving the code in a much better state for the people who come after you.

Cheers,
Wol

Legacy projects (was: COBOL programmers)

Posted Nov 21, 2025 14:15 UTC (Fri) by farnz (subscriber, #17727) [Link]

In general, the places that employ in-house programmers are very happy for you to refactor the legacy code - they have a certain amount of necessary change they have to do each year (things like complying with new regulations, or fixing bugs that don't show up until you have an end date after 2050), and they want that necessary change to happen quickly.

They recognise that change carries a risk of bugs, but they also recognise that it's better to have a weekly small chance of a bug (whether caused by a refactor, or caused by a required change) than a bigger chance of a bug when a required change is made. And they're hopeful that, by getting test cases written for each bug found when refactoring is done, they'll eventually reach a point where the test suite is big enough to let them rewrite in a new language (Java, Python, Go, TypeScript, whatever) without hitting the same issues previous rewrites have had.

Memory-safe C code

Posted Nov 20, 2025 5:17 UTC (Thu) by rgmoore (✭ supporter ✭, #75) [Link]

Or that they're happy to pay megabucks to pinch existing Cobol guys, but too stingy to provide a career path to cross-train people into it.

Once hiring experienced COBOL programmers away from another company is an accepted strategy, it makes training your own people less viable. It's a general problem with loss of loyalty*. If you can get employees with the skills you need by hiring them away from someone else, there's way less incentive to train people in house. On the one hand, it's faster (and consequently probably cheaper in the short term) to hire someone who already has the skills than to train an existing employee. On the other hand, if a company trains someone in house, the trainee may get hired away as soon as they know enough to be productive in their new skill.

*And I mean that both ways. Companies have to be loyal to their employees if they want loyalty in return.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds