Tuesday, January 03, 2012

Retiring this blog

I'm in the process of retiring this blog.  It's been a while since the MX was part of ColdFusion, so an update is in order.  I'll be migrating some of the content that makes sense to the new blog.  I intend to broaden the content a bit while at the same time keeping it firmly in the technology camp.  I'll probably just kill the off-topic content I posted on this blog.  Don't worry, I'll be sure to burn you retinas like always.

The new blog is called Digital Hot-Fix.  I look forward to seeing you there!

Cheers,
Mike.

Saturday, November 19, 2011

cfdump style fix

Sometimes when working with ColdFusion you just want to quickly dump out some variables into the page to see what's going wrong.  Normally this works fine, but if you happen to be working with a site that has a dark theme with a light colored font on the body, it can sometimes be difficult to read the output.

A simple solution is to add a class to your default stylesheet for the site.  Include the following rule:



.cfdump_struct {
     color: #000000 !important;
}

This will ensure that the body of the cfdump output is displayed in a dark color to make for easier reading.

Wednesday, July 21, 2010

Why null sucks. Reason 641.

A little bit of sql code here:

DECLARE @test DATETIME

SET @test = NULL

IF (@test <> '7/31/2010')
SELECT '@test is not equal to 7/31/2010'
ELSE SELECT '@test is equal to 7/31/2010'

Amazing. We've just figured out that a null date is equal to 7/31/2010. Who would have guessed? The reason this is problematic is that there is no way in the current implementations of sql to express n-value logic results. Comparing null to 7/31/2010 should result in null or unknown (or something else depending how many values are in your logic table). The If construct in SQL is boolean, but the test I showed above is not.

Sunday, March 28, 2010

FW/1 Notes - fw.populate()

If you've followed my blog for any period of time, you'll know that I have not been a big supporter of the various CF frameworks floating around. Until now. I've been working off and on for the past few months with FW/1 and I'm sold. Finally there is a lightweight framework that just seems to make sense to me. It's what is known as a framework by convention instead of configuration and it's very lightweight. In fact the entire framework is contained in a single cfc. Sean Corfield, the author, has done a remarkable job of keeping true to the framework's mission of remaining lightweight and protecting it from feature bloat.

I have to admit that in the past, I just couldn't commit enough brain cycles to get my head around some of the other frameworks I've tried fast enough that I wouldn't just drop it out of boredom.

FW/1 lets you get to that magical lightbulb effect where things just start working quickly. Once you get over that initial hump, then you can dig into the more esoteric pieces when you need them.

As I continue working with it I'll make a few notes here, mainly for my own reference, but also to record some of the issues I've stumbled with as I learn.

fw.populate()
This is a handy little function included in the framework that allows you to quickly populate a bean. Most often I use it to fill out a bean that is being populated from a form that was just submitted so that I can work with it. It saves you the trouble of calling all of your setter functions manually.

With the introduction of cf9, we now have implicit getter and setter functions for components driven by the property keyword or cfproperty tag depending on you cfc style (tag/script). One gotcha for me is that if you utilize those implicit accessors, you have to provide the function with a list of the properties you want populated. If you forget to supply that list, the function only populates attributes that you have written explicit setters for. Also if you have an odd case where a setter takes more than one argument (to support a derived property or do some unusual logic in the getter) it will probably just skip over that property.

Thursday, October 15, 2009

ColdFusion Builder installation frustration

Ok, so on October 5th I downloaded and installed the Beta 2 plugin of ColdFusion Builder so I wouldn't have to deal with the timeout when it hit.

Well, it hit anyway. Even though I had upgraded, it still threw the timeout message. Thinking that maybe I had done something wrong during the installation, I followed the uninstall instructions and installed it again.

Now, there is no ColdFusion perspective at all. Grrr.... Very frustrating Adobe. I REALLY don't want to start with a fresh eclipse install. It takes forever to set up all those plugins.

Thursday, September 24, 2009

RE: The Free Market Paradox

This is comment I tried to make on the story linked in the title, but for some reason could not submit. Some day I'll make my response more coherent, but I'm out of time right now.

WWJWD?

What Would John Wayne Do?

The best way to avoid mult-year contracts is to NOT SIGN MULTI-YEAR CONTRACTS.

