Wharton Hiring Again

Dave Konopka has a post over at his site about a ColdFusion position that is open at Wharton Computing at the University of Pennsylvania, in Philadelphia PA. He’s looking for a junior level ColdFusion developer, but will consider hiring a PHP, Ruby or .Net developer and retraining.

I had the pleasure of working with Dave for a little over a year and half, and let me say that Dave’s an amazing guy with which to work. Also, he took the .Net programmer retrained in ColdFusion route, so he’s not fooling around about accepting other technologies. So if you’re even thinking about it, I say take him up on his offer and drop him a line.

See his post for details.

If you want to see what kinda stuff we’re all into at the Wharton School, check at the Wharton Computing Developer’s Center.

ColdFusion 9 and AIR

I think ColdFusion 9 should be able to produce AIR applications.

Oh wait, I’m should probably preference this I love ColdFusion 8, and I think it’s great and the CF team deserves a rest. I do, I do, and they do. I’ve been holding on to this idea ever since the Philadelphia stop of the AIR Bus tour, and if I don’t get it out unfinished, I’ll never get it out there.

Okay, so back to ColdFusion should be able to publish AIR applications.

ColdFusion is cursorily related to so many of the technologies that surround AIR. ColdFusion provides an easy webservice infrastructure you need to run remote Flex applications. These remote Flex applications can just as easily be AIR as Flex. ColdFusion 8 can now generate rich controlled HTML and JavaScript driven applications. Just like the kind of applications that can be packaged as AIR applications.

But the direct linkage between ColdFusion and AIR is missing. Its can help but only as an unglamorous background player. It shouldn’t be, especially when it can produce so much of what AIR is made from.

I can envision setting something in Application.cfc like This.publishAsAir = TRUE. When the application url is browsed the ColdFusion server compiles all of the CF JavaScript libraries that are used in the application, and adds every page that is specified in another application.cfc setting, and builds it as an AIR file.

  • How would this work with applications that aren’t page based but url string based (like framework based applicaitons)? I have no idea.
  • How would this deal with pages driven by database results? I have no idea.
  • How would it hande all of the backend activity of tags like <cfmail> or <cfldap>? I have no idea.
  • Would this be really hard to do? Probably, but have you seen what they’ve done with CF 8?

I’m thinking maybe there would be some way of limiting what gets created as the AIR components. Maybe you would have to wrap all of the application parts you wanted to use in a <cfair> tag, and it would prevent the calling of certain tags within it? I have no idea.

So am I nuts, or are the obstacles too high with this?

Want to crash a CF server?

I found a new way to make your administrators life hell.

  • Create an application mapping to a custom tags directory.
  • Put a custom tag named “doSomething.cfm” in it.
  • Create a ColdFusion page named doSomething.cfm in your application root.
  • Call <cf_doSomething.cfm> in that page.
  • Browse to that page.
  • Watch your ColdFusion server die

I kinda feel like I shouldn’t bother with a bug report because, well, it was a pretty stupid thing for me to do. And in fairness, it won’t crash, it just can’t do anything while it’s processing that infinite loop.

Squidhead Future

I’m doing some serious thinking about the future of Squidhead, and I some stuff I wanted to run by the small but plucky group of Squidhead users that are out there.

It’s gotten a little unwieldy to do updates for both a ColdFusion 7 and 8 version of the feature set. Additionally, the whole business objects and non-business objects version is also getting hard to support. Finally, there are a whole bunch of features I would like to support but require ColdFusion 8. So here is what I am proposing:

  • Ceasing development of the current version of Squidhead.
  • Starting a new development track that required ColdFusion 8 for application generation. (But then generated application could run on ColdFusion 7.)
  • Dropping the non-business objects version of the code.

Once I did that, I could do the following:

  • Switch database analysis over to use <cfdbinfo> for most, but not all of what I do.
  • This would make adding support for other DBMS’s easier

I’d be happy to hear any feedback you might have on these proposals. Assuming no one objects, I would publish one last version of the old code as 1.0, and then start pruning and working on what I would call version 2.0. (I would also come up with a more standard versioning system.)

IE, cfcache and XHTML Strict Don’t Mix

I ran into a little problem today, and haven’t figured out a way around it yet.

I had a page that is slow but changes rarely, a textbook case for <cfcache>. So I added the caching statement, and ran it. It looked perfectly fine in Firefox. I went to look at it in IE 7, and the CSS was screwed up (supposed to be a centered aligned design, now all the way to the left).

I couldn’t figure it out. I looked at the source code, no differences. Finally I ran a comparison on the two page sources, and discovered that <cfcache>seems to add a ColdFusion style comment containing the url of the page into source, above the doctype declaration. I couldn’t see how that would cause the problem, so I submitted the source to the W3 Source validation service. It informed me that the comment style invalidates the page, because I was using XHTML 1.0 Strict.

As I see it, my workaround is to set the page to XHTML 1.0 Transitional, or stop using <cfcache> on this page.

Subfolders and Application Custom Tags

I love the new Custom Tag Paths in Application.cfc feature of ColdFusion 8. In fact I love it so much I’m using it everywhere now. I did run into one problem though. I tried calling an application mapped custom tag from sub folder without its own Application.cfc. The custom tag call bombs. I added an application.cfc that extended the application’s root application.cfc, and still no joy. I had to explicitly set the custom tag mapping in the child application.cfc to get it to work.

No big deal, but I figured I would share it.

Custom Tags, and cfhtmlhead

