Andrew MacNeill - AKSEL Solutions

Wednesday, July 08, 2009

PEM Editor Video Series for VFP

If you haven't tried out the VFPX PEM Editor, you may want to check out Jordan's video series here.

The PEM Editor replaces the Properties Window, Edit Property/Method, New Property, and New Method, and Document View tools in Visual FoxPro. Sound like a lot?

There are 8 videos in all, totaling less than an hour of your viewing time.

It's this type of tool, along with the Control Renamer, FoxTabs, Tabbing Navigation, among others, that shows the need for an installer for VFP that includes these great tools that improve the VFP IDE experience.

It's something that has been brought up numerous times before, in VFPX discussions as well as at last year's Southwest Fox.

Consider a single installer that runs automatically after a VFP installation (or on its own) that installs and sets up:
- PEM Editor
- Control Renamer
- FoxTabs
- Tabbing Navigation
- Automated Build
- the updated Sedna and FFC controls
- Alternate SCCText (if desired)
- Code Analyst

(the above are all tools that improve the IDE)
And then creates a separate Samples folder for the other samples such as:
- GDIPlusX
- FoxCharts
- ThemedControls
- Tab Menu
- Desktop Alerts
- and more

Developers are always using new tools and expecting the most from their IDEs - many of the tools in VFPX provide a major improvement in productivity for VFP developers, be they building new applications or maintaining legacy applications.

If you haven't taken advantage of these tools, check out the video series for the PEM Editor just to get a glimpse of what you're missing.

Labels: , ,

Tuesday, June 30, 2009

Southwest Fox Registration Saver Deadline Coming Up

Southwest Fox, the fantastic US FoxPro developers conference, has a special deal for registration with $125 off the regular $745 price.

Note: The deadline has been extended to July 7th, 2009 so sign up today.

The conference line-up looks amazing this year, just as in past years. One of the tracks that really seems to be fleshing out is the Technology Track, with sessions on Virtual PC, SourceGear Vault, Subversion and more.

Southwest Fox definitely has it all: great speakers, great sessions, great networking - a great experience for developers.

Saturday, June 27, 2009

Death of a legend

While I don't usually use this site for personal thoughts, I do want to take a moment to recognize the death of Michael Jackson, a true legend in pop culture and someone who affected the entire world with his music in a positive way.

While his lifestyle was crushing and troubling, his legacy lives on through his music and his impact on the video generation. Like his music or not, he invented pop culture as it exists today (through video, music and celebrity). I think most of the world today has some memory of him, as I know I do.

Just a thought - his planned comeback tour should continue on - with other musicians (Justin, Usher, Smokey, Paul, his brothers to name a few) taking part in those 50 concert shows, paying tribute to him. The money could go towards the obvious litigation that will be coming.

As the Righteous Brothers sang, "if there's a rock'n'roll heaven," then Michael has just joined one hell of a band.

He will be missed but his music lives on. Rest in peace, Michael Jackson.

Anyways, back to our regularly scheduled development posts.

Labels:

Wednesday, June 17, 2009

Test Driven SQL Projects

SQL Server Central just posted part 2 of an interesting article on applying the techniques of test-driven development to a SQL project. The author, Andy Leonard, goes from describing basic tests for setting up your databases to writing tests for inserting and updating data.

It's good stuff for a variety of reasons. He noted in the first article that some of the techniques are simply good coding practices (drop and recreate) but by writing them up as test scripts as well as within the SQL itself makes the entire piece part of a regression test and can resolve lots of further problems. He also points out that unit tests mean different things to different people so ensure your definition is the same as others on your team.

I'll be the first to admit that I'm not following the full pattern of writing individual tests out for each of my tables (the firing squad can resume shortly) - but the overall approach that Andy describes is solid and depending on how you code, you might find you are already doing a lot of what he describes.

"What’s really cool about all this is the fact that it’s re-executable. You can run the same script against a new instance of SQL Server where WeatherData has never been deployed, or you can run it where only version 1.0 has been deployed. I like that a lot."

Much of it is obvious to most db developers (before creating a stored proc, check its existence, ensure you have the right database selected, etc) - but there's still a lot of dirty code out there in the while. I *love* re-executable SQL - on my current project, I'm seeing a lot of code that is made to run once, just to clean something up. I keep on sending it back to the developers noting that when we do an interim release, we need to be able to re-run the code as often as it takes until it's ready.

Definitely worth the read.

Wednesday, June 03, 2009

Linux ready for the desktop? Show me productivity first.

ZDNet has an article titled Linux Ready for the Desktop.

While I do enjoy Ubuntu quite a bit (at least on one desktop) and I would never doubt the usefulness of Linux on a wide variety of machines, my concerns over open source systems have become more widespread with issues about forks.

Linux is certainly a different scenario than MySQL but consider this - mySQL has been considered a viable alternative for commercial RDBMS' for how long? It's been around since 1994 but has only really become a force to reckon with in the past 10 years.

Certain incarnations of Linux are certainly ready for the desktop (OpenOffice is arguably a good alternative to MS Office - bloat and all) - but then so are an entirely cloud or web-based OSes.

