HomeBlogLearnProductsEventsServicesAbout UsFAQ
Mike Yeager's Blog

Thursday, March 27, 2008
Attention all VFP developers who want (or need) to learn .Net

EPS Software is having an event in Houston May 1&2 for VFP Developers to get acquainted with .Net. There's even a bonus session for those considering the migration of an existing project. Following that is a week of courses in intensive .Net Architecture and Framework use focusing on the Milos Solution Platform called Milos University. It's designed to show best practices, proper architecture, etc. I'll save that for another post... Here are the specifices if you're interested... I know I'll be there.

You can now register online for either (or both) of two powerful, back-to-back training events by EPS -- the world leader in VFP to .NET migrations, and a leading developer of advanced frameworks for enterprise .NET software.

EVENT ONE: On May 1 - 2 (a Thursday and Friday) EPS Software Corp. will host the first of two unparalleled training opportunities: an intensive course, .NET Development for VFP Developers -- with a special view toward VFP to .Net migration, a task many companies are contemplating, if indeed they haven't already started.

The evening of the first day is a Bonus Session on the Strategy of VFP Migrations, with much information accessible also to nontechnical business managers. It will be a detailed overview, based on best practices and real world experience, of the optimal way to transition a mission critical application from any version of FoxPro to .NET and SQL server.

EVENT TWO: On May 5 - 9, Markus Egger and Claudio Lassala, both .NET MVPs, present MILOS University, a one-week seminar on advanced .Net development using the Milos Solution Platform, EPS's advanced modular framework and "component store" for building enterprise applications. This training is not just for Milos licensees! Building powerful enterprise applications with Milos is based on deep insights into Object Oriented architecture and flexible, maintainable enterprise systems, so the training provided is relevant to anyone who is interested in a higher level of .NET skills. A free Bonus Event is a penetrating real-world look into where .NET is now, and where it is going: the "State of the .NET Union."

You can attend either of these events, or both. "Combo pricing" is available, and special discounts will be offered to EPS software development or consulting services clients. The training will be at EPS's office in the Houston, TX area. Details of the agenda and registration information are provided in the attached PDFs.

If you, your staff or colleagues are interested in either of these events, please register at your soonest. Space is limited, and pre-announcement interest has been strong. Online registration at: http://www.vfpconversion.com/Training.aspx

Posted @ 2:57 PM by Yeager, Mike E. (myeager@eps-software.com) - Comments (20)

Monday, February 18, 2008
The myth of "good code"

How often have you inherited someone else's production code and thought, "Wow, these guys were good"? So far, I'm batting very close to 0 on that one. I don't think this is an uncommon situation either. From this, I can conclude:

  1. I am REALLY GOOD - much better than almost everyone else
  2. Most of the production code in teh world isn't really that good
  3. We all judge code quality on different criteria

I'm pretty certain it's mainly due to #1 <S>.  "I could be wrong now... But I don't think so..." OK, it probably is a combination of all 3.

