Monday, October 25, 2004

Purge VFP Memory - Follow Up

As I blog here, VFP doesn't release its allocated memory assigned by OS (Windows) after a long run/heavy memory usage process, and commands like CLEAR ALL, CLOSE TABLE ALL and etc doesn't alway help. (or may be it doesn't release all memory)

I found an old VFP function that able to release its allocated memory and back to the minimum memory usage required to run VFP, that is
SYS(3050, 1, 1000)
So, set the VFP foreground memory buffer size to minimun or set your optimized memory buffer size after a long run process should helps to improve performance in long processes. And it is in my testing. :)

Saturday, October 23, 2004

Is Prime Number?

I just back from Job Interview in this morning. I was required to write a program to check any number passed is prime number or not. I was not very sure what is prime number, therefore the interviewer asked me to write another program. And, I am able to write it on the spot.

After the interview, I took abit time to search from internet what is prime number and I have written IsPrime() within half an hour. I think I "failed" the test because I shouldn't take that that long time. Anyway, here is the code :


FUNCTION IsPrime(tnNumber AS Integer) AS Boolean
llIsPrime = .T.

*-- Check number from 1 to value of parameter
*-- minus 1 because every number can be
*-- divided without remainer

*-- by itself by default

FOR i = 1 TO tnNumber - 1
IF i = 1

*-- 1 is not prime number
*-- by definition

llIsPrime = .F.
ELSE

*-- If number can be divided
*-- by other number without
*-- remainder,

*-- then it is NOT prime number

llIsPrime = NOT (tnNumber % i = 0)

IF NOT llIsPrime
EXIT
ENDIF
ENDIF
NEXT

RETURN llIsPrime
ENDFUNC

I have tested it, and it should work. Anyone got shorter code for this function?

Thursday, October 21, 2004

Purge VFP Memory

Recently, I run a batch process that took out maximum 90MB of RAM to run the a process. After it was finished, my PC become very very slow. I tried to :
CLOSE TABLE ALL
CLOSE DATABASE ALL
CLEAR ALL
SET PROCEDURE TO
SET CLASSLIB
SYS
(1104)

However, Task Manager still showing that VFP(n).exe took 90MB of memory usage. My PC still that slow. So, any command or funtion that *really* can purge memory?

Friday, October 15, 2004

More photos from VFP DevCon, Las Vegas

Alex Feldstein posted Igor Vit's and his photos which were taken during VFP DevCon 2004.

Alex also posted his experience in Las Vegas here and here.

[Source : Alex Feldstein]

VFP9 Help File Refresh

Garrett Fitzgerald has posted a link for download latest version of VFP9 Help. Thank you Garrett.

BTW, how does Garrett get know of this link? I couldn't find any announcement regard this from Microsoft Visual FoxPro home page nor Microsoft Download Center.

[Source : Garrett Fitzgerald]

What happened to Universalthread.com?

Recently, I keep "disconnected" from Universalthread.com while I was surfing. After disconnected, I failed to reconnect to it again, even its home page is not reachable.

What is happening? Are they doing maintenance? I didn't receive any notification at all. Anybody?

UT is part of my life. I just feel abit uncomfortable if it is "down". :P

Tuesday, October 12, 2004

Letter from Crimestar Corporation to FoxTeam

Crimestar Corporation, a solution provider to the law enforcement market has written an appreciation letter to MS FoxTeam members for their hard work and dedication to Visual FoxPro.

Friday, October 08, 2004

Back from VB.NET world tour event

I am back. I arrived at event venue at 8:55am. Many peoples were waiting in front of function room. 9am sharp, we were allowed toenter to functionn room.

I can briefly count that is about 550 attendees. 400 T-shirts were given away, according to VB.NET Product Manager, Malaysia.

After welcome and introduction by PM Malaysia, Microsoft's Jay Roxe, the Product Manager for Visual Basic shown us the way to extend Visual Basic.NET application using popular and powerful community usercontrols - VB Power Pack. Some useful controls could be found in VB Power Pack are Toolbar, Task Panel (XP style outlook bar), MSN like notification window and etc. Then, Jay asked is anyone using Tablet PC. I could see one or two persons shown up their hands. Jay continued to show usage of Ink Control for writing recognition. Lastly, Jay demo a simple VBA application by integrate XML data returned from .NET web services into Excel worksheet. XML DataSource mapping do the treats to display XML on form.

