Doug's Resume
OO Lexicon
Chat with Doug!
Recent Entries
You may also be interested in...

heaters
hotels boeken in 7 sec
Engagement Rings
Online Dating Australia




SURF'S UP!
You:
Your Web Site:
<< August, 2006 >>
SMTWTFS
12345
6789101112
13141516171819
20212223242526
2728293031
Search Blog

ColdFusion Jobs
Recent Comments
Re: Promoting Family Unity: Lowering Your Utility Bills! (by Fernando Lopez at 5/07 10:12 PM)
Re: Why I Hate ORMs (a solicited rant) (by Richard at 5/06 10:56 AM)
Re: Why I Hate ORMs (a solicited rant) (by dougboude at 5/06 10:27 AM)
Re: Why I Hate ORMs (a solicited rant) (by Richard at 5/06 6:50 AM)
Re: Why I Hate ORMs (a solicited rant) (by Sean Corfield at 5/06 1:40 AM)
Re: Why I Hate ORMs (a solicited rant) (by Steve Bryant at 5/05 5:07 PM)
Re: Why I Hate ORMs (a solicited rant) (by dougboude at 5/05 4:36 PM)
Re: Why I Hate ORMs (a solicited rant) (by Mark Mandel at 5/05 3:52 PM)
Re: Why I Hate ORMs (a solicited rant) (by dougboude at 5/05 3:42 PM)
Re: Why I Hate ORMs (a solicited rant) (by Brian Rinaldi at 5/05 3:14 PM)
Categories
Archives
Photo Albums
Funnies (5)
Family (3)
RSS
Reciprocal Links

Powered by
BlogCFM v1.11

29 August 2006
Easy Security for Canvas Wiki
with auto-author population
I'm sure we here at my day job aren't the only ones who are using Ray Camden's Canvas Wiki and wish that those who author and edit pages within it didn't have to type their names in every time. Well leave it to my brilliant coworker Doug Sims to have implemented a slick, surgical way to incorporate both security and automatically capture the correct author/editor. The basic steps are:
  1. Enable IIS Challenge/Response on the web directory where Wiki lives;
  2. Modify one line in one file of the Wiki

