« Is it October yet? | Main | Copy- (or Cut)-and-paste as much as possible; avoid re-typing code! »

August 01, 2008

Best practices with Visual FoxPro

With respect to dBASE-like languages, I started developing with dBASE IV and then switched over to FoxPro for DOS in 1992; since then, I have developed with/in every single version of FoxPro and Visual FoxPro and am currently developing in VFP 9. For the next couple of weeks, I'd like to share some of my best practices with Visual FoxPro.  You might not consider some tips to be earth-shattering but it's my hope that  you will find a couple nuggets/gems that will facilitate and expedite your particular development (environment).

So here goes my first tip: Default options to facilitate VFP development

1. Via the View tab/page of the 'Tools | Options' dialog, maximize lists for less scrolling and/or typing:
  • Set the Most Recently Used list to contain the maximum of 24 items
    (The Most Recently Used list controls the number of files displayed in the most recently used [MRU] list.)
  • Set the List display count to contain the maximum of 30 items
    (The List display count specifies the maximum number of items to initially display in IntelliSense drop-down list boxes.) In VFP 8, you will find the “List display count” spinner control in the “Editor Options” section at the top of the “Tools | Options | Editor” tab.
2. Via the Editor tab/page of the 'Tools | Options' dialog, you can more quickly detect incorrectly delimited strings):
  • At the very least, set the Background color of 'Strings' to yellow (like a highlighter).
    I also like to set the Foregound color of 'Comments' to green (to distinguish comments from code).
  • In the same vein, I like to maximize windows to see as much code as possible at one time and, as a result, to not have to scroll as often.
Enjoy!
Art Bergquist

Posted by abergquist on August 1, 2008 | Permalink

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341fba8753ef00e553e547e58834

Listed below are links to weblogs that reference Best practices with Visual FoxPro:

Comments

Art...
Definitely some great comments and tips. I would offer a different perspective on one of your comments. I do not like to maximize the code window (to be able to see as much code as possible). Here is why. First of all, I use FixedSys as my coding font. I like it because it is monospaced and it is easy to differeniate between 1 (one), l (lower case "ELL") and I (upper case "EYE"). Additionally, zero and "Ohs" are easily distinquishable. Since FixedSys is a monospaced font, I limit the width of my code screen to 80 characters. That way, if I have to actually print out the code, it is very readable on the written page; i.e. no wrapping which (for me, at least) makes the code difficult to read at times. The downside for some coders (it doesn't bother me a bit) is that you are forced to continually use the semicolon so that you can continue the command on the next line. Personally, I do not see this as a disadvantage and is a small price to pay for readability.

This may or may not be a "feature", but this also forces the coder to code "somewhat vertically"; that is... while the code is not very wide, it tends to be VERY vertical and requires downward scrolling (again, not a problem when using a mouse with a scroll wheel). At least, the reader is only concerned with accessing more code from one direction.

Just my two cents worth. It works for me and that is the bottom line. Each coder must come up with their own, personal set of standards that work for them. THAT is truly the real bottom line.

Posted by: Dave | Aug 8, 2008 8:27:41 AM

Dave,

Thanks for your "narrowing my perspective" a bit with your "eye-opening" comments [g].

Seriously, I've primarily employed Courier New while coding but will also check out FixedSys.

Thanks again!

Art

Posted by: Art Bergquist | Aug 8, 2008 8:38:18 AM

Just tried FixedSys; since it only allows 11 point for the font size, I think I will stick with 'Courier New / Bold / 14'. Drew (Speedie) had liked -- and I like -- that both for personal readability as well as when presenting.

Posted by: Art Bergquist | Aug 8, 2008 10:42:13 AM

The comments to this entry are closed.