Tracy’s Blog

Take your work seriously…but never yourself.

To be continued…

Check out my blog’s final resting place: http://www.signaturesterling.com/blog/

There’s no place like home…

February 21, 2008 Posted by | Uncategorized | Leave a comment

Potent Potables

ingenuity.jpgWhile manipulating a paper-clip this weekend to serve as the zipper lever that recently broke off my dog’s blanket, I realized a much needed modification to the old phrase; “Necessity is the mother of invention.”

I posit: “Ingenuity and necessity are the parents of invention.

…sounds like a bumper sticker waiting to happen.

February 11, 2008 Posted by | MISC | Leave a comment

Blogger-iffic!!

blogs.jpgWell, since our database server has taken its bi-weekly (sometimes tri-weekly) , anti-climatic crash and burn, now seems a good time for a blog posting.  In this posting, I’d like to address my fellow bloggers out there – especially those who are new to the art of blogging.

Dare I say, one must embark on one’s own blog-journey with realistic expectations.  First, there are a TON of bloggers out there blogging about a broad range of topics.  A couple blogs have made it big, but statistically speaking; the chances of your blog becoming the ‘next big blog’ are slight at best.  That said, my advice to you is not aspire to be the ‘next big blog’.  Doing so will only cause you to over-analyze your post topics, syntax, punctuation, and grammar to such a severe extent that you will disappear from your message.

Instead, approach your blog as your own personal broadcast station; where it’s all you, all the time.  Your blog should be your own little venting portal to the world; a digital diary of sorts.  Whether your blog is destined to have 5 readers or 5000, its destiny will only be achieved if your unique flavor and view of the world shines through your posts.  Give your blog readers a view of the world through your eyes so they’ll have a different perspective than their own and everyone else’s.

Gotta go…database server is back up; just remember to blog for no one, but yourself.

Happy Blogging!! ^_^

February 5, 2008 Posted by | MISC | Leave a comment

Migrate to ’08

resolutions2.jpgWhoops, forgot to record my New Year’s Resolutions.  Oh well…better late than never I ‘spose; here goes:

  • The JHP lip spoiler for my car
  • Xenon headlights for my car
  • All-around badge removal from my car
  • A 6-minute mile
  • Running in this year’s Rock ‘n Roll Marathon
  • An over-hand pull up
  • Finish/Deploy (at least) Version I of my elusive Teacher’s Aid website application effort
  • A career mentor (sorry Google)

February 3, 2008 Posted by | MISC | Leave a comment

‘Mo AJAX Pleeeeez?!!!

ajax.pngFew (web developers) would argue: The improved quality of user experience when navigating a JavaScript enhanced website or even a single web-page when compared with that of its non-JavaScript utilizing, post-back requiring, entire page re-rendering counterpart(s). I must confess, most of my early years in web development were spent living in paranoid fear of JavaScript. When confronted with it, I found it cryptic and foreign looking – ironic considering my extensive varietal exposure to probably a dozen or more programming languages, half a dozen technical platforms, and plethora of coding design concepts and algorithms. Still, in spite of my broad background, JavaScript freaked me out; the way it intermingled haphazardly with the HTML and executed on the client-side. Fortunately, after years of therapy and slow, gentle, indirect exposure, I’ve grown to admire and respect JavaScript’s indisputable power and user-experience improving potential. So much so, that my new web development motivational acronym is: NPB (No Post-backs); your users will thank you.

Speaking of JavaScript, I’ve continued frolicking with a plethora of the AJAX Toolkit components including the ReorderList and built-in AJAX Extension; the UpdatePanel. At the risk of sounding like a huuuuuge geek, the ReorderList control is AWESOME (once you get it working)! It’s one of the more difficult controls to get working initially, namely because the control’s sample code, at best, faintly resembles the sample displayed on the .NET AJAX website.

Here are some pointers to get you started:

  1. Copy the ReorderList and associated ObjectDataSource from the SampleToolkit Code.
  2. The associated DataSource can be any type you’d like other than an ObjectDataSource, just make sure you provide the Priority parameter for updates, insertions, and selects and a unique field identifying each of the ReorderList’s elements for updates, selects, and deletes. All remaining fields should be those relevant to the content of your ReorderList’s elements.
  3. Set the ReorderList’s DataSourceID attribute to your DataSource’s ID and the DataKeyField attribute to the unique field name.
  4. Write the corresponding queries (or stored procedures) for the select statement (be sure to order by priority here!), update statement (don’t forget to update the Priority parameter value here!), delete, and insert statements.
  5. Last, but most important, MAKE SURE you put a value into the DragHandleTemplate’s div. It doesn’t matter what; just throw something in there because without it, you won’t be able to drag your elements around and you will be baffled as to why it won’t work!!

