article . UT April 2003

Filed Under (Visual FoxPro) by WildFire on 31-05-2004

I was reviewing this a while ago: Universal Thread Magazine April 2003. Plus here are some useful Visual Foxpro KB Articles at

Reloaded Concept Art

Filed Under (GFX) by WildFire on 31-05-2004

Something yummy to start your week: Concept Art Productions for the Matrix Reloaded/Revolutions.

workBLOGS . API shutdown and maps

Filed Under (Visual FoxPro, work.BLOG) by WildFire on 30-05-2004

This is the Windows 98SE-compatible snippet I use for shutting down the CPU.


#define EWX_LOGOFF 0
#define EWX_SHUTDOWN 1
#define EWX_REBOOT 2
#define EWX_FORCE 4
#define EWX_POWEROFF 8
declare integer ExitWindows IN user32;
����������integer dwReserved, integer uReturnCode
declare integer ExitWindowsEx IN user32;
����������integer uFlags, integer dwReserved

' = ExitWindowsEx(EWX_LOGOFF, 0)
' = ExitWindowsEx(EWX_REBOOT, 0)
= ExitWindowsEX(EWX_SHUTDOWN, 0)


Note: The html CGIs i'm using auto eliminates * so i'm replacing it with '.

There's a better one which can shutdown Windows XP and Windows 2000 and do a lot more 'cleaning up' procedures. I'll post that one later once I figure out to whom I can give credits for that code.

One of the issues yesterday involves this 'automatic' shutting down of computers at a given time. There were no problems in the client computers but in the server module, which uses a mapped/shared virtually-created-drive approach, it shows this 'there are n users connecting to this computer... shutting down will make them whine and howl...' type of error. For a moment there which lasted for 10 minutes or even more, I was formulating solutions and knocking once again on the doors of WinAPI, hoping that there's a way I could somehow supress that confirmation.

Only to realize that I can make things easier if I set a different shutdown time for the server and make it do the shutdown process after all the client PCs are knocked out.

Yeah... sometimes the best solution to a problem are those little simple things we often overlook.

workBLOGS . oDAYDreams

Filed Under (work.BLOG) by WildFire on 29-05-2004

A Saturday of a week of client visits... this day is. For most of my life Saturdays were created to quench my laziness... dreaming about being a knight or a magician in the medieval era fighting fierce three headed toxic-breathing dragons using three inch USB switchblades, a laser light as my sword and/or mind control-related powers.

This or the other 1001 dream variations where I came out an unscathed hero at the end of the day, was always the way lazy Saturdays were spent.

Not today.

There were no knights... no swords nor daydreams, just CDRs, keyboards and codes.

Although I bring a backup of my Microsoft Visual Foxpro installer almost every client visit, I seldom end up using it on a client site. This day was different. I spent most of the time re-configuring things and coding at site which I haven't done since I started 'serious freelancing'. I often test things and think of possible and weird scenarios a day or two before each visit. Plan Bs and Plan Cs are formulated in advance.

I guess I underestimated converting an existing project to a simpler one. It was too late when I realized that it is easier to 'complicate' simple programs than making a complicated program simple. I'm talking about Project:Valhalla, a trimmed down version of Project:Sophieia, both Internet Usage Monitoring Systems targeted for Internet Cafes and Computer Laboratories.

On site, the first challenge (or problem) was API related. The codes I made were targeted for Windows XP and Windows 2000. Though I tested it with Windows ME before and was quite sure it was working fine then, it seems Windows 98SE merely logs out the user instead of shutting down the computer. Good thing the first module I made which contains Windows 98SE/ME-compatible codes was included in the CD I brought along. The newer version of that shutdown I made was supposed to work with older versions of Windows but I guess there's really a big difference in theory and once it's working 'out there' already.

The next problem is server related. Though a server in this case, is not present in the client's place. There is however a 'pseudo-server' powered by Windows 98SE (again) but this makes things difficult for me. I was left with no option but to share a folder and map things on the client computers. Problem is... the settings inside the SETUP.dbf, my main configuration database, would be inconsistent already with VALHALLA's client modules and its main server module (directory settings and others). The pseudo-server was not partitioned too, so, I cannot merely place the program in Drive D: and map the shared folder as drive D. Had this been Windows XP, drive letters could be changed, though I'm not sure if it can change the primary boot drive too.