What strikes me is that from what most of us have seen, the vast majority of production code (excluding the code we've written ourseles and may be biased about) is not of a very high quality. How can this be? Does the world really run on bad code? In a word, yes. The fact that it works is beside the point in this discussion, but I don't think it could be argued otherwise. The majority of production code in the world is not of a very high quality.

Here are a few reasons why:

  • Time pressures force us to cut corners
  • Time pressures prevent us from refactoring
  • Coding is HARD - just plain HARD, people who are really good at it are rare
  • There is always something I haven't learned yet
  • The tools are always changing
  • The definition of good is always changing

I try to look at it from the perspective that, "it wasn't possible to write high enough quality code in the past because the tools and methodologies had not evolved far enough to allow it", but I just can't make the argument. Even with TDD and XP and all of the other acronymns, I still have yet to inherit production code and think, "Wow, these guys were good". Even though my mind is telling me that all of the advances must be making our code better, it really doesn't translate into reality. The crap I see today is no better than the crap I saw ten years ago - it's just different crap. There are a great many programmers who can write code that works, but few who write really high quality code. In part, I know that it's just too expensive. Business runs on things that work, and it won't pay for things that are beautiful. It's not even a matter of being short-sighted. At this point in time, thinking that the majority of the architects, developers, testers and other professionals will get to the levels we imagine them at isn't reality.

What I see happening is that the advances are coming in the things that we CAN do with the tools. That in turn, makes the systems we develop more complex and the learning curve even higher. It's not that we're not getting better, it's just that every time we move up the curve, the curve gets bigger. The majority og software professionals are no higher up the curve than we've ever been. The world runs on software that works, and that software is no closer to perfect than it's ever been.

What do you think? Please be ready to back up your rebuttals with, "I inherit a LOT of really good production code these days". I'd love to be wrong on this one... But I don't think so...


Posted @ 12:11 PM by Yeager, Mike E. (myeager@eps-software.com) - Comments (55)

Monday, October 08, 2007
News from the ALT.NET Conference

Ellenor Roosevelt said that, "Great minds discuss ideas. Average minds discuss events. Small minds discuss people." In the developer world, it might be said that Great minds discuss ideas. Average minds discuss development environments. Small minds discuss whether VB.NET is better than C#.

This past weekend I was privileged to attend the ALT.NET conference in Austin. It was not a large conference (only 120 attendees), it was not a Microsoft conference (though Microsoft attended) and perhaps most surprisingly from a conference named “alt” dot net where there were quite a few Mac notebooks and open-source software floating around, it was not an anti-Microsoft conference. Those who did attend were an amazing bunch, mainly people in the bow wave of development who are already so used to practices and tools and ideas that the mainstream development world hasn’t even started using yet that it was old-hat to them. Attendees proposed and moderated their own sessions. Discussions were passionate, intelligent and thoughtful.

At the opening meeting anyone with an idea they wanted to discuss was invited to write it on a sticky and put it on the board, then we all initialed the topics we were interested in. This is how the agenda was created. One of the stickys came from Scott Guthrie who wanted to talk about the yet to be unveiled MVC Framework. That particular sticky turned out to the most heavily initialed of the weekend and the session was one of the highlights of the conference. As the people I work with know, I avoid ASP.NET projects whenever I can. I think the model is crap. The MVC Framework (named for the model-view-controller pattern) changes all that for me. URLs no longer have to map to pages- instead “routes“ are used to match requests to objects that handle requests. Postbacks and all of the spaghetti code that goes with them are gone. ViewState has given way to what appears to be programming practices from this century. It allows, for the first time truly testable .Net web apps. It works with ATLAS. The whole thing is pluggable, so you can substitute your own mode, view and controllers if you want or just inherit from the defaults – or just use the defaults, they’re actually very reasonable.  The base classes aren’t all sealed and locked away. Anyone who’d used Rails recognized what they were looking at and they were impressed. If you do web apps, you have to see this stuff! They absolutely heard the community and got it right. There isn't even a link at Microsoft yet, but Jeffrey Palermo hits the highlights.

Let me describe just one session. Imagine walking into a session about Ruby on Rails. Because it has become so popular in the web app world that it’s not just a novelty and because so much of the group is using it and because you want to see what all the fuss is about, you walk in. Ruby does today what the MVC Framework will do later. The discussion starts with a couple of questions from the guy a few seats down. It’s a subject he clearly knows pretty well and he asks about things that were wondering about too. Pretty soon, someone asks for a walk-through of a rails app and the moderator sits down at his Mac and jumps right in. This is one of the few presentations all weekend. The moderator builds the equivalent of a VS Solution in a couple of minutes and then says, “OK, what are our tests”? The people in the room are so used to test first development that it’s natural – (of course this is the first step) even in a 10 minute demo! Did I mention that the guy a couple of seats down who got the ball rolling was Scott Hanselman who now works at Microsoft? This doesn’t feel AT ALL like a run-of-the-mill conference.

On Sunday when we were wrapping up, I recalled how more people carried paper notebooks than notebook computers. Granted, it was on a weekend, but between sessions, there was no overwhelming rush to check e-mail and make phone calls. I hadn’t seen a single PowerPoint slide. I shot the breeze with Martin Fowler and discussed why Exchange and Notes both handle time zones for calendar appointments poorly and wished someone would fix THAT. I took an aspirin to hold back the headache from only getting 4 hours sleep. Austin was a lot of fun. Sign me up for next year.


Posted @ 1:32 PM by Yeager, Mike E. (myeager@eps-software.com) - Comments (35)

Friday, September 07, 2007
VFP Conversion Tools and running into old friends on "the internets"

A co-worker ran across some questions about VFP to .Net conversion tools on the Universal Thread. I checked it out and ran into a few old friends as well. I swapped a couple of emails and got caught up, then posted some information about our products for the curious that I'd like to re-post here...

My name is Mike Yeager and I'm the lead developer on the conversion tools from VFPConversion (part of EPS Software).

We'll be updating our web site as soon as we can get to it, but here is some info on the most asked about tools. The cost for the conversion tools is from $1-3K each, depending on the type of license / user.

The Project Analyzer is a FREE tool written in VFP that compiles metrics about your VFP projects. This information is very helpful when trying to determine the scope of a conversion project or even just documenting your investment in VFP. There is also a premium version which costs $129 that gives you much more detailed information by drilling deeper into the source code. It includes information such as the average # of commands per method for a VCX, the number of sub-classing levels for forms, controls and classes, etc. This helps us determine the quality of the code and how well the architecture might convert to .Net.

The Report Converter which converts from FRXs to SSRS has been released for quite some time now and is getting really good feedback. If you're interested, contact us and we'll convert one for you for free. From FRXs to Crystal Reports is not yet ready for prime time.

The Forms Converter has recently been released! It converts all visual classes in both SCXs and VCXs. We don't generally do free samples on this one because most people's forms rely on many, many VCXs and those all have to be converted as well. With this tool, you can configure your target to be plain vanilla .Net controls, Milos Solution Platform controls (EPS's own .Net Framework), Developer Express, Mere Mortals, etc... We have not tested all target frameworks thoroughly, but so far feedback is very good.

We've used both of these tools in projects we've worked on in-house. They're both very fast (measured in forms and reports converted per second!) and they save a LOT of time, especially on large projects with hundreds or thousands of forms and reports.

It's true that we only address the most time-intensive conversion tasks. After having done many conversions and we are constantly looking at all of the conversion techniques out there (including VFP compilers for .Net, calling .Net forms from VFP, calling VFP forms from .Net and many others). We've concluded that a comprehensive automated VFP to .Net conversion just isn't plausible. To be sure Conversion projects, if they are of any size at all, will not be cheap in terms of time or money (if you pay someone else to have it done), however they are much less expensive than a ground-up re-write.

We'd love to talk to you about it if you're facing a conversion project. They're not easy and they're not fun, but they are possible and there are many success stories out there. There are lots of free resources on the VFPConversion web site including a conversion roadmap, white-papers, technical articles about specific tasks, etc.


Some automation is almost always possible. We've even taken forms defined in .PRG files, saved them as classes in a .VCX and then converted them to .Net forms!

In all likelihood, you probably want a new architecture for your .Net app anyway, even though you may keep significant pieces of your existing app. Here are some of the big differences you'll find in doing a conversion:

1) Most .Net apps are architected differently than VFP with well-defined tiers. It's much easier to do when you can create and use .dlls (not the COM+ kind) in your development environment.
2) .Net apps have no concept of dataenvironments that span classes or tiers.
3) .Net highly discourages visual inheritance - subclassing visual controls, containers and forms the way it is so commonly done in FoxPro.
4) .Net uses client-server data access technology - you almost NEVER have full access to an entire table at once on the client side.
5) Until LINQ is released with VS2008, you can't query data in memory - all queries have to be run on the DB server. Even when LINQ IS released, it takes a lot more work in VS than it did in VFP.
6) VS has strongly typed languages - variable and parameter data types were never defined in most VFP apps and it's quite common to use multiple types of data in a single variable or parameter in VFP - IIF(condition, 1, 'ERROR') doesn't work well in .Net!
7) VS has only limited ability to run code on the fly (macro substitution, executing uncompiled source code, etc).