I’ve been doing a fair amount of work with custom tags and JavaScript DOM manipulation. One of the things with which I’ve struggled with is organizing my code. Do I put the JavaScript in the custom tag? Do I put it in central .js files? What if the script I’ve written will only be called from one custom tag and one custom tag only?

Well I haven’t worked out all of the answers, but I do have a solution for single use scripts: Use <cfhtmhead> to inject the script into the html header from the custom tag. It keeps all of the connected code together, but still does proper, degradable, properly-separated JavaScript and HTML.

Here’s an example of this in use:

<cfsavecontent
variable=“javascriptToInject”>


type=“text/javascript”
language=“javascript”>

window.onload = focusForm;

function focusForm(){


if(document.getElementById(“username”)){

document.getElementById(“username”).focus();

}

}


</cfsavecontent>

<cfhtmlhead
text=“#javascriptToInject#”>

<cfoutput>

<form
action=https://#application.hostSecure##cgi.script_name#&#8221;
method=“post”>

<label
for=“username”>Username</label></dt>

<input
type=“text”
id=“username”
name=“username”
/>

<label
for=“password”>Password</label></dt>

<input
type=“password”
id=“password”
name=“password”
/>


<input
type=“submit”
name=“signin”
value=“Sign In”/>

</form>
</cfoutput>

On Code Reviews… again

I gave a presentation on code reviews to the Philly CFUG a few weeks back. Then my host died, and I never posted this. I’ll try and get the presentation up on the site in the next few days. But two questions arose that I figured I would discuss here:

  1. Do you check the code after the review to make sure developers have made the changes for which the team has asked?
  2. Can developers request a code review?

Both of these speak to a subtler issue. Does your team want to be adequate or excellent? What about each member, what do they want? The answer to this question will inform the answer to the previous ones.

Now this isn’t want of these things where I’m using reverse psychology to encourage what I want others to do — “Well if you want to be only adequate…” Look, not everyone can be excellent. I don’t want to get into a whole discussion on where someone brings up “Free Markets” and someone brings up Harrison Bergeron and then we all get angry at each other. My brief statement on this is that there is plenty of value contributed by people who are only adequate.

But it’s going to make a difference with a whole lot of things, including code reviews. Those that want to be excellent welcome criticism, because the idea of their product being flawed in any way is appalling to them. It’s more appalling than letting other people find those flaws. But really, they like to show off what they’ve done, and want to be acknowledged by their peers for it too.

On the other hand, those that only want to be adequate don’t care if something has flaws, as long as it works. They may try and avoid reviews, but mostly they’ll tend to be indifferent to the whole process, and will only do it if they are mandated. Unfortunately once it’s mandated it becomes a perfunctory step for them, a hoop to jump through. Some of the more militantly adequate will say things like “Don’t bother fixing it; let’s see if we can sneak it past the code review.”

So, if you have group of developers striving to be excellent, they absolutely will ask for their own reviews (but you might need to let them know they are available) and you won’t have to check them afterwards. On the other hand, if your team is on the other end of the spectrum, you might just have to mandate them. Perfunctory code reviews while painful are better than none at all.

As for double checking the code, it comes down to trust. Do you trust your teammates? I say err on the side of trust. Code reviews tend to ruffle a few emotional feathers to begin with. To big brother people afterwards would just add insult to injury. Trust people until they give a reason not to trust them. Obviously if you are doing work with sensitive data you may want to evaluate this on your terms.

But if people have violated your trust, you’re going to be glad you followed the rest of my advice on code reviews. That way you’ll have page names and line numbers by which to judge whether or not they kept up their end of the bargain.

This tension between adequate and excellent effects many other aspects of your team. I’m thinking you may want to look at this for more than just code reviews. I figured this would be a good place to sneak it in.

New Job

July 1st starts the first official day of my new job. I’ll be taking on the role of IT Director for Wharton Research Data Services. WRDS (pronounced “words”), as we call it, is a suite of research applications that provide access to financial databases used around the business and business academic world. We resell it to other educational organizations, making it a very important part of the Wharton brand. I’ll be taking over direction of the web portion of the application.

My first concern will be the giving the website a direly-needed facelift. To facilitate that we hired Happy Cog to do a kick-ass redesign, that has been sitting unused for awhile. I’m going to get that new design up on the site, by October. As part of that plan, I’m going to be taking on automation and separation of content from design. Of course, I won’t be doing this alone. I’ve got a new staff of which I’m in charge

The technology that drives the site is Perl. There are no thoughts on getting rid of all of the Perl, as it’s needed to talk to the SAS databases on the backend. I’ll be adding ColdFusion where it makes sense – mostly in a community feature that we are building. Additionally I’m working on what amounts to a domain specific language (in ColdFusion) to automate page construction. Thanks Peter Bell for turning me on to that whole stuff.

It’s sort of a bittersweet sort of thing. It’s the first move for me in awhile that involves complete change, as opposed to just increasing responsibilities. I give up all my safe ColdFusion cache.

The job of running our ColdFusion environment and providing ColdFusion leadership will be falling to Dave Konopka. I’m extremely proud of him, since I hired him, and now he’s replacing me.

While today is my official start date, I have permission to sort of coast through this week and start next Monday. I’ll be wrapping up some lose ends from my old job today and tomorrow, and taking a 5 day weekend for Fourth of July holiday.

I still intend to post on ColdFusion, and I’ll still be maintaining Squidhead. However, I’m going to generalize the topics a bit. I’m going to talk a bit about my experience as a client to Happy Cog (awesome in short.) Also I’m going to talk about some developer soft skills (like influence), and how to practice them.