News for hackers. Stuff that matters.
Re:IBM will offer free COBOL training by zxcvbn4038 on Saturday April 11, 2020 @08:01AM (#22841209)
Not to mention GOTO. If your one of the people who hyperventilates when you see a goto because you learned that it was considered harmful in programmer school then Cobol might not be for you. ;)

You might be surprised about the comments though - depending on the age of the codebase. Mainframes were rented back in the day, you paid by resources consumed, terminal time was precious, and mainframes were often turned off outside business hours.

Because of this a lot of the development actually happened between terminal sessions in flowcharts, pseudo code, documentation, and peer review before the programs were ever modified and run.

If you ever run across really old comp-sci books you’ll typically see them divided into three sections - first section was usually a guide to the author’s terminology and symbology, second part was usually a guide to flow charting and documentation (IBM had standardized forms for developers to use), and then the remainder of the book was the content with lots of explanations of how to work the datasets hugely larger then the memory available to you.

But as time passed and computer time became cheaper many of those formal development practices started to get lax.

Re:IBM will offer free COBOL training by kens on Saturday April 11, 2020 @12:48PM (#22842601)
> Mainframes were rented back in the day, you paid by resources consumed

To expand on that, IBM used to rent mainframes based on a 40-hour week. The computer had a usage meter (like a car odometer) that would keep track of how much time the computer was running. If the meter ran over, you would be billed for the excess charge.

The computer actually had two usage meters, with a key to select between them. When an IBM service engineer maintained the system, they used their key to switch from the customer meter to the maintenance meter. Thus, customers weren't charged for the computer time during maintenance.

One interesting thing I noticed about the IBM 1401 is that it's built from small circuit boards (SMS cards) that are easily pulled out of the backplane for replacement. Except the cards driving the usage meter. Those cards are riveted into place so they can't be removed. Apparently some customers discovered that they could save money by pulling out the right cards and disabling the meter.

Re:IBM will offer free COBOL training by zxcvbn4038 on Saturday April 11, 2020 @01:26PM (#22842829)
I found a picture of the meters for those that are curious - http://static.righto.com/images/ibm-360/epo-30.jpg
Re:IBM will offer free COBOL training by johnohara on Saturday April 11, 2020 @11:57AM (#22842303)
The terminals were turned off. The mainframe kept running. In the computer room, the second shift operators ran batch jobs, printed reports, and did backups.

Didn't matter if the terminal was turned off or not either. The UI was burned into the phosphors.

Re:IBM will offer free COBOL training by Zenst on Saturday April 11, 2020 @12:22PM (#22842447)
>The UI was burned into the phosphors

Oh wow, so true, brought back many memories and also one of those overlooked aspects when you change a system as the previous burned in fields would with the right lighting create a whole avenue of data input errors that truly was a case of given the user a new monitor, which can be fun if your looking at it as a software issue in some new rollout. Yeah that can be a fun one and sometimes can't beat site visits as the local environment will never be replicated in any user transition training setup, however well it is done.

Re:IBM will offer free COBOL training by Kye on Saturday April 11, 2020 @08:48AM (#22841383)
I used to have an IBM flowcharting template I inherited. I mostly used it to draw shapes and didn't appreciate what it meant to have a standard you could make tools like that for.

https://americanhistory.si.edu/collections/search/object/nma...

Re:IBM will offer free COBOL training by zxcvbn4038 on Saturday April 11, 2020 @09:18AM (#22841524)
Awesome! I used to have one of those templates, unfortunately it got lost in a move. Surprisingly you can buy similar templates on Amazon but I’ve not seen one used in decades.

https://www.amazon.com/Rapidesign-Computer-Flowchart-Templat...

Re:IBM will offer free COBOL training by perl4ever on Saturday April 11, 2020 @09:24PM (#22845430)
The New York State Civil Service exams for IT positions (meaning anything involving software development as well as other stuff) still have a flow chart section.

I actually quit the interview process with an insurance company a year or two ago after they wanted me to take a test involving reading flow charts, but now I'm in the position of having to pass something similar if I want to get promoted.

However, I don't think people use flow charts on the job anymore, even in state government.

Re:IBM will offer free COBOL training by codycraven on Saturday April 11, 2020 @11:03PM (#22845757)
I've found that flowcharts are enormously helpful for software design and communicating the design decided upon. Maybe in your role you don't have a need to communicate how software should be written?
Re:IBM will offer free COBOL training by perl4ever on Sunday April 12, 2020 @12:57PM (#22849454)
I like to make hierarchical text outlines.

I feel like once you need a general graph sort of structure, you're too far down the road to spaghetti and/or excessive detail.

Re:IBM will offer free COBOL training by cmiles74 on Sunday April 12, 2020 @02:58PM (#22850307)
I make flowcharts all the time. I find them particularly useful for showing stakeholders how different pieces of an integration project work together. Usually the moving parts are pretty coarsely grained, like an ETL job or something that writes out a file and something else that picks it up. IMHO, your 70s-era flow chart diagram is pretty good at that kind of stuff.
Re:IBM will offer free COBOL training by vlan0 on Sunday April 12, 2020 @09:10AM (#22848007)
>However, I don't think people use flow charts on the job anymore

Only for our service desk. Much easier to read than walls of text.

Re:IBM will offer free COBOL training by Bayart on Saturday April 11, 2020 @11:54AM (#22842289)
>If your one of the people who hyperventilates when you see a goto because you learned that it was considered harmful in programmer school then Cobol might not be for you. ;)

I don't know, at this point seeing a GOTO in my « native language » (the C language) is so incredibly weird that my first thought is « this guy is trying to do something weird and interesting ». It just wouldn't cross my mind somebody would be using a GOTO as a result of ignorance or laziness.

Re:IBM will offer free COBOL training by jacoblambda on Saturday April 11, 2020 @02:06PM (#22843074)
Really? Not trying to be derisive, just surprised. One of the common paradigms in C is GOTO for cleanup and error handling. I know it can be avoided if you really try however when used correctly, it can greatly improve the readability of code.
Re:IBM will offer free COBOL training by sjburt on Saturday April 11, 2020 @02:19PM (#22843160)
C gotos are scoped to the function, making them fairly reasonable to use. COBOL and FORTRAN have global gotos.
Re:IBM will offer free COBOL training by lonelappde on Saturday April 11, 2020 @02:56PM (#22843376)
Real programmers use INTERCAL's COME FROM
Re:IBM will offer free COBOL training by jacoblambda on Sunday April 12, 2020 @08:59PM (#22852206)
Oh lord, it's been a while since the last time I've heard someone mention INTERCAL.
Re:IBM will offer free COBOL training by WorldMaker on Monday April 13, 2020 @03:48PM (#22859308)
That language with no pronounceable acronym remains an important teaching tool for programming language learning and design.
Re:IBM will offer free COBOL training by RickJWagner on Saturday April 11, 2020 @01:35PM (#22842883)
Yes, indeed. I started as a bank programmer, working on an IBM mainframe.

At night, nearly the whole machine was consumed by batch processing. If there was some problem that required a late-night fix, it was worked out first on green-bar print of the program, using hex to determine what was in the registers. Then the code could be submitted via ICCF, but the wait for a compile could take literally hours. If you mis-typed something (say a forgotten period), the compile would fail and you would have to resubmit the job. Waiting hours again!

Re:IBM will offer free COBOL training by zepearl on Saturday April 11, 2020 @02:20PM (#22843161)
> But as time passed and computer time became cheaper many of those formal development practices started to get lax.

I agree.

~15-20 years ago we used to have some teams which were specialized in creating flowcharts for anything that had to be implemented.

Nowadays I do a bit of everything (project mgmt, development, support, analysis, etc...) and in my area I'm the only one drawing logical overviews (very primitive stuff - I use "MS Visio" and I like it a lot) whenever we have to implement something that has the potential to become a bit challenging => so far I've always been very happy of having done that (all conflicts/complications/flaws/etc... of the proposed logic are then caught already at that stage, therefore no problems later during the core dev phase and we have as well less problems with the resulting implementations).

Re:IBM will offer free COBOL training by Zenst on Saturday April 11, 2020 @12:16PM (#22842421)
YIP I trained early 80's in JSP, didn't even learn GOTO was a verb, as could code around using it with JSP.

Then you hit reality and all the baggage legacy code has as well as standard, JSP did not traction well and when it did - well maintenance of code......lots of legacy spagetti out there.

WHy is COBOL still in use, its a robust data processing language and that is the bulklk of things - batches of data that need processing, mailing lists for the post, bills.

COBOL does handle data well if you want to know when it rounds/how it rounds and have and trancation....Formating ourput. This was at a time that no other could fit the job and all runs upon robust hardware designed not to fail as much as your consumer affairs that were still a glint in many eyes.

So the legacy grew, bloated. I've worked on a fair few migratioin projects for a software house and the costs to migrate you large blob of legacy code on legacy hardware to run upon something modern is not a quick process, not cheap and so much planning and due dilligence as well as data integretary and testing involved alone is a huge costs.

SO you end up with legacy code hanging in there as no managment team can justify a 6-10 year budget in the mindsets that work upon a 5 year plan and budget.

WHich ends up with many systems being literally too big to fail and too costly to ever be full migrated as the risk/costs just grow and management with the guil and drive to push against the status quo in management is often a path to career suicide, so they carry on with the heard mentality that management prevail. With those that do stick their neck out being of two types, those who care and know what's needed and those who just want to be seen to be doing something big, run into it, then the rush decisions unfold and before you know it, they have already flown off to another company saying how they initiated a project that will die a horrible death not long after they left as people realised what a mess and the true costs involved are.

Hence many reasons why COBOL still around today, it just works and in some ways you can't knock legacy. Nokia phones, work for days, just work and do the job of being a phone. So for that task they do the job much better than anything modern, however the modern android and iphones do much more, bells and whistles of all flavours and yet if you just want to, or need to make a call, overall they are not as robust compared to using an old nokia, that just works and works well for the task at hand.

This and the mentality, if it works, don't change it does have merit and is something you learn over time.

But there is always hope, so bits can be pulled away from the legacy and if planned and managed right by people who know what is needed and the business needs as well as requirements and mindful of minimising risk and interruption, there will always be a way.

Though I've seen many a project with the best in the world be doomed from the start as the bites of the cake made it an all or nothing approach and nobody wants to wait or budget/plan for something that takes longer than 5 years in software in the business customer world. ALways exceptions, but then many are planned for 5 years when known will take longer on the basis that 3 years in you push a new 5 year plan out and bolt on a few trinket features and justification to hide the fact that it was never going to go fluid and end up on target.

Best approach, bit by bit, batch processing and the like can be more easily migrated, though the data as always and interacting with that will always be as big a part of any migration than the code.

But yeah GOTO, when your working on code that needs performance and the platform is more costly to upgrade than most, you will see much use of GOTO in the code. Then you get wonderful things like variable length records that many won't even know about and unaware that in COBOL you can define a say a top level record definition as 80 character and then redefine that with a PIC(x) OCCURS DEPENDING UPON VARIABLENAME. Then write that feild and get variable length records stored and save data storage and other expensive resources that we take for granted today. So yes, many gotchas and creativity to eek out performance and reduce storage costs.

WIth that, GOTO is not your biggest problem with legacy code of the COBOL flavour, let alone linked in machine code specially crafted to do a sort upon the data as was faster and now nobody knows what that blob actually does or how to change it, so yeah, lots of traps in any legacy code of any flavour.

Re:IBM will offer free COBOL training by mycall on Saturday April 11, 2020 @06:39PM (#22844750)
> Mainframes were rented back in the day, you paid by resources consumed, terminal time was precious, and mainframes were often turned off outside business hours.

Sounds very cloud

Re:IBM will offer free COBOL training by p_l on Sunday April 12, 2020 @08:21AM (#22847753)
Cloud is return of the "computer centre" model of old, similarly billed by usage and with various level of vendors services provided.
Re:IBM will offer free COBOL training by WorldMaker on Monday April 13, 2020 @03:50PM (#22859328)
Which is why everyone should be laughing at IBM Cloud right now for not succeeding that well at IBM's original business model. ;)
Re:IBM will offer free COBOL training by closeparen on Saturday April 11, 2020 @08:25PM (#22845209)
Azure Stack Hub and AWS Outposts are both fairly mainframe-like: you rent racks for your physical premises that are essentially opaque to you, managed by the cloud provider, and bill according to usage.
Re:IBM will offer free COBOL training by walshemj on Saturday April 11, 2020 @08:45AM (#22841374)
I doubt that mainframes where turned on and off every day even later with super mini's we left them powered up
Re:IBM will offer free COBOL training by nosborn on Saturday April 11, 2020 @09:20AM (#22841532)
Every mainframe I worked on until the mid-80s was turned on by the first person to arrive in the morning and turned off by the last to leave in the evening.
Re:IBM will offer free COBOL training by p_l on Sunday April 12, 2020 @04:38PM (#22850883)
Many sites had operations plan that involved weekly or biweekly "IPLs" done on weekends.
Re:IBM will offer free COBOL training by walshemj on Tuesday April 14, 2020 @04:50PM (#22871268)
Doesn't mean the power was off