My #1 concern with any OS that I'm going to place on my desktop is "does it make me more productive?" (an offshoot of that would be "does it make any of my clients more productive?")

I'm a firm believer that people will pay for things that make them more productive. I believe Vista has shown that people are NOT willing to pay for upgrades that don't. The security argument doesn't completely wash with me because too many people gun for Microsoft since it is the leader - no OS is impervious to attack (except the one that isn't connected to anything).

Now I've been playing with the Windows 7 beta and so far, it isn't bad - but it still annoys me a bit more than Windows XP but far less than Vista. I've been living in a Visual Studio 2008 project with third party controls and while some of the results are nice, I still rely on Visual FoxPro to do a great deal of the background work.

On the same project, I work with SQL 2005 but I also have SQL 2008 on my office machines - I can safely say SQL 2008 is far better than SQL 2005 in making me more productive. Yet I still use VFP to write automated SQL scripts - it's simply better at text handling than any other tool.

Some people love the Windows Explorer - others find alternatives. The only real way any new operating system is going to make it is by making people more productive, not by a little but by a lot.

The iPhone isn't a great phone - but it does open up the entire world of smart phones to consumers in a way that Windows Mobile simply hasn't. Both phones have features that the others don't - but cell phones are a consumer product - they rely not just on impression and productivity but also "coolness".

Desktop operating systems do not rely on the coolness factor - they are there to get a job done. I don't want an operating system that simply replaces another - I want one that makes me do more with less.


Labels: , , , ,

Monday, June 01, 2009

Refactoring T-SQL

While much has been said about the benefits of refactoring application code (see VFPX Code Analyst), I typically haven't seen a lot of noise about refactoring T-SQL and stored procedure code.

The refactoring features found in SQL Manager tend to be more about refactoring your database design but not about the actual content of the SPs.

It's important to note that if you tend to rely on large stored procedures, then many of the same rules of refactoring apply:

1. Keep it short and sweet.
2. Make it readable.


So when dealing with a particularly unruly stored proc (over 1000 lines), I was quite happy to find Red Gate's SQL Refactor (here's a post from the lead developer).

Some of the features are pretty basic (renaming variables, etc) but the one of great interest was the Encapsulate as a new Stored Proc.

As with a number of tools that are add-ons to other components, its overall usefulness might seem limited if you are building your stored procs either using testing patterns or have good code review sessions - but if you're inheriting or just watching one procedure get too big, it's definitely useful.

What about your SQL applications? How big do you let your stored procedures get?
What tools do you use?

Wednesday, May 20, 2009

Dealing with Font Sizes

Andy Kramek offers some great samples of identifying how long a string can be in a particular font. This is something that every UI designer needs to consider when dealing with screen design.

While many VFP developers will use FONTMETRIC and TXTWIDTH, Andy has wrapped it all into a fairly easy function to call.


Check it out here

Labels: , ,

Wednesday, April 15, 2009

SQL: Does a Field Exist?

In the FoxPro world, checking to see if a field exists can be done a number of ways:

=AFIELDS(la)
IF ASCAN(la,"FIELDNAME")>0

ENDIF

or

IF TYPE("FIELDNAME") = "U"

(I'm sure there are lots of other ways especially if you're already working with a data dictionary tool)

In T-SQL, there is no real equivalent however, you can do the same by using the INFORMATION_SCHEMA table.

While there is no shortage of sites on the web that will show you similar code (like this one), I wanted to post it here for any VFP devs who may be switching between DBFs and SQL.

IF NOT EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS
WHERE INFORMATION_SCHEMA.COLUMNS.TABLE_NAME = 'MyTable'
AND COLUMN_NAME='MyColumn')
ALTER TABLE myTable ADD MyColumn decimal(10,2) NULL

Of course, this assumes that the table already exists but you can use similar approaches for tables as well.

IF NOT EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'myTable')
CREATE TABLE .....

if NOT EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'CFG_Fees'
AND COLUMN_NAME='minmFee')
ALTER TABLE .....


Labels: ,

Sunday, April 05, 2009

VFPx Showcase: Control Renamer

When speaking about VFPx at last year's Southwest Fox conference, it became evident that there aren't a lot of avenues for finding out how to use various pieces of VFPx. So as part of the FoxShow, I'm creating videos designed to showcase VFPx components, starting with the Control Renamer.

If you have ever wanted to rename a control in a class or form but were hesitant because of missing other code references, the Control Renamer is definitely a tool you want to try.

Now, there are lots of areas where new options can be added into this tool - but they are primarily "extras" like setting color settings or some logging.

Check it out below!









Labels: , ,

Thursday, April 02, 2009

New VFP 9 SP2 Hotfixes: Report Designer Bug Fixed

Rick Schummer just noted this on his blog but it bears repeating.

A bug that Cathy Pountney had reported with the VFP 9 SP2 Report Designer has been fixed and is available for download, combined with 2 other hotfixes.

As Rick points out:
"Hopefully this is just the third in a string of hotfixes we will see from Microsoft as they support the product we all love. Today is a very good day. This is one small step for VFP, one giant leap for VFP developers. "

Download it here


Labels:



 
milf big naturals cumfiesta mike's apartment