In practice we find that most the code itself is cast aside used only for reference when writing the new app in C# or VB. Entire sections of code devoted to things that were complex in fox are rewritten in a few lines in .Net and vice versa. The things that carry over best are SQL statements.

Even if the project architecture doesn't lend itself well to conversion, a tool like the report converter is often used. If you have 150 reports in your project and the converter saves you just 1 hour per report (in our experience it's a lot more than that) then it's more than paid for itself - plus your conversion project is now ahead of schedule by all of those hours. If you hae 2,000 reports - as some large projects do...


Posted @ 4:31 PM by Yeager, Mike E. (myeager@eps-software.com) - Comments (13)

Friday, September 07, 2007
VFP Conversion Tools and running into old friends on "the internets"

New message

Posted @ 4:27 PM by Yeager, Mike E. (myeager@eps-software.com) - Comments

Thursday, July 05, 2007
Viva Las Vegas

I recently met a very good friend in Vegas for a couple of days of getting away from it all. Vegas continues to astound me. As many times as I've been there I've found that, it's a little different each time and yet, it never seems to change. You still can't walk down the street without seeing SOMEONE dressed up as Elvis, passing by a wedding chapel and seing an advertisement for Wayne Newton's show. This time we stayed at the recently renovated Golden Nugget. It really was nice and it still had $5 blackjack tables - something you'll be hard-pressed to find down on the strip where even a table with a $10 minimum bet is hard to come by. We had a LOT of fun. We ate at the buffet, played slots, played hours of blackjack. We even played a few hands of a blackjack variant that I still don't understand, though I managed to win a hand with an 8-to-1 payoff somehow. At one point we met a very nice couple playing craps and the young lady was kind enough to teach us how to play.

Las Vegas is still unique, even with all of the casinos springin up all over the country. My wife and I recently went to Atlantic City while on a trip to visit my family and there really is no comparison. We ate at a buffet, we saw Elvis, and and advertisement for Wayne Newton, but it was different. I pulled a quarter out of my pocket in Atlantic City to drop into a slot machine only to realize that Atlantic City is all-paper now. You can't even put a quarter in a machine anymore. Most machines would only accept a $5 bill or higher. How's that! Las Vegas was happy to take my quarters, nickels, pennies, $100 bills and whatever else I could produce. We saw the light show, we went down to the strip, we did NOT ride the Stratosphere (I did that on another occasion and scared myself quite enough to last a lifetime thank you very much).

I can only take Las Vegas a couple of days at a time, but if you're looking to get away from it all, you can't beat Las Vegas. I can't imagine any place farther away from "it all".

Posted @ 9:46 AM by Yeager, Mike E. (myeager@eps-software.com) - Comments (15)

Thursday, May 31, 2007
Surface, SilverLight, Xiine, Orcas, PopFly

There's a lot of new stuff out there and it's pretty fun to take in all in. Some of it's awesome (Surface and Xiine), some of it's crap (Silverlight), some of it's just an incremental improvement (Orcas & PopFly). Anyway, here are my opinions based on my interactions with these technologies. Remember, you get what you pay for...

