Internet scam. Phishing attempt - fake cash prize winner popup banner. (c) –

Modal Dialogs

May 12, 2024

I did a lot of Windows-based programming in the last decade or so of my career. Windows programs are ‘event’ driven. When I first started, I worked in languages like COBOL and BASIC.

I believe most early programming was considered ‘waterfall’ programming. In waterfall-type programming, each step executes sequentially and completes before the next step is started. When all steps are completed or something causes an abnormal end, the process is started all over again.

Windows programming is ‘event’ driven. That means that tasks are done when an event occurs. What is an event? Events are things like clicking a mouse button. Right, left, and center clicks are events. ‘Mouse down’ part of a click is an event as is ‘Mouse up’. There are scads of possible events: moving a mouse right, left, up, or down, scrolling through a list, checking/unchecking a box, selecting an item in a list, or typing any character. When typing, ‘Key down’ is an event as is ‘Key up’. Events are often a couple of smaller events. A programmer simply places instructions where the computer looks when any event is triggered. Any event can set off any number of actions.

I’m sure for non-programmers this has already become tedious but, if you are an Internet user, you might find some other characteristics of Windows programming interesting. One that I used, but also worry about, is called ‘modal’ dialog boxes.

A dialog box is a small frame that presents a message on the screen with one or more options, dialog with the user. It might just say ‘Click OK to Continue’ and present an OK button. These are necessary because Windows, as the name suggests, talks to you through use of screens, or windows. Windows are a rowdy bunch.

Have you ever been reading something and another window pops up and covers what you were reading? Imagine installing an app and there is a dialog box waiting for you to click OK to resume the installation. Another window has popped up hiding this box. You are twiddling thumbs waiting for an installation that never completes. Never. Finishes. You have no clue that the installation is waiting for input from you because the CLICK OK TO CONTINUE prompt has been hidden. After you’ve been burned enough, you likely figure out what is going on after a while. I have been doing this kind of thing a long time, KNOW about this booger, and STILL get burned by it.

A MODAL (mow-dull) dialog box requires a response from the user. It does not just pop up and let everything else go its merry way. I made frequent use of modal dialog boxes because my programs were used by testers, programmers, and users all over the country. All over the world. Users use. They also complain. Quickly. Hotly. Noisily. Often unfairly. There is a saying in the programming world that if you make something idiot-proof, the world will respond with a better idiot. Modal dialogs were a means to prevent some of the complaints. How does this affect you?

When working online, I often encounter prompts that I consider modal. Web programming is a little different than Windows programming, but very similar also. The principle I described above is much the same. Some web processes stop and prompt you before allowing you to continue an operation. That operation is paused until you respond. You can do other things before deciding when or whether to click the button but the prompt may be hidden by other windows. Some dialogs insist. Insert a DVD. Select a destination folder. Etc. Modal dialogs. These dialogs usually stay front and center. You MUST take an action to continue.

These are often red-flag choices for me. If I‘m on a website trying to read a news article and a new dialog comes up insisting I click a button to PROCEED or one to CLOSE or one to CANCEL, I get a chill. The Internet is the wild west.

Remember what I said about ‘event’ driven programming? A programmer can put whatever text they want on a button. It could say ADD $200 TO YOUR BANK ACCOUNT. It is more likely going to do something sinister. This is a silly example but this is the kind of choice I approach with extreme caution. When I run into these, I first look for the X in the upper corner of most windows. (This is NOT a Twitter thing). Normally, this force closes a window. This also triggers an event that a programmer can intercept with malicious programming. When I see a MODAL dialog in a web page, a mental alarm goes off. Cheeks clench.

I am notorious among my old coworkers for being suspicious of everything. Identity theft has been a huge threat for years. Viruses are everywhere. I would bet you have virus software protecting your computer. People who write virus software are working harder all the time to harm you. People are getting wise to those efforts so more sophisticated ways of duping people are being developed. All the time. Usually, in order to lure you in, some overt act on your part has to occur. Click a button. Click a link. Sometimes these come up in an explicit demand that you take the action to continue what you are doing. YOU MUST CLICK SOMETHING because all other options are locked to you. Disabled. To me, these are modal dialogs and when I see modal dialogs, I tense up and start looking for an exit.

My wife has often felt that I read too much into too many things. She may be right but companies like LifeLock, Symantec, McAfee, and any number of other computer security software utility companies serve as constant urgent proof that there is valid cause for concern. A careless click can complicate your life or your finances for years. Once unleashed, the devil in details can be incredibly hard to exorcise. Beware what you click!

Subscribe to our YouTube channel

Subscribe to our newsletter

White Cane Coffee presents Coffee & a Conversation

Don't Miss