Wednesday, October 15, 2008
Thursday, September 25, 2008
Friday, August 29, 2008
I have to admire some of the design principles being followed by the development team. Things like
- never optimize early - currently, the product is written in java to maximize platform breadth without killing the small team with multiple build environments. The plan is to port the project to C or some other low level language after it is complete to gain performance.
- free and open source - need I say more.
- rel is essentially a working prototype for the real product(s) that come after. It's the design spec for those products that actually works.
- there are no nulls - you can do this with sql products, but it can be very painful. You wind up with lots and lots of tables and joins
- there is no autonumber feature - complete reliance on candidate keys.
- attributes(columns) do not have a specific order. No commands rely on the position of an attribute in a relation (table)
- there is no restriction on what may go into an attribute. You can define whatever types you need, although you may have to drop out into a different language to do that. Even other tables can be contained in an attribute of a tuple (row)
You can visit the Rel site here.
Monday, August 25, 2008
If I ran the same thing from the command line, everything worked fine, so it must be some eclipse setup thing that's screwed up.
To make a long story short, for some reason, the ant home directory was not pointing to the ant install in eclipse.
To fix, go to window | preferences | Ant | runtime | Ant Home... and enter the path to the embedded ant install (for me, this is: C:/Program Files/eclipse/plugins/org.apache.ant_1.7.0.vblahblah
For some reason, it was pointing into my workspace directory.
Friday, August 08, 2008
I like that we're going to be seeing an expansion of cfscript to the point that you can write an entire cfc in script. A cfscript version of cfquery would be really nice. It'll be interesting to see how cfqueryparam gets handled because that tag is so important and so ugly.
The one thing I didn't see mentioned was support of xslt 2.0 and xpath 2.0. Both of them have been W3 recommandations for a while, but it looks like the development efforts of xalan have stalled. It doesn't look like anybody is working on it at all. Maybe cf9 can include the saxon 9b parser instead. You can get the saxon parser working in CF8, but it requires a little hacking. I always tend to shy away from those types of modifications simply becuase I tend to forget about them when the next CF version comes out and something invariably breaks.
If you haven't looked into test driven development, here are a few links to get you started:
A good readable book to get the juices flowing: Test Driven Development: By Example
The mxuint website
The mxuint blog
a good online reference
Now that mxuint has made it's 1.0 debut, there are a lot of interesting thoughts floating around the group regarding what we can do next. For me, I think the most compelling idea is that it would be nice to be able to use the same framework to do other sorts of testing. In particular, finding some strategies for testing THROUGH the database and pushing into the area of functional testing.
The db problem is a tricky one since in order to write good tests for that, you need to have your database in a known state for each test. A lot of people persue the mock strategy, but to me, that only gets you so far. A lot of my apps have a great deal of logic in the db itself which mocks short circuit. Use of transactions would seem like a good idea, but the devil is in the details. Screw up a rollback and your db could wind up in really bad shape. I like the use of a backup/restore strategy, but performance can be a big issue as well as database locking. Oh, and forget about running it against a shared development database. Hopefully we'll get something nailed down to help with this, even if it's just a set of processes you can implement.
Functional testing is where the real fun comes in. Scenario and output testing can take so many forms that it's going to be fun to tackle some of that. If you have any thoughts on what you would like to see here, make sure you post them over on the mxuint blog. We're still gathering thoughts on the subject, so it would be nice to see what everyone is thinking about.
Tuesday, July 08, 2008
Wednesday, June 18, 2008
One of the features that I've heard is planned for cf9 is implicit getters and setters. I imagine those will be along similar lines to the ones in as3, but I don't know any more than you at this point. That sounds like it will save a lot of keystrokes for lots of us and I'm looking forward to it. What I'm not looking forward to is knowing that it's not going to be out until sometime in 2009. So, to help ease that pain a little, here's a little code I have running that sort of does that for basic value object like components. Just extend it to provide get/set/val/do functions for each property you declare with cfproperty. All of the methods can be overridden when needed, and in some cases you should override them.
<cfcomponent hint="Extension point for Value Objects" output="false">
<cffunction name="onMissingMethod" output="false">
<!--- define arguments --->
<cfargument name="missingMethodName" type="string" />
<cfargument name="missingMethodArguments" type="struct" />
<cfset var name = "" />
<cfset var propList = ""/>
<cfset var private = structNew() />
Build a list of properties from the cfproperty tags in the
extending object. We will use this list to determine if
the properties belong to the object
<cfset md = getMetaData( this )>
<cfset foundMethod = structFindValue( md , arguments.missingMethodName , "all")>
<cfset propArray = md.properties/>
<cfloop from="1" to="#arrayLen(propArray)#" index="item">
<cfset propList = listAppend(propList , propArray[item].name , ",")>
Getters/Accessors - examine the missing method that was called to see
if it began with "get". If it does, then we are going to return the
value of the property that matches the rest of the method name
<cfif left(missingMethodName,3) is "get">
<cfset name = right( missingMethodName , len(missingMethodName) - 3 ) />
<cfif listFindNoCase( propList , name )>
<cfreturn variables.instance[name] />
<cfthrow type="ValueObject" message="Property #name# is not defined in component #md.name#."/>
<!--- Setters --->
<cfelseif left(missingMethodName,3) is "set">
<cfset name = right( missingMethodName , len(missingMethodName) - 3 ) />
<cfthrow type="ValueObject" message="The #uCase(name)# parameter to the get#name#
function is required but was not passed in."/>
<cfelseif NOT listfindNoCase( propList,name )>
<cfthrow type="ValueObject" message="The set#name#() method of the component
#md.name# is not defined."/>
<cfset evaluate( "this.val#name#('" & missingMethodArguments & "')" )>
<cfset evaluate( "this.do#name#('" & missingMethodArguments & "')" )>
<!--- Doers --->
<cfelseif left( missingMethodName , 2) is "do">
<cfset name = right( missingMethodName , len(missingMethodName) - 2 ) />
<cfset variables.instance[name] = missingMethodArguments />
Business Rule place holder
if this method is not overriden in your component for each property,
no business rules or format enforcement is taking place
<cfelseif left(missingMethodName,3) is "val">
<!--- This should be overriden in your component --->
<cfset name = right( missingMethodName , len(missingMethodName) - 3 ) />
<!--- Print --->
<cfelseif missingMethodName is "Print">
<cfreturn variables.instance />
The isEqual method here is not detecting if you have two handles
on the same object. It's actually checking to see if the
properties are the same on the two objects.
<cfelseif missingMethodName is "isEqual">
<!--- serialize the attributes of the first object --->
action = "cfml2wddx"
input = "#this.print()#"
output = "private.obj"
<!--- serialize the attributes of the second object --->
action = "cfml2wddx"
input = "#missingMethodArguments.obj.print()#"
output = "private.obj2"
<!--- Test for equality --->
<cfif private.obj eq private.obj2>
<cfreturn true />
<cfreturn false />
type = "ValueObject"
message = "The method #missingMethodName# was not found in component
#expandPath('/' & replace(md.name,'.','/','all'))#"
detail = "Make sure that you have defined the property using cfproperty."
Friday, June 13, 2008
Most of the time when I'm working, I like to have CF hit me with as much debugging information as possible. I'm familiar with it enough now that I know what to ignore generally.
Back in the days of cf7 ;) there was a little problem with CF throwing an error on every cflocation tag it hit if you had implemented the OnError method in your Application.cfc file. It has since been corrected, but the underlying technology that deals with cflocation must still trigger that error somewhere in the bowels of cfs java code.
If you are working in cfeclipse and using the line debugger, there is an option under preferences | ColdFusion | debug settings that lets you break on a CFML runtime error. Turning this on means that instead of getting the big CF error page with all of its debugging goodness, your code will halt execution and you can see where exactly in your code the error was first determined. Occasionally this can be helpful, especially if something is confusing cf about the location of your error.
Unfortunately, with this on, CF still thinks of cflocation as an error. For all I know, it technically may be because of how cflocation has been implmented. Hey, if we're allowed to trap an error sometimes, so should the people that wrote our language.
If you want to try a workaround in your code, Ray Camden has a post on his blog with some code. For what I'm doing, it's probably best just to leave the thing off and deal with runtime errors in the resulting page in the browser instead of trapping them by default.
Tuesday, May 13, 2008
Since there are no more Republicans in the race for President now, is there a chance that a third party or independent candidate can make a decent showing this time? Former Congressman Bob Barr has thrown his hat into the ring. It's unfortunate that he couldn't run as a Republican, but the Republican party appears to be more concerned with big business and protecting it's own skin than with personal freedom and liberty.
And since the former Congressman is supporting the Fair Tax, I'll be taking a serious look at him.
Bob Barr 2008
Monday, March 17, 2008
While Wall Street is losing its mind today over the Bear-Stearns fiasco, some good news was to be had. The first production Tesla Roadster rolled off the assembly line today. It is my feeling that this is the birth of the true American electric car (although it's made in the UK, future models will be made here). While it's got a price tag of a cool 100Gs, it performs as well as cars costing twice that much and more.
Before you dismiss this as just one of those concept type cars that we'll never see or that it's some rich guy's hobby, realize that there are two more designs behind this one. Each of them designed to both lower the price by half and increase the target audience by building a luxury sedan followed by a min suv.
Hopefully, this will do better than my last prediction that the segway was going to take over urban commuting and change the way we build cities. (doh!)
Friday, March 07, 2008
Gary Gygax dies at 69. Wow, that really hits home pretty hard. I can still remember being home from school sick and my Dad giving me a copy of the "Monster Manual" for no particular reason. It's one of my best memories.
I mean, just look at those critters just below the surface on the cover! It still makes me want to pull out my +10 hammer of justice and start "judging" them as evil with a swift clonk on the noggin.
Oh, and if you wind up taking over up there, could you do something about those Scientologist freaks? They're ruining Hollywood.
Thursday, February 28, 2008
I imagine that few people actually enjoy filling out captcha boxes, but the alternative is horrible. No one wants to wade through lots of unconnected comments that are really just attempts to either game the search engines or lure you to some shopping website that will never actually ship you any product if you are foolish enough to buy something.
So, while looking around for some captcha alternatives, I had these thoughts
- Most of the alternatives seem to expose character based data. If they ever get popular at all, the bots will be all over them just like some of the early captchas.
- How easy would it be to defeat a comment submission page written in flex/flash? It seems like that might be hard to script a bot for, but could probably be defeated with a mouse/keystroke recorder of some sort if there were no challenge on the page.
- This one is my favorite. Why not do away with captcha all together, but run your comments moderation through your email spam/bayesian filters. Comments get deleted if they aren't approved in a month, and you could set up a rule to automatically accept any comment that made it through the spam filter. The spam filter on my gmail account works terriffic. I think I might be able to actually set that up here. Maybe I'll give it a whirl if I run out of things to do.
Thursday, February 21, 2008
Ok, I'm part of a dieing breed, but I was really disappointed when McEwan's Scotch Ale stopped being sold in liquor stores throughout Maryland. In fact, it was getting difficult to find ANY Scottish brew in the state. I'm glad to see it's back after about 6 months.
Here's to your good health!
Maybe next year ColdFusion gets its own Super Bowl ad. Well, it's nice to dream, isn't it?
Monday, February 11, 2008
Generally all first bids are rejected because the company being purchased doesn't want to leave a lot of cash on the table. Personally, I see this merger as being less than inspiring. Yahoo is having trouble competing with the Google behemoth and Microsoft certainly knows how to dish out irrelevant search results. I'm very confident that Microsoft can push Yahoo into obscurity faster than just about anybody else.
I actually liked some of the open apis that Yahoo has delivered in the past year or two as well as their finance page being pretty solid. Unfortunately, that good work always seems to take a back seat to search which doesn't really get me too excited. I think it's difficult to create competitive advantage just with search. It's the SaaS model that continues to be interesting to me in terms of a way to deliver both value to the user and eyeballs to the advertisers.
Generally speaking I don't see this business combination providing much value to users and minimal value to existing shareholders of both companies.
Friday, February 08, 2008
Thursday, January 24, 2008
Also, without the networks putting their best serial tv up on iTunes (especially NBC), it's not as good of an experience. The best part about iTunes with an appleTV was that you could watch shows when you want within a day or two of it actually airing. That was really cool. HD would be cool, too, but I'll have to buy LOTS more drive space to support something like that, although Apple is already experimenting with it.
Sunday, January 20, 2008
What is likely to happen is some sort of cash payment in the form of an income tax rebate. The problem with this approach is that many people will not necessarily change their buying habits. Many people simply put all of their receipts into their bank account and withdraw as needed. Unfortunately this type of behavior mitigates the stimulus effect that the government is hoping for. So, if you get a check, spend it.
Now, think what would be possible if we were under the Fair Tax. All of the wrangling in Washington trying to decide who should get a benefit and who should be punished goes out the window. There would basically be 2 strategies available for them to boost the economy, either reduce the tax temporarily or increase the prebate. Increasing the prebate suffers from the same problem that the cash payment under the current system has. We don't get the full effect because we don't change people's buying patterns.
The other method would be to do something like a tax amnesty day (or days). This would have a huge stimulative effect on the economy. People on the fence on larger purchases would have a major incentive to make their purchase on the amnesty day. There is no ability to "save" a tax amnesty. The wealthy would have a huge incentive to inject large amounts of their savings back into the economy. And the poor would have an opportunity to make their money go about a third further for that day.
It's unfortunate that adoption of the FairTax is not the hottest issue on TV or in the papers. It is the ONLY big idea in this campaign season that has the potential to improve the life of all Americans, make us more competitive overseas and remove massive amounts of corruption in Washington.
It's also unfortunate that the only front-running presidential candidate to support the Fair Tax is Mike Huckabee, and he is more concerned with courting the religious right than in promoting responsible government and Congressional Statesmanship.
Thursday, January 17, 2008
Friday, January 11, 2008
Of course the reason that there is so much trouble with HD on iTunes: 6:09 worth of video is 201.1MB. Movies would fill up a lot of disk space pretty quickly.
Now where did I put that usb 1 petabyte drive...
Tuesday, January 08, 2008
Thomas Boswell - For the Redskins, the Unthinkable Has Happened - washingtonpost.com