Friday, October 17, 2008

Day 2 started with Andrew MacNeill's “Profiling and Refactoring: How to Analyze and Clean-up Your Code” session. This was my first time seeing Andrew present, although I've been reading his blog and following his podcast The Fox Show for some time now. The two big things I got out this session were Code Analyst and Coverage Profiler tip.

Code Analyst is an open source developer tool on VFPX that is used to evaluate code against a set of user defined rules. For example, there could be a rule that PUBLIC variables are not allowed. There could also be a rule that every method/program/function must have a RETURN. Code Analyst would then scan the source code and document which rules were broken and where at in the source code. Kind of like a Code References on steroids.

A really cool feature of Code Analyst is that it supports four types of rules: method, line, object, and file. A good example of a method rule is the RETURN command. Each method must have at least one. Or only one, depending on you was raised {g}. Whereas checking for a PUBLIC variable would be something that is done for each line.

One idea I had for using Code Analyst is enforcing Software Development Standards (a.k.a. this is how we do it here). For example, I could have a function for opening tables called OpenDBF(). Therefore, the USE command should only exist in this function. I could create Code Analyst rule to check for the USE command.

As for the Coverage Profiler tip. Anyone who has used Coverage Profiler knows that the LOG file it generates can get big real fast. Disk space is not the problem so much as getting the Visual FoxPro Coverage Profiler Analyzer tool to process a 100+ MB file. Andrew suggested importing the LOG file into a table and then deleting the entries that were not important. For example, I could delete entries based on the filename, class, or the time it took to execute. After that I’ve got something that is probably a lot easier to grok.

The second session of the day was Christof Wollenhaupt’s “Introduction to Mobile Development”. This presentation covered the basics of developing software for mobile devices. Christof discussed how to setup a virtual mobile device for testing, mobile device limitations such as screen size and API, and did a demonstration of how to use the alternative Visual FoxPro runtime Guineu for running VFP applications on a mobile device.

Next I attended Rick Strahl’s “Using Ajax and jQuery features to build Rich Web User Interfaces with Web Connection” session. Rick explained what jQuery is, why you want to use it, and demonstrated some cool examples. He stated the number one reason for using something like jQuery is the normalization across the different browsers. He also mentioned a blog post on his web site where he explains how to add jQuery IntelliSense to Visual Studio. Although it sounded like Microsoft should be adding that feature soon.

After lunch, it was time for Craig Boyd’s session “VFP Studio: Extending the Visual FoxPro IDE”. Ever since the Southwest 2007 keynote where Craig and Bo Durban first did a sneak peak of VFP Studio, I’ve been waiting to hear more about VFP Studio. Craig explained that VFP Studio is a replacement for the Visual FoxPro IDE. For example, the MODIFY COMMAND window, Class Browser, Project Manager, Form Designer, and etc. It is not a run time replacement, like Christof’s Guinea or eTechnologia's VFPCompiler for .NET projects.

Craig went on to explain that VFP Studio was created with Microsoft Visual Studio SDK. This same SDK has already been used to create IronPython and a few other IDEs. He stated the biggest problem with the SDK is that it is so huge that it can be quite overwhelming. He also mentioned that it is still evolving, so sometimes a new release will break existing code.

Craig was able to demonstrate some of what he and Bo have already completed. What I saw was very cool. I especially like code editor and form designer features.

Replacing the Visual FoxPro IDE may not sound like a cool idea if you have never worked with Visual Studio. Trust me, it is {g}.

Craig wrapped up with a call for help. He and Bo are currently looking for developers with C# and Visual FoxPro experience. They also have a need for testers. So if you are interested, please contact either of them directly via email at SweetPotatoe Software or Moxie Data.

Next I attended Christof Wollenhaupt’s “Creating Owner Drawn Controls in Visual FoxPro” session. In this presentation Christof demonstrated how to create your own controls (i.e. page frames, progress bars, and etc.) using GDI+. I would call it a basic how to guide for creating the same kind of cool things you see on VFPX like ctl32 StatusBar and FoxCharts.

One of the coolest parts of this session was an example of an Office 2007 style floating menu bar. You know the one that pops up when text is highlighted and the mouse is positioned over the text. Very cool.

I also enjoyed the way he “converted” a complete Visual FoxPro form to a .NET GUI with the click of a check box. Everything from page frames and option groups to text boxes. That was pretty slick.

The last session of the day was Rick Strahl’s “Using .NET with Visual FoxPro for Reliable Web Service Access and Hosting” session. Rick discussed the current state of Web Services and Visual FoxPro, how to use .NET via COM Interop, and the differences between ASMX and WCF.

I must admit that I have only done a few web services so far, mostly Visual FoxPro server to Visual FoxPro client. It was good to see what my options are for the future and to be able to squirrel away some sample code and notes {g}.


Links:
Andrew MacNeill's Blog http://akselsoft.blogspot.com/
Rick Strahl's Blog http://www.west-wind.com/Weblog/
posted on Friday, October 17, 2008 8:18:11 PM UTC  #    Comments [0]
 Thursday, October 16, 2008

One of the questions I get asked most often by someone who could not attend the conference is what happened during the keynote? Traditionally the keynote is when big announcements are made and new cool stuff is publically previewed. For example, last year Craig Boyd and Bo Durban demonstrated VFP Studio.

This year the organizers of the conference did something different that I think was really cool. A live video broadcast streamed over the internet.

So, if you missed the live broadcast or just want to see it again. It is available for viewing at http://www.ustream.tv/channel/swfoxtv. Be sure to catch the "magic" of Craig Boyd and Bo Durban about 57 minutes into the video {g}.

One last thing. I want to thank Steve Bodnar of Geeks and Gurus for making this happen. He did all of the work solo. From the setup and testing, to shooting the video and handling the chat window. Way to go Steve!


Links:
Geeks and Gurus http://www.geeksandgurus.com
posted on Thursday, October 16, 2008 9:23:54 PM UTC  #    Comments [0]

Today began with Andy Kramek's pre-conference session - Introduction to Transact SQL. This session covered the basics of Microsoft SQL Server Transact SQL (T-SQL). From variables, temporary tables, and common table expressions. To functions, stored procedures, triggers, and more.

My favorite part was the explanation of how Microsoft SQL Server, and most other database management systems, process a SELECT command. Andy took us step by step how the query engine builds each of the intermediate result sets, the order everything is processed in, and how Visual FoxPro's engine works slightly different.

Knowing this helps me understand how to build better SELECT commands. It also explains why a SELECT command might not always do what I expect it to. Great information.

posted on Thursday, October 16, 2008 9:05:06 PM UTC  #    Comments [0]
 Sunday, October 05, 2008

Today I completed my first half marathon (13.1 miles) with a time of 2:15:35 (hh:mm:ss). My first goal was simple - cross the finish line. After that, I was shooting for a time of 2:15 (hh:mm). So I must say that I am pretty happy with my results.

As for the race itself, this was the inaugural year for the Brooksie Way Half Marathon & 5K Run/Walk. From my perspective I think everything went really well. I like the course, a mixture of paved roads and dirt trails, flat ground and hills. There were plenty of aid stations, lots of volunteers working the course, and a beautiful finish line at the Meadow Brook Hall on Oakland University campus.

I would like to say thanks to my family and friends who cheered me on along the course and at the finish line. Every time I saw your faces and heard your voices it made me forget the fatigue and gave me the boost I needed to push harder.

Now that I have done my first half marathon, I'm thinking the Martian Marathon (26.2 miles) on April 5th, 2009.


Links:
Brooksie Way Half Marathon http://www.thebrooksieway.com
Martian Marathon http://www.martianmarathon.com/
posted on Sunday, October 05, 2008 11:18:29 PM UTC  #    Comments [1]
 Sunday, August 24, 2008

On Saturday August 23rd, 2008 I completed my first 10-mile event in the Crim Festival of Races with a time of 1:58:08 (hh:mm:ss). My goal was to finish something closer to 1:45. It was not an un-reasonable expectation. I had ran that same distance for the previous three Saturdays with an average pace of 10:32 (mm:ss) per mile. I guess the temperature that morning (somewhere in the high 80's, low 90's) had a bigger effect on me than I expected. That will teach me not to do all of my training runs in the 60's to 70's.

Despite my results, I really enjoyed the Crim Festival of Races. There's something about participating in a race with thousands of other people that is exciting and motivating. If you are ever near Flint Michigan on the fourth Saturday in August, I highly recommend it.


Links:
Crim Fitness Foundation http://www.crim.org
posted on Sunday, August 24, 2008 9:53:45 PM UTC  #    Comments [0]
 Sunday, August 10, 2008

Wow! It's been 117 days since my last blog entry. I knew that it had been a while. I guess it was just too easy to keep telling myself I'll catch up on the blog next week. Oh well, here is what I've been up to for the past 4 months.

In April I resigned from CCS (Complete Computer Service, Ltd.) and took a position at White Light Computing. CCS is a small software company that sells vertical market applications to the Healthcare Staffing, Security Guard, and Temporary Help industries. With almost 13 years of service it was not an easy decision for me to leave, but I still think it is what will be best for me and my family in the long term. I hope to remain in contact and friends with the people I worked with there for many years to come.

May 1st was my first day at White Light Computing. So far I am really enjoying the challenges and the type of work I am doing. After working on a vertical market application for so many years it came to the point where I knew the code like the back of my hand and the frequency in which I was technically challenged was less and less. One of the things I like about software development is that I can constantly test myself and learn new things. And the work I am doing at White Light Computing lets me do just that.

On June 14th I took a little trip over to Grand Rapids Michigan to catch the GRAFUG (Grand Rapids Area FoxPro User Group) special event, The Andy & Marcia Show. Andy Kramek and Marcia Akins presented five topics: Implementing Design Patterns in Visual FoxPro - Part 1 & 2, The 26 Hour Day, Using ActiveX Controls, and Event Handling in Visual FoxPro. In addition, TechSmith donated copies of SnagIt and Camtasia Studio Bundle which were given away during the event. All of the above plus lunch and snacks for the low price of forty dollars. Definitely worth every penny and giving up a Saturday to attend.

The month of June was another big month for me personally. My wife and I celebrated our 10th anniversary with a ten day trip to the west coast. We started with three nights in Las Vegas at New York New York Hotel and Casino. One of my favorite places in Las Vegas is The Bar at Times Square and the dueling pianos. Another highlight was seeing "Phantom" at The Venetian. Although I have seen The Phantom of the Opera a couple of times before, I have to say that this production was by far the best, and the custom built theatre was amazing.

From Las Vegas we flew over to San Francisco and stayed at the Marriott Fisherman's Wharf for three nights. San Francisco is a really cool city with a lot of culture and unique bars, restaurants, and shops. I especially liked that most places we wanted to go were in walking distance. For the things that were not, the mass transit system is out of this world compared to what we have back home.

For the last segment of our trip we rented a convertible and drove to Napa Valley. Along the way we stopped and did some brief hiking at Muir Woods National Monument. This time we stayed three nights at a bed breakfast two blocks from downtown Napa, visited several wineries, and finished with a trip to a spa in Calistoga. The whole trip ended with a Friday night red-eye flight back home so that we would have at least two days to recoup before going back to work.

Vacation is always nice, but eventually you have to come back home and deal with all of the things that got left behind. That was July. I don't know where time went, no special events come to mind, but the days flew by none the less.

On second thought, I did start a half marathon training program in July. On October 5th I'll be running the Brooksie Way Half Marathon in Oakland County, Michigan. This is my first ever half marathon so I'm not expecting to break any records, finishing the event will be victory enough.


Links:
White Light Computing, Inc. http://www.whitelightcomputing.com
GRAFUG http://www.grafug.com
New York New York Hotel & Casino http://www.nynyhotelcasino.com
San Francisco Marriott Fisherman's Wharf http://www.marriottfishermanswharf.com
Muir Woods National Monument http://www.visitmuirwoods.com
Brooksie Way Half Marathon http://www.thebrooksieway.com

posted on Sunday, August 10, 2008 6:10:43 PM UTC  #    Comments [1]
 Tuesday, April 15, 2008

Ever since I decided to post the Beyond Compare add-on utility, VFP2Text, it was always my intention to also release the source code. The reason I waited was to allow some time for any bug reports or major enhancement ideas. I figured initially it would be easier for me to handle them.

Well, it's been over a month since I first blogged about the add-on and so far no problems reported and the enhancement requests have been about minor changes. So, in keeping with my original plan, I have posted the source code for the utility on my web site here.

