Experience, Information Technology

The Best Part of Low End

As I get closer and closer to the cranky old man stage of life I get pickier and picker about my monitors and office lighting. I also find supposed high end products intolerable.

Anyone who reads this blog knows I write a lot of books. “The Minimum You Need to Know About the Phallus of AGILE” is off for final editing. I have two more books that are somewhere between 2/3 and 3/4 of the way completed. Those who visit the Interesting Authors blog were exposed to early (and ugly) drafts of their early chapters.

Over the course of the past few weeks I’ve been waxing nostalgic for my days of COBOL. This has lead me to experiment with GnuCOBOL under KDE Neon 64-bit. This is Yet Another uBUntu (YABU) Linux distro. I’ve also been kicking around various editors and IDEs, even giving UltraEdit another try. Just haven’t had the time to see if they actually fixed the C/C++ standard formatting. What is with editors like Atom, Sublime Text 3, and UltraEdit wanting you to hack default configuration files instead of providing options in menus? This is not a good trend though many seem to be following it. A previous post about Sublime Text 3 and COBOL may have given you some idea of what I was doing now.

Why so many things? There is no IDE for GnuCOBOL. Yes, during my days on OpenVMS I gladly used EDT or LSE, then ran a stand alone debugger. I would still do it today if the billing rates weren’t all illegal alien wages. The one thing that made it great, besides OpenVMS, was the debugger. It was screen oriented and worked with any language back when PC’s were selling retail with only two floppy disks installed.

The massively overweight Eclipse was my first knee-jerk impression. Let me save you some time. The COBOL plugin is horribly broken. By that I mean it will not install from the marketplace. Fine! I did some digging and found out where it lives. I followed the manual install instructions. Managed to install, but it crashes and burns when you try to start a COBOL project. Despite my not favorable impression of Eclipse, this could have justified its existence.

Someone pointed me to the OpenSource version of Visual Studio Code, VSCodium. The one without evil empire tracking information built into it. I installed it and the COBOL plugin for it. I also installed the OpenVMS IDE plugin. Don’t install both of these together. I no longer have my DS-10 Alpha (and don’t want another) but I did want to kick the tires on that plugin at some point. If you install both the COBOL plugin jumps off a cliff. Uninstalling the VMS IDE plugin made the COBOL plugin “work”. It can’t really “work” until version 3.1 or greater of GnuCOBOL is released. A compilation switch has been added to make things nicer. You can read a bit about it in this message thread.

One thing is for certain, the $299 SlickEdit Pro didn’t handle GnuCOBOL like an IDE. I uninstalled that trial within half an hour of getting the trial license key. The makers of SlickEdit need a 5 active install, $99/year license like UltraEdit if they want to be taken seriously. UEStudio would have been worth looking at, but it doesn’t run on a real operating system so why bother?

I honestly hoped KDevelop had a COBOL plugin. A quick search of the user forum shows quite a few people interested in COBOL, but so far nobody interested in developing the plugin others are waiting for. I like KDevelop because it is built around/using KATE. One of the reasons I was paying $99/year for UltraEdit was clients kept forcing me to use default Ubuntu desktop for development. Yes, QtCreator is great for Qt development, but you need another really good editor for all of your cutting and pasting and note taking. That’s what I used to use KATE for.

UltraEdit has always had a “feature” (inexcusable bug) that has pissed me off to no end over the years. It’s a burr under the saddle that just rubs both horse and rider raw. It happens when you have told UE to use spaces instead of tabs. The tab size value isn’t correct.

empty file with cursor in first position image
empty file with cursor in first position

With tab size set to 4 an IT oriented user would expect the first “tab stop” to be at 4, then multiples of 4 across the page.

after first tab key image
after first tab key

 

after second tab stop image
after second tab stop

