Cobol in nodejs

2016-08-29 10:35:00 +0000

Cobol can be compiled into Javascript and you can call Javascript from Cobol, as I read in this article on arstechnica. Will this finally be the way out for all legacy Cobol code?

// Dependencies
var Cobol = require("cobol");

When .Net came out early 2000s, a Cobol compiler was offered too. There a also numerous way for interoperability from Cobol to Java as well. Both didn’t succeed in cornering and replacing Cobol as far as I know. Maybe Cobol in Nodejs will.

Some things that could help:

  • Javascript is not plagued too much by enterprise architecture and requirements engineering thinking, bringing SOA, star diagrams, layers, foundations and all sort of antropomorphism This can avoid a huge amount of waste in, where organizations could spend a year building up a SOA-bus instead of doing anything - resulting in the legacy Cobol system still to the heavy lifting.
  • The hackish nature of Javascript can be troublesome, but also introduced a practical approach to dealing with legacy code. Not just rewriting everything, but just copy&paste what you need, and add functionality when it’s useful.
  • In both .Net and even more in the Java / JVM world there’s a belief that eventually everything has to run in the Virtual Machine, as bytecode, or as .Net intermediate code. Both environments have excellent ways to interoperate with ‘native’ libraries written in C, but that’s less popular. In the Node.js world this quite a common way of working.

Read more

Programming education and smart contracts

2016-08-25 00:00:00 +0000

While looking browsing at Quora I found this posting by a professor in New Zealand on why certain programming languages are taught at universities while being suboptimal for teaching. Reminds me of this article by Edsger Dijkstra ‘On the cruelty of really teaching computing science’ I had recently read. Dijkstra A point Dijkstra raises is the problem of explaining by using solely analogies - ‘never refer to parts of programs or pieces of equipment in an anthropomorphic terminology, nor allow your students to do so’.
Avoid using the term ‘bug’, use ‘error’ instead. A bug a fault in software just happens, while an error clearly indicates what it is: wrong code, by fault of the programmer. And ‘programs wanting things, knowing things, expecting things, believing things, etc., and each time that gave rise to avoidable confusions. The analogy that underlies this personification is so shallow that it is not only misleading but also paralyzing.

One modern programming language that is easy start with but less fit for its purpose is Solidity, the most used programming languages to write smart contracts for Ethereum. Solidity is similar to Javascript, a familiar language for most programmers (including me), making it easy to get started. However, writing smart contracts is hard. Unlike when writing web-applications, there’s little tolerance for errors in your code. There are other languages that you can use to write smart contracts as well, and Daniel Ellison makes a very good case for LLL in his blog-serie The Resurrection of LLL.

To wrap up, I’m now sitting in a Seats2meet location in Amersfoort, a place where you can work as freelancer. More quiet then an Internet cafe, but a lot more inspiring then working alone at home. During lunch I met someone who has a youtube channel explaining math - in Dutch. He uses lots of like here:

after all anthropomorphic might be bad, examples are certainly not.

What I now do or should do is work on Plutus.it, I could sure need help besides inspiration. If you know how to write smart contracts, or want to learn, contact me!

Read more

Archive

subscribe via RSS