If you haven't seen Microsoft's new UI paradigm, check out Surface. I saw some of this in a Bill Gate's keynote a few months ago and wondered when it would find it's way out of the R&D labs. It's hardware and software and for certain types of things, it's incredible (though I wouldn't want to write a book with it). I want one! I wasn't all that excited when tablet PCs came out. This is a whole new ballgame!

Xiine is a sweet digital media reader that manages subscriptions, downloads the content and lets you view it and interact with it any time or place you want. It's kind of like iTunes for magazines, books, tutorials, etc... I recently upgraded my video driver to take advantage of WPF and the graphics in this thing are cool. So far, I'm finding that it comes in really handy when I travel because I've always got new reading material in my laptop. I can even cut and paste code snippets right out of my CoDe magazine subscription.

OK, I was a little harsh on SilverLight - it is a good concept. I think of it as Microsoft taking Flash to the next level. In its initial release however, it relies on the developer knowing javascript and the foundation seems ... shall we say... a bit shaky. Playing with it was one of the most painful experiences I've had with new technologies in a while. In its latest iteration, it allows us to use C# or VB and get away from the quirks and drawbacks of scripting. That does make it a lot more interesting! Still, all of the Silverlight stuff you do will be hosted on existing web site technology, so it's really just giving us more exciting things we can do with a web page - soon.

Orcas, the next version of Visual Studio includes a lot of cool new stuff, but some of the wind is out of the sails because we found out about a lot of the new stuff a long time ago with the release of the 3.0 framework and all the WFs (WPF, WCF, WF). Though we'll finally be getting the developer tools to create things that use these technologies easily, the technologies are old news by now. The new things in Orcas are really all about the compiler features. Linq is the one thing that I've played with in early releases that I'm REALLY excited about. It hasn't been out in the general public nearly to the extent of the other features, nor have the new type inference features that make Linq really exciting. I'm really looking forward to Orcas - but it's yesterday's news.

WCF was a bit of a hassle to get installed, but it seems to work quite well. Even though there is some new terminology to learn, the concepts are pretty straightforward. After that first hello world app, you've got the hang of it. There are a ton of options and issues, but compared to remoting and the W* implementations, shis is way more powerful and easier to work with.

I've worked in some capacilty with WPF and XAML for some time now and am pretty familiar with it. It is da bomb for UI work. The designers are getting to the point where you can use them. Orcas will support it. Nuff said.

I've seen Workflow Foundation (WF), but haven't tried it out myself because I haven't had a use for it lately. It seems a bit esoteric and I may hold off for a while until the tools get better. It's just one of those things where the tools don't give you much visibility into what's going on yet. I'm going to wait on this one.

This morning, I signed up for the Alpha of PopFly, a SilverLight based social web site. It's kind of a YouTube site that give you tools to create your web site right inside your browser. You can also create "Mashups" where you smash together services available on the web and create some new useful or interesting combination. I saw one this morning where they smashed a list of upcoming music events together with Live Earth to give you a map of the country showing all of the events and giving you event information. Pretty cool. There are hundreds (and soon millions, I'm sure) of combinations. Finally, there is the community where you can share you stuff and see what others have shared. So far, I like it because it brings that ability to use some of the information floating around on the web in an intelligent way, so the content can be of higher quality and be more useful.

It's been a lot of fun. I've gotten to test drive some really cool stuff and I like where it's going in general. Some of the trials I've had have just been getting past the marketing babble and finding out what these things really are and how I might use them. That's always been a challenge with M$. Let me know what you've seen recently that's cool...


Posted @ 10:35 AM by Yeager, Mike E. (myeager@eps-software.com) - Comments (17)

Monday, May 21, 2007
Static Analysis and Team System

If you've programmed in .Net, you've at least heard of FxCop, Microsoft's free static analysis tool. It's a VERY cool tool that looks at the IL in your .EXEs and .DLLs and does an automated code review for you. Microsoft even provides a whole set of default rules to look for everything from naming conventions to pointing variables that are declared and never used. How can you beat that for free?

I'll never forget the first time I ran FxCop against a very small project that I had just finished. I thought that I was a pretty good .Net programmer at that point. How bad could it be, right? 287 violations. I don't think I had 287 lines of code in the whole project! Ouch. It took days to get over the bruises on my ego, but with the Help of Claudio Lassala, a C# MVP here at EPS I went over each violation, figured out what each one meant and how to correct it. In many cases, just figuring out what the violations meant was hard enough! Come on, who instinctively knows how to reduce your code's "cyclomatic complexity"? In FxCop, there is usually a link you can click right in the violation itself to get a full explanation of what it is and how to correct it. Naturally, most of it sounded pretty far out there to me and not really applicable to my app, but Claudio was insestent that the code would be of much better quality if I fixed EVERY SINGLE violation. That first time, it took me a couple of days to get them all cleaned up, but in the end I DID have better quality code and after using it on every project I got used to coding to a higher standard so that now, it doesn't feel like any additional effort. Instead of typing:

public string HelloWorld(string Recipient)


        return "Hello " + WhichPlanet;


I instinctively type:


/// Returns a string saying "Hello" to someone.

/// </summary>

/// <param name="recipientOfHello">The recipient of hello.</param>

/// <returns>string</returns>

public string HelloWorld(string recipientOfHello)


        // Example of resource in english: "Hello {0}";
string.Format(System.Globalization.CultureInfo.InvariantCulture, Properties.Resources.HelloWorldText, recipientOfHello);


I've gotten better performance, it's clearer to the majority of other .Net programmers, I've added intellisense for programmers who will use my code down the road, I can post versions in other languages easily, etc, etc, etc. Once I added tools like CodeRush to my dev environment, I was able to automate most of the typing and since then, I've never looked back.

It was just about the time I was feeling pretty good about myself again that Claudio introduced me to some additional static analysis rules that he had created for our internal use at EPS. FxCop allows you to create your own rules and add them to the default rules. Only 46 violations this time <s>. At least now I KNOW thta my code meets all of our coding standards when I check it in. I LIKE FxCop. It's helped me clean up my code considerably and found things that I would probably never have discovered on my own. Things were pretty good...

Then along came Team System. I think Team System is AWESOME, that every programmer should use it whether they work in a large team or not and that Microsoft should lower the barriers they've created with the ridiculous pricing and licensing scheme they've created for it. (Most people start to sense that there's something wrong when you have to produce white papers to explain a licensing model). For a V1.0 product, they've done a great job and by the time V2 comes along I think it will be hard to live without. The worst piece of the puzzle so far seems to be in the area of static analysis. They've baked in the heart of FxCop - in fact the FxCop name still appears in various places, but I get the feeling that they only had a weekend to do it and never got to finish...

Many of the nice things about FxCop didn't make it into the new integration. The links to explanations of violations for example aren't in the TS version. Speed is another issue. It got so bad that we had to step back and come up with a whole new process so that we could avoid running static analysis during most of our builds. The engine also seems somewhat ... ah ... "quirky", occasionally locking up Visual Studio and requiring a re-start. The list goes on, but since static analysis is SO valuable to us, we developed some work-arounds I wanted to share:

1) In FxCop, you could add acronyms such as “EPS” to a custom dictionary for each project so that you didn’t get naming errors when doing static analysis. In Team System, you can still do that, but the settings are global – for every project. Modify (or create) your CustomDictionary.xml file for Visual Studio. The default path is C:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\