Okay, if you have to do it yourself (and don't have a shining infrastructure department who manages your web servers), enabling security on the wiki directory is a snap.

  • Go to the IIS Admin, navigate to your wiki directory, right click and click Properties.
  • Click the Directory Security tab, then click the Edit button in the "Authentication and access control" section.
  • In the "Authentication Methods" window, uncheck the "Enable Anonymous acess" box and make sure that "Integrated Windows authentication IS checked.
  • Hit 'Okay', then 'Apply' and close out the IIS admin.
Screenshot of the IIS Admin:

Whenever a user navigates to the wiki web directory now, they will be asked for their username and password (it'll be the same one they use to log into their machine on the network). They may also have to append the network domain name to their username, as in the following example where user 'DBoude' is on the BPL domain: BPL\DBoude

For step 2, open the wiki template Views/dsp.edit.cfm. Somewhere around line 50 to 59, find the table row for author, and change it to this:

<tr>
    <td>
    Author:
    </td>
    <td><input type="text" name="author" value="#listlast(cgi.auth_user, "\")#"></td>
</tr>

That's it!

 

Posted by dougboude at 5:45 PM | PRINT THIS POST! | Link | 1 comment



28 August 2006
What is an 'Advanced' Coldfusion Developer?

 What is an “Advanced” ColdFusion developer?

 

Preface: You will see the word ‘framework’ used in this post once or twice, though it has little to do with the topic. Please refrain from using this word’s occurrence as the catalyst for yet another framework debate thread.

Thank You!

The Management


As we’re all well aware of, labels such as ‘Advanced’ are only a weak approximation at best used to give some context to an individual’s skill level and abilities. Shoot, for most of us, even our own job titles fit this definition, as there is no single phrase that totally encompasses our duties, abilities, and skill set. One reason it is that we humans take the time to factor a person or ourselves down into a single adjective or descriptive phrase is typically for convenience’s sake; it’s expected protocol that whenever we’re asked the question “what do you do?” or “How would you describe your current skill level?”, that we do it in a way that can be uttered with a single breath. Sometimes the whole labeling thing can also be misused as a self-serving item, fueling vices such as inordinate pride and the like; in that usage I personally condemn it, and make it a point not to use it in that way. For the remainder of this post, however, I’ll assume that those who seek the label that fits them best do so for reasons other than pride.

 
So regarding skill level assessment, what categorization would I ascribe to myself if asked to do so, and why? Using what criteria? Ah, even we as individuals in the privacy of our own minds would have to jump through a few hoops to arrive at an answer we felt really confident and comfortable with (assuming a healthy level of self-humility is present), so how on earth could we possibly do a better job of summing up someone else’s skill level? Between the lines of many different threads hither and yon regarding frameworks I see that the reason ‘Advanced’ and ‘frameworks’ and ‘OO’ are being spoken of in the same thought is the fear factor. I speak from experience, that at one point I felt, not from any internal source, but from the evolution of the community, a burning need to re-evaluate my own skill level. Why? Because in a nutshell, there were things going on out there that I did not know. That innate fear of the unknown that often has its subtle effects on the way we behave and think did just that, and caused me to wonder if by not forcing myself to “keep up with the Joneses” was the skill level status that I had personally settled on losing its actual meaning? I believe that everybody in our community, to one degree or another, felt it just like I did. Some said to themselves, “you know what, I just better go ahead and invest the time to traverse this new learning curve. It’s going to be painful and tedious probably, but I’d rather go through that pain than to face the potential situation of not getting a job because one of those new frameworks became an industry standard and I remained ignorant of it.” Still others, like I did for quite a while as well, said to themselves “Why should I question my skill level just because I don’t take the time to keep up with every single new thing that comes out? I shouldn’t, and I won’t.” But even having told themselves that, the fact that those new things persist and continue to become ever more prominent in the community keeps them questioning even when they don’t think they need to; it’s just human nature. And then every once in a while when someone inadvertently or even purposefully posts something that gives the slightest hint of equating OO or frameworks with Advanced, the need to defend their point of view is roused, and we see the myriad of debates such as we have. Let me be clear at this point, I am not belittling anybody regardless of which camp your personal philosophy resides in; the previous was merely my evaluation of what I believe regarding why it is there came to be two camps in the first place.

 
What I do believe to be relevant here is my philosophy on the very question of “Am I Advanced?”  You see, we all have our own personal hierarchy of skills; those that we have deemed as more or less advanced than another, and our own personal rules for classifying a skill somewhere in the junior to advanced range. With everybody harboring their own personal “opinion” on what is junior, what is mid-level, what is advanced, how can we even hope to answer the question of whether or not we as individuals fall into the “Advanced” category or not? In my opinion, to even pursue such a quest is an exercise in futility, with no reward of any consequence waiting for us at its conclusion. Even if we concluded that “yes, I am advanced”, so what? The next guy may not think so after applying his own hierarchy of skills to your resume. Does his opinion matter? To me, only if he’s my potential new boss would I care how he classified me according to my skills, and with that even, there’s no way I could know ahead of time what his personal hierarchy of skills is!. Other than the previous scenario, opinions are like armpits, right?

 
Bottom line is that classifying an individual’s skill set is a subjective thing at best, and is best done by ourselves for ourselves. We should not allow somebody else’s evaluation result to provoke us to anger or discourage us from going forward, but like any good student of any profession will, take any and all critique (including self-critique) and use it as a tool for progress. We’re the best judge of ourselves, and if we keep or pride in check and our minds open to new things, nature will take her course and we will continue to evolve and grow in a healthy, career-enhancing way.

 
So are you advanced? You tell me. Do you feel advanced? Are you aware of any areas in your personal toolbox where there are ambiguities or understandings that could stand to be refined? Areas in your professional experience that you haven’t really gotten your hands dirty in yet, dug down to the nuts and bolts so that you could get a thorough understanding of how a particular technique or tag behaves? Are you aware of new techniques or methodologies being explored and implemented by others in your professional community which you have yet to really take a good look at? The answer to all of those questions will likely always remain an unequivocal “absolutely dude!”. Does that mean nobody is ever advanced? Are you getting tired of reading the word “advanced” yet? You should be, because homing in on labels such as these are a bad thing to do unless it’s the appropriate thing to do at the time, such as during an interview and you’re asked point blank how you would categorize your skill level. When asked, give your honest estimation. Until then, I say that the question will probably be one best left as a reflexive one; ask it to yourself, of yourself, and when you do, let it be nothing more or less than a catalyst for your own personal and professional growth. But let’s not go the way of those poor, poor Sneetches who were more concerned with those who “had stars upon thars” and those who did not; it was and will always be an exercise in futility, not to mention a complete waste of the precious few moments we all have to invest in something better and more lasting in our lives.

 
Are you advanced? You be the judge of that. Ask yourself often, ask yourself honestly, and always strive to do better. Personally, I won’t look at you through “label colored glasses”. From where I’m standing, we are a community, a community with an enormous amount of collective experiences and knowledge, and I would venture to say that every single individual who has joined themselves to this community has nothing but the common good in mind, manifested by the very obvious and copious levels of sharing and assistance that takes place 24/7 from every side.

 
Are you able to wear the label ‘advanced’? I keep repeating the question so that I can beat it as the dead horse that it is, hopefully making it a distasteful question so that we won’t even have the stomach to utter it again anytime soon.  Fact is, it shouldn’t even be a question at this point; it’s almost completely irrelevant to anything we as a community work to accomplish. N’est-ce pas?

Posted by dougboude at 5:56 AM | PRINT THIS POST! | Link | 8 comments
25 August 2006
Maintaining Hierarchical Navigation Data
Storing hierarchical navigation data in a single table is a snap. Maintaining that data, however, can be a little bit of work (inserting sub items, removing sub items, etc.). What I wanted to share in this post is the solution i built for myself to perform navigation administration, where the navigation is stored in a single table with each record related to some other record in the same table. Bear in mind that I built it  for my eyes only, so isn't necessarily what I would give a customer to use. But, it didn't take an inordinate amount of time to build and it gets the job done, so I am kinda fond of it for those reasons. Without further adieux then, let's take a gander at it.

Following is a snapshot of the admin screen for maintaining the navigation. You'll notice it also incorporates a rudimentary sort of security.


So, in the scenario where I want to insert a sub-nav item somewhere, I simply add the new item's info to the "Add New" section at the bottom, making sure to designate its parent in the "Parent ID" column (choosing 'None' if this is a top level item). The sort order column is used to indicate where under that parent this particular item should show up. Right now, I have nothing in place to prevent me from having the same number twice, so I just have to look at the other children for this parent to determine what the sort order value should be.

Removing a nav item is as simple as checking the delete box. I have my update coded so that if a nav item is removed, its children are automatically removed as well.


Here are the relevant tables I use to store the navigation data (note that ev_nav has a relationship back to itself via an aliased instance of itself in the diagram):


If anybody is interested in getting a copy of the actual files (self-posting template, cfc, and mdb), feel free. Also, consider yourself warned, it's kinda fugly and wasn't meant for public review, but it should provide a good base for something prettier.
Posted by dougboude at 5:47 PM | PRINT THIS POST! | Link | 5 comments
24 August 2006
Removing FlexBuilder from Eclipse

Many of us have tried (or at least downloaded and installed) FlexBuilder, the trial version. For those of us who use Eclipse for other things besides Flex and never bothered to actually purchase FlexBuilder, we may find ourselves with a now expired plugin that tends to pop up now and then asking us to enter our serial number. No big deal really, only a minor annoyance. Except for today when I tried to open a CSS file.

I'm not even in the FlexBuilder perspective, but apparently the CSS extension had somehow been associated with FlexBuilder, so now instead of seeing my file open up in all its glory, I am prompted to purchase the product. I tell FlexBuilder "No thanks", but am unable to open my CSS file. So then, the point of this whole post: How to remove the FlexBuilder plugin from Eclipse.

Fortunately it's a very simple process.

  1. Close Eclipse
  2. Go to the "plugins" directory of your Eclipse installation
  3. Sort the Plugins directory entries by name so that all of the FlexBuilder items are together. Highlight them all and send them to Windows Purgatory.
  4. Now go to the "features" directory of your Eclipse installation
  5. highlight and delete all of the Flexbuilder entries there
  6. Restart Eclipse

All finished!
Posted by dougboude at 12:39 PM | PRINT THIS POST! | Link | 1 comment
Cool Eclipse Plugin for CSS and JS

Aptana is an Eclipse plugin that came to me highly recommended by a peer (Doug Sims) and has proven itself to be a real assett to me as well. What does it do? Only provide code assist with both Javascript and CSS files! Another VERY COOL thing it does within the code assist is provide visual indicators of which CSS and Javascript attributes are IE and/or Firefox compatible, something that is a constant plague to those trying to maintain cross-browser compatibility.

Visit Aptana.com and click the "Download Aptana Plugin" link on the right hand side of the page for instructions on how to install.

One caveat of this plugin is that it's code assist feature is only available when working with .JS or .CSS files...inline css or javascript, well, you're on your own.

Posted by dougboude at 12:28 PM | PRINT THIS POST! | Link | 2 comments
When the Obvious is TOO Obvious: A lesson in Troubleshooting

Look at the following code and guess what the output would be:

<cfset strObj = createobject('component','com.makestring').init() />
<cfset newstring = strObj.getString() />
<cfoutput>#newstring#</cfoutput>

 

Oh, here's the cfc...

<CFCOMPONENT>
    <CFFUNCTION NAME="init" ACCESS="public" RETURNTYPE="makestring">
        <CFRETURN this>
    </CFFUNCTION>
    <CFFUNCTION
        NAME="getString"
        ACCESS="public"
        RETURNTYPE="string">
        <CFSET var thisString = "" />
        <CFSAVECONTENT
            VARIABLE="thisString">
            <ul>
                <li>list item 1</li>
                <li>list item 2</li>
                <li>list item 3</li>
            </ul>
        </CFSAVECONTENT>
        <CFRETURN thisString />
    </CFFUNCTION>
</CFCOMPONENT>

 

Choices:

  • A:[empty string]
  • B:
    • list item 1
    • list item 2
    • list item 3
  • C: depends

 

The correct answer is C, and what it depends on is whether or not somewhere else within your application a CFSETTING tag is lurking that has ENABLECFOUTPUTONLY set to 'Yes'. If this attribute is in effect, then your result will be A; if it's not, your result will be B.

The reason I felt the need to post on this is the fact that I spent a few hours yesterday developing a mild headache trying to figure out why my perfectly simple cfc was producing an empty string at one point within my app, but the correct string elsewhere. Through experimentation and noting that when I removed the CFSAVECONTENT tags everything worked as designed, I eventually concluded that I MUST have discovered a bug in the framework I was using, and so notified the keepers of the framework of all the details of my investigation and conclusion, along with code samples. They immediately (and nicely) informed me that more likely it was the fact that I had ENABLECFOUTPUTONLY enabled, and that I hadn't included CFOUTPUT tags within my CFC method. With egg still dripping from my face, I added the CFOUTPUT tags to my method and wouldn't ya know it...it worked.

I still haven't taken the time to find out where within this app the CFSETTING tag is being called, but two lessons gleaned here for me:

  1. Next time I feel excited at the prospect of having discovered a "bug", I'll think again (nobody wants the reputation of being The Boy Who Cried 'Bug!');
  2. Start troubleshooting from 10,000 feet instead of with a magnifying glass.
Posted by dougboude at 11:48 AM | PRINT THIS POST! | Link | 3 comments
18 August 2006
Dynamically accessing unknown query fields
Ever found yourself in a situation where you need to output values from a query, but you're unable to explicitly reference the columns by name? Perhaps the query is a "Select *", or the column names are being dynamically aliased within the sql based on the date. Whatever the reason, never fear, there are solutions to the challenge.

 

One's first instinct may be to call upon the trusty ol' Evaluate function, which will definately work. But what would your friends say if they saw you using a function that has such an evil reputation as a process hog? Here's at least one alternative way to output a query when you don't know the column names ahead of time.

The key lies in the fact that queries can also behave like structures. (they can also behave as one dimensional arrays, if the field names are known ahead of time). To leverage this behavior, we're going to use the column name as the first key and the rownumber as the second key. Like so:
<cfset fldname = "firstname">
<cfoutput>#myQuery[fldname][1]#</cfoutput>

For the query "myQuery", the value of "Firstname" in the first record would have been output.

In comparison, if we had known the field name ahead of time and wanted to grab that field's value from a specific record, we could have treated our query as a one dimensional array and referenced it like

<cfoutput>#myQuery.firstname[2]#</cfoutput>

outputting the value for firstname in the second record of the data set.

One final example

Following is an example that outputs a query in table format, without knowning anything about the query ahead of time
(We're using QuerySim to fabricate our data set. If you don't have a copy you can get it here.):
<cf_querysim>
    UserInfo
    userID,firstName,lastName,userGroups
    100|Stan|Cox|33
    200|Joe|Blow|35
    300|Doug|Boude|21
    400|Jim|Pickering|15
</cf_querysim>

<cfoutput>
<table>
    <tr>
        <cfloop
            list="#UserInfo.columnlist#"
            index="h">
            <th>#h#</th>
        </cfloop>
    </tr>
    <cfloop
        from="1"
        to="#UserInfo.recordcount#"
        index="i">
        <tr>
            <cfloop
                list="#UserInfo.columnlist#"
                index="c">
                <td>#UserInfo[c][i]#</td>
            </cfloop>
        </tr>
    </cfloop>
</table>
</cfoutput> 
Posted by dougboude at 4:23 PM | PRINT THIS POST! | Link | 1 comment
15 August 2006
Review of "Night Listener"
Robin, RObin, RobIn...nothing personal, dude, but you really should not have done this movie. Not even your amazing acting ability could pull this one out of its own boodie.

I've seen a lot of movies, among them I've seen a whole truckfull of bad movies; but this movie, "Night Listener", has got to be the all time worst movie I've ever seen. It was a dead fish, a frigid woman, a stoned crack ho...the thing barely moved. Time passed, people moved and spoke, but NOTHING happened, ever, at all. Oh, a few times the plot's finger twitched and you were led to believe that something exciting MIGHT happen, but it never became more than a single, nervous, twitch in the story. Of all the mundane, dry, flavorless, tasteless, BORING, eventless, disappointing, "wham bam thank ya ma'am", quickie, "is it in yet?", gaggingly-horridly-lacking-in-writing-effort plots I've ever had the pain to be exposed to, this was the Uuuuultimate. Okay, every story has characters, it has a setting, it has a situation, right? Well, I'm reasonably certain that either A) the writers simply took pieces of other movies they found strewn about on the editing room floor and found a way to piece them together or B)the writers put a hundred 3x5 cards into three large fishbowls, one containing character descriptions, one containing settings, and one containing situations, and then drew out cards from each until they had a story. "Okay, we need a character. Let's see...oh, he's a radio talk show host! Good, good. Hmmm...oh! He'th gay! Hooray! Now the setting....ah, the antagonist lives in rural wisconsin! Oo, this is getting exthiting, ithn't it? D'oh! The protagonist recently broke up with his 20 something hunk of a boyfriend, but is still deeply in love with him. We can really work with that, right boyth? Wow, now here'th where it gets interesting: there's a 14 year old boy that is the antagonist, and he has been molested by his parents and others since he was little. He's dying of aids, wrote an incredibly inspiring soon-to-be-published book, and has an inordinate  man-crush on this gay radio announcer. ...."

