The ever-snarky Andrew Orlowski points out in the Register that Microsoft is shipping an anti-spyware tool (they bought, not developed) based on the abandoned, unsupported and generally disrespected Visual Basic 6.0. Perhaps they should consider rewriting it in Visual FoxPro…
Tag Archives | FoxPro
Andy Kramek posts a follow-up to his well-received essay: “Well, my little article on “Whither .NET” certainly prompted a variety of responses! I suppose it was to be expected that most of my regular readers are fellow FoxPro travelers and are probably pre-disposed to agree with my point of view. However what I found revealing was the comments from some people who obviously read something into my article that simply was not there.”
In the original post, I showed a simple Visual FoxPro program to generate a week’s worth of activity history from Visual SourceSafe. Andrew MacNeill observed that it would not work for him, as he was supporting more than one database. Here’s one solution: change the original program from shelling out with a single command. Instead, generate a batch file, and then execute it. Here’s a sample:
SET TEXTMERGE TO VSSHIST.BAT SET TEXTMERGE ON NOSHOW \ SET SSDIR=C:\MY DOCUMENTS\SOURCESAFE \ SET VSSEXEDIR=C:\PROGRAM FILES\VSS\WIN32 \ %VSSEXEDIR%\ss history $/ -R -vd <<DTOC(DATE())>>~<<DTOC(DATE()-7)>> -B -O@History.txt SET TEXTMERGE OFF SET TEXTMERGE TO !VSSHIST.BAT SET SSDIR= SET VSSExeDir=
[UPDATED]: My blogging software made mincemeat out of the slashes, greater-than and less-than signs. Copy with care, and proof your result.
The SSDIR environment variable is recognized the the SS.EXE SourceSafe command-line executable: if set, it points to the SRCSAFE.INI file and the location of the data files SourceSafe is to operate on. The second environment variable, VSSExeDir is one I use to simplify the batch file, but putting the absolute path to the SourceSafe executables in one place, you can refer to it within the file, and only need to change it in one place should you change paths. Think #DEFINE in other languages.
Building on the work covered in Essential SourceSafe, here’s some code that will generate two text files of the activity that your SourceSafe database has recorded in the past week. This can be a handy way to keep track with what’s going on in a busy project.
(Changing the text output into an RSS feed is an exercise left to the reader. Cool idea, eh?)
I used Visual FoxPro to generate the commands for SourceSafe, as I couldn’t figure out a way to generate a date less seven days in a DOS command shell. In my next post, you’ll see a slick way to generate the current date, but that didn’t help me here.
Save this program into a Visual FoxPro project, and optionally add a CONFIG.FPW with RESOURCE=OFF, SCREEN=OFF and build it into an EXE. Place the WeekHist.exe in the root of your SourceSafe install (or change the paths in the code below to match) and you can run the exe manually or set the .exe to run on a weekly scheduler using the OS’ scheduler tools.
*============================================================================== * Program.............: WEEKHIST.PRG * Purpose.............: Generate a weekly history file from SourceSafe * Author..............: Ted Roche * Copyright...........: 2000-2005 by Ted Roche, licensed under the Creative * ....................: Commons Attribution Share-Alike License, * ....................: http://creativecommons.org/licenses/by-sa/1.0/ * ....................: Please fix and pass along - Ted * Last revision.......: 2005-June-30 * Parameters..........: None * Returns.............: Nothing, outputs History.txt, .lst or .err * Environment in......: Must run in root of VSS install, ASSuMEs that the * ....................: data directory and win32 directories are below * Environment out.....: History.txt is brief, History.Lst is verbose *============================================================================== * Format is: * win32\ss history $/ -R -vd07/02/05~06/26/05 -O@History.lst * Try...Catch would be nice, but this supports any VFP runtimes #DEFINE CRLF CHR(13)+CHR(10) ON ERROR do errhand with ERROR(), MESSAGE(), MESSAGE(1), LINENO() lcCommand = "win32\ss history $/ -R -vd" + ; DTOC(DATE()) + "~" + ; DTOC(DATE()-7) + ; " -B -O@History.txt" RUN &lcCommand lcCommand = "win32\ss history $/ -R -vd" + ; DTOC(DATE()) + "~" + ; DTOC(DATE()-7) + ; " -O@History.lst" RUN &lcCommand RETURN PROCEDURE errhand(tnError, tcMessage, tcMessage1, tnLineno) STRTOFILE(TTOC(DATETIME()) + " Error " + TRANSFORM(tnError) + CRLF + ; " Message " + tcMessage + CRLF + ; " Message1 " + tcMessage1 + CRLF + ; " Line " + TRANSFORM(tnLineNo)+ CRLF , "History.err", .t.) ENDPROC && errhand
Andrew MacNeill – AKSEL Solutions says: MS at Gnomedex: I Don’t Want to Wait for Longhorn to see you “get” something. Too True: Microsoft has become the slowest moving beast in the jungle. Other vendors are shipping betas now, or have been shipping live products for years. Andrew notes “There’s a lot to be said about taking the time to get it done right.” Yes, that’s true, but in the immortal words of Susan Graham “Shipping is a feature.” Contrast this attitude with the Open Source idea of “ship early, ship often.” Agile organizations can cobble together a prototype, pass it around to interested parties, build a beta-quality product, circulate it amongst a large audience, use the feed back to add/drop/modify features, then Version 1.0 can kick butt, instead of just being a platform for delivering Service Pack One. Perhaps Microsoft does this within their closed, NDA-enshrouded beta process, but few products (with Visual FoxPro a notable exception) appear to benefit from the vetting. Either the testers aren’t giving MSFT good enough feedback, or MSFT is failing to act on it.
Microsoft has been this route already once with Active Desktop and Channel Description Format (CDF). Any bets that second time will be the charm?
Alex Feldstein blogs .
“VFP Devcon’s Keynote in Las Vegas was well attended. Present from Microsoft were Y. Alan Griver, Ken Levy, Randy Brown, John Koziol and Richard Stanton.” Read lots more on his.
For the stereoscopic view, David Stevenson heard the same keynote, a few seats away. In David Stevenson’s Talking Fox, he blogs:
DEVCON keynote shows early Sedna ideas. “At the opening keynote session at the Visual FoxPro DevCon in Las Vegas Sunday night, Ken Levy and Randy Brown of the Microsoft Visual FoxPro team showed several early prototypes of features that might be included in the Sedna release in 2007. Ken emphasized throughout the session much of the same information that has been posted publicly so far, including the fact that Sedna will be focused on making Visual FoxPro 9.0 work better with the Longhorn operating system, .NET 2.0, SQL Server 2005, and other upcoming technologies.”
Ken Levy’s monthly letter is out and points to a revised VFP Roadmap, most of which has been leaked by Ken over the past month on the UT. No surprises here. The project code-named “Sedna” – how harsh! – is officially announced.
There’s a great plug for the Hentzenwerke “New in Nine” book.
Slashdot posts “Firefox 1.1 Plans Native SVG Support. Spy Hunter writes “The Scalable Vector Graphics format has yet to take off on the web, perhaps due to a small installed base of SVG-enabled browsers. That could soon change as the latest Firefox 1.1 nightly builds have started coming with native SVG support compiled in and enabled by default. If this feature makes into the Firefox 1.1 release (which is not certain, but likely, as the developers want it to happen) it will increase the number of web users who have an SVG renderer installed. But perhaps more interesting than that is the possibility of mixing SVG graphic elements directly into the markup of regular XHTML pages, freeing vector graphics from the small rectangle of a browser plugin and opening up a host of exciting new possibilities for web developers. This is enabled by the integration of SVG directly into the Gecko rendering engine, instead of as a browser plugin. With such a useful web developer feature available only in Firefox, could we soon start seeing websites asking their users to download Firefox to get the best browsing experience?”
Exciting news! I’ve always been a fan of using graphs for presenting information, and SVG has a lot of nice features. Lauren Clarke has a presentation on using SVG with Visual FoxPro
On Slashdot, Python Moving into the Enterprise. Qa1 writes “Seems that Python is moving into the enterprise. At the recent PyCon it has become apparent that it’s not just Google, GIS, Nokia or even Microsoft anymore. The article points out that Python is increasingly becoming a perfectly viable and even preferred choice for the enterprise. More and more companies are looking at Python as a good alternative to past favorites like Java. Will we finally be able to code for living in a language that’s not painful? Exciting times!”
I knew several attendees at PyCon, although I was tied up that week (teaching MySQL) and couldn’t make it. Ed Leafe, former FoxPro MVP and host of several great email and web forums at http://leafe.com, presented the promising business development framework dabo. The Greater New Hampshire Linux User Group is building up a Python SIG (developers on all platforms welcomed) and will be holding debriefing sessions about the conference as part of meetings state-wide.
CompuServe is running a survey. You don’t need to be a member:
John Koziol of Microsoft responds, “Excuse me for saying so, but that’s a dumb-ass survey.”
I couldn’t say it better myself. Let’s put VFP over the top!