Oct
08

Geeking on a Saturday

I had a ton of fun today being a geek.

My day started with a trip across Michigan to rehearse my Data Explorer session at the Grand Rapids Area Fox User Group. The drive is actually a nice three hour ride. I used my laptop the entire trip for the first time as a device to enhance the travel experience in a geeky way. Nice to know my battery lasts exactly long enough to cross the state of Michigan, but not much longer.

I purchased Microsoft Streets and Trips 2005 while I was in Redmond for the MVP Summit (thanks to Rick Bean for pointing this out on our visit to the Microsoft company store). The software comes with a GPS unit. I loaded the driver last week on the way home from the MVP Summit so I was not breaking my new software before a conference policy. I plugged this in to see how it operates with Microsoft MapPoint without loading the Streets and Trips package. Way cool! The real time feedback is impressive and the accuracy of the maps is amazing. I have seen other more expensive GPS technology in hand held units and dashboard units show the position just off the road. Heck, this package is only US$80 and includes mapping software and the GPS hardware device (plugs into a USB port). The bad news is I purchased the 2005 version and I see the 2006 version was just released. The new version of Streets and Trips has voice and text prompted directions on Windows XP. This feature would have helped today because I was traveling alone. Steve Bodnar told me (and I have since read more) that the Streets package has more GPS features built in than the more expensive MapPoint software. Hopefully this is just a leap frogging problem and the next version of MapPoint will get the cooler GPS features so I don’t have to suck up hard drive space with both tools.

Even more geekness: while I was traveling I caught up on 5 different FoxShows I had downloaded, but have not had time to listen. Andrew: love the format and you are getting some excellent interviews. Each of the interviews provided me a little humor, insight and information. They all got me more geeked for the Southwest Fox conference next week and made the trip go a little faster which is always a good thing.

The trees are just starting to turn color in southern Michigan so the scenic part of the drive was very nice. It is almost a shame I will probably miss the peak season because Therese and I are heading the Arizona next week. Hopefully the weather will hold and we will get a beautiful view and the ultimate color tour out the airplane window on our return flight.

It was good visiting with friends on the west side of Michigan and appreciate the time each gave to come listen to a presentation I have only presented once before. It went better than expected because I have not had time to really practice the sessions before I have presented them to the two groups. As Sharon noted at the meeting today, there is always the plane ride out to Arizona. I am not sure the passengers outside of the Fox developers traveling on our early flight next Thursday really will want to listen {g}.

Oct
07

Why policies are made

I have a business policy to never load new software on my development machine right before a conference where I am presenting. The policy was created years ago when I did this and it triggered a panic attack during a rehearsal days before I was headed to GLGDW in Milwaukee. Demonstrations I had run a dozen times all of a sudden stopped working. Burned once and hopefully never to happen again… Well until yesterday.

Yesterday my client set me up for access to their Citrix box so I can do remote support. I have loaded the Citrix client on other computers without incident so I never gave it a thought when we went to set this up. The Citrix client installed just fine. Life is good.

Then I started VFP 9 (with the SP1 beta installed) which I have been using for more than a week now. The VFP window is displayed, the Stonefield Database Toolkit splash screen is display, a couple more of my startup program items are processed and then the Windows Installer kicks in and asks me for the VFP 9 install CD. What the heck?

I don’t have the CD with me (a freak of nature by itself) so I cancel the install and quit VFP 9. I start up VFP 9 without the SP applied and it does the same thing. Argh! What the heck did Citrix install that could possibly mess up the VFP files? The frustrating thing about this is I probably will never know, but I suspect it is one of the ActiveX controls. I supplied the Windows Installer with the CD when I returned back to my office and all is well again. All I could think of is how bad my sessions would go this Saturday at the Grand Rapids Area Fox User Group and next week in Tempe at the Southwest Fox conference. Life is too short to have to worry about this kind of stuff happening to my machine.

So back to the business policy. I am going to add language like “never, ever” (in bold) to the “do not load any software two weeks before a conference” policy, and make this an offence punishable by termination. How hard is it to fire yourself?

Oct
05

I have been reading several blog posts sending crongratulations to Craig Boyd on becoming a Microsoft MVP (definitely well deserved). It seems obvious to most of us how Craig became an MVP since he has been creating examples and posting blog entries as if there were three or four of him cloned and working hard in his office in Minnesota.

That is not the full story. Head over to Tek-Tips and read any of the thousands of posts he has made over the years. His posts are some of the best forum post reading you can find. This is where I first met Craig and where I was initially impressed by his willingness to share his knowledge with the Fox Community.

Oct
03

MenuDesigner – Beta?

Today in his blog, Andrew MacNeill asks when the MenuDesigner Professional beta will be starting. The answer is simple, when it is ready and not a day sooner. I worked on it a bit at the MVP Summit and a little this afternoon when I needed a break from all the catching up I have to do after being out of the office for the last week. There is a fair amount of work to do on it, but I am definitely in the stretch run now.

The problem solved at the MVP Summit was something very simple once you have 20/20 hindsight. When I first sat down and designed the MenuDesigner I listed the features I felt were necessary to make the product sell. I then prioritized them based on difficulty and started working on the list with the most difficult first. The reason I took this approach is fairly obvious. If I hit a technical showstopper, I would have invested less time before scrapping the product. One of the last features on the list is adding a record. At first glance this may sound easy. I mean, how hard can it be to APPEND BLANK to the MNX file, which is nothing more than a DBF? It is not hard, except for the act that GenMenu depends on the sequence of records in the MNX. To retain full compatibility with VFP and the MNX structure, I have to maintain this record sequence. To accomplish this I was depending on the old FoxPro INSERT record command. Not the SQL Insert, the old Xbase INSERT, which inserts a record physically between two other records. When I first tested this out it failed miserably.

So at dinner at the summit someone (I think it was Ken Levy) asked me about the MenuDesigner and when it was going to ship. I brought up the latest technical hurdle and David Stevenson mentions he is tech editing an article for FoxTalk which uses this command. This leads to discussion and then Doug Hennig has me search the new VFP 9 ReportBuilder project for the command. Sure enough it is in the code so it must be working. More discussion. I tried a couple of things and then we came across the one little piece of information missing from my original scenario: turning off buffering. You see, one of the base features of the MenuDesigner and the native VFP Menu Designer is the option of not saving your changes. Simple to implement with buffering. So now I have to implement my own buffering with a cursor separate from the MNX cursor I was using up to this point. This is not a super big deal. I have to change some code in the menu opening method and some more in the saving menu method and I should be good to move on to the actual code to add an item to the menu.

Back to this 20/20 hindsight, it makes perfect sense that VFP would need exclusive use to physically insert a record. I had that part. It also makes perfect sense that VFP would not allow buffering on the table to physically insert a record. I just wish I would have thought about this more, or the MVP Summit would have been months ago. {g}

So now you know…. the rest of the story.

Sep
30

Today is the best day of the MVP Summit because today is the day the Fox MVPs got together with the Fox Team. We got to see a lot of what Microsoft is thinking about and considering in the Sedna release. Back in June, I revealed my personal number one requirement for Sedna in my post VFP Roadmap provides direction: Longhorn compatibility. Today we got a to see a preview of VFP 9 running on Windows Vista (formerly known as Longhorn). I can tell you I saw it running. There are still glitches and the Fox Team is still evaluating the full impact, but I am very excited by the small progress. We did not see it do much, but Ken was able to run the Class Browser / Component Gallery and it did not crash.

If you are headed to Southwest Fox (yes there is still time to sign up), you will get to see what the MVPs saw today (and probably more knowing the team). You will also have the opportunity to provide feedback to the Fox Team as well.

Oh, and more good news based on dinner Thursday night here at the summit. I was discussing the MenuDesigner I have been developing for a couple of years. We solved a major problem, which was holding up the progress on the development. One little 15 minute discussion and with some real smart Fox developers and I am rolling past a big issue. This discovery was well worth the cost of this trip and the investment of time.

Sep
24

VFP 9 SP1 Installation Tip

I have not installed the public beta of VFP 9 SP1 yet. I will be installing it on September 27th after the last session I give at next week F1 Technologies VFE DevCon. I have a personal policy not to install software the week before a conference or major presentation. One of those once burnt, never gonna happen again type policies.

I have one tip for you concerning the installation of VFP 9 SP1 recently made available to the Fox Community. Before you install, back up your original files in case you need to go back to the original version. This tip also allows you to run both the release version (build 2412) and the beta of SP1 on the same computer. I have done this for the service pack testing of VFP 7 and VFP 8 and it worked well. Here is what I do before installing:

  1. Go to the following folder: C:\Program Files\Common Files\Microsoft Shared\VFP
  2. Create a subfolder called VFP9NoSP
  3. Copy all the VFP9 Runtime files including VFP9r.dll, VFP9t.dll, VFP9rXXX.dll (resource files, especially the ones you deploy), the three Report*.app files, the FoxHHelp9.exe, and the FoxHHelpPs9.dll to this new subfolder.
  4. Go to the following folder: C:\Program Files\Common Files\Merge Modules
  5. Create a subfolder called VFP9NoSP
  6. Copy all the VFP 9 merge modules to the new subfolder
  7. Copy the main VFP 9 folder to another folder. I call mine: C:\Program Files\Microsoft Visual FoxPro 9 NoSP