OMG. Are we not STRETCHING reality JUST A WEE BIT here????? I put all of my being into forcing my head to try and imagine that "well, MAYbe this situation could exist SOMEwhere and be real", all in the hope that at LEAST the writers will give me some action, excitement, intrigue, plot thickening, resolution...stuff like that. Did I expect too much? I don't think so. Even a bad B movie at least puts forth a lot of EFFORT to entertain me! This movie drew me in unawares, slapped me around like a bad dog, put me in the corner promising to let me out if I was good, so I was good, and then it never let me out of the corner. Suddenly it was just friggin over and I was left there, QUITE unsatisfied and knowing that some unseen writer somewhere had purposefully USED me and taken my money. I was SO disappointed...couldn't even stop saying "I can't believe it" out loud until some 30 minutes later, and now a day after I'm STILL thinking it! The plot had at least 7 points where some decently exciting turn or twist could have occurred; but no.

This movie is lame, lame, lame. Lame cubed. Lame times some logorithmic googol number to the nth degree. Unless you're truly a depressed self-masochist whose only hold on reality and life is when other people (or movies) use and abuse you, do NOT let yourself see this movie, at least not at theater prices. It will do you harm, possibly irrepairable harm.

Sheesh, any 3rd grader with half an imagination and a bottle of model glue could've written a better movie than this. The main character's last name was Noone, and his radio show motto was "This is Noone, at Night". AUGH! NOONE, HUH? What a COINCIDENCE that he's a talk show host at NIGHT. Sheesh, Hollywood, did NOBODY see what I saw? Okay, I'm done ranting. Promise.

Just my take.

Doug out.
Posted by dougboude at 11:51 PM | PRINT THIS POST! | Link | 18 comments