The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,284 other followers

Archive for the ‘Hardware’ Category

I still print (relevant parts of) code. Have been for a long time. Will keep doing it.

Posted by jpluimers on 2021/02/24

In a response to [WayBack] Iris Classon on Twitter: “I’m curious, how many of you guys and gals have printed out code on paper to read later? Doing it during earlier years also counts 🤓”, I started the long read below starting with [WayBack] Jeroen Pluimers on Twitter: “Still do.… “.

Basically a more in depth coverage of my 2017 post Happy 60th birthday, Fortran.

[WayBack] Thread by @jpluimers: “@IrisClasson Still do. @IrisClasson There is a story behind these 1988 tractor feed print outs, which follows shortly. I should put dinosaur […]”

Still do.

There is a story behind these 1988 tractor feed print outs, which follows shortly.

I should put dinosaur or old-fart on my job description.

CC @isotopp

The story has to do with this.
A “translation” of [WayBack] Programming Fortran 77: A Structured Approach (ISBN-10: 0835956717) but I wish I had had the original back then, as in fact it was a knock off, mostly covering FORTRAN IV and 66.

Sidestory: these books were from the same era.

Machine learning and AI modern?

They are about as modern as AWK. Both still relevant though.

AWK is indispensable on many *n*x related systems, especially the low powered one. The book is still the ultimate source on it; see [WayBack]

text processing – Is there still any reason to learn AWK? – Stack Overflow

If you quickly learn the basics of awk, you can indeed do amazing things on the command line.

But the real reason to learn awk is to have an excuse to read the superb book The AWK Programming Language by its authors Aho, Kernighan, and Weinberger. You would think, from the name, that it simply teaches you awk. Actually, that is just the beginning. Launching into the vast array of problems that can be tackled once one is using a concise scripting language that makes string manipulation easy — and awk was one of the first — it proceeds to teach the reader how to implement a database, a parser, an interpreter, and (if memory serves me) a compiler for a small project-specific computer language! If only they had also programmed an example operating system using awk, the book would have been a fairly complete survey introduction to computer science!

Famously clear and concise, like the original C Language book, it also is a wonderful example of friendly technical writing done right. Even the index is a piece of craftsmanship.

Awk? If you know it, you’ll use it at the command-line occasionally, but for anything larger you’ll feel trapped, unable to access the wider features of your system and the Internet that something like Python provides access to. But the book? You’ll always be glad you read it!