If you want to be extra careful you can also export the registry settings for VFP 9. I have not done this in the past and have not had any problems skipping this precaution. You also might want to back up your FoxUser files.

Now I have backups of the VFP 9 files without the service pack beta.

I do this for two reasons. The first is so I can double check things in the released version to see if something works differently with the SP installed. I can verify bugs which are suppose to be fixed, and validate problems found in SP1 to see if they are newly broken since the released version.

The second and more important reason is I might have to release new versions of my current VFP 9 apps and I do not want to do this with the beta runtimes. I can build the apps using the VFP9.exe in the NoSP folder. Before doing so I swap in the VFP 9 runtimes and merge modules. If I need to do this I create subfolders with the corresponding SP1 files just like I did with the original files. After I am satisfied with the testing I build my installs with the released version files. Once I ship the product I swap in the SP1 files and proceed with the testing.

I install the SP1 beta over the original folder (C:\Program Files\Microsoft Visual FoxPro 9). Note, this will automatically overwrite the merge modules and runtime files too. I create two shortcuts to VFP 9. One for the SP1 folder and one for the NoSP folder. I use the appropriate shortcut for the type of work I am doing, but I can tell you I use the beta version for most of the time. The Fox Team has been very good about shipping stable betas over the last few years.

The fix list for SP1 is very impressive and I am happy with the bugs squashed so far. It is now up to you to help out with the rest of the bug discovery. Make sure to follow the Microsoft specifications to reporting bugs. Making a post noting “the report designer is broken” just does not cut the mustard. Provide concise reproducible steps, code examples, observed behavior, detail what you expected to happen, your hardware configuration, and any additional notes you think are important.

Happy testing.

Sep
21

FoxPro Tips – Twice Baked

Lots of people are remembering tips and tricks Drew Speedie passed along over the years. It was one of his many specialties. In the spirit of this I want to pass along something I have accidentally demonstrated three times in the last couple of weeks and something I learned this afternoon.

With the BROWSE window open you can press Ctrl+F to bring up the VFP Find dialog. Enter in any text and click on the Find Next button and VFP will search all the columns in all the records looking for the text you typed in. It is a quick and dirty way to find keys, or strings in columns, or numbers in numeric data. This does not work with memo fields or date/datetime fields. The searches start with the current record.

I noted this was accidentally demoed. I cannot say how often I use this little trick, but it has been around forever. Fortunately a brave developer was not afraid to ask about what I did when I “demoed” it at the Detroit Area Fox User Group and a couple of others learned the trick as well. I was looking for something in the DataExplorer metadata at the time. Same thing happened on my southern California tour last week.

Today I was working at a client and did another accidental demo of the feature. This developer has been using FoxPro since the 80′s and was surprised when he saw me look up data in a cursor. His usual technique is BROWSE FOR something. Two different approaches to the same end.

So my friend turns around and shares a cool tip I did not know about. Adding the DISTINCT clause into an aggregate function in a SQL Select statement:

USE (_samples+"data\customer") IN 0 SHARED

SELECT ;    COUNT(*) as nTotalCustomerRecs, ;    COUNT(DISTINCT Country) as nDistinctCountries ;  FROM Customer  INTO CURSOR curBeAmazed

I was amazed by the result set! I tested this all the way back to VFP 5.0 and it works (except for the _samples system memvar).

I swear you can learn so much about development and Visual FoxPro by watching any other developer. It does not matter what your experience is, or what the other developer’s experience is. I have seen this happen repeatedly throughout my career. It is so cool to do pair programming and gain this knowledge. This is also a common experience attending conference or user group presentations.

Drew would be proud!

Sep
18

Drew Speedie has died

I cannot even begin to express my sadness about this, but I read minutes ago that Drew and his son Brent died in Yellowstone park a couple of days ago. I sit here stunned with tears rolling down my cheeks. Such a tragedy.

Our community has lost one of the best people around and our thoughts are with Irene, all of his family and friends, and the entire Visionpace family.

You both will be sorely missed. I hope you both get great seats in heaven when hockey returns.