<?xml version="1.0" encoding="utf-8" ?>

2) Use "Configuration Manager" to create a build configuration to run static analysis. Everyone knows that every VS project has a "Debug" and "Release" configuration. The Configuration Manager tool, lets you add other configurations. One thing you can do with configurations is target the build to a specific processor type (which is handy for those of you with 64 bit machines), but the real value of build configurations is that you can change all of those project properties which, for Team System includes things like whether or not to run static analysis. Because we use a lot of test driven processes, we build often, so our default "debug" configuration is set up to be as fast as possible - no static analysis, no xml comments, etc. We then create a new build configuration for each project in the solution, copying the "debug" settings and then we modify them to produce a very thorough build. We can even set up a policy in Team System to require that we build with this configuration before allowing code to be checked in. Most of the day we code, build and test with the fast "debug" configuration. Then, when we're getting ready to check code in, we switch to the new configuration and build everything. We clean up the static analysis violations, ensure that our tests pass and THEN check in our code.

Catch you later!

Posted @ 10:41 AM by Yeager, Mike E. (myeager@eps-software.com) - Comments (3)

Friday, May 04, 2007
The Visual Inheritance Question

I've probably converted a couple thousand forms from Visual FoxPro to .Net. In fairness, I was the primary developer on a tool that did the conversions for me. There are some notable differences in the two environments that I wanted to highlight. I'm just finishing up on a couple of deadlines that have kept me away from my blog, but I want to write this stuff down while it's still fresh.

When I lived mainly in the FoxPro world we made the most of visual inheritance. We subclassed the base form, button, textbox, checkbox ... everything. That way, when we wanted to change the look and feel or behavior of these controls or add some functionality, we could do it in one place and the changes got inherited in every place we used them. Then we created some composite controls. Created a subclass of the main for "edit" forms, for "search" forms, for report forms. We dropped on "OK" and "Cancel" buttons, a control to do resizing, changed the background color, etc. Next, we added another whole layer of subclassing everything so that changes could easily be made to one project and not another. By the time we created a form that we’d actually use in an app, it was probably about 4 layers deep in visual inheritance. Now, when we needed a new edit form, we simply subclassed the one that had almost everything on it, filled in the blanks, moved things around, adjusted the colors, the size, the title bar, fonts, behavior, etc for the specific needs of this one form and we were done. Visual subclassing was very, very powerful in VFP.

.Net doesn't like visual subclassing nearly so much. Create a subclass a form based on another form and you find out pretty quickly that things are quite different than in the VFP scenario I just described. Probably the first thing you'll want to do is resize the form and change the caption on the title bar... but for some reason -- you can't! What good is subclassing one form from another if you can't even change the text on the title bar! Turns out, .Net has a really good reason for this behavior (called "encapsulation"), but it sure does throw a wrench in the works if you want to do visual inheritance. The well-known work-around is to go into your base form and change the modifier from the default private to public. This works great for the designer which will now let you resize the subclassed form. The best practice however is to not do that. Instead, you should create an interface for the properties and methods on your base class that you want subclasses to have access to and create public methods (and/or properties) on your base class that implement the interface. Perhaps you'll create an interface including SetFormTitle() and SetFormSize() methods. Now sub-classes can call these methods to adjust these settings. This leaves a lot of people (including me) scratching their heads. Forget using the form designer - it won't work with your interface. At this point, you're limited to modifying the base class in a subclass by writing code. Does that sound right?

Of course, VFP could work this way too. If you've ever created a "control" class, dropped a few textboxes or buttons on it and used it on a form, you've seen this in action. Unlike using a "container" class, once you drop your new control onto a form, you can't right-click, select "edit" and drill into the textboxes and buttons. Most of the VFP developers I know did this about once, learned their lesson and never did it again. Why limit yourself?

Now, what was that "encapsulation" thing again? One of those key pieces of object-oriented programming. It means that objects should only interact with one-another through well-defined interfaces and that one object shouldn't know the internals of the other. To put it another way, you should be able to see the other object, but not see inside the other object. That concept sounded sooooo awesome the first time I learned about it. Practically the death-knell for spaghetti code! As long as my objects stayed backward compatible with earlier interfaces, I could add functionality, completely change the internals of my object and not worry about breaking any code that used it. As long as I maintained my SetFormTitle() and SetFormSize() calls with the same parameters and return types, I was not going to break any code that used my object.

So if I was to drop my container onto a form and drill into those text boxes in the designer. Maybe just to stretch one of those text boxes to make it just a little bit longer? Do I now know too much? Do I now know about the internals of my object? Haven't I just busted the rules? .Net emphatically says, "Yes". What CAN we do to make everyone happy?