Lets say you were able to make multi-year phone contracts illegal. If I were a cell provider, the first thing I would do would be to get rid of my long-term contracts, and stop subsidizing my handsets. In fact, I'd probably raise the price of my handsets to include my early termination fees if I have a cost associated with you leaving early. Now, to remain competitive, I'll set up a financing company that will knock your cash outlay down to an amount similar to my competition and make the whole process very easy. You can now leave whenever you want.

You can regulate and regulate and in the end, you're just paying for non-producing government employees. Contrary to what you say about not liking government intervention, I think you DO like the idea of government sticking their nose in. You want gov't to enforce what you think is a correction to a problem when every customer that signs one of those long-term contracts is testifying that the services included are more valuable to them than the loss of freedom - and really it's just money. You can always leave one of those contracts, you just incur a fee.

I'm not sure what you mean by private industry not regulating itself. Private industry doesn't have to power to write or enforce laws against it's participants. However, there are two things that we have in abundance that serves a similar role, Standards bodies and bankruptcy. We have the AMA, W3C, FASB, State Bar Associations, etc. If a company does not provide a good or service that is more valuable to its customers than the price they charge, they will not be able to cover expenses and will eventually go away.

Gov't artificial intervention with low interest loans, tax breaks, grants, etc. without getting a direct benefit back interferes with the markets self-controlling mechanisms. You wind up with businesses surviving that should not exist. I would argue that not only are the suggestions to manipulating the market that you have made are unfair, they won't have the consequences you intended. Instead, you'll see a decrease in your standard of living because you will be paying more for your services: Additional taxes to handle enforcement of your new regulations and higher prices because for some reason, the companies you now regulate are using that regulation as a barrier to entry for start-ups, so they are able to decrease competition and raise prices.

I'm guessing I won't be seeing you on Youtube at a Tea Party any time soon.

Monday, August 17, 2009

Workflow design with Balsamiq


If you are responsible for designing application workflows and haven't heard about balsamiq, go there NOW and download the demo. Don't even bother reading to the end of this paragraph. Just go.

I've been using this program now for a few months and it has been fantastic in getting those pesky requirements down on paper before you spend a ton of time doing markup and css.

It takes a little practice to get quick with it, but you'll be amazed at how effortless the interface really is. The biggest problem for me originally was deciding on a simple drawing storage plan. I basically wound up with a simple "one folder per project" model and that has worked nicely.

One of the features I really like is the ability to pull in graphics from existing sites for maintenance work. The best feature about this is that balsamiq will let you degrade the real image to make it look more like a quick sketch. So your initial design goes from this:





to this:



At first, this might not seem like a big deal, but it winds up being huge. In the minds of your clients, that black and white sketch is just a sketch. That color image on the other hand is almost finished and they don't understand why you are dragging your feet so much considering that you've already shown almost the whole application.

There is a linking option in Balsamiq that will allow you to simulate linking your projects together. It makes for a nice flow in a live presentation, but I'd urge caution in it's use. Again, it looks a little too polished. Having to open a separate file for each page transition makes it obvious that what you are looking at is a series of pictures and not markup. Once you get your client trained on what they are looking at, then maybe you can make good use of the linking.

Another plus is that Balsamiq is an AIR app. At this point, it's my favorite AIR app. It's always nice when something you use is written in the products you work with.

So, if you do any type of application design work, take a few minutes and check out Balsamiq.

Wednesday, May 13, 2009

Flex Examples

This site has been very helpful lately for working with flex. I think I'll start serching here
Flex Examples

cookbook plugin

Wednesday, April 29, 2009

SnipEx

Does the SnipEx server support trigger text in cfeclipse?  Doesn't seem to be nearly as much help without that or the ability to at least copy the snipets locally.

Wednesday, April 22, 2009

Does the Services Browser work in Ganymede?

I've written before that bits of the ColdFusion Extensions for Eclipse seem to be a bit bugged in Ganymede. I've found that the issues I ran into generally had some sort of workaround to get the thing to work if not as good as in Europa.

This one has me stumped though. If you open the services browser and expand your list of components, I can never drill into the tree below the component name. I get the "Contacting server..." message forever. This is very similar to the issue with trying to browse the file system with rds, but with that one you can refresh and keep going. It's a pain, but it keeps working.

With this one, though, there is no way to refresh just one component. If you refresh the entire tree, it collapses the component again and when you open it back up, it's back to "Contacting server...".

Anybody have a way to get this to work?

Update
Never mind.  I found the workaround about 2 minutes after I posted this.  Here it is:

Highlight the component.  Toggle the show dots at the top of the panel off and on until what you want to see shows up.