Back to the story. With some side-steps to (:

Here we go…

This is end 1980s. I was a student. A year later I started my own consultancy as a side-thing.

The reason is that I had a client prospect for some PC Turbo Pascal programming. So I needed to buy some hardware. Only companies could buy hardware. So I started one.

2 years later, I was selling PC network hardware to a university research group, so they could connect to the internet. At 75% of what they would pay via their regular channels. My profit was large enough to cover for that year of studying.

Back to the print-outs.

They were on tractor-feed paper
We had a class: computer usage for chemistry students. It was mandatory. They were teaching from a FORTRAN 77 book that was in fact more FORTRAN IV and FORTRAN 66. Found a link to it too: [WayBack] Cursus Fortran 77, R.C. Holt, J.N.P. Hume

The way you would program in that class was via PC terminals with serial terminal emulation, connected to a VAX 11/780 machine running VAX/VMS 4.7.

The connection was through a multiplexed serial over an unshielded ribbon cable some 300 yards long.
The connection was very reliable: about 90% of the characters would transmit correctly.

So I had to reset the VT52 terminal emulation over the Kermit protocol every minute or so, then wait a dozen seconds for the screen to re-draw.

At the chemistry department it was still a VAX 11/780 machine called HLERUL5, but at the computing department they had an 11/750 called RULCRI which was faster.

They also had a bunch of VT100 terminals that could do 132-columns instead of 80, with a far more reliable connection.

Later the chemistry department also got their own VAX 11/750, renamed the old one to HLERUL52 for the 2nd years studens to to work on, and kept the old HLERUL5 name.

The machines were networked too, so you could connect to one, then daisy-chain your logon to the others.

Long story short: later I managed to get official accounts on both chemistry department machines, and borrow an account on the computing department one. So I had accounts on HLERUL5, HLERUL52 and access to RULCRI when needed.
Later too, I found out that the room above the VAX 11/780 also had VT100 terminals (later even two VT240 terminals!). It wasn’t meant for student use though. But with some social engineering…

In the mean time, I wanted to make better use of the VAX/VMS FORTRAN compiler.

Apart from that it fully supported FORTRAN 77, it also had many more language features and had support for 132 columns instead of just 80.

Given FORTRAN had limited use of the leftmost 8 columns, having 124 usable columns instead of just 72 made a huge difference in readability.
There was no book in the library on VAX/VMS FORTRAN, but the on-line help was great: both vast and in-depth. With the bad serial documentation though, it was very hard to read on-line.

The easiest way to read things was on paper. I think the printer back then was a LA36 DecWriter II or LA120 DecWriter III

Printing one topic at a time however was cumbersome. Print jobs were not always printed in the right order, and sending like a 100 print commands that all were slightly different was hard too.
Luckily I found out two things:
  1. you could dump the output of a FORTRAN HELP page to a file
  2. you could recursively generate all FORTRAN HELP, then redirect that to a file
The recursion was great, as it would output everything in an orderly fashion. What was lacking though is a good table of contents. More on that in a bit.
So I decided to send that file to the printer. Of course I knew that would take something like an hour, so I printed it during lunch time.
I was back from lunch early to monitor the printing progress (VAX/VMS had queues for everything, and you could monitor the ones or the parts of ones you had access to!).

The printer was right next to the VAX 11/780 and both of them were very noisy. The climate control was even noisier, which meant you wanted to avoid that room whenever possible.

So shortly after my job was ready, I wanted to pick it up and make the 300 meter walk twice.

Right at that moment, the student assistent walked in with a red face, madly screaming “who the hell printed this one inch stack of FORTRAN help”.
I responded that I did. At first she (this was a time when we had a way better balanced female/male ratio in STEM) would not even want to give my output, refusing to believe I would read it.
She also would not believe that you cour recursively send the help to a file, then print it. But the stack of paper demonstrated otherwise.
I explained that I was going to read the whole stack. It took a long weekend, as after reading, I manually made the hand written table of contents on the front.
In addition, I colour marked the sides of the paper matching the entries in the table of contents.

Now I could index into the right topics very quickly.

She was amazed I did all that in just a weekend. Apparently, that’s how my brain copes with information: need something, read something, read something, use something.

Later she actually made use of that stack of paper, as it was a great way for other people too to figure out some things faster than doing it on-line.
Back to my side-business: that’s the reason for the PASCAL stack of paper. It’s the output of the VAX/VMS help for the PASCAL compiler. It was great and helped me learn a lot on the language.

That print job took far less time: it was printed from RULCRI to the printer at the computing department. Their printer was not a dot-matrix one, line printer. It was orders of magnitude faster.

3 years later, I started doing more and more work with Turbo Pacscal and made the business my full time work.

Only a decade later, I found out why I had deverted less and less energy into my studies and more into work.

Two reasons: computers are way easier to cope with than people, and a theoretical university was totally the wrong kind of environment for my learning mode: I am an auto-didactic person. I need to do things in order to learn.
By now I have slowly learned way and way more about people. Coping with them is still tough, taking a lot of energy. But by now it is also a lot of fun. Though doing both at the same time is still very very hard for me.

Finally back to the STRUCT print job:

That was actually the FORTRAN program I developed for the assignment.

You could choose from multiple problems to solve during the assignment.

As one of the few students, I managed to finish it in-time.

I was the only one that took this particular problem.

The essence is that you got a few tables with data:

  • atom numbers, atom abbreviation and atom covalence (the number of other atoms they can bond with)
  • bond pairs with abbreviations and minimum/maximum distance
  • atom locations (abbreviation plus X/Y/Z coordinate)
The goal was to find which atoms were connected, and describe any cycles.

Only after reading the tables, then trying to solve the problem, I found out a recursive solution was needed to solve it.

Boy was I surprised that FORTRAN did not support recursion.

In the end, I implemented my own recursion with stacks citing a Dire Straits song with “and when you finally reappear, at the place where you came in…”.

A long story to explain I started printing on things to read very early on (:



Read the rest of this entry »

Posted in Algorithms, Development, Fortran, Power User, Printers, Software Development | Leave a Comment »

Automatically closing ABBY Finereader 5.0 windows after scanning is completed

Posted by jpluimers on 2021/02/23

Both my Fujitsu ScanSnap ix500 and ix100 scanners can be used from Windows to automatically scan to PDF.

PDF conversion is done through the included ABBYY FineReader 5.0 software.

However, on each scan, it keeps a dialog open with the scan results, even if scanning went fine.

When scanning lots of documents, lots of dialogs are open, causing two problems:

  • a lot of memory and window handle resource usage
    • this can be ~100 megabytes per instance
  • a lot of disk usage:
    • it keeps both the non-OCR and OCR PDF files active (only when closing, the non-OCR PDF file is deleted)

I wanted to close that dialog automatically, but none of the configuration settings allow it.

So I wrote a quick and dirty solution, that could have been in any tool supporting the Windows API and call backs. The solution below should easily translate to tools other than Delphi.

These are the only Windows API functions used:

these types:

and these constants:

The basic structure is an EumWindows call passing a callback that gets called for all top level Windows, then in the callback, for matching captions: call EnumChildWindows with another callback. In that callback, for matching captions and child captions, perform a click or close.

Related posts:

Log of Windows related to both programs:

ParentHWnd=$00000000;HWnd=$00030602;IsVisible=-1;IsOwned=0;IsAppWindow=-1;WindowTextLength=33;WindowText="ABBYY FineReader for ScanSnap 5.0"
> Recursive child windows for ABBYY
  ParentHWnd=$00030602;HWnd=$000205EA;IsVisible=-1;IsOwned=0;IsAppWindow=0;WindowTextLength=74;WindowText="Register your copy of ABBYY FineReader and receive the following benefits:"
  ParentHWnd=$00030602;HWnd=$000205E8;IsVisible=-1;IsOwned=0;IsAppWindow=0;WindowTextLength=25;WindowText="- Free technical support;"
  ParentHWnd=$00030602;HWnd=$000205E6;IsVisible=-1;IsOwned=0;IsAppWindow=0;WindowTextLength=51;WindowText="- Information about new versions of ABBYY products."
  > Child is Close button: clicking.
  < ParentHWnd=$00000000;HWnd=$00030602;IsVisible=-1;IsOwned=0;IsAppWindow=-1;WindowTextLength=33;WindowText="ABBYY FineReader for ScanSnap 5.0"
  ParentHWnd=$00030602;HWnd=$000205F6;IsVisible=-1;IsOwned=0;IsAppWindow=0;WindowTextLength=34;WindowText="Processing finished (warnings: 1)."
  ParentHWnd=$00030602;HWnd=$000205F4;IsVisible=-1;IsOwned=0;IsAppWindow=0;WindowTextLength=31;WindowText="Converting to searchable PDF..."
  ParentHWnd=$00030602;HWnd=$000205D2;IsVisible=-1;IsOwned=0;IsAppWindow=0;WindowTextLength=63;WindowText="Page 1. Make sure the correct recognition language is selected."

ParentHWnd=$00000000;HWnd=$00010248;IsVisible=-1;IsOwned=-1;IsAppWindow=0;WindowTextLength=14;WindowText="Creative Cloud"
> Recursive child windows for Creative Cloud
  ParentHWnd=$00010248;HWnd=$0001024A;IsVisible=-1;IsOwned=0;IsAppWindow=0;WindowTextLength=28;WindowText="Main Container Client Dialog"
  ParentHWnd=$00010248;HWnd=$00020350;IsVisible=-1;IsOwned=0;IsAppWindow=0;WindowTextLength=18;WindowText="Sign in - Adobe ID"
  > Child is Signin button: closing parent.
  < ParentHWnd=$0003011A;HWnd=$00010248;IsVisible=-1;IsOwned=-1;IsAppWindow=0;WindowTextLength=14;WindowText="Creative Cloud"
    < ParentHWnd=$00000000;HWnd=$0003011A;IsVisible=0;IsOwned=0;IsAppWindow=0;WindowTextLength=4;WindowText="Core"

It appears that ABBYY has a different set of booleans than Creative Cloud.

This is kind of odd, as delphi – How to get captions of actual windows currently running? – Stack Overflow points to Window Features – Windows applications | Microsoft Docs: Owned Windows stating:

The Shell creates a button on the taskbar whenever an application creates a window that isn’t owned. To ensure that the window button is placed on the taskbar, create an unowned window with the WS_EX_APPWINDOW extended style. To prevent the window button from being placed on the taskbar, create the unowned window with the WS_EX_TOOLWINDOW extended style. As an alternative, you can create a hidden window and make this hidden window the owner of your visible window.

Apparently, ABBYY fully plays by the rules, but Creatheive Cloud cheats a bit: none of the Windows are WS_EX_APPWINDOW, but the hidden unowned “Core” owner of the “Creative Cloud” still makes it appear on the taskbar.


Read the rest of this entry »

Posted in Delphi, Development, Fujitsu ScanSnap, Hardware, ix100, ix500, Power User, Scanners, Software Development, Windows Development | Leave a Comment »

One second code: Do YOU know how much your computer can do in a second?

Posted by jpluimers on 2021/02/11

[WayBack] One second code: Do YOU know how much your computer can do in a second? is a quiz version of the [WayBack] Numbers Every Programmer Should Know By Year.

[WayBack] About this game revealed it was made by 3 people curious in the speed of their hardware which – not surprisingly – has been relatively stable over the last decade or so.

Source code is at [WayBack] GitHub – kamalmarhubi/one-second: Fun performance game!

I bumped into it via these tweets:

I like games like this (ever played the The Deadlock Empire multi-threading game?), so I played the tests, and learned a lot:

[WayBack] Thread by @jpluimers: “@astropuffin @b0rk @yminsky 9/18 here. Not sure that is poor, as I learned a lot from it. This is what I learned after industry for 30+ years: “

  • Google being a 3 millisecond ping away made me guess query frequency to be ~100 Hz. Here, curl can dot it at ~15 Hz. Seems most are less lucky.
  • Knowing Linux fork being fast, I was amazed how many magnitudes it is faster than process start.
  • @b0rk’s SSD is way faster than mine which made my estimation of 10 million bytes/second write speed too slow.
  • SSD and interface speeds have improved more than I thought.
  • The grep implementation is way faster than I anticipated.
  • Parsing of msgpack is only an order magnitude faster than parsing JSON. My guess was at least two orders of magnitude.
  • I assumed SQLite did everything in memory, and kept SQL statements prepared, so I was 2 orders of magnitude too high on both the indexed and non-indexed query.
  • Boy, md5 is much faster and bcrypt much slower than I thought. Again 2 orders of magnitude wrong. On both sides.

Definitely stuff to show some development and operations teams. Including of course the interactive graph … (be amazed at the things that have staid constant speed over time)

The game brings the latency numbers way more in perspective than I thought. For background reading, see Latency Numbers every Programmer and Architect should know.

For more things on perspective, two videos below:

  • the famous “Grace Hopper explains the nanosecond”
  • Jeff Dean lecturing at Stanford: “Building Software Systems At Google and Lessons Learned”



Read the rest of this entry »

Posted in Development, Hardware, Power User, Software Development | Leave a Comment »

A choco install list

Posted by jpluimers on 2021/02/03

Sometimes I forget the choco install mnemonics for various tools, so here is a small list below.

Of course you have to start with an administrative command prompt, and have a basic Chocolatey Installation in place.

If you want to clean cruft:

choco install --yes choco-cleaner

Basic install:

choco install --yes 7zip
choco install --yes everything
choco install --yes notepadplusplus
choco install --yes beyondcompare
choco install --yes git.install --params "/GitAndUnixToolsOnPath /NoGitLfs /SChannel /NoAutoCrlf /WindowsTerminal"
choco install --yes hg
choco install --yes sourcetree
choco install --yes sysinternals

For VMs (pic one):

choco install --yes vmware-tools
choco install --yes virtio-drivers

For browsing (not sure yet about Chrome as that one has a non-admin installer as well):

choco install --yes firefox

For file transfer (though be aware that some versions of Filezilla contained adware):

choco install --yes filezilla
choco install --yes winscp

For coding:

choco install --yes vscode
choco install --yes atom

For SQL server:

choco install --yes sql-server-management-studio

For web development / power user:

choco install --yes fiddler

For SOAP and REST:

choco install --yes soapui

If you don’t like manually downloading SequoiaView at (

choco install --yes windirstat

For drawing, image manipulation ( last, as it needs a UI action):

choco install --yes gimp
choco install --yes imagemagick
choco install --yes

For ISO image mounting in pre Windows 10:

choco install --yes wincdemu

For hard disk management:

choco install --yes hdtune
choco install --yes seatools
choco install --yes speedfan

For Fujitsu ScanSnap scanners (not sure yet this includes PDF support):

choco install --yes scansnapmanager


Posted in .NET, 7zip, Atom, Beyond Compare, Chocolatey, Compression, Database Development, Development, DVCS - Distributed Version Control, Everything by VoidTools, Fiddler, Firefox, Fujitsu ScanSnap, git, Hardware, Mercurial/Hg, Power User, Scanners, SOAP/WebServices, Software Development, Source Code Management, SQL Server, SSMS SQL Server Management Studio, SysInternals, Text Editors, Versioning, Virtualization, Visual Studio and tools, Visual Studio Code, VMware, VMware ESXi, Web Browsers, Web Development, Windows | Leave a Comment »

Node-RED is on my research list.

Posted by jpluimers on 2021/01/19

Cool stuff that is on my research list: redundancy through Node-RED.

NodeRED Multi-Node Redundancy Example – YouTube:

A simple proof of concept showing how to implement multi-node redundancy using four NodeRED instances, with Modbus TCP Remote IO.

Example Flow:…

Parts used:

  • WAGO
    • 750-352 Ethernet Coupler ModbusTCP
    • 750-1506 8ch DI/DO 24VDC Module
    • 750-461 RTD Module
    • 750-600 End Module
    • 787-1602 24VDC 1A PS
    • 789-801 DIN push button
  • Raspberry Pi 3b +
  • DIN Rail mount:


Read the rest of this entry »

Posted in Development, Hardware, Software Development | Leave a Comment »

%d bloggers like this: