Saturday, August 22, 2009

SwFox Vault PreConference Teaser Video

All of the preparations for this year's SwFox conference are well underway. All of the session demo's are completed and the white paper and powerpoint presentations are almost completed.

I'll be doing a rehearsal of the SQL Tips and Tricks session on Saturday Aug 29th at the special SwFox Rehearsal event in Lansing MI. I'll also be doing a rehearsal of the Vault session in Atlanta, GA on Sept 8th at the Sept. meeting of the Atlanta Fox Users Group.

Just to help spur additional interest in this year's conference, I've put together a 4 minute basic demo of the vault functionality I've built within VFP.

I hope that you find this interesting and I hope to see you at the conference in October.


Note: Blogger seemed to really shrink the video down to where its difficult to make out the content. The full-size video has been added to the SwFox videos page. Here is the direct link to the video:

Saturday, May 2, 2009

Speaking at Southwest Fox 2009

I’m very excited to be able to announce that I was invited to speak at the 2009 Southwest Fox conference in Mesa, Arizona. I could tell you all about Southwest Fox but if you are reading my blog, chances are that you already know about it.  For those few who may not, you can find out more by visiting

Speaking at a FoxPro conference has always been a goal of mine but it is something that I’ve always questioned whether or not I had what it takes.  The established speakers in the FoxPro community have been excellent and I’ve learned so much from them over the years.  I’ve always wanted to find ways that I could give something back to the community, but I’ve struggled to find out what that could be.  Most of the people whom I’ve met over the years attending the various FoxPro events are either independent programmer/consultants or work for companies that distribute a commercial software application.  I write software that is only used by my company, in support of the over 500 customers that we provide mailing and other services for.  While we are all using the same programming language, the goals and objectives we strive for can be very different. The question in my mind was whether I knew or did something new, cool or interesting that would benefit the community. 

At last year’s conference, I really started to believe that I could be a speaker and started to think about topics I could present.  I was able to participate in the “Show us your apps” session at Southwest Fox 2008 and received good reviews on some of the work I had done building developer tools with Intellisense to generate basic search/edit table maintenance web pages using West Wind's WebConnection. I was able to show this presentation again in a little more detail at a smaller gathering in Toledo this past January and again received very positive feedback.  In conversations with other attendees, with some of the organizers and with members of my programming team, I started to bounce session ideas around and get some feedback as to what others thought about what I’ve done and what I could share.  When speaker submission proposals were due in the spring, I decided to propose three topics for sessions related to Intellisense, SQL Server and SourceGear Vault.  

A few weeks back, I was humbled by the receipt of an email from the conference organizers informing me that I had made the cut and they had chosen my Vault and SQL Server sessions.  There was an immediate reaction of excitement – “I made it!” immediately followed by steadily growing burden of expectations – “What did I just get myself into!”  Speaking in front of people has never been a problem for me (if it was, why would I even consider submitting a proposal?) and I’ve very comfortable in my knowledge of the topics and in my belief that what I have to share is something people should like.  The biggest area of concern for me was in the requirements for a white paper for every session.  Technical writing (and writing in general for that matter) has never been one of my strong points.  This was the area I decided to focus on first in my preparation for the conference.

Many of the established speakers have been very kind and helpful to share tips and tricks that they use to prepare for speaking and they have shared with us access to a website where many speakers have contributed notes and resources directed at helping the conference speaker be the best they can.  Since the white paper was my biggest source of angst, I jumped right in to the advice given for this.  There were several recommended reading items given and after a little research, I decided that Write to the Point by Bill Stott was the best selection for me.  A common theme of the reviews provided for this book was “encouraging the beginning, or the intimidated, writer”. This was me they were talking about. 

I’m only about half way through the book but so far, it has been very good.  The main theme of the book has been how a majority of us have all been beaten down and intimidated by our past English teachers by focusing so much on the technical aspects of the English language (grammar, punctuation, sentence structure, etc.) that we lost the ability to focus on what it was that we wanted to say in the first place.  The book encourages you to focus on writing something new and interesting and not to worry about bad writing skills.  No one will care about poor use of grammar or sentence structure if the material you are trying to share is worth reading.  If however you write boring material or simply rehash ideas or topics that have already been covered in depth without introducing any new angles or challenging the existing thoughts, then you are in trouble as everyone will notice the grammatical mistakes since there is nothing really else to get excited about.  That is now my goal – find a way to be what Stott refers to in his book – a “Good Bad Writer”.  In case you haven’t noticed, I’m going to try the concept with this blog by talking about what the speaking experience is like from a new speaker perspective.  How did I do?

Anyways, I’ll sign off with another plug for Southwest Fox 2009.  As a company owner, a programming team leader and a software developer, I cannot speak highly enough of the value obtained by attending a development conference.  I’ve attended close to 15 conferences in the last 10+ years and I’ve learned so much about the technology, different approaches in problem solving and made several close personal and business relationships.  My company and my programming team would not be as strong as it is today if we had not made a commitment to sending as many of our programmers as possible to a conference every year.  Whether you learn more about a technology or tool you may be considering, see a great session that solves a problem you’ve been fighting, have the opportunity to bounce questions or ideas off different speakers or peers in the break rooms or hotel bar or even simply get away from the day to day grind of the job and into an atmosphere that promotes fresh thoughts and openness to new ideas, the time I spend at a conference each year provides the highest return on the investment of my time and money that I could ever possibly hope to achieve.  I hope to see you all there.  

Sunday, March 1, 2009

VFP Syntax Coloring in Blogger

So I'm all excited about the prospect of starting a blog and I've got a list of topics going that I keep adding to. I'm working on one the other night (not published yet) and I wanted to add a few source code examples to it.  Having never done this before, I'm thinking to myself, this shouldn't be that big of a deal, right?  Wrong.  

I'm publishing this blog with Google's free Blogger service.  Say what you want about this tool but it was super easy to get started and with a last name like Krzystek, I didn't have to worry about the availability of wkrzystek on (or any other domain for that matter!).  It's pretty customizable with several templates to choose from, many gadgets you can use, and more.  If you are thinking about starting a blog and you are not sure which to use, I recommend this one very highly based on my experience so far.  Many others tell me to upgrade to WordPress and it seems pretty cool as well but this was the one I had picked and I'm not interested in moving it at this juncture unless I find a compelling reason to do so. 

One of the first items I tried was simply pasting my code directly into the Blogger editor and when I did this, the formatting was fine but I lost all of the Syntax coloring. Hmm.  I've seen this before and I've used Word as a middle step so I launched a new instance of Word, pasted my VFP code and everything looked good.  However, when I pasted the code in Blogger, the syntax coloring came across properly but everything was double spaced.  Further more, trying to clean this formatting up in the Blogger editor was a major PITA to get the code to look like it was in VFP.  This is too much work for my taste.  

It seemed like Word was putting out CRLF's at the end of each line and then Blogger was converting each CR and LF to an Html line break tag.  OK, I can handle this, back to VFP again - _Cliptext = STRTRAN(_Cliptext, CHR(10), "").  When I pasted this into blogger, everything was formatted properly again but all of my syntax coloring was now gone.  Doh. Of course this made immediate sense to me since _Cliptext = _Cliptext is a tip I use every day in VFP (intellisense: CP2) to clear any formatting from the clipboard before pasting into another source where I don't want the original formatting to come along (this is great when copying stuff from the web into word or other rich text editors).

At this point, I started digging deeper into the problem.  I had remembered a recent blog post from Bernard Bout who referenced a blog by Burkhard Stiller who was working on a project to convert the RTF used by VFP into valid HTML snippets so that it's easier to use when blogging.  This seemed to me to be exactly what I needed.  I downloaded the last copy from Burkhard's blog and tried running the form (OK, I should have spent more time reading his 7-part blog post first but that's just not me.)  As soon as I ran the form, it crashed and after a little debugging, I determined that the clipboard format that my VFP is putting out wasn't the same as what Burkhard was expecting.  OK, now it's time to read his posts to see if I can figure this out.  Burkhard was using a constant of 49298 for the VFP clipboard RTF output and this value returned an empty string when I run the form.  On his blog in Part 5 he shows some VFP code using FoxTools to enumerate all of the info on the clipboard.  I modified this slightly for my use just to save the clipboard contents to a file that I could inspect in UltraEdit:

*\\ Start with EnumClipFm(0) gets the first format available.
nFormat = EnumClipFm(0)
DO WHILE m.nFormat != 0
IF BETWEEN(m.nFormat, 49152, 65535)
" | GetClipFmt(#" + ;
TRANSFORM(m.nFormat) + ") =", ;
?? " | GetClipFmt(#" + ;
TRANSFORM(m.nFormat) + ") =", ;

*** WTK: Save the clipboard text to a file
                        *** for further inspection
lcClipText = GetClipDat(m.nFormat)
STRTOFILE(lcClipText, "cp_" + ;
TRANSFORM(m.nFormat) + ".txt", 0)

nFormat = EnumClipFm(m.nFormat)
= CloseClip()

When I ran this code, the VFP RTF clipboard data was saved to cp_49292.txt.  OK, go back to the form, change this value and voila - I get the HTML formatted code shown properly in the embedded browser control on the form.   OK.  This wasn't too bad.  To get the html generated, I simply right-clicked and chose View Source from the browser control and I was able to get the html snippet.  (As a side note, EditPadPro is an awesome html View Source utility.  It automagically sets itself to be the View Source app for IE on install and displays the HTML in the same syntax coloring as Visual Studio's web developer).  When I pasted the html in the blogger editor, it looked simply awful (as html does to the naked eye) and further more when you previewed the output of the post, all of the coloring was gone and none of the indenting was retained.  In blogger, you have both a rich editor control as well as the ability to tweak the html source directly.  I attempted to paste the generated HTML directly into the html source window and this still didn't work.  Why not?  Well, the way Burkhart's tool works currently is that he is using a CSS style for each style of code formatting options in VFP (strings, literals, commands, comments, etc).  Since blogger is all template based, these CSS values are never registered. At this point I should have punted, but no - I'm much more stubborn than that.  I went into the blogger layout options and tried in vain to add the CSS styles from the generated HTML code to the tempate's Head section.  I made several different attempts at this to no avail and when I evaluated the risk of permanently fouling up my Blogger template if I continued I decided this was not the way to go.

I then went out to see if I could figure out what others were doing.  I remembered reading a post from Rick Strahl's Blog about how he was getting syntax coloring for ASP.NET code from Visual Studio.  While very cool, this wouldn't work for me. I then checked Doug Hennig's Blog, Rick Shummer's Blog and Cathy Pountney's Blog who were all using Blogger and saw that they didn't have source code syntax coloring in their blogs at all.  I asked myself, can this be done?  At this point I was getting tired and just a little frustrated and feeling like my concept of short and frequent blog posts had all gone to heck since I had been at this for a couple of hours now and I stopped for the night.

The next morning, I tweeted about the experience and had a few suggest tweaking my _VFP.EditorOptions to either include X or make sure that it was excluded.  My setting was "LQKWT" and X wasn't included.  When I looked at the help file since this isn't a setting I'm often tweaking, I saw that the purpose of X was specifically to suppress the RTF clipboard formatting.  This wasn't it.  I started going back to the thought of using Word as an intermediary which was also suggested.  If you remember from the top of this post, when I pasted from Word, everything was double spaced.  I couldn't tweak the clipboard externally from VFP but could I affect this from within Word directly?  One of the things I always have set in Word is to Show all non-printing characters - I want to know if there is a tab character or if someone held down the space bar for 5 seconds to indent (that drives me nuts).  When I pasted the code, I saw that each line had a end of paragraph symbol at the end of the line (what you get when you press the Enter key).  I thought about changing these all to a "soft-enter" or "line-break" (what you get when you press Shift+Enter).  One could certainly do this manually but that would be a pain for large blocks of code.  I'm unfortunately using Word 2007 (which I still haven't acclimated to after about 6 months) so I'm not sure exactly if this tip will work in earlier or later versions of Word but I suspect that they will. I pasted my VFP code into a new Word document so I could safely do a Replace All.  I launched the Find and Replace dialog and in my Find I put "^p" to search for a Carriage return/paragraph mark and in the Replace I put "^l" to replace with a New line.  Check out this page for Special characters you can use with Find and Replace in Word.  This worked like a charm - the code came into blogger properly indented and formatted and with the same syntax coloring I have in VFP.  

To summarize what I learned in this process is that you really can't get the VFP syntax coloring copied out to anywhere but Word with any sense of reliability.  To export it from Word to the Blogger editor, first replace all paragraph marks (^p) with new lines (^l) and then you can copy from Word directly into Blogger and all is well.  I'm sure that if I tried hard enough, I could probably write a Word automation utility that would do all of this for free.  That would be kinda cool, wouldn't it?  Sounds like a future blog post!  

Thursday, February 26, 2009

Lack of Blog Posts from the VFP community

It seems like most of the people whose VFP blogs I was following have drastically reduced their posting frequency.  About the only frequent posts that come in to Google Reader are SwFox announcements and posts from Rick Strahl and Andy Kramek.  It seems to me that people seem hesitant to post something unless its a grand and complete thought.  Rick and Andy's posts are absolutely phenomenal and I hope they don't ever change but I think they scare others away to say if you don't have a white-paper quality post - don't post it.  I know I've felt that way in the past where even though I may have a lot of interesting little topics, taking the time to polish them into a white-paper quality blog post scared me away.  

With that being said, I'm going to try to keep the frequency of my posts up and to try to keep the content lightweight where it doesn't take me more than a little bit to share either something I learned, something cool I found or something that I had forgotten about.  Hopefully the readers of this blog will benefit from that.  I'm willing to bet that the others in the community have gone through the same process where soon after they launch a blog they have all sorts of great ideas and then eventually the interest wanes and the blog goes without a post for months on end.  

I'm also curious as to the effect of Twitter on this process.  After being part of twitterville for the last few days, I'm seeing loads of traffic from the people I know in the VFP community including several of whom I used to really enjoy reading their blogs.  Since Twitter is pretty painless and you only have 140 characters to post with, it lends itself to ease of use and the social aspect of it is kind of addictive.  Are we all spending our time on Twitter instead of blogging?  Hard to say for sure.  Anyways, I've got a few ideas I'm working on that hopefully you will like. Stay tuned for the next post.  

Wednesday, February 25, 2009

Welcome to Twitterville

Well I finally took the leap.  After attending the last foxpro conference, it seemed like I was one of the few in the room that wasn't twittering non-stop during every presentation.  So far it seems OK.  It definitely has a little bit of a distraction quality to it but it is nice to be able to interact more often with the friends in the community that you only saw once or twice a year at a conference.  So far I'd say that about 90% of my tweets were more social in nature but I'm hopefull to add a little bit more technical stuff to what I'm tweeting about.  I've used the web interface through chrome for most of my initial posts but now I've switched to using TweetDeck which definitely gives a richer user interface.  Anyways, that's about it for this post.  I'm going to do my best to keep my blog posts coming on a regular basis.  Wish me luck. 

Tuesday, February 3, 2009

Hello World!

This is my first attempt at starting a new blog.  Hopefully from this simple beginning, I can get a good feel for the flexibility and ease of using the Google blogger software to build and maintain a blog.  Hopefully, this will be pretty easy!

Here is a sample image of the intro screen from Dars:

Checkout for more information.  For our video demonstration, click here.

Here is an example of embedding a short video clip in the blog: