Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Neat tricks in your apps 4

Status
Not open for further replies.

TomKane

Programmer
Jul 24, 2001
1,018
AU
I'm not sure if this is the right place to put this, but we've always had a problem getting users to log out of the system so that we can do whatever it is that we need to - it's a rare enough situation but it can cause problems as all our deployments or scheduled by our deployment people and if we can't deploy at a certain time then we may have to wait until other deployments for other apps have been completed before we get another chance.

What we've done recently is put a change into our application so that based on a particular event the application warns the user that the app will close in two minutes and then in one minute and then it exits and the app cannot be run until we reset the event.

I know that's nothing special and most apps can do that sort of stuff quite easily, but what I am wondering is: are there any "neat tricks" that your applications can do that makes your working lives easier?
 
That trick is one of the most re-invented ones, yes. I re-invented it also and it saves a real lot of work. Another one is the errorlog: If an error occurs, it is logged to a simple text file.

I once had a user who claimed that the computer "hung" in one of my application. I asked him if he had seen any error message. He answered "no". At that time it is really great to have an errorlog showing which 21 error messages he clicked away.

[cry] I still cannot understand a user that lies about an error but still expects to be helped...

Best regards
 
We once had a group of users who were extremely picky about wording, punctuation and spelling. It got out of control when they would pick apart these things instead of evaluating screen functionality of when we did walk-throughs. Their perception was that the application was sub-standard because capitalization was inconsistent!

Our solution was to implement a user help table from which context-sensitive help text was displayed instead of hard-coding it. We gave them a screen to maintain their application's help text which was originally written by the developers. That way we relieved of the burden of maintaining it to their exacting standards and they could be as wordy and precise as they desired. Amazing that a year and a half later the help text is exactly as we originally wrote it. You can afford to be picky when you don't have to do the work!

Code:
select * from Life where Brain is not null
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
When posting code, please use TGML to help readability. Thanks!
 
Once I had an application sales entry for a retail chain) that often locked records (by design). This was caused by one person keying in the invoice, and going to another terminal to look at the same invoice [mad]. We coded it so that it would tell the user who was locking them up, and what terminal, so they could handle it themselves, along with an on-screen admonition not to turn their terminals off and sign back on. They ignored that, of course (these were commissioned salespeople). Finally, we got tired of fixing the commissions files manually and told them if they turned the terminals off before resolving the record lock, they would adversely affect their commissions. That did the trick.

Sometimes you have to motivate users to do the correct thing.[hammer]


"When once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for here you have been, and there you will always long to return."

--Leonardo da Vinci

 
LOGGING for sure is the biggest bang for the buck and not just error logging. Depending on your use model you may want to log all sorts of stuff.

-pete
I just can't seem to get back my IntelliSense
 
Our users have no idea how much logging we do. I wrote a trigger in DB2/400 to log changes to a certain file that someone has been changing. Triggers will fire no matter how you update the file (via SQL, a program, a utility, or anything else). Pretty slick.


"When once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for here you have been, and there you will always long to return."

--Leonardo da Vinci

 
palbano,

You are quite right. Back in the "good old days" when I was still a Lisp programmer, I once had to make a system which included "bill of materials" functionality. You could enter a lot of semi-raw materials (sheet, tube, etc.) and an "other" category. This last category was logged so I could see what people really needed as an extra category.

flapeyre,

A former colleague of mine had a theory that examples from an IT person were never understood, unless the example was about the other person's salary. You'd be amazed how right he was.

Best regards
 
Thanks for that - there's some good stuff in there
 