For testing purposes, any arbitrary value(s) distinguishing each of the ReorderList elements within the ItemTemplate will do, and viola! Your control should be working; complete with database updates when you move the items around. Now for the really cool part – functionally, you can place ANYTHING within the ItemTemplate. For example, the application I’m building required users to be able to visually alter the order of blocks of reviewers for a work flow web application. In order to achieve this, I had to house 3 NESTED GRIDVIEWS within my ItemTemplate, each of which are editable/deletable, etc…and everything totally works!!

After one small change…which brings me to my next topic: UpdatePanels. Initially, these little dealios seem like a post-back avoiding savior. They’re extremely simple to implement allowing developers to essentially just execute server side, event-handler code for a control without a post-back just by including the control within an UpdatePanel. However, one soon realizes that attempting such a feat with even a slightly performance intensive control (such as a DropDownList with 1000+ elements), and the control becomes unusable; the reasons for which you will find: Here, in this person’s enlightening article.

What does this have to with a ReorderList? You’ll notice the sample ReorderList is housed within an UpdatePanel for reasons I’m not entirely certain and its presence was hosing up the performance of the controls contained within my various internal GridViews. The good news is that removing the UpdatePanel doesn’t seem to have any ill effect on the behavior of the ReorderList at all so I would suggest eliminating it altogether unless your ItemTemplate contains a level of simplicity comparable to that of the sample ReorderList’s.

That said; my mind reels (no, I don’t get out much), at the extensive use possibilities of this control. Any web application requiring users’ to declaratively order anything could potentially benefit from this control. Whether it’s a simple shopping list, or ordered favorite home prospects (complete with images and description) within a real estate website, or giant ImageMaps with routing sequences, or ANYTHING!!

At any rate, hats off to the creator of the AJAX ReorderList control for providing such a robust, adaptable, and functional tool that I can now include within my web application arsenal.

February 3, 2008 Posted by | Tech | 3 Comments

Review This.

review.pngI find the whole review process much of corporate America has now employed to be rather amusing and somewhat annoying. Here’s how it usually goes down:

  • Describe, in detail, how you measurably did/did not achieve last year’s goals.
  • Write about everything else amazing you do to make your company better (i.e. more profitable).
  • Write your new goals for next year.
  • Pray that your manager agrees with everything you’ve written, and awards you the gigantic raise you know you deserve.
  • And, finally rant and rave if (and when) your prayers are not answered.

Why must I spend so many hours composing elegant narratives about MY opinion of MY performance and abilities when it doesn’t directly influence my (potential) raise anyway and what purpose does it server? Is it simply corporate America’s attempt to force those among their employees that don’t already understand the importance and benefit of setting personal career goals and routine self-reflection? Much like my advanced English teacher’s vain attempt when forcing students to write daily journal entries for an entire semester? These are life lessons that cannot be taught by teachers, employers or anyone else, you either figure it out and act accordingly…or you don’t.

Long before ‘review time’ arrives, I’ve committed much deliberate thought to my career and its direction and I have a firm understanding of where I was yesterday, where I’m at today, and where I’d like to be tomorrow without carving out a monotonous piece of literature describing every painful detail for my supervisor to read whom I may or may not sway in the pursuit of my monetary cause. Besides, any competent supervisor, in my opinion, should be well aware of their under-lings contribution(s) and/or lack thereof.

Therefore, in the interest of saving myself the trouble of composing yet another exhaustive narrative and my supervisor the trouble of reading (assuming he or she does) said exhaustive narrative, I can confidently summarize my opinion of my career performance for each and every one of my future reviews with the following:
I am a programming goddess. The End.

January 24, 2008 Posted by | MISC | Leave a comment

AJAX…not just for toilet cleaning anymore.

ajax.jpgOr is it?? Of course not!! Buuut, while the out-of-the-box functionality of most of the current Ajax Toolkit components do some nifty things and prove useful for fundamental, non-volume or performance intensive tasks, they also leave a lot to be desired if you’re looking for more enterprise-level applicability and functionality. As a result, I have adapted 2 of the current toolkit components for my own web application purposes when I found them lacking: the ListSearch(Extender) control and the CascadingDropDown control.