You CAN subclass the .Net base classes in code. (Something along the lines of public class MyButton : System.Windows.Forms.Button in C#) You can then compile this class and use it in your applications. You can even get it into the toolbox, and with a little extra work, set a meaningful icon for it (it won't show up looking like a button in the toolbox by default) and make it behave just a little more like a button. With some more work, you can get it to show up looking like a button at design time. Now, whether you just include the source code for MyButton in your project or compile it into a dll and set a reference in your project, you can start using MyButtons, but unless you are a control designer, I think this is a little too much effort. Besides, this is “inheritance”, not “visual inheritance”. This is an exercise in creating written code.

Is there actually a difference between an object meant to implement logic and one meant to be visual? I think so. And I think we should draw a line between them and allow for more visual inheritance. I would however like to see a big difference from the way FoxPro implemented it. I’d rather not make it so easy to let controls see UP the containership chain. In other words, the textbox shouldn’t have easy access to the form it’s on, and especially not to the other textboxes and buttons. I’ve seen code like that and it truly IS ugly. If controls need to work with each other, that should be done in one place, through the containing object which does have knowledge of its own internals. I think seeing DOWN the chain should be a lot less restrictive. Yes, I think you should be able to change the size of a subclass of a form. This would allow for a much better story in the designers so that we could visually change that title bar and stretch that textbox and create a much more productive environment.

Are there ramifications? Yes. Let’s say in VFP you had a project with 200 forms derived from a base class form with a label on it and one day you decide you don’t need the label anymore. You open the base class and delete the label, save your change and rebuild your app. Presto, the label is gone. Even if you changed the position and text of that label on every one of your 200 forms, you won’t see an error. VFP is happy to ignore all of those property settings in your forms for the label that no longer exists. .Net will scream at you however and I think that’s OK. You’ll get a couple hundred compile time errors and will have to double click on each one and remove the offending settings from each form. I’m OK with that. It will produce tighter, higher quality code.

This is NOT an issue with the CLR. These restrictions come from 2 sources. 1) all visual classes contained in other classes are marked private by default. 2) the designers don’t support “drilling in”. You can change the default modifier of contained controls from private to public. You can change properties of contained controls in code and even on the property sheet after you do this. The designers however will not let you make any of those changes visually and will very likely throw away whatever changes you made on the property sheet when it re-writes the code in the generated .designer file. Your changes will have to be made by hand in user code.

Would changing the way this works break the rule of encapsulation? I’m not so sure. Visual controls have a well-defined interface and exposing a well-defined interface (the top, left, height, text, backcolor or other members) in a subclass of a visual container isn’t as terribly horrible as exposing the internal workings of something that does logic. There is already a line in the sand between visual and non-visual objects. I think the self-imposed limitations are a question of philosophical purity vs. productivity. I understand the potential for misuse, but I fall on the side of productivity on this one.


Posted @ 10:02 AM by Yeager, Mike E. (myeager@eps-software.com) - Comments (28)

Wednesday, March 14, 2007
VFP is certainly not dead yet.

Microsoft officially announced last night that there would be no Visual FoxPro 10. The product is being sunsetted. It reminds me a lot of when they announced the same thing for Windows NT. But like NT, VFP will not go away today or tomorrow. There are a LOT of VFP applications in the world. I'm surprised nearly every day to come across them. Some of these are BIG applications. Mission critical applications. Dozens of man-years invested. We're talking huge. I know a lot of organizations that still have those NT boxes running in the server room (Some of them now run as virtual machines on a big, bad, brand-new box).

I still work in VFP A LOT! On average, I spend several hours a day in the FoxPro IDE. I'm comfortable with Fox, I'm good at it and I expect to be working in Fox for at least a couple more years. There are a lot of mature, robust VFP apps out there getting the job done every single day. I maintain a few of them myself. I also spend part of my typical day creating tools to help people converting from VFP to .NET and part of my day working exclusively in .NET.

Do I think Microsoft is right? Not that they asked me for my opinion mind you <s>. Having worked with .Net since the first beta, I can tell you that in versions 1.0 and 1.1 I still missed Fox a LOT. In 2.0, I missed it sometimes. With 3.0's WPF and WCF I still miss some things. When LINQ arrives with the Orcas release, I'll be ready to let go. A lot of features developed for FoxPro have made their way into .NET. Many of the FoxPro Team at Microsoft have moved to the .NET teams over the past several years and taken some of the best ideas with them. In some ways, .NET is just now catching up with Fox (Language INtegrated Query? We had that in DBase!). In other ways, it is way ahead. Just looking at some of the new WPF interfaces blows me away. SQL Server has also grown up a lot. Back in version 6.5, I think you'd have been crazy to dump DBFs for SQL, but compared against even the FREE version of SQL Server 2005, DBFs have lost a lot of their appeal. VFP still has some advantages over .NET. Two years ago, I could name a dozen very big advantages. Today, I can only name a couple and from the previews I've seen, those will disappear soon too.

Fox is a great tool and I expect to be working with it for the forseeable future. Am I going to start a new project in Fox? No. Am I going to uninstall Fox from my machine? No. I have versions 6, 7, 8 and 9 loaded along with dozens of projects on my disk and in source control. Some of these apps will live a long time in Fox, others will be converted to C# or VB, others will be retired - eventually.


Posted @ 9:02 AM by Yeager, Mike E. (myeager@eps-software.com) - Comments (4)

Monday, March 05, 2007
A good day at the rink

My son's mite hockey team won their playoff game on Saturday and got to go to the championship game on Sunday. It was an odd scene because the rink is in the middle of a shopping mall on the west side of Houston! The facility was very nice and the ice was good. The kids were stoked. My son's team was playing against the leading team in the league and they hadn't lost a game all season. The closest they got to losing was a tie. Our team had improved steadily all year and was ranked 3rd. The kids played their hearts out in a nail-biter! There was one bad call against our team when the refs didn't see the puck hit the back of the opposing team's net and called no goal. We were down an goal at that point and really needed that score. Several minutes later, the refs made a similar call in our favor - that evened things out at least!

