I tend to focus on development topics of late. Specifically ColdFusion/Railo, Coldbox Framework, SQL Server and Eclipse.
Monday, October 23, 2006
Server Mechanic game...
http://digg.com/playable_web_games/Server_Mechanic/
Digg it, if you like it!
- Will Belden
October 23, 2006
Sunday, October 01, 2006
ColdFusion MX 7, VMWare, VM Shared Folders, Win2003 and Model Glue: Unity
Initially, I was simply doing an "upload" via Eclipse to the "server", but the Deployer plugin I use for Eclipse only allows a single file upload, no folders per round. I often modify four or more files at a time and quickly tired of picking each file, right clicking, choosing Upload, and hitting the spacebar to push the OK button on the "Overwrite...?" dialog. Times 4. Wore me out. ( I have never been able to get the builtin FTP of Eclipse to be my friend.)
So my next option was to see if I could use the Shared Folders feature to have the website setup in IIS point to that shared folder as the site. Then I could simply save the file after editing within Eclipse and click Refresh/Reload in the browser.
( I should note that the "shared folder" of which I speak is on the host machine. I wanted the VM "server" to see that folder on my real machine, as all my development code is on an external USB drive connected to my network. - WB)
Let me say this...the right combo can be a bit tricky. I think, honestly, more so because I didn't want the ColdSpring, Reactor and ModelGlue folders in the root, which means adding CF Mappings. (I wish there was another way to do this without adding mappings for the WHOLE server!!!)
Here was the solution that I came up with after much trial and error. (I had to reinstall the VM setup this morning and had to trial-and-error it until I got it right again because I didn't have my earlier successful attempt as a reference. (Blogging here means *I* can find it again if I need it...)
With the VM Workstation or higher, a "network share" looks like this:
\\.host\Shared Folders\MySite
Now you can map these to a drive letter, but don't even try it. Works fine for Windows in general, but not for IIS and CF mappings.
I buried the Reactor, ColdSpring and ModelGlue folders within [siteroot]\_system\, which meant adding those pesky mappings.
In the VM's IIS config, you set the Home Directory of the site to:
\\.host\Shared Folders\NewDevSite
...assuming your site is "NewDevSite", which I'm sure it isn't. You have to make sure that you have the radio button "A share located on another computer" checked first.
That allows IIS find the site itself. Then you have the ColdSpring globalConfig rootPath mapping in the ColdSpring.xml file:
And finally...the CF mappings:
\\.host\Shared Folders\NewDevSite\_system\ModelGlue
The problem was that I had [mis]remembered being able to use a mapped drive in IIS, but you cannot do this, at least I wasn't able to to that. I tried and tried, but to no avail.
Hope that helps someone out there!
- Will Belden
October 1, 2007
Saturday, September 02, 2006
ColdFusion ColdSpring - Evaluate variables in ColdSpring.xml
As part of my new implementation of ModelGlue:Unity, I found that I have to place the values of different things in many different places. In this situation, that was the applications datasource name, user ID and password. I dislike having more than one or two places to have to place values, in the event they need to change. (A good security policy for databases is to change those passwords every so often.)
In my ColdSpring's XML config file, I had attempted to place the following:
However, this only resulted in a query error along the lines of a datasource not being found with a name of "#APPLICATION.dbName#".<bean id="oDatabase" class="com.oDatabase" >
<constructor-arg name="dbDatasource">
<value>#APPLICATION.dbName#</value>
</constructor-arg>
<constructor-arg name="dbUser">
<value>#APPLICATION.dbUser#</value>
</constructor-arg>
<constructor-arg name="dbPass">
<value>#APPLICATION.dbPass#</value>
</constructor-arg>
</bean>
Perhaps my solution to my need is not the best way, since I modified ColdSpring files directly. Perhaps there is even another way, but a couple hours of searching did not reveal the answer to me. I thought "there has to be a way to tell CS to evaluate the XML value entry instead of just seeing it as a literal string."
I opened DefaultXMLBeanFactory.cfc in the /coldspring/beans/ directory and modified the "constructBean" function. There are two places you'll find this line, one in a regular bean function setup, I believe, and the other specifically for init() functions.<cfinvokeargument name="#argDefs[arg].getArgumentName()#" value="#argDefs[arg].getValue()#"/>I replaced that line with this block:
<cfset VARIABLES.csTempEval = argDefs[arg].getValue() />In my ColdSpring XML config file, I changed the section above to look like this:
<cfif FindNoCase("~~~", VARIABLES.csTempEval) GT 0>
<cfset VARIABLES.csTempEval = mid(VARIABLES.csTempEval, 4, 999999) />
<cfset VARIABLES.csTempEval = Evaluate(VARIABLES.csTempEval) />
</cfif>
<cfinvokeargument name="#argDefs[arg].getArgumentName()#" value="#VARIABLES.csTempEval#"/>
<bean id="oDatabase" class="com.oDatabase" >Voila! Now my ColdSpring dynamically evaluates APPLICATION.dbName instead of trying to use it as a literal. It will only do this is the tag has the three tildes (~~~) at the front. Obviously, you can modify it to do it with any character combination you find more appealing. I would avoid anything too crazy, or anything you might actually want as a true value down the road. I considered having the changes look for anything beginning and ending with "#" characters but that would eliminate the ability for more complex combinations, if needed, such as "myTest_v#APPLICATION.version#" where it evaluates to "myTest_v01" or similar.
<constructor-arg name="dbDatasource">
<value>~~~#APPLICATION.dbName#</value>
</constructor-arg>
<constructor-arg name="dbUser">
<value>~~~#APPLICATION.dbUser#</value>
</constructor-arg>
<constructor-arg name="dbPass">
<value>~~~#APPLICATION.dbPass#</value>
</constructor-arg>
</bean>
If anyone out there knows of a more ColdSpring acceptable way (that I was unable to find), please let me know. Of course, I made a backup of the original CFC in the event that someone brings it to my attention!
September 9, 2006
Friday, September 01, 2006
ColdFusion - Crazy Error
"The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Null Pointers are another name for undefined values."After my initial bafflement, it occurred to me that the problem wasn't where it was saying it was, in a call to the CFC, but rather in the CFC function itself. I had specified a function returntype of "numeric", but had neglected to setup to return anything at all. Even when I modified the call to the function to not accept a return, as in:
myFunctionCall(parm1=value1, parm2=value2) ;
instead of
myRetVal = myFunctionCall(parm1=value1, parm2=value2) ;
... it still didn't work and threw the same error.
Hopefully, if you're having this problem, and search on some of that text, you'll end up here with a search and save yourself some headache!
Will Belden
September 1st, 2006
Wednesday, February 22, 2006
Not your Personal Conveyance
This...irritates...me...to...no...end. I can understand needing to purchase groceries. I can understand not having a vehicle. I can even fathom being too weak to carry everything you need. But I cannot comprehend, condone or even conceive of "stealing" a shopping cart to take your purchased goods back to your dwelling.
Why do people do this? Pure laziness, in my opinion. If you don't have a car, then when you walk to and from the grocery store you need to buy less. Certainly no more than you can carry from point A to point B, whether that distance covers a quarter of a mile or three miles.
That shopping cart does not belong to you! It's not yours. That store paid good money for that cart and has to maintain it, clean it, repair it and replace it when it goes missing. What makes you think you can just run off with it?
Now, to my detractors who think to holler about "poor" and "indigent" or whatever words you want to synonimize with "lazy" -- don't, okay? I have been without transportation in the past and I have never STOLEN a grocery cart. And to be honest, I wouldn't have as much a problem with this concept if it was returned to the store! I'm not above borrowing, but you've got to return the thing. Now its missing from the store so that when I make a 5:00 pm run to the store to pick up a handful of things and the store is crowded -- I have nothing to use. Leaving it at a hotel parking lot, the entrance to your apartment complex or beside the road is an unsightly blot on my view. It makes everyone who lives in that area look like trailer trash.
Don't buy more than you can carry, get someone to give you a ride back home, grow your own food, whatever. Quit stealing the shopping carts! It's NOT your personal conveyance.
Will Belden
February 22, 2006
Thursday, November 10, 2005
Customer Service Apologies -- UGH!
We are taught as kids that it's not good enough to say "I'm sorry", but rather the apology needs to be indicative of admitting a wrong doing, with the intention of not doing it again. When a customer service representative says, over and over, "I apologize for that, Mr. Belden" they are not indicating that they are truly sorry. After all, this particular individual probably had nothing to do with the problem that I'm calling about. Secondly, they aren't making that implied promise of handling the situation better in the future. How can they? They aren't a decision-making individual within their company.
I think I would find it more satisfactory if they just said "I can understand your frustration, Mr. Belden." This would make far more sense, imply an empathy (that of course they don't possess) and save me the grief of having to say, after their tenth apology, "Please stop apologizing and let's just get it corrected." To which I typically expect them to say, "I'm sorry for all the apologies, Mr. Belden."
I'm sure all this is laid out in the "Vendor's Guide to Handling Customer Complaints" or whatever little green book that they give all the $4.00/hr customer service call center employees. I think one of the difficulties I have is that I don't care much for following other people's guidelines, but rather feel I am appropriately intelligent to handle the situation well without a script to follow. (Hence I never joined the military!)
Anyway...a short rant about why I despise calling any customer service center. I also would rather pull my fingernails out than call because I'm pretty sure, from the moment I dial the phone, that whatever I have to be calling about probably won't be fixed anyway. My typical pessimism at work, mind you!
Will Belden
November 10, 2005
Tuesday, August 09, 2005
The Beauty of Irfanview...
Here are some of the reasons I love this program so much:
- It's free.
- It can open almost ANY image, including Photoshop, Illustrator, .gif, .jpg, .png, etc. (Be sure to get the plugins...)
- It can open almost ANY video files, including .mpg, .avi, etc...
- You can do basic operations such as pasting in a screenshot and saving. You can crop, resize, resample, reduce colors or go to grayscale (I often do this when pasting a screenshot into email to minimize message size and bandwidth usage.)
- It has support for basic effects, but also lets you use Adobe .8BF filters, too!
- Did I mention it's free? If not, it's free!
- It's updated frequently. I had v3.95 on my machine when I started this, but found that v3.97 was available. (I updated immediately...!)
- It can whip out thumbnails for a whole directory for quick viewing super fast. Very useful to find a file you seek quickly.
- You can defined an external editor per file type. I have my image files (all types) associated with Irfanview. When I double click a .psd file, it opens there and shows me if it's the file I think it is. Then I can hit SHIFT+E and it opens in Adobe. But I was able to determine if it was the file I was looking for without having to actually load Photoshop.
If you haven't ever used this little program I highly recommend downloading it and trying it. You have nothing to lose, but you might find you'll wonder how you ever lived without it!
- Will Belden
August 9, 2005
Friday, July 29, 2005
Shopping Carts and the Lazy People Who Use Them
As an adult, I don't know if there's anything that bothers me more than people who do this. It is probably my biggest pet peeve. The reason it bothers me so much is because people are super lazy. Most stores place a little section multiple places in the lot where you can place the cart into it, and it has a lip to keep them from rolling back out amongst the parked vehicles. I have watched people who are parked just across the aisle from the cart return areas and still not put the cart there.
It's begun to bother me more recently. We've all heard the stories of the "runaway carts" that invariably put a dent in someone vehicle. My mother-in-law, Linda, had it happen to her at Wal-Mart. Some lazy shopper just couldn't find the time or take the effort required to put the cart away and left in a place that it could roll into Linda's car. She has a nice new Toyota hybrid that she very much loves, but it now has a HUGE dent in the door. Most people love the cars they have. Most people take care of it. The individual who let the cart roll probably has a 2005 Cadillac that they would be very upset to see a scratch on, but don't give another thought to the people who could be affected by their carelessness.
I see people leaving the cart just whereever, but I don't have what it takes to say something to them. I'm certainly not going to leave my ice cream to melt and go gather them up and put them away, either. But I always put my own cart away. If it's a smaller store that doesn't have a cart return gizmo in the lot, I take it in.
Shame on Wal-Mart, too. I can see them saying "Uh, look...we can't be responsible for that." And I agree. However, when Linda talked to the store about it, they actually told her they would take care of the cost. When she told my wife and I this, we couldn't believe. "Kudos for Wal-Mart" I exclaimed. I asked her about it roughly two weeks later and she told me that Wal-Mart changed their mind and were not going to cover the cost. BOO on Wal-Mart! If they had told her no upfront, that's understandable, but to let Linda believe they were going to pay for it, then dash the hopes...well....that's just piss-poor customer service.
The worst part is that you, for something you didn't even have anything to do with, can't really report it to your insurance company because that will just raise your rates. So what happens? You're disgusted every time you go to your car and see the big dent.
All because some lazy, irresponsible, selfish shopper couldn't take 15 seconds to walk the cart to the return area.
PUT YOUR DAMN CART AWAY! Maybe I'll start saying something to people. Maybe I'll politely ask them to put their cart away. Maybe, while they are getting into their car, I'll walk in front of them, grab the cart, scowl and put it where it belongs. Maybe I'll just get angrier. Maybe I won't do anything. But you can bet I'm "ranting" about it here. This is the primary reason I started this blog, so I could complain (out loud) about lazy people and their runaway shopping carts.
- Will Belden
July 29,2005
Monday, July 25, 2005
Sometimes I really hate people. (In cars...)
Part of this training is actually riding the bike for long distances. (Go figure...) This past weekend, we did 30 miles on Saturday morning, then another 30 again on Sunday. While it's great that Ponte Vedra has some good distances of running/biking trails, they don't go the whole distance that we need to train on. Past that, there's a good length of "HOV" lane, reserved for bikers. But it, too, runs out before the mileage we need to cover. At that point, we're on A1A, riding with traffic.
On Sunday, the roads were still wet from rain the night before. Puddles were everywhere, and so getting a bit wet and muddy was a given. However, I wasn't prepared for what happened to us.
We were riding along, and a white or silver Nissan 280Z honked at us, and then deliberately hit a puddle to splash us. At first I wasn't sure this was the case, but another biker who had passed us and stopped on the road further up had exactly the same thing happen to her. As a guy, I can understand wanting to do that. Guys are mischievious and sometimes bad mannered. But there is a BIG difference between thinking about it and actually doing it.
What prompted the title of this posting is that it's really sad that many people, especially people in cars, have no social conscience whatsoever. People do things in cars they would never consider doing on foot. Like speeding up, running you out of your lane so they can cut in front of you or flipping you off as they pass by. Apparently being in a moving vehicle afford a feeling of anonymity that you can partake of to do as you please, regardless of the consequences to others.
My advice of the day.... THINK about others when you're driving.
- Will Belden
July 25, 2005
Is she Anakin Skywalker or something?
Check it out....so we can complain together about her!
Uncommon Ground of Positives.
Actually, I think it's cool that she thought enough of what I'm doing that she is willing to join in. Usually it's the other way around, with me following her excellent lead!
- Will Belden
July 25, 2005
Welcome to my first Rant
Prior to this, I had a "blog". Not a real blog, mind you, but "My Soapbox" on my website Belden.NET, in which I posted infrequent meanderings on my site. I have them there (all 6 of them) dating back to 1999.
I have one I'll be writing in a few minutes, a need for ranting that I cannot contain. I won't be talking about anything specific to my work environment, or about my employer, so don't even think of looking here for that kind of information. I've read way too many articles about people being fired for doing that. And just in case you're wondering, no, my rants (or raves) don't express the opinion of anyone but myself. Not my friends, family or employer. (Unless I indicate otherwise by quoting them.)
I look forward to your readership. And if you aren't reading this...too bad for you!
- Will Belden
July 25, 2005