Running the program on a read-only CD-ROM is also out of the pool of possible solutions since it needs to write things.

Good thing I brought along an old compiled Essentials CD I compiled a year ago which contains the PowerPack TweakNow 2003 application which can create virtual drives. TweakNow saved the day in terms of that problem.

After a free lunch (which these days have been a sort of silent unspoken agreement between me and my clients), there were some minor-'out-of-nowhere' errors too... certain variables that won't work on the mapped directory but works fine on the un-mapped one, a variable that refuses to update and sticks with its initial value unless you issue another select DBName . Go Top . cInt = DBName.Field_001 lines of code, a stubborn CD-ROM that 'buffs-out' which I believe was the source of a heated argument between two IT-related technicians from different companies that visited that place yesterday (another story for now), power-supply related blues, a number of time-field related issues and countless accidental reboots. I also made a couple of on-the-fly reports in that place.

Around 04:30PM when every important issue was treated, test files purged, all other utilities installed, and another batch of snacks, we decided to call it a day.

Walking out of the client's premises, somehow I have this victorious feeling just like those medieval knights battling three-headed dragons on my past lazy Saturday daydreams.

I guess I'm just living out some dreams after all.

link avatar

Filed Under (Random.links) by WildFire on 27-05-2004

And behold the Great Avatar's Digital Kitchen.

Visual Studio 2005 Team System

Filed Under (Random.links, SoftDev (non-VFP)) by WildFire on 27-05-2004

Visual Studio 2005 Team System
... and reviews Shrek 2.

THOUGHTS . block-outs and direction

Filed Under (Random.scribbles) by WildFire on 26-05-2004

Since that day of the elections, which was 15 days ago, block outs occur almost regularly. It maybe caused by two things. One is storm (and/or weather related factors), the other is election-related 'magic tricks'. 'Magic tricks' that are too advanced that creating a computer algorithm for it is two eras away from it.

This was unlike the previous block-outs which lasts only for five to fifteen minutes, not that long unless it's in the middle of the night and out of silence, your little kid wakes up and howls non-stop. I tell you 10 seconds of child howls and cries is that powerful that even the US military scientists are planning to include this in their 'artillery of the future'.

Back to the block out, since it was longer and we don't have any generators here, and even if one exists, I don't think I can code with that grinding sound even a few floors away from me, I decided to stay at the roof top sitting in the bench under the one-o'clock afternoon sun.

And I remembered the last time I was on a bench under the heat of the sun... that was 10 years ago perhaps when I was still in high school. Those days when, we, with our friends do nothing but park our butts in that bench, play basketball afterwards, talk about mindless things that I can't even remember after an hour, punch and kick one another, play basketball again and play basketball again three blocks away.

Almost half of the time we emerge winners of the game. The other half we test if we are faster than a stone hurled towards us while the others test sines, cosines and projectiles, if we choose not to pay the bets. All of the time though, we are lucky to be alive to tell the tale. Sometimes even brave enough to return to that place where they are already posting in chalks the amount of debts we have to pay.

Ah... life was simple then. I don't have to worry about SQLs, DBFs and corrupted CDX files. There were no compile errors. No brain-damaging API calls, no network-locking problems and such... only adventures, mischief and pure fun.

Memories like these make you question your direction in life. Why do I have to do this? Why do I have to do that? Why do I have to stay and work up to the wee hours of the morning? What for..? Why..? Why can't I just bark and park my arse and play ball all day?

Of course I have answers to these questions but sometimes I often think if these answers are really that valid. And even if they are, another array of questions always emerge.

NF . Acrylic case

Filed Under (Random.links) by WildFire on 25-05-2004

