What was on YOUR mind the morning of your wedding?

It's a few years back, and this programmer pilot fish has two things on his mind: his upcoming wedding and the thorny problem of triggering terminal screen updates in near-real-time as data changes.

"I had been working on the screen-updates problem at work for days without coming up with a decent solution," says fish. "I really needed to handle updates without completely rewriting every screen."

Trouble is, the changes can be triggered by actions from the corporate mainframe, or up- or downstream users, or real-time controllers on the production floor. And each screen is from an independent program with different actions that cause different data items to change in different tables and columns, which in turn impact other screens.

And pretty much every approach fish tries is a mess -- or at least too messy for a production system.

Then, the morning of his wedding, fish is in the shower getting ready for the big day when the answer comes to him.

"You create a controlling process," fish says. "Each screen sends a message to the controller with what it has done. The controller has a table that matches the incoming change to screens that would care about it. The controller then messages just those screens with the change and the key.

"Both the outbound and inbound screen messages can largely be handled in the common screen-handler code, thus minimizing the amount of code that has to change. The screens are already message driven because that's how the terminal I/O and data are communicated around..."

Fish's two teenage brothers, who have spent the night at his house, find fish a few minutes later in his bedroom, wrapped in a towel with his hair dripping, furiously writing down notes and diagrams sketching out the solution.

They think he's lost it.

Fish, on the other hand, knows he just needs to get his brilliant solution down on paper so he doesn't have to worry about forgetting it during his honeymoon.

"Except for some minor details, the solution was implemented as designed," says fish. "I use that example to this day when getting my boss to understand that a short break from work can have better results than slogging along."

Sharky always has just one thing on his mind: Your true tales of IT life. Send them to me at sharky@computerworld.com. You'll snag a snazzy Shark shirt every time I use one. Add your comments below, and read some great old tales in the Sharkives.

Get your daily dose of out-takes from the IT Theater of the Absurd delivered directly to your Inbox. Subscribe now to the Daily Shark Newsletter.

To express your thoughts on Computerworld content, visit Computerworld's Facebook page, LinkedIn page and Twitter stream.
Windows 10 annoyances and solutions
Shop Tech Products at Amazon
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.