Thursday, October 29, 2009

What's up with VFE?

Many Visual FoxExpress developers have made inquiries about the status of Visual FoxExpress. It has been quite a while since there was a full release of Visual FoxExpress, in fact, it's been nearly 2 years. The good news is that we have been working on VFE during that time. We've fixed a number of outstanding issues, increased the performance and stability considerably, addressed issues with the IDE on Vista and Windows 7 and added several new features. We've also enlisted Bill Anderson the "sharp-eyed Fox anthropologist and xBase archeologist" to help us with framework changes and he's done an incredible job of fine tuning, cleaning up and ensuring that the framework adheres to our own standards. It's time we rolled all that stuff up into a new release and got it out the door.

Toni and I are working on doing just that. Tonight we posted Visual FoxExpress 2009 Beta 3. This release rolls all of the previous Visual FoxExpress betas into a single download and includes an updated version of the framework. This is a beta and does include a few changes that we have not deployed in live applications ourselves yet, so please take the appropriate caution with your production applications.

The next beta will address a couple of other longtime nagging issues, mostly related to installation. We're working on eliminating the use of the registry by the VFE IDE and installation programs and instead storing the information we need within the Visual FoxExpress directory structure. These changes will make it easier for developers that need to run multiple versions of VFE on a single machine to do so and also will allow VFE to run regardless of the currently logged in user on a machine. You can expect to see this release before the end of the year.

After we've addressed the registry issues, our primary focus for future releases will be on usability. There are two areas that we'd like to work on here; the Sample Application(s) and the documentation. Toni and I are splitting this work and plan to have an updated sample and updated documentation released in the first quarter of 2010.

If you've seen Toni speak at any VFP conferences or user groups as of late, chances are you've seen her speak about using Subversion with Visual FoxPro. We're using Subversion for source code control with VFE in-house. We are in the midst of planning changes to Visual FoxExpress to allow Visual FoxExpress users to get the latest version of the framework directly from our repository. We also plan to have those changes as part of our next major release. This will make framework changes available much more quickly than any method we've used in the past. Once all of these things are in place we will also consider opening up the repository for changes by current subscribers. When the time comes we will solicit the community for feedback on exactly how this should be implemented, so please hold your feedback on this for now.

Tuesday, October 20, 2009

CXToFRX

At Southwest Fox 2009 I showed a little utility that allows the creation of a VFP report based on the layout of a form or class. I had a need to do this quickly with several forms, so I whipped this up. All you need to do to use it is select the objects in the form or class designer that you'd like in a report, then run CXToFrx.prg and it will quickly create a report that matches the layout of the items you've selected in the form or class designer. This is a crude little utility that I whipped up for a specific need and it only supports textboxes, labels and editboxes at this point, but based on the oohs and ahs, thunderous applause and millions of dollars I've received in PayPal donations since I demoed it, it apparently has a lot of value.

In order to use it you have first create a report file named blankreport.frx in the folder where you place the CXToFrx.prg file. Enjoy...


Labels: , ,

Southwest Fox 2009 Rocked!

Toni and I are back from Southwest Fox. I'm physically drained and mentally charged. This was definitely the most fun I've had at a conference ever.

This year's speaker group was awesome and the attendees were awesome as well. There's no elitism amongst the speaker group. Everyone speaking knows that everyone in the seats is an expert in their own right and that everyone has something to share. New friends were made, 20+ year friendships were renewed and equal amounts of love and knowledge were shared. It's such a blessing to be a part of such a great community.

Thanks to Doug, Tamar, Marshal, Rick and Therese for taking care of all the details and providing such a wonderful conference. The community is truly in your debt for creating such a wonderful, hassle free, unifying event.

SW Fox 2010 was announced. I already can't wait for next October 14th to do it again. SW Fox outdoes itself each and every year and even though this year was by far the best, I fully anticipate next year being even better. SW Fox is a can't miss event for anyone working in Visual FoxPro. To everyone that was there, I know I'll see you next year. To those that weren't you've got a year to plan for it. Don't miss it again and this specifically means you Whil Hentzen, Steve Black, John Harvey, Del Lee and so many others that were missed this year. The one thing you can't BIOR is missing Southwest Fox.

Monday, October 12, 2009

Building a Sample Data Set

I had reason recently to build a sample data set for testing purposes. A little bit of background is required before I start showing you the code. We have a field representing a stock number. The first 3 characters of the stock number represent the vendor's product line. Before you start bashing me about the data design, this is old, old data and I did not design it. I know that we should have a separate field for the product line but we don’t. Anyway, I wanted to have three random records for each product line.

The data is in Oracle so I used the following as an expression for a column I named rank.

dense_rank() over (partition by substr(stk_num, 1, 3) order by substr(stk_num, 1, 3), dbms_random.Value) as rank


The rank() and dense_rank() analytical functions provide a way to rank over a grouping. This statement say rank the data grouped by the first 3 characters of the stock number in order by first those 3 characters and then some random value.

So, my full select statement looked like the following:

SELECT id, stk_num, rank
FROM
(
SELECT
product.*,
dense_rank() over (partition by substr(stk_num, 1, 3) order by substr(stk_num, 1, 3), dbms_random.Value) as rank
from product
where format <> 'V'
) r
where rank <= 3 ;


This yielded the first 3 random records but what I really needed to do is remove all of the records except for these three random ones. So I just tacked this on to a DELETE statement like the following:

DELETE FROM product where id NOT IN 
(SELECT id
FROM
(
SELECT
product.*,
dense_rank() over (partition by substr(stk_num, 1, 3) order by substr(stk_num, 1, 3), dbms_random.Value) as rank
from product
where format <> 'V'
) r
where rank <= 3 );
commit;


This took my test data set from over 222,000 records to less than 3200. This is probably not "technically" a random sampling but it should work much better than what we currently have in place.

Labels: , ,

Thursday, October 01, 2009

IsConsonant Function

I wrote this little function for a teammate the other day and could not decide if I should blog about it or not. It is a simple function that I any Visual FoxPro programmer could write. Prior to writing the function, I searched the web to see if someone else had already written it. I could not find anything so I decided to post it hoping that I will save someone else time in the future.


FUNCTION IsConsonant
* Purpose...: Returns .T. if the letter passed is a consonant.
* Author....: Toni M. Feltman
* Parameters: tcLetter, The letter to check.
* tlYIsVowel, When passed .T. the letter Y is considered a vowel.
* Returns...: Boolean
* Added.....: 09/29/2009
LPARAMETERS ;
tcLetter, ;
tlYIsVowel

LOCAL ;
lcVowelString AS Character, ;
llReturn AS Boolean

lcVowelString = IIF(tlYIsVowel, 'AEIOUY', 'AEIOU')
llReturn = ISALPHA(tcLetter) AND NOT UPPER(tcLetter)$lcVowelString
RETURN llReturn

ENDFUNC

Labels: , ,