Thursday, June 26, 2008

Technical Fixation

Ever noticed that when some coders learn a new technique they apply it like slathering butter on bread even where it makes no sense?

I'm re-engineering a web page where there is a parent-child relationship between two entities akin to a user and what rights they might have. The original coder used two listboxes to show assigned and available rights (good!) but then used checkboxes in each listbox row with a check all box in the header (the newly learned technique). To move rights around you check your butt off and then hit Save changes.

What the hell? I'm replacing it with the traditional mover lists construct while enabling multiple selections in each list. A lot fewer mouse clicks when moving shit around and conforms to a better understood standard, IMHO.

To paraphrase an old saying, if builders built buildings the way some web designers code web pages the first woodpecker to come along would destroy civilization.

I go back to what I keep preaching: Experienced Fox coders should run absolute rings around pure .Net weenies if they put up the intellectual investment to learn the syntax and idiosyncrasies of .Net. MS has had problems with migrating VB 6 coders to VB .Net and adoption of VB .Net has been slow. Wanna know why, IMHO? Because most VB coders couldn't architect their way out of a bird fountain. Experienced VFPers understand the interconnection between all aspects of the application and think long and hard about the architecture, meaning UI and classlibs, before writing a line of code.

You all could be rockstars. My sole regret is that it took this long for me to get this deeply involved with .Net not to see it.

Sunday, June 22, 2008

A New Neurophysical Theory

OK, this is complicated, bear with me.

I spent the day today watching the rebroadcast of Carl Sagan's Cosmos on the Science Channel. My wife, Teri, flitted in and out without a real interest in the show. After 18 years of marriage, I'm used to that - my sense of awe and wonder not being reflected back is common - she just doesn't care.

It sometimes bothers me. I know my wife is intelligent and I always took her lack of interest in science or history as an affront; a personal insult since - to me - a lack of interest was a vague reproof since she obviously had the brains to comprehend the material.

I know she loves me and wouldn't want to hurt my feelings, so there had to be another answer. Sagan inspired, I began to think about what was going on. I came to what I believe is an answer that has profound implications in a lot of areas.

What if she doesn't care about these topics because she's not genetically or intellectually predisposed to do so although entirely capable? Is it possible that there is an evolutionary governor in our brains that sets limits to the amount of interest we should show in certain topics?

I think it would be part of the survival mechanism. What good does it do for an individual to be too wrapped up in looking at the stars if a sabertoothed tiger is coming in for the kill?

Is there a mechanism in our brains that limits our interests in areas that have no direct bearing in our personal survival in the here and now? Is this why so many kids have a hard time learning abstract math like Algebra?

Are those of us who yearn for more information about the Universe and read history genetically inferior because we are diverting energies away from attention directly related to personal survival and the propogation of species?

Does evolution put soft barriers in our minds - "No, no you don't have to think about that" on certain subjects? Is that barrier elastic insofar as it can be stretched when an area of thought is linked to another area the brain thinks is important? I think so.

So many things make sense if my hypothesis is applied. I'm sure I'd word all of this better if I was a psychiatric clinician.

I wish I could explain it better.

Wednesday, June 18, 2008

What, This is Hard?

More time diving into the peculiarities of the .Net Framework...

I have to say that I am not finding this very hard at all. Granted, I can't do UI design using Divs and such in ADO to save my life (mental block - I expect things to be rendered where I goddamn put them) the coding is nothing that any other experienced VFP-er would take very much time to learn.

In fact, I'm coming to actually love the way this all holds together. Mind you, this project is stuck with 2.0 Framework and I'm sure that a lot of what I'm grinding through is better handled in 3.0 and 3.5.

Still, though, there are weirdnesses that I guess are better handled by experience. It's the same in VFP, I suppose, but I had years and years and professional incentive to master those oddities. I'm now exposed to the firehose.

Example: If you include a column in a GridView but don't actually show it, the value is blank. WTF??? I can't count the number of times I had a primary key stashed in a ListBox or Grid in VFP and made it's length zero just so I could grab the value from the selected row when needed. Nope, not in .Net unless you use a Template field (I think that's what it is called - kinda away from .Net at the moment).

I'm finding that I leave a lot of my control state code (what's visible, read only, etc.. based on selections and environment after a postback) in the Page_PreRender method. Is that good practice? for me.

I'm heading in the direction of either being a damn good .Net coder or a damn bad one. Haven't figured that out yet; it may be years before I do. I wish I could get out to a con and bang heads and compare notes with McNeish or Markus to get a better feel. For now I have to operate under the guideline that if it works, it must be good code.