TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Unleashing the Power of COBOL and Clean Code: Foward Pass in Legacy Languages

5 pointsby LangIsAllWeNeedabout 2 years ago
I&#x27;ve been working on a project that involves primarily developing a neural network in Cobol, and its been a real interesting experience. I&#x27;m hitting some roadblocks unfortunately but I have learned a lot about computation and life. My code is clean but my data is dirty.<p>I know Cobol is not the most cutting-edge language out there, but it has some serious advantages when it comes to reliability and security. I&#x27;ve been able to get the backpropagation algorithm working pretty well, but I&#x27;m running into issues with the forward pass. Specifically, I&#x27;m struggling with the activation functions and how to implement them in Cobol. I&#x27;m using a sigmoid function, but I&#x27;m not sure if I&#x27;m doing it correctly. I have tried using linked list for the weights but i&#x27;m still getting segfaults. I&#x27;ve also been having trouble sleeping, because I&#x27;m so excited about the potential of using Cobol for neural nets.<p>I&#x27;m wondering if anyone else has experience working with neural networks in Cobol, and if so, what strategies you&#x27;ve used for the forward pass and activation functions. I&#x27;m also curious about any tips or tricks you have for writing clean code in Cobol.<p>I&#x27;ve reached out a ton to the PyTorch and jax devs to see if they might be interested in helping me develop a way to transpile it to Cobol so I can use more modern techniques, but they haven&#x27;t responded to my emails.<p>Everyone on this site is on average much more polite, resourceful and ambitious compared to the other tech sites. I found this influential and I&#x27;ve been striving to demonstrate my skills by finishing a language model in COBOL, and I am almost finished I think.<p>I really thought the rigid and explcit nature of cobol would satisfy my craving for clean code. I&#x27;m the type of dev that writes 5 extra lines of python so that everyone knows what it does. But now I am getting confused with the level of verbosity, the level of explicitly has led to implicit complexity. I finally understand Turing completeness as a theoretic possibility not endless flexibility.<p>And has anyone else had success writing neural nets in Cobi? My code is getting wild out here. I&#x27;m starting to wonder if I&#x27;m in over my head here. My develop experience and clean code is trending downward by the hour.

2 comments

simonblackabout 2 years ago
<i>But now I am getting confused with the level of verbosity, the level of explicitly has led to implicit complexity.</i><p>Enjoy the verbosity. It makes for excellent maintenance down the track. There is no ambiguity about what is happening <i>if you name your variables correctly</i>. For what it&#x27;s worth, I once wrote an 8080 disassembler in COBOL. That was 40-odd years ago. It&#x27;s still maintainable <i>because of its verbosity</i>, though I doubt if I&#x27;d have the patience to do so these days.
评论 #35005306 未加载
shooabout 2 years ago
&gt; Everyone on this site is on average much more polite, resourceful and ambitious compared to the other tech sites.<p>Hear hear. This site abounds with better-looking people with better ideas and more talent. And they&#x27;re actually really, really nice!