After ten minutes break, Matthew Gertz,the Development Lead of Visual Basic Compiler Team take over the presentation. He demonstrated some new features built-in onto upcoming version of Visual Studio.NET - VS.NET 2005. Matthew had shown quite alot of VS.NET 2005 enhancements :
  • XP Themed supported
  • Partial Class - ability to split class code into two or more source code file.
  • Click Once Deployment
  • My Class
  • Control Alignment Indicator - Vertical/Horizontal shown up while moving control around form to help developer to have "tidy up" form display.
  • Fix error during debugging without stop the execution.
  • Naming Symbol - Modify control's name property from property sheet would be synchronized to "object reference" in source code file.
  • Smart Tag
    • Prompt syntax error description, tips of syntax usage and suggestions to fix error.
    • Display "builder" screen, like VFP controls builder.
  • Drag & Drop DataSource
  • Enhanced Code Snippet Technology - Similar task code snippet can now be group together.
I like the enhancements bolded above. It would be wonderful if FoxTeam implements them into Visual FoxPro.

Additional Info given during FAQ section:
  1. SQL Server Reporting Services would be shipped with VS.NET 2005
  2. Serial Communication Managed Code Class
If you ever attend .NET related event, you may find that MS presenter like to use code snippet to drag & drop code segment into source code editor. As told, there would be 500 code snippets being shipped with upcoming VS.NET.

Somethign I feel quite excited, there are much more developers ask questions in this event compare with previous one. There are 50 question sheets (at least) been passed to Jay and Matthew. Why would this happen?

Additional Resources :
Visual Studio .NET Bootstrapper
Hosted Experience
Visual Basic 2005 Express Edition Beta
Visual Basic Power Pack
VB @ the Movies
CaveManHank Source Code
Windows Mobile 2003-based Pocket PCs SDK & localized emulator
Smart Client Applications
Visual Basic Developer Center
Web Development

Thursday, October 07, 2004

ASP.NET Webcast Special

Microsoft has a webcast special offer to someone who planned to learn and improve himself on ASP.NET.

Attend three live or on-demand webcasts and receive a complimentary gift package containing a copy of Visual BasicĀ® .NET Standard Edition and an ASP.NET development book* - a $125 value**.


Do you feel amazing?
But, this offer only applicable to US and Canada developers. So sad .. :'(

ASP.NET Webcast Series

VB.NET world tour at Kuala Lumpur, 8th Oct, 2004

I will be attending VB.NET world tour at KL on tomorrow morning. I think I will got chance to meet Microsoft's Jay Roxe, the Product Manager for Visual Basic and Matthew Gertz,the Development Lead of Visual Basic Compiler Team. :)

This event is popular, as I know it would be full house. Event location had been changed from Microsoft Auditorium which only able to accomodate about 120 persons to a Hotel Function Room. I guess that would be at least few hundred of developers on tomorrow. I will try my best to blog what happen during the event. So, stay tuned. :)

My dream, VFP DevCon

I like to attend conference. I would attend any conference if possible especially MSDN (the only Microsoft conference in my country).

One of the conference I never and have no luck to attend, VFP related : VFP DevCon. Why? Currency problems.. FYI, exchange rate USD 1 = RM 3.83.

I "heard" that, Advisor VFP DevCon for this year is excellent, covered a lot of good topics especially VFP9 new Report System. This make me got a very strong "desired" to attend it, at least get the conference CD. Since I didn't register for it, I am thinking to order DevCon CD (if still available) with ~ USD 1150 . Could anyone give me some advises? What has been included in the conference CD? Would these materials be published later? Is it worth?

Friday, October 01, 2004

UML Newbie

I have been trying UML to model my application design for long time. However, I just can't do it *well*. In other words, I don't know how to start, how should I model it for certain situation and etc. I used to read quite alot of online UML related articles and books. They didn't help me much. After thinking for long time, I decided to get my hand dirty by doing modeling as what I think it should be. Of course, I refer some other online resources in order to dot it *correctly*.

Ok, here is my first *offical* class diagram. It shows the classes and relationships between my class controls in a form. It is backward works. It is drawn after I have designed and implemented it. Ya, ya I know I am on the wrong way. But please just ignore it for a moment and look at the UML I have done.


Click to enlarge

May be I should briefly describe class diagram above.
  • Item form class is my form.
  • Item form has a combobox class (not shown in diagram, should it?), called ComboA.
  • ComboA.InteractiveChange() event is binded to a Item form's property, called ItemType.
  • ItemTypeBaseInfoCtrl is my custom dynamic control loader. It has a event which binded to Property ItemType. Once the event triggered, it adds derived container class of cntItemTypeBase (such as cntSerial) dynamicly based on options choisen from the value of property ItemType.
  • OTOH, oShowIngredient class also has a event binded to property ItemType. It adds/removes page to pageframe and concrete class of cntIngredientBase (such as cntIngredient) into page dynamicly at runtime based on ItemType value either.
  • Item Form class has a List object called MultiLocationListObj class which is subclass of class icListObj.
Did my diagram draw correctly? Could anybody give my some advises, with any example? Should I draw diagram for UI layer?

BTW, are there any UML forum?

Thank you.