With about 2 minutes to go one of my son's teammates scored the go-ahead goal and the last two minutes contained some intense hockey. In the end our team won by a goal. It was interesting talking with some of the parents cheering for their kids. Emotion ran high and there were a lot of parents yelling for thier kids to do this or that - backseat coaching! Later, after the game they announced that there would be a family skate the following week at the same time as our practices had been. A chance for the kids and the parents to just come out and skate together. I was talking with some of the parents and was surprised how few of them were planning on coming! It seems that the more vocal the parent, the less likely they were to get out and do it themselves. After all of the coaching, it turned out that most of them didn't even skate. These were the same parents yelling, "forecheck! forecheck! how many times have we been over this?" <G>

I see this a lot in kids sports and I see it a lot in the professional world. One of my goals as a parent and as a professional is to avoid that kind of behavior in myself. I'm not always successful, but I'm working hard on it. As a professinal coder, it's easy to look at someone else's work and criticize it. We often forget our own code written many years ago in another place and time. We often forget that if the programmer who wrote this piece of code years ago had known what we know today, that they probably would have done it differently. When I started writing code there was no such thing as n-tiered applications. There was no such thing as object oriented programming. We grow and learn. I shudder to think what someone ten years from now will say about the code I'm writing today. I wonder what the next paradigm will be. I can't wait until I look back and shake my head dismissively and mutter, "what were we thinking?".

Software development changes daily. Usually those changes are good. Sometimes the changes come so fast that it feels like you're drinking from a firehose. Sometimes, we just wish it would stop for a while! We all get to yell our opinions from the back seat. I'm OK with that. Dialog is how we learn. What I have a problem with is yelling from the back seat without being a driver yourself. There is a phrase, "contempt without investigation" that I just love because it describes so well what I hear from developers all the time when new ideas come up. "That's stupid, why in my language we can do that with X". I'm OK with being proud of what you know, but until you take the new method for a spin - really look at it from another viewpoint, I'm not going to pay too much attention to you. To me, you're a lot like that parent who's never skated yelling, "forecheck!". Unless we're a little more willing to look at those things we don't understand, it's going to take us a long. long time to get to that next paradigm. Bill Gates is widely credited with bringing the phrase, "good artists borrow, great artists steal" to the software industry. I've never thought of Mr. Gates as the greatest visionary of our time. In my opinion, he's a guy who's smart enough to take advantage of the ideas that are already out there and to apply them without hindering himself with the details of where they came from! He's done pretty well with that! To me, he's the guy who watches the game and then gets out on the ice himself and applies what he saw for his own team.

See you at the rink,
PS My adult team won our game later that evening - and I'm proud to say that my forechecking was very good for a change <s>. All I told my son was that I was very proud of him.


Posted @ 9:38 AM by Yeager, Mike E. (myeager@eps-software.com) - Comments (4)

Friday, March 02, 2007
You're kidding! - A shortage of Visual FoxPro programmers?


Every business is cyclical in one some way. Our company has a special expertise in helping other companies move from Visual foxPro to .Net. In the last few months there has been another big surge in this part of our business. Suddenly, (again) huge conversion projects are starting up all at once. We're in another cycle and oddly enough, the cycles seem to keep getting bigger instead of smaller.

I believe ours is the only company in the world with 2 MVPs in BOTH VFP and .Net. Our professional relationships allow us to double that number if the demand calls for it. That's not even counting the rest of us, many of whom have certifications in VFP, SQL Server and/or .Net and have extensive experience with these platforms. We get a lot of calls asking us to help out on a conversion project, to do training, to provide tools or to actually do the conversion and in most cases we're asked if we can recommend prospective employees who are familiar with VFP, SQL Server and .Net. You wouldn't think that would be a tough question. After all, just about every VFP programmer I ever knew had SQL Server experience and most of them have started working in .Net. So where are all of those people? Working!

The pool of available people with this unique blend of skills is surprisingly small and with very few new developers getting into VFP the pool is steadily shrinking, but the sheer number of mature, stable mission-critical VFP apps still out there in the world continues to amaze me. This has caused an unexpected shortage of workers with a select skill set and that acually seems to be driving up prices. It reminds me of Y2K when COBOL programmers were suddenly coming out of retirement because the job offers were just too good to pass up. For the next few years at least, it looks as if .Net developers with a VFP background will actually be in demand. We all know that the "good" people with these skills are going to be even harder to find.


Posted @ 9:42 AM by Yeager, Mike E. (myeager@eps-software.com) - Comments (3)

Wednesday, January 17, 2007
Arbitrary Constraints in SQl Server Reporting Services

I've been doing a lot of work with SSRS lately and am getting increasingly familiar with the product. I like it - a lot, but it does have some interesting constraints about where information is allowed to be placed on a report layout that seem to me to be arbitrary. Here are a few of my pet peeves about this V2 product that I hope will disappear in V3.

  1. You can't use data in report headers or footers or in page headers or footers. At first glance, you'd wonder why anyone would want to do this, but there are several good reasons. Most business applications store things like CompanyName and Logo in a table and it would be nice if you could do a SELECT from that table and drop the fields on your report header. Also, what about things like printing invoices where you're using pre-printed invoice paper with a space for the TO and FROM addresses at the top of each page? I don't see why SSRS imposes this limitation when other products don't. The work-arounds are messy and not 100% reliable. It seems to me from reading newsgroup postings about it that many users are upset enough to ditch the product for this reason and that Microsoft is taking the hint and might put it into a future version.
  2. Certain Global variables aren't accessible in certain places on the report. I wish I could be more specific, but I really can't - each case is individual. Globals!PageNumber is one example. Why can I only put this in the page header or footer? I have occasionally hit a circumstance where I want to put the page number in the body of the report - but I can't. I'm relatively certain that during processing, the report engine knows which page it's on. Why go out of your way to prevent this?
  3. Many of the things available in a report aren't in the expression dialog and/or don't have intellisense support. For example, ReportItems! is a list of existing report controls that can be referenced by other controls, but has to be typed in by hand. Methods and enums available in the .Net Framework are often available in expressions but many such as DateFormat.ShortDate don't show up in intellisense or show up in teh expression dialog as having syntax errors. There is also no indication as to which pieces of the .Net Framework are unavailable due to security constraints (for example, System.Environment.UserName).
  4. I understand the security implications for a report running in a web browser, but in locally rendered reports (.rdlc) should run under the same privledges as the application hosting the report. Why do locally rendered reports run as if they were running on a report server?