In return, I ask that you please share with me any cool enhancements or bugs you find. Thanks.

posted on Tuesday, April 15, 2008 11:03:32 AM UTC  #    Comments [0]
 Friday, April 11, 2008

Last night Mike Feltman, of F1 Technologies, did a presentation called "Collections". He discussed the basics of collections and arrays, and very some cool utilities he wrote for working with both.

One of cool things I learned had to do with the FOXOBJ clause of the FOR EACH ... ENDFOR command. For example, in the following code sample "loObject" is not a Visual FoxPro object, but is re-casted as a COM object.

loCollection = CREATEOBJECT("Collection")
loCollection.Add(CREATEOBJECT("Custom"))
FOR EACH loObject IN loCollection
   && loObject is a COM object, AMEMBERS() returns 0.
ENDFOR

Starting with Visual FoxPro 9, we can add the FOXOBJ clause so that loObject is a Visual FoxPro object. This is an important distinction, because functions like AMEMBERS() and COMOBJ() would produce unexpected results.

loCollection = CREATEOBJECT("Collection")
loCollection.Add(CREATEOBJECT("Custom"))
FOR EACH loObject IN loCollection FOXOBJECT
   && loObject is a Visual FoxPro object, AMEMBERS() returns 18.
ENDFOR

The FOXOBJ clause was not new to me. However, what I did not know was that using the FOXOBJ clause made the FOR EACH ... ENDFOR command almost 2x faster than the FOR ... ENDFOR equivalent.

* create a collection with 10,000 items
loCollection = CREATEOBJECT("Collection")
FOR m.lnX = 1 TO 10000
   loCollection.Add(CREATEOBJECT("Custom"))
ENDFOR

* test the performance using FOR EACH
m.lnStartTime = SECONDS()
FOR EACH loObject IN loCollection
   * do nothing, we already have an object reference
ENDFOR
? "FOR EACH: " + TRANSFORM(SECONDS() - m.lnStartTime) && 0.156 seconds

* test the performance using FOR EACH with FOXOBJ
m.lnStartTime = SECONDS()
FOR EACH loObject IN loCollection FOXOBJ
   * do nothing, we already have an object reference
ENDFOR
? "FOR EACH with FOXOBJ: " + TRANSFORM(SECONDS() - m.lnStartTime) && 0.016 seconds

* test the performance using simple FOR
m.lnStartTime = SECONDS()
FOR m.lnX = 1 TO loCollection.COUNT
   * get an object reference to the item
   loObject = loCollection.ITEM(m.lnX)
ENDFOR
? "FOR: " + TRANSFORM(SECONDS() - m.lnStartTime) && 0.031 seconds

Little gems like this are one of the benefits of attending local FoxPro user groups meetings. The opportunity to learn something new, meet new people, and the comradery are all valuable benefits.

If you missed this presentation, I heard that Mike will be presenting it again at the Grand Rapids Area FoxPro User Group on May 10th, 2008.


Links:
DAFUG http://dafug.org
GRAFUG http://www.grafug.com
F1 Technologies http://www.f1tech.com

posted on Friday, April 11, 2008 10:43:36 PM UTC  #    Comments [0]
 Wednesday, April 09, 2008

I downloaded my first issue of FoxRockX and I have to say that I like it. The format reminds me of the old FoxTalk issues. There is a good amount of content; twenty-four pages with out any advertisements. And of course, source code was included.

Out of the five articles in this issue, Doug Hennig's "Deep Dive: A Generic Import Utility" is my favorite. This article is part one of a two-part series that will demonstrate how to add a generic import utility to your application. In this issue he discusses the overall design and engine code. The next issue will be about the user interface.

Articles like this are a major reason why I subscribe to technical publications. Maybe I don't have a need for this today. But, I know that there is a good chance I will someday. And when that time comes I will more than likely use this article and sample code as inspiration for designing and writing my own.


Links:
FoxRockX http://www.foxrockx.com
Subscription in America & Asia http://www.hentzenwerke.com
Subscriptions in Europe http://shop.dfpug.com

posted on Wednesday, April 09, 2008 10:27:24 PM UTC  #    Comments [0]