asmr coding kmeans clustering in COBOL #asmr #coding #programming #notalking

preview_player
Показать описание
This program is a simple demonstration for illustrating how even modern data analytics algorithms can be implemented in very old programming langauges like COBOL, with extremely limited support for mathematical operations. For simplicity reasons, none of the more recent predicates and features have been used, other than what was provided by MS-COBOL 2.1 back in the early '80s.

A small fixed-size set of X-Y samples corresponding to screen positions (width=80, height=25) is clustered with the K-Means algorithm using K=2 clusters. The points have been selected so that one cluster is on the left half and the other is on the right half of the X-Y plane, while the initial centroids are placed on the top-left and bottom-right corners. Hence, the processing terminates immediately with a stable solution, although there is a limit for max iterations. All calculations are made with integers, so the exact floating-point solution for the centroids is truncated. The program can be easily adapted to read the X-Y data from an input file and produce an output file with the results (cluster assignments). Also, with some additional code, a text plot of the results can be created.

The language is the creation of Grace Hopper, a pivotal figure in the evolution of programming and the design of the first trully general-purpose languages. The two main strengths of COBOL was the rich I/O functionality for data file handling and the screen handling routines for creating terminal-based user I/O via forms and tables. Although functionally limited and with loquacious syntax by the programming standards of later language generations, COBOL was deemed extremely reliable and understandable by the programmers of those early days. So much that, even today, there are millions of lines of COBOL code running 24/7 in huge data centers for data management, for example in the financial and insurance business sectors.

Enable captions for more details and walk-through. Source code available at the Github repository (see channel info).
#asmr #coding #programming #notalking #cobol #retro #msdos #dosbox
Рекомендации по теме