Satisfy your technolust (or make that technocravin') with these:
Pre-Assembled Acrylic PC Case
Iomega Micro Mini Drive

workBLOGS . unsmoothen

Filed Under (work.BLOG) by WildFire on 25-05-2004

Not all client visits are 'walk in the parks'. Sometimes it's rough. Sometimes the rough part involves database that goes south and east then goes south once again. Sometimes it involves the politics inside a certain company... like for example, a change in administration and you'll find yourself re-initializing the explanation (and impression/integrity-build-up) from scratch all over again, strict security guards which you cannot blame in the first place since they're just doing their jobs... and a lot more.

But let's not elaborate into that for there are a lot of good things in each client visit to think about the 'not-so-good' ones.

While some may draw inspiration from great programmers/developers like (insert-your-icon-here... mine was Peter Norton when I was still in college), if you'll look everywhere you'll find a lot of good models from 'simple-day-to-day' humans. One of this is this bus vendor I encounter every now and then when I travel to our north-based clients. To give a short overview, these are the people bringing goods (mineral water, hard boiled eggs, newspapers, 'chicharons' etc.) to buses, loads, hollers, advertises, then after five minutes or so unloads and waits for another bus where they can sell their goods.

There's this one vendor who aside from selling helps people when he's in the bus. This afternoon he even left his goods in the bus to rush down to help another passenger load her stuff.

Programmers and software developers who do free lance related works should also be like this. When you're visiting your clients and there are things that could help them whether it's part of your work or not but would make things better, never hesitate to do so. Install free anti-virus applications, firewalls and spyware removal tools. Introduce or other productive applications that could make their company save a lot. Teach them to defrag. I've seen a lot of fragmented and unoptimized units in most of my clients and I'm sure there are a lot of others out there.

You can even teach them how to blog.

In this world where silicon is getting powerful and powerful each day... it won't hurt to show little acts of kindness... just like that bus vendor.

workBLOGS . confidence

Filed Under (work.BLOG) by WildFire on 24-05-2004

Sometimes you can measure and rate the software you develop by the amount of confidence you have when you're presenting it to your clients. I remember showing two integrated database systems to three client schools September last year. I was more confident presenting Project:Genesis which was a couple of years old already compared to Project:Alexandrieia (Integrated Media Center System) which then was only two and a half months old. Still pretty much in its infancy if you'd ask me.

With Genesis, I can even click and present things with eyes closed while I was closing my eyes and crossing my fingers silently when I was presenting Alexandrieia.

But after months of working up to 3 or even 4 in the morning, Alexandrieia have grown to something a little 'powerful' than before. It can now even auto-detect a user who have not taken a bath yet and initialize the shutdown procedure once it detects a certain scent from a user. Yes that's how powerful APIs are.

NF . 3D Monitor

Filed Under (Random.links, Random.scribbles) by WildFire on 23-05-2004

If this 3D monitor remains true to what the article talks about, then it is about to break barriers and revolutionize a lot of things. A concept before which can only be seen in movies (see Paycheck) is now here... well, at least that's how that news article projects it. I prefer though seeing, touching and smelling it before I'll start doing that tribal-jump-for-happiness dance routine.

But still, once that barrier is breached, expect Room.Improvements(22*17 meters, lLimit=.T.) becomes a Field.Improvements(nInfinite, lLimit = .F.). The technology behind this, like on any other field, will just keep on improving and improving.

And of course patents will still be there to hinder some parts and clog some tunnels of innovation every now and then.

THOUGHTS . Bill Gates and bloggin’

Filed Under (Random.links) by WildFire on 22-05-2004

Even Bill Gates 'indirectly' supports blogging. Are we expecting an MS-powered blogging tool in the near future?

Finally, Avatar is starting his tech/work/life blogs. Once he finalizes everything I'll post a link to it for you all to see why this was the first person I tried convincing to start a blog of his own.

There are a few others in this 'make-them-blog' list of mine and probably stating their full names in here could push them even more. Besides Google can make these names pop into their search results.

First would be Nepthaly Talavera, a college classmate of mine who is now the Dean of the Computer Science department of the university I worked before. I expect to hear some education/institution related views from him for I believe this country has to concentrate more on the blooming (in size but not in brain-optimization) computer science student population. So dude, turn off that Anime-infested TV of yours and start doing the 'dirt-ier binary-related things'.

Second would be Ceazar Ryan Sealana who's 'leet-coding-skill-style' and love for mischief far exceeds my Foxpro-powered skills and love for a peaceful digital life.

Third would be Hazel Juanico whose expertise involves SQL, VisualBasic and Javascripts and punk/grunge rock. I have known Hazel since the old elementary days up until we finished that back-breakin'-neuron-abusive Computer Science degree.

Fourth in the list would be Mark Anthony Panizales, a former student of mine who was also a founding member of that wormz team we organized years ago. This is one dude who really understands what real programming/software development is, has a great vision and persistence to back it up. If he says it, he'll do it.

There are a lot of blogging-related tools in the 'net. I use the GreyMatter scripts but there's which was acquired by Google (Yep that's how serious blogging is these days) and has recently upgraded.

Hosting-wise there's that offers as low as P34.50 a month web-hosting services.

Let's all change the IT-related-aspects of our country through blogging.

NF . Linus

Filed Under (Random.links) by WildFire on 22-05-2004

I didn't post a link to that article questioning if it was really Linus Torvalds who wrote Linux a couple of days ago since I was probably too tired to even sit infront of this computer, but I'm doing it now along with an article that defends Torvald's side. It even includes a link to Andrew Tanenbaum's notes.

NF . outsourcin’ Star Wars

Filed Under (Random.links) by WildFire on 20-05-2004

Looks like even Star Wars is geared to be outsourced.

thoughts . problem solving

Filed Under (Random.scribbles, work.BLOG) by WildFire on 19-05-2004

Sometimes, if not always, it is so hard to talk someone about systems and problem solving especially if that someone is lSensitive, lEmotional and cPersonality = STRONG. To make things even harder, these are the persons that are often close to us, persons we hold dear. Closeness is oftentimes quantified by emotions but the use of such in this discussion, stops there.

A great deal of our life lessons, we learn through our work. And in database-related programming, software development and system analysis humans can learn a lot. In fact the approach use in the whole software development process if applied to real life situations could make this greed-infested/disorganized/unsystematic world a better place to 'interface' and connect with.

One can view life as a big problem (but not necessarily negative) that needs to be solved or 'lived' if you prefer such word. In every step of your life, directly or indirectly, you create means to solve a problem, but first and the most important aspect of all; you must know what the problem _really_ is. This is where you question existence, the why's of things and in such thing as complicated as life these questions can stretch far beyond places Hubble's sight can even reach in 7 cybernetic lifetimes.

Most often, a big problem is composed of little problems branching out to another set of nodes and child problems.

Now, one's approach to solving such things would depend on how you, with your experience, view things. You can view it as 'cut-the-root-of-the-problem' and the nodes will be flushed as well .OR. you can do little node and leaves at a time until slowly and slowly you are tackling and conquering the problem subset before marching to the next level/node. That or the other or the combination of both or A then B or B then A, the combination is endless, can bring you to the doors of the solution. The process in itself can be views as a means of solution to start with.

Now let's go back to that arguing/talk with someone we first tackled on Paragraph-01. You can't expect to solve a problem if you're attitude is like this: while discussing Problem v1.117.1256725, and you feel like you with your intelligence cannot 'fight through' the parameters of that problem starts randomly accessing bits of information that will pull Problem v1.291.1837125, Problem v2.129.28341245 and countless others.

Solve problems ONE by ONE, it doesn't matter if you're doing it the LIFO or the FILO way, or the stack or queue approach. Even CPUs tackle each program line by line. Even Superman to be efficient follows this principle. Spiderman too, he rescued his girl first then maneuvered towards the dangling train. And I don't believe hyperthreading on a 512-bit computer with 7777500GHz could defy this principle.

Talking to someone who tends to bring all problems forward instead of dealing with it one by one frustrates me. Add more nFrustrationCounts if that someone gets too emotional, looks for other holes instead of concentrating on the problem at hand and too close minded enough to see things. We're talking about oOBJECTS here so things must be dealt with objectively and lEmotion should be set to .F.

Add the nCount(ProblemOccurence) too. If the problem keeps repeating and repeating all over again nFrustrationCount increases. There must be something wrong with the system that needs to be addressed instead of being to emotional and close minded to even discuss the problem.

And in every thing/activity/process they do, humans should learn to evaluate and reflect on things.

But that my friend is another story for now and I still have to work on how to prevent database corruption during power fluctuations.

In case you want to know what the problem is about... we'll I tell you it's about spoon and forks.

Yes really. No kidding this time. Such a 'near-to-null' related matter, right?

snippet . DbRepair

Filed Under (Visual FoxPro) by WildFire on 19-05-2004

A snippet compiler application, a dbRepair function from Sergey Karimov (via and John Koziol's bio at VS Data Team's WebLog.

That would be our FoxPro-related links for the day.

Wait there's another one: Pathological Testing for AppDevs. Automatic 'self-destruct'-related routines in the program once it detects a paranoid user who's IQ is below three digits is included with this test, right?

NF . Blizzard

Filed Under (Random.links) by WildFire on 18-05-2004

Oh-la-la! Something to look forward to. People close to me know that I don't play computer games that much, but I always look forward to the artworks, the cinematics and the technology behind these things.

article . Is the Rich .Net Client ready yet?

Filed Under (SoftDev (non-VFP), Visual FoxPro) by WildFire on 16-05-2004

Rick Strahl: Is the Rich .NET Client ready yet?

workBLOGS . VF6 and corruption

Filed Under (Visual FoxPro, work.BLOG) by WildFire on 16-05-2004

Since the day I upgraded to Visual Foxpro 8, I considered it knocking out VF6 in all departments. And indeed it does prove itself far superior than the last version that was bundled with Visual Studio. That was until yesterday when I discovered that a certain Database Utility application I created could open databases that were corrupted by power interruption and 'magical reboots' (possibly caused by computer viruses).

I have already installed NAV on a client's computer which could possibly have eradicated that 'magical reboot' problem but I created a patch still... just in case. Problem is, when I tested it last week on the client's computer, the patch won't work so I have to use that old but reliable Database Utility I have created to open the corrupted database and delete the last record which is often a blank one. After that the corrupted database is fixed.

It was yesterday when it came into my mind that probably the reason that UTILS can do these things was because it was compiled in VF6... and after a number of isolating-the-problem experimentation, I found out that the said theory was right. You see, when VF6 encounters a corrupted database, it still opens it during the use DatabaseName line but when you do the database manipulations such as Append Blank/Replace (Add) or Delete it generates an error. With Visual Foxpro 8... once it encounters a corrupted database, even in the start (use DatabaseName line), it generates an error at once.

However Visual Foxpro 8 still has an advantage, it displays the name of the corrupted database while VF6 just points to the line of code where the error occurs. Here are the exact lines:

VisualFoxpro 6

Fatal error: Exception code=C00000FD
Called from - line 6...
Called from - main line 2...

VisualFoxpro 8

Error loading file - record number 12. FRMPROFILE . Loading form or the data environment : Table 'f:\hra\communit.dbf' has become corrupted. The table will need to be repaired before using again.

Combining the strengths of both version, I created a small module patch in VF6, compiled it in .exe form and called it from the main VisualFoxpro 8 module using the ShellExecute API.

DECLARE INTEGER ShellExecute IN shell32.dll ;
INTEGER hndWin, STRING cAction, STRING cFileName, ;

ShellExecute(0, 'open', 'FIX-0_545.exe', '', '', 1)

I'm still studying how the Flush+TableUpdate approach could also help solve this problem but for now I'm using the patch above and an auto backup feature that copies the database to a different folder every five hours.

I also added two features to that Database Utility application yesterday, a feature that saves the structure of the database and the indexes along with it which is useful for documentation and reference related things and a MERGE databases feature. It was a special addition since it was done with my little Angel on my lap playing with a diskette and a floppy drive while I'm doing it.