In addition to error logging (to a database table, not the local user's disk), I add a System Profile that creates a text report of the drive spaces, CPU speed, RAM, mouse presence, etc. The user can email the profile, along with their errors from the log or a question they have, to my support email from inside the program.

But I ALWAYS show them everything that goes into the email. They have the right to remove (or change, I suppose) anything that goes out.

Cheers
 
Here's a neat trick that didn't work, because they can also be informative. It's not really about getting work done (sorry) but the time I wasted arguing with users about it....

Ages ago I wrote a thing (in DOS) with a windows-like graphic interface, i.e. areas of screen that could pop up containing text windows, buttons, bits and pieces like that, for the user to enter what they wanted to do, and generally control the program.

I personally find it very frustrating the way that when you've opened a new thing like that in Windows, it often requires attention (and closing) before clicks on any other menu or button in other windows have any effect. For instance, I am resizing a graph and have opened the resizing window. Now I decide to save the graph first, but clicking on "File" just makes an anoying little "ping" because first I need to close the resizing window...

So to avoid users getting frustrated about that, I limited the mouse to the area of screen that was relevant. If you opened the file-select window, the mouse wouldn't move outside it, so you couldn't even try to resize the graph... In any case, surely that should make the program easier to use, because the you are guided to click on something that can have an effect, and the amount of irrelevant screen you have to look at is very much reduced??

But most of the users got really claustrophobic. They felt afronted, denied their right to click where they wanted... even though there was no sense to click elsewhere, and nothing would happen if you did!

Strangely the problem was alleviated when I made some of the smallest windows a nice bit bigger. It seemed it really was claustrophobia.
 
I can hear the cries now - "the mouse isn't working" :)

Greying "dead" portions of the screen is an effective way of making it clear (as clear as can be on a PC!) that the dead space cannot be used.

<marc> i wonder what will happen if i press this...[pc][ul][li]please give feedback on what works / what doesn't[/li][li]need some help? how to get a better answer: faq581-3339[/li][/ul]
 
We set up a logging facility in our apps as others have mentioned. Access to it was controlled via the presence/absence of a key file with an obscure name in the root of the C: drive. There was a simple DebugMode() function that returned a True/False value depending upon whether the file existed.
At startup it would be used to enable extra menu options which allowed app users to view the log.

It was also used to display extra debugging information such as intermediate results of complex calculations in messageboxes, without the need to take out the code for final compilation and having a minimal performance hit.

The advantage of doing it this way was that it could easily be activated over a PC Anywhere connection if they had problems we couldn't replicate, then switched off afterwards.

John
 
at a small hospital where I used to work, it was nearly impossible to get people to log off. So, being on an AS-400, I started sending out a broadcast message about the shutdown. Still not getting users off! So I wrote an app to automate the process and told the users that it was now &quot;built in&quot; to the system and I had no control over it. After the machine actually booted them in the middle of work a few times, I noticed everyone actually started signing off when the broadcast message went out. Naturally, I had it setup to shutdown all critical apps regularly before booting everyone to ensure no work loss, but I didn't tell the users that! (except for the hospital Administrator, who was very concerned the first time it happened due to lots of complaints from users, but they got over it!!!) Problem Solved!!

Doug Pardue,
Technology Consultant
 
I have a logging system I went a little overboard with. Right now if you compile one of my apps with a compile-time var DEBUG=True it creates an extra process and custom thread safe logging queue(ueueueue) as well as kicks in a few extra classes.

Debug messages are fired all throughout the application, either as things occurr or based off a custom stopwatch class. The queue process manages writing data to the file (creating the log file if necessary) and can also handle month rollovers (it creates a diff log for each month) and empty queues (goes to sleep pending updates). It handles incoming messages from something like 20 indepent processes.

There is then a secondary application that parses these debug logs and draws up average execution times for timed debug messages (in ms, such as file load/save times, etc) and parses out other un-timed messages...

Of course since I added this to only the Debug version it doesn't exist in the release version, but it was interesting anyways :)

I still need to write a pong game...I keeop planning on embedding it in my About pages but keep forgetting...oh well.

-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
These are all great ideas!

In a reporting interface that I have, I log each time a user runs a report along with the report name. Reason: So I can go back and question any that are not run, so I can clean the database out.

I also hate the security functions in Access, so instead I coded in a way to retrieve the user's network login and set access to forms and reports dependent on that.

Once I built a reports menu that essentially built the entire report design from the form so they could group, sort, display whatever they wanted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top