Monday, August 25, 2008

Getting started with Visual FoxPro

In the last couple of years I have observed a lot of newbie type questions on the forums, and get a feeling that there is a slight influx of people new to Visual FoxPro showing up online, or maybe just getting online. Please don't interpret this observation that Visual FoxPro is surging in popularity worldwide, but in certain parts of the world it might be. In recent emails and over the years on forums I have answered a number of posts with the question: how do I get started learning Visual FoxPro?

Here are my current recommendations:
  1. Use the product and try things out. I don't think there is any better way to learn Visual FoxPro than trying things. There is a reason I put this as my #1 reason, it is the most important.
  2. Open the Help file and read. Sure there is the command syntax, but the VFP Help file is chock full of information about the product and approaches you can take to solve problems.
  3. Buy books and start reading:
    Any of the VFP books at Hentzenwerke Publishing are worth reading and have good information, especially the Fundamentals book, HackFox, KiloFox (1001 Things), the Report Writer, and Deploying Visual FoxPro Solutions. If you are new to VFP 9 and need to understand what is new in Visual FoxPro, get all the What's New books to get up to speed quicker. Soon there will be new books published by FoxPro User Group of German Language (dfpug, publishers of FoxRockX).
  4. Subscribe to FoxRockX (formerly FoxTalk 2.0).
  5. Scan Foxite.com, FoxForum.com, ProFox List, MSDN Forums, Microsoft Newsgroups, Tek-Tips, the UniversalThread, the Virtual Fox User Group, dfpug (German), and PortalFox (Spanish/English). Read as many messages as you have time for. Many of links are on the admittedly outdated Favorites page of my personal website. (Yes, feel free to send me more and the corrected links {g}).
  6. Read as much of the Visual Fox Wiki as possible. Yes, I know there is a lot to read. How do you eat an elephant? One bite at a time. (sorry to those who love elephants - it is just a saying related to tackling large tasks, not a slight on elephants or elephant lovers)
  7. Read as many blogs as possible. Lists to start are here: Visual FoxPro Wiki - BlogWatch and the UniversalThread Blog List. You might consider getting a RSS feed aggregator. I currently recommend FeedDemon (now free).
  8. Sign up for one or more of the upcoming conferences (German DevCon (Frankfurt), Prague DevCon (Czech Republic), Atout Fox (France), SDN VFP Conference (The Netherlands), Brazilian Conference (Sao Paulo), VFP Conference Teheran (Iran), and Southwest Fox) (USA))
  9. Find a local FoxPro user group if one exists, otherwise band together some other Fox developers in your area and start one.
  10. Surf the web (Google is your friend), there are plenty of sites available with VFP information. You can start with some of the favorites on my site. From there you will find hundreds more.
  11. Consider hiring a mentor.
This should get you started and there might be stuff I missed (post comments on this blog entry). I realize that there is a huge financial investment and you will spend a lot time learning. The challenge you face is one many VFP developers have conquered in the last 13+ years. You have a lot of support waiting to help you out on the forums and way more resources than we had in 1995 when many of us were cutting out teeth on VFP.

Good Luck!

Labels:

Thursday, August 21, 2008

Extending the Sedna Data Explorer - Teaser Posted

In an effort to entice you to sit in on my Extending the Sedna Data Explorer session I have recorded a short teaser video, and have it posted on the Southwest Fox Video page. The same session will be given at the German DevCon in November.

Please take a look and let me know what you think.

Labels: , , ,

Tuesday, August 19, 2008

Video conversion software

I am looking for software that will convert AVI files to WMV (Windows Movie File) or SWF (Flash). Any recommendations?

Labels:

Appreciation for the VFP compiler

We all take things for granted and I recently found renewed appreciation for the VFP compiler catching simple things. Over the last week I have been working on and off to track down an indexing issue brought to my attention by one of White Light Computing's sub-contractors. It is an issue between VFP and FoxPro for DOS.

One of my test programs runs in FoxPro 2.6a DOS and had the following code:

llSeek1 = SEEK( "CRANE ", "test", "lo_locn" )
llFound1 = FOUND()
llEOF1 = EOF()

I posted the code for a code review and it was revealed to me something I know: FoxPro 2.6a does not support the third parameter for the SEEK() function. FoxPro 2.6a for DOS and FoxPro 2.6a for Windows happily accept the line of code and ignore the extra parameters. I guess the FoxPro compiler figures this is a mistake on your part and is doing you a favor by ignoring the problem. In my case it was bad because I did not have the proper index tag selected and I was getting misleading results.

In VFP, the compiler catches extra parameters. If you add a fourth parameter to the SEEK() function VFP provides you some responsible feedback.

Compiling d:\devvfp9apps\junk\program1.prg
llSeek1 = SEEK( "CRANE ", "test", "lo_locn", "more?" )
Error in line 23: Too many arguments.

Compiler rules being tighten does cause pain initially, but in reality this is one of the best things the Fox Team did for us over the many versions released. I work in several versions of FoxPro and VFP these days, and understand the tweaks on the syntax is something I get burned on once and awhile. I really appreciate when the compiler saves my bacon.

One of the other things I commonly see with code I am working on is the ENDIF comments. For instance, sample code:

IF llCondition
llQueryOK = .T.
ELSE
llQueryOK = .F.
ENDIF llCondition

Initially looking a the ENDIF one might think this is invalid syntax (ok, maybe I was the only one {g}) and the developer forgot to put in the && inline comment. In reality, FoxPro knows there is no valid syntax after the ENDIF so the rest of the line is completely ignored at compile time. This happens in all versions of FoxPro.

We have been taking on quite a few projects over the last year and my preference is to recompile to VFP 9 so we support fewer versions of VFP compilers and runtimes, and I want to take advantage of the stability of VFP 9. The most common compiler error I see is the lack of commas separating variable declarations. This one drives me crazy. It is easy to fix for sure and VFP 9 is really good about pointing out the problem.

Labels:

Tuesday, August 12, 2008

Visual FoxPro Wiki: CDX Corruption Checklist

I am doing some research on a strange index issue today (likely a future blog post). Googling almost anything in VFP will link you to the single biggest FoxPro KnowledgeBase on the planet: Steven Black's hosted Visual FoxPro Wiki. I wish I had a count of the number of times I visit the Visual FoxPro Wiki.

Today the topic I found extremely compelling is "CDX Corruption Checklist". It is already marked as a three-star topic (highly rated). This topic did not help me solve my problem, but it was an excellent read.

My thanks to all involved in putting this one together.

Labels: ,