December 19, 2007
Bugs the Debugger Won't Help You With
SET RANT ON
You do not even have to read any further because there is nothing you can do to improve the situation and contrary to the title, this has nothing to do with any debugging tool. However, Dear Abby says that I will feel much better if I get it out of my system, so here goes. The "bugs" where the debugger WON'T help are those little things that, frankly, annoy the H-E-double hockey sticks out of me. I am wondering if they bug you as much or perhaps you even have some that annoy you and would like to vent. Feel free to comment. Right now, it is my turn.
#1 on my list are the companies who have a double door leading into their establishment and NEVER, repeat, NEVER unlock one of the doors. What is that all about? They paid for the door. Why not use it? Otherwise, it is just an expensive wall. I don't need to have my carpel tunnel syndrome aggravated by walking into a door (assuming that it will open) only to find it doesn't budge because it's locked.
#2 is public restrooms where the maintenance person has jammed the paper towels so tightly into the towel dispenser that it is almost impossible to pull a towel from the dispenser. Invariably, my wet hands try to pull the towel only to come away with a white triangle about the size of my thumb. I try again; same result. I then reach into the slot and pull out 15 towels. The triangles have fallen onto the counter, making a mess and I have killed another tree by wasting 15 towels when two would have done the job.
#3 is a corollary to #2. The hand dryers that blow hot (if you are lucky) air. Their drying span is too short to complete the job and yet, too long if run a second time. Think of all the electricity we are wasting by having to run the hand dryers a second time. If we want to stop our dependence on foreign oil, we can start by increasing the amount of time in the drying cycle of hand dryers by 50%, thus requiring only one cycle.
#4 are cell phones. Oh, you are all shaking your heads. Well, then, I won't go any further because you already know what I am going to say. Please, save me the effort and just say it for me.
You know, Dear Abby was right. I do feel better and the price of the therapy was cheap. Thanks for listening. You, too, can avail yourself of this free, cathartic treatment. Just let me know what is bugging you. Until the next time, here's to better mental health through griping, moaning, and complaining.
SET RANT OFF
December 18, 2007
A Promise is a Promise
Back in October, I promised to elaborate on the Southwest Fox 2007 conference and review some of the sessions. Well, Santa is checking out who has been naughty and who has been nice, and frankly, I need as many of the “nice” checkboxes checked as possible. I apologize for the delay, but for those of you who are still awishin’ and ahopin’ I would come through, here ya go.
Before I begin, I would like to regurgitate (what a revolting word; but fun to say) what you have undoubtedly read on many occasions in the past. Namely, if you have never attended a developer conference, what the heck are you waiting for? 15 years ago I was in the same boat. I read (almost) those exact same words and thought a developers’ conference can’t be that good. Well, I was wrong and every time I think I am right, I attend another conference and prove to myself that I am, indeed, wrong, wrong, wrong. Believe me; if you are in the trenches and do application development (i.e. write code) on a daily basis, you owe it to yourself to attend a conference specializing in the coding discipline of your choice. While I am partial to Visual FoxPro, other conferences for other languages are just as rewarding. You get shortcuts, tips, tricks, traps as well as renewed enthusiasm for your work. You get the chance to meet with people who are in the same “development boat” as you. You are not an island. OK, you may be an island, but in a chain of islands that, together, form a beneficial archipelago. Bottom line,.. Consider attending a conference of your choice. I wax poetic, but I also digress, so on with the show.
The two sessions I will address in this blog are the two sessions given by Cathy Pountney. Some of you may know that a few years ago I was a technical editor on a Hentzenwerke book, “The Visual FoxPro Report Writer – Pushing It to the Limits and Beyond” written by Cathy. It was written in the days when Microsoft swore that the report writer would never be improved. It is still a very viable book for those of you who have not upgraded to VFP 9. However, with the release of VFP 9, many of the enhancements were to the report writer. So much so, that it is almost a totally different animal. While I have been hibernating in a cave mainly doing maintenance work on applications written in VFP 8 and earlier, Cathy has been leading the charge to push the VFP 9 report writer past its limits and right into the 5th dimension. So while she is on the cutting edge of the report writer enhancements, I have made a comfortable home on the coagulating edge. I still have a few years of coding energy left in me and I felt it high time that I get on the VFP 9 report writer band wagon. I was reluctant to do so because I felt so at ease with the “old way” and besides, it was a bit intimidating, but biting the bullet, I attended both of Cathy’s sessions with the express purpose of getting over my fears and intimidation. BOY, am I glad I did!
“Getting Your Head Around the VFP ReportListener” was the first session. This was the session that I was hoping would remove the mystique from the newest version of the report writer. It did, or I should say, Cathy did. She knows her audience. She can speak to her audience so that the “difficult to grasp” is “graspable”. This was a good thing. When I walked out of this session, I had been (practically by hand) taken through the basics of the reportlistener. One of the revelations, at least for me, was how the various components worked together to produce the report. In the old days (pre-VFP9) there was just the report engine. With VFP 9, you not only have the engine, but the listener object, the preview container (separate from the report engine) and the extension handler. This fact, in and of itself, was a key to understanding the “new and improved; whiter than white” report writer. Each component was explained and placed in its proper environment as it relates to creating reports. Next came all of the new properties, events, and methods. Cathy’s practical, real-world examples using several of the methods and properties made the task of creating the reports seem easy. It was at that point that she dangled the carrot in front of me that by knowing the basics and understanding the fundamental concepts, developers could then use them to their advantage to create reports the way the user has requested (instead of being forced into a pigeon hole of “this is the ONLY way it can be done”). Extensibility. What a concept! Unfortunately, those tricks will be shown in her OTHER session. For now, she continued with the basics. It was just like having to take Chemistry 101 to learn the periodic table BEFORE you could take Advanced Chemistry and blow things up. Also, she is correct. Learning the basics of the methods, events, and properties is what will allow us to (in a nice way) blow things up when we need to print out those mind-boggling reports.
OK, now for the cool stuff. With the basics out of the way, I later went to the “OutFox the VFP Report Writer: Printing on My Terms” session. I am really glad that I went to the basic session first because this session built upon those concepts. Rather than tell you about the session, I am going to list just a few of the new abilities that users of VFP 9 have at their disposal. How about being able to select which pages of the report they want to print? Or printing only the odd pages, or only the even pages? You can now specify how the report is collated and how many pages print on a sheet of paper (ideal for printing “mini pamphlets”). You can specify the margins. Perfect when you want a wider margin for three-hole punching. You can shrink to fit the page. How cool is that? Haven’t you ever printed out a report and ONE detail line printed on the second page? If only you could have shrunk the report enough to get it all on one page. NOW, you can. You can rotate the report; you can specify different size paper for different pages. You can create your own printer dialog to allow for user input as to all of the specifications mentioned above. Using the extension handler, you can customize the preview container toolbar or modify the print dialog box. I haven’t even added the use of GDI+ to the equation. BOTH sessions were eye-opening. BOTH sessions did exactly what I had hoped; namely removed the mystique and pointed me in the right direction and allowed me to say to myself, “This isn’t so tough.” Of course it isn’t when someone else has done the heavy lifting. Cathy would be the first to acknowledge that she gained valuable insight in certain areas of the VFP 9 report writer from others more informed than she. THAT is the beauty of these conferences. Developers sharing and passing down information so that the less informed can be educated. THAT is another reason why you should consider attending a conference if you never have.
Lastly, and realistically, there is no way one person could walk out of those sessions, sit down to the keyboard, and put what they saw into immediate use. Fortunately they don’t have to, but when they are ready, Cathy provided (as did all speakers) examples, code samples, and white papers about the topics so that you could review later and take the time to master this facet of Visual FoxPro. Two sessions; tightly coupled, but giving me the basic fundamental understanding and the wherewithal to decide how to move forward in the manner that most benefits me when attempting to tame this beast. Time well spent.
December 10, 2007
Sometimes, It Is the Small Things In Life That Count
Has this ever happened to you? It happens to me a minimum of once a week, but NOT ANY MORE! Most often it happens when I am copying a directory (yes, I am “old school” and refuse to say “folder”) full of files from a hard drive to a thumb drive. I know that the process will take a few minutes so I begin the copying and go get a drink refill. Adding fresh ice, topping off the glass, and meandering back to the computer, I notice a message on the screen. Have you seen one similar to this before?!?!
While not completely wasted, the time getting my refill wasn’t as productive as I thought it would be because the copying process did not complete, but, instead, paused waiting for my input. I said “Yes”, but then had to wait for the process to complete. What a pain. Oooh, thank you Microsoft. I certainly wouldn’t want to overwrite a file that I can recreate any time I want to (usually whether or not I actually want to). The fact that it is referred to as a “system file” makes it seem that much more important, too. Well, in MY opinion, (I use the phrase, “in MY opinion” so that if I am wrong in anything I say, I can just say that “MY opinion” was based on MY experience) there is very little upside by even having these Thumbs.db files hanging around all over the place. If there was only a way to prevent them from propagating like tribbles in heat. Hey, there is!
I ASSume that the main purpose for these files is to have a way to easily (and quickly) see thumbnail images of any graphics files. Nice concept, no problem. It does take some amount of overhead to create the file, but to me, the time is insignificant unless you had a couple thousand .jpgs in a directory (and then, I would question THAT behavior). At any rate, you can prevent the OS from automatically creating (AND THUS, ELIMINATING THIS ANNOYING “FEATURE”) as follows:
Open up Windows Explorer, go to the menu Tools|Folder Options| click on the “View” tab, and under the “Files and Folders” section, look for the checkbox with the caption, “Do Not Cache Thumbnails”. Stick a big, old, fat check in that box and from now on the Thumbs.db file will not be written to your hard drive. Yes, you WILL still be able to select Thumbnails as a format to view the directory’s files, but since it is not written to disk, it is never copied, and you will never see the above message again. As I mentioned, there is a very minor, minor, minor performance hit each time you request a thumbnail view, but it is a small price to pay (again) in MY opinion. Ah, life is good. Sometimes it’s the small things in life that count.
December 06, 2007
Too Cool for School!
Last October, when I attended the Southwest Fox 2007 conference, Rick Borup of ITA Software, showed me a pretty slick tool that he recently discovered. I have been using it for about a month and although I do not use it often, when I need it, it really comes in handy. I thought it was cool enough to pass it along so that you could evaluate it for your own personal use.
The product is called ZoomIt and is available at: http://tinyurl.com/2xv7eu. It is, essentially, an easy way to magnify your screen. It is much easier to use than the magnifier that Microsoft routinely provides under the Accessories|Accessibility options. On top of that, it has a couple of features that are pretty cool. Before I go any further, I will tell you that it will be worth your time to read the accompanying documentation (it’s only one page) to save yourself some startup time.
If you read the documentation, you will find that ZoomIt has the capability to display a countdown timer on the screen so when you are giving presentations and take a 10 minute break, the countdown until the break is over is displayed so that all attendees are aware of the “official” time left before the presentation will continue.
Additionally, ZoomIt allows the user to (crudely) use the mouse as a pen to circle a specific area of the screen for emphasis. In fact, (again, mentioned in the documentation) the user can draw straight lines, using the proper keys, to “box in” an area of the screen. Like I said, I don’t use it often, but it is definitely the “right tool for the right job” and comes in real handy when you need it. Give it a shot.