Posted @ 2:24 PM by Yeager, Mike E. (myeager@eps-software.com) - Comments (3)

Wednesday, January 10, 2007
Tag! I'm it!

Markus tagged me and now it's up to me to tell you 5 things you didn't know about me. Since I'm NOT a public figure or prolific blogger like those who've come before me, that should be easy <s>.

  1. I love to fly airplanes. Truth be told, if I could fly every day I would do it in a heartbeat, but such jobs were designed for single people who can be away from home a lot. The very first airplane I ever flew was when I was a crew chief in the New Mexico Air National Guard. I got to have what they called an 'incentive ride' in an A-7K Corsair fighter plane going about 500 miles per hour. I started taking flying lessons immediately after that, but got interrupted when I moved to Taos and ran out of money. Several years later, I took it up again and learned to fly in a Cessna 172 in Alamosa Colorado (KALS). I purchased my first airplane N2326E, a Piper Tomahawk and tied it down at my home airport in Taos New Mexico (KSKX) for a couple of years and brought it with me to David Wayne Hooks airport (KDWH) when I moved to Houston. I've managed to fly about 100 hours a year over the past 3 years. Currently the plane is for sale and I hope to move up to a bigger, faster plane soon.
  2. I spent a sizeable chunk of my youth being a ski bum. Before I went on to get my BA in Computer Sicence from Rutgers, my first two years of college were spent getting a AA degree in skiing. It included sports medicine, resort management and even some on-hill classes. I've often thought of it as taking retirement early, while I was still young. It involved a lot of sunburned noses, making great friends, drinking, hitchhiking - oh yea and lots of skiing. I've skied probably 2,000 days in my life and specialized in mogul skiing on some of the steepest terrain in the world. Not exactly a career-minded path, but I wouldn't change it for the world.
  3. I don't spend much time on computers outside of work. Most everyone I know lives and breates the stuff. they're email junkies, gamers, midnight programmers and I'm not! I much prefer spending my time off with my wife and son, flying, golfing, skiing, being on the beach, hiking or almost anything else. If I didn't put in more than 40 hours every week in front of a compuer screen, I'd do it as a hobby, but I get my fill at work.
  4. I'm currently reading Janet Evonavich's novels about Stephanie Plum - Jersey Girl Bounty Hunter. My wife would read these books and laugh out loud. One day when looking for something to read, I picked one up and am now on #4 (I think there are 12 of them so far). They're page-turners and if your're from New Jersey like I am, they're hysterical. Everyone from New Jersey knows that you never go to the beach, you go "down the shore". I'm not proud of this fact but, "Whoomph, there it is!".
  5. I am the world's worst basektball player. If there were a hall of fame for this, I'd be enshrined in glory. I've always been more of an individual sport kind of guy, but even so... I've managed to be adequate at baseball, football, soccer, volleyball and recently hockey. For some reason, I can't seem to see the big picture of what's going on in any way, shape or form on a basketball court. Add to that my poor ability to dribble and shoot and you've got a disaster waiting to happen. Ever since junior high school, I've harbored a secret fear that I may one day have to play basketball again and then my secret would get out.

Tag - Now You're it! Here are the 5 people I'd like to tag...

  • David Tansey
  • John Martin
  • Sean Lee
  • Tim Locke
  • Jess Williams

Links to come...

Posted @ 10:21 AM by Yeager, Mike E. (myeager@eps-software.com) - Comments (3)

Tuesday, December 05, 2006
This is how to write a utility! WMI for developers.
I was recently looking for some code to determine the serial number for a computer's motherboard.  Searches turned up tons of examples for querying WMI (Windows Management Instrumentation), but the syntax was pretty whacky and I had a hard time finding the right query in the MSDN documentation.  Trying the queries out was time consuming.  Reading a post on a MS forum, I cam a cross this link: http://www.microsoft.com/downloads/thankyou.aspx?familyId=2CC30A64-EA15-4661-8DA4-55BBC145C30E&displayLang=en for one of the best utilities I've seen in a long time.

This thing is incredibly complete!  It not only lists everything that is available to you (thousands of pieces of information!), it allows you to retrieve each value at the click of a button, automatically generates sample code (in the language of your choice) on the fly and then RUNS the sample code interactively if you want.  If that isn't enough, there is a link to the MSDN documentation for each call right on the screen.  You can even hook into WMI events right there in the utility!

If you're doing any work with WMI - get this utility.  If you're writing a utility - see how well it stacks up against this one!  Well done!


Posted @ 10:02 AM by Yeager, Mike E (myeager@eps-software.com) - Comments (4)

Blog List
VFPConversion Blog
Markus Egger's Blog
Ken Levy's Blog
Claudio Lassala's Blog
Blog Archive
March, 2008 (1)
February, 2008 (1)
October, 2007 (1)
September, 2007 (2)
July, 2007 (1)
May, 2007 (3)
March, 2007 (3)
January, 2007 (2)
December, 2006 (1)
October, 2006 (2)
September, 2006 (2)
August, 2006 (6)
July, 2006 (3)
June, 2006 (2)
May, 2006 (4)