The ListSearch(Extender) is a control that incorporates a behavior already found by default in the Mozilla’s browser (but not in IE 6) whereby a user can select a DropDown (or ListBox) into focus and then type characters to auto-navigate themselves to the first corresponding record within the control. IE 6’s current behavior will only ‘remember’ a single character so when the user enters ‘TRA’ to navigate themselves to the record labeled ‘Tracy’, IE will first take them to the first record beginning with ‘T’, then the first record beginning with ‘R’, and finally the first record beginning with ‘A’; NOT the desired behavior.

Enter: The ListSearch(Extender) control which alleviates this annoying behavior within IE 6 and replaces it with the expected and desired multi-character, auto-navigate behavior. Upon discovering this splendid fact, I wasted no time in implementing the control within our company websites where corporate mandates our users browse with IE 6. Unfortunately, my excitement soon faded when I realized that a number of records within my DropDown or Listbox control exceeding ~5000, the performance of the auto-navigation became increasingly slower and was virtually un-usable when all of our required ~50,000 records were included :-(.

[Sigh]…my seemingly heroic AJAX control, it would seem, is too slow to serve its purpose; what’s a girl to do? Google it!! And discover this guy’s brilliant solution and implement it – like I did (or better yet…just download the 10920 version of the Toolkit where the Mr.Brilliant has now pre-included his fix ^_^). Oh, hhhappy days are heeere agaaaaain…

Now then AJAX control #2, the handy-dandy CascadingDropDown. This control’s preliminary description lent itself to be highly useful for our gee-gan-tay search pages where our users select a bunch of different filter criteria from a bunch of different Dropdown/Listbox controls, then ‘Submit’ to obtain their associated results, only to learn that they’ve selected a combination of criteria that doesn’t exist and they’ll now have to ‘guess’ which selection item(s) need to be altered.

Anyone who’s tried to alleviate this problem by dynamically auto-populating the controls with a number of records based upon the user’s selections server-side has quickly figured out the ree-dic-u-luss postback times associated with the necessary page re-rendering.

Enter: The CascadingDropDown control which dynamically populates the Dropdown contents via JavaScript and Web Method (yippee, no more postback delay!!). But, before one begins a premature celebration, the controls’ associated DropDown can only have a single other DropDown control’s contents influencing its own contents (read: One parent). OH…the humanity of it all!! And what do we do when the standard AJAX control fails us? Google it!!

This time, however, Google did not reveal any Mr. (or Ms.) Brilliant’s to me which left me no alternative but to modify the control code myself to accommodate multiple influential parent controls.  Here is the JavaScript source file which should be the only file you need to change within the control and some examples of the new control’s use.

In a nutshell, the control behaves the same as its predecessor (so I recommend successfully implementing it before attempting this one since that will throw enough of a learning curve at you initially), with the exception of the ability to enter a comma delimited (space free!!) list of parent ID’s within the CascadingDropDown’s ParentControlID attribute rather than just a single ID value. With that, the indicated control’s associated web method will be called every-time any of those parent controls’ selected-values is changed by the user.

Due to the fact that the order in which the web methods are called must remain arbitrary, there are a few caveats to remember:

  • You must always have a non-filtering, generic option appearing as the FIRST value in the dropdown that represents a ‘return all selections’ selection (All).
  • In addition, this item’s Value Field must not match any of the other item’s values and it must not equal -1 (you’ll notice I used -5 in my webservice example)
  • You must indicate this item as all related CascadingDropDown’s SelectedValue attribute. (see example .aspx).
  • NO SPACES between the parent id’s:
    • Good: ParentControlID=”ddlModel,ddlColor”
    • Bad: ParentControlID=”ddlModel, ddlColor”

Otherwise, everything else works pretty much the same; you’ll still receive a semi-colon delimited list of all parent Categories and their current selected values in the knownCategoryValues parameter of the web method with which you can dynamically determine the DropDown’s contents.

As a note, testing has indicated that the Dropdown’s each seem to be good for a maximum of ~800 records before they die.  I’m not sure why, but that certainly limits the usefulness of this tool.

I personally could really use an AJAX tool similar to this one without the ‘cascading’ quality.  I’d like it to simply populate a single DropDownList via a Web Method (alleviating the postback), but able to handle upwards of 50,000 records without a problem.   Any takers?? ^_^

Feel free to report suggestions, criticisms, observations, or questions and…happy cleaning!!

P.S.

Just a little hint if this is the first time you’ve modified an ajax control: if you just open the entire AjaxControlToolkit solution file when you edit a control, re-building the solution will take a little while (about 15-30 seconds) regardless of the fact that Visual Studio displays ‘Ready’ in the lower-left corner. Wait until it says ‘Build Succeeded’ in the lower-left corner and the little bucket icon with the 2 moving green arrows in the bottom-middle of the screen has disappeared.

January 22, 2008 Posted by | Tech | 1 Comment

Things that make me go….wuh?!

Police BadgeWould someone pleeeeez explain to me what is up with police officers in this city?! I have been pulled over more times in my short 2 year residence here than the rest of my entire life while residing in Tucson, Arizona. But it’s not just the frequency with which I get pulled over, it’s each and every officers’ condescending, offensive, and just generally impolite demeanor virtually every time I interact with them.

Some of you may, at this point, mistakenly dismiss me as nothing more than one of those speed-demon, criminally negligent cop-haters, but nothing could be further from the truth (except maybe a bit of the speed-demon part). I’m one of those unusual people who happens to agree with the laws we have in place (or at least recognize their necessity to preserve my security) and, with the exception of the occasional speeding or parking violation, I refrain from ANY criminal activity of ANY kind. Furthermore, I have never had anything but the utmost respect, admiration, and reverence for individuals who put their lives on the line everyday to protect my way of life.

In addition, I never, in my 27 years of living in Tucson, felt disrespected by a single police officer I interacted with nor did I feel badgered or profiled. I have suffered each of these while interacting with San Diegan officers on multiple occasions since relocating here. It’s common knowledge that any career field is going to attract some bad apples, but the volume, frequency, and misery of my interactions with police officers in this city has led me to believe the majority of its officers have adopted this unpleasant demeanor and approach to interacting with their citizens.

I’m well aware of the disparity between populations and subsequent crime rates among the cities of Tucson and San Diego and can only assume that the latter’s harsh urban environment is what has shaped these good-intentioned officers of the law to become so jaded, bitter, and cynical towards the general population. I can only imagine the devious criminal scum and life threatening scenarios San Diego police officers must be faced with on a daily basis.

But, unfortunately, some of San Diegans’ ill-tempered attitudes towards police officers (like my own) are self-fulfilling prophecies in the form of a defensive reactions against the officers’ inappropriate aggression and mis-use of authority. Any socially-skilled individual will agree that it’s necessary to adjust one’s demeanor and aggression level depending on the details of the situation at hand. Why is, then, that I feel like a convicted felon nearly every time I interact for any reason with a San Diego police officer? Why should I, a strictly law-abiding and highly productive citizen be treated in such a manner? I am always nothing but absolutely respectful during all my encounters with police officers, in spite of my rapidly developing aversion to them; why should I not receive the same respect I’m providing?

It’s tragic that, with all the adversity already directed at a police officers courtesy of the plentiful number of legitimate criminals out there, officers must also endure offensive behavior from law-abiding, respectful citizens who are simply irritated by the authorities’ unnecessarily abrupt, condescending, and patronizing manner. Furthermore, such superfluous adversity is easily avoided by remembering that, in spite of the excess number of scandalous deviants, most of us are still morally-upright, virtuous, and honest citizens just going about our day who want nothing more than to be treated with the same respect we give. After all, those among us who agree with the laws and their enforcement (or at least their necessity for our secure way of life) are ultimately on the same team and serving the same purpose as those in law enforcement, so why treat each other as such?

December 13, 2007 Posted by | MISC | Leave a comment

Bootcamp Character

Chester FlakeEvery once in a while I stumble onto a personality so bizarrely charismatic and fascinating, it’s difficult to avoid being captivated by their presence; much the same way one cannot look away from the gory road-remnants of what used to be a human being while driving by a horrific traffic accident. I encountered one such personality in an unlikely location: while attending a Microsoft Professional Developer Certification two week boot-camp course in Atlanta, Georgia earlier this year (a separate topic that deserves a blog thread all its own, but we’ll reserve that for another time).

The man they call ‘Chester Flake’ was not only my Microsoft boot-camp instructor, an accomplished developer, Database Administrator, and overall .NET expert-turned-trainer, but has also dabbled seriously in policitics, stand-up comedy, acting, real estate, owned a slew of businesses, and all with more than enough personality to fill up a large building.

Sure, we wasted some classroom time listening to his fantastic (and remarkably true) tales, but honestly I was grateful because without his daily bizarre antics, I stood little chance of remaining conscious during class since, true to its ‘Boot-camp’ title, the course came complete with severe sleep deprivation and hideous study schedules. In addition, the man they call Chester Flake was a fountain of .NET knowledge and there was little I could quiz him about that he hadn’t already encountered in his own development experiences and could answer to. As such, he was able to side-step many of the tedious, fundamental elements of the curriculum and present more advanced, highly tangible and applicable lessons for those of us who were already developers, making very efficient use of the classroom time we had and reserving the fundamentals for individual learning.

All-in-all, if you’re ever faced with the choice of a mundane hoo-hum instructor to lead a course you’re attending or a slightly insane, completely maniacal one; I suggest the nut for 2 reasons. First, you will find it much easier to stay awake during class and second, chances are he or she is very good at what they do since otherwise they would’ve been terminated long ago for offending the office staff with their off-color and eccentric sense of humor.

December 12, 2007 Posted by | MISC | 2 Comments

Well…I do DEE-CLAY-AIRE…

DeclareFirst, I must apologize to my frequent blog-reader [singular] for the recent lack of new postings. Unfortunately, my current employer has become rather Nazi-like with their website restrictions which I find particularly hindering considering much of my work involves problem-solving via research using web search engines. Sad is the day a company feels it can no longer trust its own employees. Nonetheless…I will not be silenced! “The Man’s” futile attempts to squelch my free-speech frenzy shall not succeed; my voice will continue to echo across the mountaintops of Blog-land!

Anyhoot…onto the bloggin’ topic: The savage .NET 2.0 battle rages between declarative server control initiation versus programmatic server control initiation and maintenance. Here is one such fellow blogger touting his preference for the pragmatic, programmatic methodology.

And here’s my 2 cents: When first introduced to asp.NET 2.0, I, too, found the declarative server tags and DataSourceControl-populating wizards somewhat disconcerting, creepy, and a little too Dreamweaver for my taste. “I’m a real programmer”, I kept thinking, “I’ve dredged my way through the ugliest, most-cryptic of programming coding (that’s right, I’ve had to work with Prolog) and I certainly DON’T need any wizard to do my programming for me.” I was suffering from what the professionals like to call ‘Old-Skool-izm’.

Relatively soon, it became quite clear which side of the coin Microsoft’s developers had contributed vastly superior resources towards planning, implementation and even documentation efforts; the declarative side. After MANY frustrating scenarios (and multiple blog postings) working with a variety of server controls in a stubborn, strictly programmatic manner, I found myself fixing many of the inexplicable, unintuitive server control symptoms and behaviors by simply switching to declarative mechanisms.

As time rolled on, and continued to plunge headfirst into the code-reducing, time-saving declarative devices, I found myself wondering why I had so fervently resisted them for so long. Certainly there are times when a programmatic method is necessary for a certain echelon of dynamic server control behavior, but when it’s not; why write more code than I have to? And furthermore, why not allow Microsoft’s framework to invisibly do the heavy lifting for me in terms of maintaining a control’s state?

On that note, I recently discovered what I considered to be a somewhat obscure ViewState symptom of populating a server control programmatically rather than declaratively. If you rely on a server control’s view state to retain its data across postbacks, so that you’re not required to continuously re-load the control every time the page refreshes, asp will store your entire data set for that control in view state (that’s about 136 lines x 1024 characters worth of view state for a single DropDownList control populated with approximately 5000 records). This is because all changes made to server controls via the code-behind file are lumped in with asp’s interpreted “user-initiated control changes” and so are preserved within view state rather than stored server-side.

Alternatively, declaratively binding a server control to a DataSource object, such as a SQLDataSource or an ObjectDataSource, will store the control’s associated dataset server-side eliminating the size-able view state that will travel to/from server and users’ browsers for each page request.

Similarly, any property setting changes made to controls in a programmatic manner, such as the control’s styles, maxLength, databindings, etc will ALSO be recorded and maintained within the page’s view state. Is one’s view state really a consideration when we’re talking about view state hogging rich server controls such as the GridView? Probably not, but it’s food for thought.

December 12, 2007 Posted by | Tech | Leave a comment