Like I said, the cranky old man stage of life waits for all of us if we live long enough no matter what gender we are born as. For as long as I can remember this bug has existed in UltraEdit when using spaces and it is just ()&*)(*&ing annoying! In the new new new new world of COBOL it is a catastrophe. Why?

cobol fixed format sample image
cobol fixed format sample

In fixed format COBOL, Area-A starts in column 8, Area-B starts in column 12, columns 1-6 are for line numbers, column 7 is the comment/continuation, and column 72 is quite literally the end of the line. In “modern” fixed format COBOL, they tend to skip the line numbers.

modern fixed format cobol image
modern fixed format COBOL

In short, you need a tab size of 4 to actually be 4 when inserting spaces instead of tabs. This means if the cursor is sitting in column 1, you only insert 3. In fact, at all times you take the current cursor position, subtract it from the next highest multiple of 4, and insert exactly that many spaces so the cursor lands in said multiple of 4.

Now that I’ve issued this severe beating, it should be noted that UE does handle syntax highlighting correctly in both fixed and free format COBOL.

COBOL free format UE image
COBOL free format UE

That is something notepadqq doesn’t do or at least doesn’t do in an obvious manner.

notepadqq COBOL image
notepadqq COBOL

Notice how the first 6 characters are blue? That’s because it is hard coded for fixed format (or at least not an obvious way to enable free format.)

notepadqq COBOL fixed format image
notepadqq COBOL fixed format

There is supposedly some hack I can write to make UE auto-generate zero filled line numbers spacing them by 10. I just haven’t had time to try. I’m not certain I want to pay that kind of money _and_ have to fix that myself, especially since it sounds like I’m going to have to hack the default C++ template so it doesn’t force K&R on me. No, I don’t care what your argument is. If your C/C++ coding style involves this:

if (fred) {
    /* do someting */
} else {
    /* do something else */
}

Where they “{” is on the same line as the if and the “}” is on the same line as the else you are using the archaic K&R style. Java also uses this style and it hasn’t been a valid coding style since about 1985, neither is any style based on it.

In it’s defense, I really like the color schema notepadqq uses for COBOL. I “think” one should be able to hack the existing cobol.js file to make it fixed/free sensitive.

Sublime Text doesn’t do a bad job. Unlike UltraEdit, I can click the line numbers in the output window for errors and be taken to them. You just can’t debug even with the GDB debug plugin.

line numbers compiled with -free
compiled with -free

There might be yet another hack I can do to UE to make that work but I think you are starting to see the lack of appeal when it comes to paying an annual fee for something that I not only have to hack, but have to keep those hacks on-line so I have them when I travel to a client site and have to use one of their development machines for 6-12+ months. Sublime Text 3 was something like $25 back when I bought it and good forever. (I do think it is around $80 now.) If they come out with the same one time fee no matter how many times you install deal for Sublime Text 4 in a few years, yeah, I’ll do that. So far I haven’t actually had to hack hidden files. I’ve installed a few plugins and tweaked a couple of user/configuration settings using menu options. I didn’t have to find the super secret directory where they hid the file on this platform.

Why then, the title of this blog post?

Ah grasshopper. You’ve been reading my books and my blogs for years (or you should have been!) The journey is more important than the destination. I don’t write for the Twitter generation, I write for people who can think for more than 140 characters.

My waxing nostalgic for COBOL (and an academic on-line who knows less than nothing talking out his ass) got me to do some COBOL programming and COBOL research again. I’ve once again been spending an ocean of time in text editors and LibreOffice. My eyes have become more sensitive as I age and I’ve become pissed off at all of the “dots” I see making up text on my screens.

Yes, that Zotac branded NVIDIA card with 384 CUDA core would make BOINC crunch like the dickens and complex images would appear quite clear, but plain old text looks more and more like it was printed on the screen by an 8-pin dot matrix than some high end combination of graphics card and monitor. I have to get a long way from the monitor before that collection of dots looks like a “solid” character. In truth, with or without my glasses, the monitor has to be a good twelve inches past the end of the fingers on my outstretched arm before enough of a blur effect happens to push the dots together.

Believe it or not, the ViewSonic Super CLEAR IPS monitor I’m using right now looks even worse than the VG2732m-LED monitor sitting beside it connected to the same video card on the same computer.

For the past few days I’ve been hacking this 7th-gen i7 HP EliteDesk. I suspected the NVIDIA based card just kind of sucked at text. The machine has a built in Intel HD card, so why not use it?

intel built in graphics image
Intel built in graphics

Intel HD Graphics cards, Skylake in particular, have a lot of issues under Linux. There is a continually recurring bug where two monitors are found, but only one displays anything. Yesterday I didn’t really have time to fight with it so I snagged an old MSI (Radeon based) video card out of my spare parts drawer and stuck it in. I wish my attempts at taking a picture yielded something I could be certain would show up on a Web page. Most of the dots were gone?

Why was that video card one of half a dozen “spare” cards in that massive drawer? AMD ceased supporting it with the stuff that became part of Ubuntu 18.04. The “free” driver doesn’t make the GPU available to BOINC so I had to obtain another of those NVIDIA based Zotac cards. (I can usually find them for $50 or less, probably also one of the reasons I see dots.) They certainly make BOINC crunch numbers when I’m not at the keyboard!

Today I was miffed. I really wanted to solve my built-in Intel video problem. When I got to the office after running errands I re-read _all_ of the posts in that bug link. Please allow me to tell you how to solve your problem of second monitor displaying either nothing or horrible looking stuff when Intel HD graphics are involved. Oh, laptop users, you are screwed.

  1. Power down.
  2. Open your case.
  3. Install any non-Intel video card you have available which will fit an existing slot and connect monitor(s).
  4. Close case.
  5. Boot Linux.
  6. Open a terminal.
  7. sudo apt purge xserver-xorg-video-intel
  8. Power down.
  9. Open your case, remove installed video card, connect monitors to ports of your built-in video card, close case.
  10. Boot Linux.

This fixes the problem. My text is about as grainy as it was with the higher end NVIDIA based card. At some point tomorrow I may be forced to install the really old MSI card because text looked a lot cleaner.

Companies writing drivers for Windows do, and Windows itself does a lot of cheating when it comes to making text look solid. On the Linux platform few developers take the time to make text look as solid as a green phosphor letter.

You’ve probably guessed one of the books I just started writing; “The Minimum You Need to Know About GnuCOBOL.” What you probably haven’t guessed is where I landed for a COBOL “IDE”

Emacs

Yeah, I didn’t think I would ever install something that heavy again. Well, that heavy excluding the total tonnage of Eclipse.

I’m not certain but Emacs just might be the last place Lisp still exists. I vaguely remember having to write portions of an Algol then a Lisp compiler back when I was working on a masters degree.

I really did try a lot. If I was willing to push a bolder up hill with my nose, I probably could have dug into Anjuta and got it working with the compiler and debugger.

Anjuta old fixed format image
Anjuta old COBOL fixed format

 

Anjuta COBOL new fixed format image
Anjuta COBOL new fixed format

 

Anjuta COBOL free format image
Anjuta COBOL free format

I suspect the reason the 2 lines are in RED is this free format isn’t quite as “free” as others. It most likely wants SELECT and a few other things to start where Area-B would have them when using fixed format.

Summary

While waiting for my next contract to come along I am now writing four different books.

  1. “Dream Recorder”
  2. “Twenty of Two – The Infamous They”
  3. “The Minimum You Need to Know About GnuCOBOL”
  4. “The Minimum You Need to Know About GUI Emacs”

Too many Emacs books focus on just the terminal. Yes, there are hundreds of “free” sites listing 20-30 commands, just enough to really get into trouble. Yes, there are probably a hundred or more Emacs books out there right now. Most focus on Emacs in a terminal or simply add credence to the old mantra

If Emacs had an editor it would be one Hell of an operating system!

Yeah, I’ve heard it, I’ve said it, and I’m living it again.

To those who say “How can you keep all of those books straight?” that’s easy. Work on one until you get tired or lose the spark, then work on another. I’ve done the one-book-for-an-entire-year thing. That was “The Minimum You Need to Know to Be an OpenVMS Application Developer.” It’s really hard to maintain a spark for that long. Taking a few weeks or months off to write about something else that interests you then coming back to an older piece is rejuvenating, or at least it is for me.