NOTE: I am in the process of moving my blog to this new system. Thus, it should be noted that this entry was originally posted on 4/1/08.
While developing a web site for a customer, I recently had the problem with evaluating a form field to retrieve that field’s value. For example:
I had a form field as follows:
<input type="text" name="q_1_f35d5381-c9f7-431e-6332-4d404f55ed4c" id="q_1_f35d5381-c9f7-431e-6332-4d404f55ed4c" size="25" value="" />
As you can see I’m using a GUID in the name. This helps me map the form back to another entity after processing.
In order for me to get the value of the field, I loop through the fieldnames and Evaluate() that field as follows:
<cfloop list="#frm.fieldnames#" index="x">
<cfset s.value = Evaluate("frm.#x#") />
</cfloop>
However, when I submit the form and run the code, I received this CF error:
"4d404f55ed4c," on line 1, column 33, is not a valid identifer name.
The CFML compiler was processing: an expression beginning with "frm.q_1_f35d5381", on line 1, column 1.This message is usually caused by a problem in the expressions structure.
It looks like CF attempts to "subtract" the values between the "-" in the GUID. In other words, its attempting to subtract 4d404f55ed4c from 6332 which are the values at the end of my GUID.
After a few hours of attempting to resolve this issue I finally <a href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=3&threadid=1350391" target="_blank">posted the issue on the Adobe Forums</a>.
After just a half-hour a kind fellow by the name of Azadi (thanks Azadi, whoever you are) provided a fantastic solution: Array notation on the structure iteself instead of using evaluate! Duh.
I’ve used this solution before but not on a form structure. So, I changed the code that proceses the form as follows:
<cfloop list="#frm.fieldnames#" index="x">
<cfif StructKeyExists(frm,"#x#")>
<cfset s.value = form['#x#'] />
</cfif>
</cfloop>
And it worked beautifully. Remember array notation instead of Evaluate() is a good option in this circumstance.
NOTE: I am in the process of moving my blog to this new system. Thus, it should be noted that this entry was originally posted on 3/31/08.
As a develop web sites I use my customers as a source of information for web site content. After all, they know their company best. While I don’t usually use their content word-for-word, I will take the liberty to make the content web-usable. In other words, customers often produce paragraphs of content when only a few sentences is necessary to get the point across. And since web users “scan” pages instead of “reading” them, I like to make the content as concise as possible.
On a recent progject, a customer provided me with oodles of content. However, most of the content was a history of services they have provided or growth they have achieved (a yawning experience for most site visitors). So, I provided a little guidance in what content should be for their web site. Note that this was tailored for a company who provided actual physical services, thus, some suggestions might not apply to your particular situation. If you need assistance with your web site’s content feel free to Contact Me.
Here is what I gave them:
Web Site Goals
(you should always have a goal for your new web site project)
- To increase leads to a final sale by providing product/service information and relevant contact information.
- To allow customers to quickly and easily find the information they need resulting in increased customer satisfaction and increased sales.
- To recruit prospective drivers and employees by creating an online employment application that is easier to complete than competitors online applications.
Web Site Content Should Contain…
(remember that this is not an exhaustive list and your web site may need different content)
- Products available
- Product pricing
- Contact information
- Phone numbers (preferred)
- Email addresses
- Steps for quality assurance
- Process of reliability
- Distinguishable characteristics between competitors
- Other elements that achieve the web site goals
- Flexibility that meets customer needs
Web Site Content Should Avoid…
(this is a good recommendation for any web site)
- Vast histories of the corporation or its entities
- Too much sales or business growth information on product/service pages
- Extensive growth information is usually saved for web pages dedicated to investors
- Should be placed in “About” section
- Anything else that does not support web site goals
Will Your Visitor Answer “No” To Any of These Questions?
- Is this what the visitor expects to see on this page?
- Is this information credible and can I trust this company?
- Is this interesting enough to continue spending time on this web site?
Will Your Visitor Find The Answers To These Questions?
- How do I learn more about this product?
- This is interesting, what do I do now?
- What if I’m not comfortable doing that?
- What if I’m not comfortable doing that?
- What if I have more questions?
Can your visitor quickly answer these questions?
Remember that content is relative to the web site and this is by no means and exhaustive list of options for content. However, they are a good starting point.
NOTE: I am in the process of moving my blog to this new system. Thus, it should be noted that this entry was originally posted on 3/24/08.
A colleague and good friend of mine approached me about assisting him in developing a somewhat major web-based application. It turns out that the application is a very good idea and I was anxious to lend a hand.
After our first meeting my friend asked me how we could get his supervisor to approve the project. This is a common problem for many subordinates when trying to approach management with a new idea. The following were my recommendations:
- Consider the circumstances – You will need to decide which of the following are necessary. For example, if its a small idea, you won’t need to develop a plan. You can decide what is necessary.
- Develop a plan – Create a plan that your supervisor will understand. This may be a simplified schedule of what needs to be planned, purchased, expensed, who is involved, etc. Or it could simply be a list of items you need from Purchasing.
- Make them a winner – Assist your supervisor in seeing how they benefit from the new system. This may be more efficient employees, cost-savings, or time-savings. Of course, this has to be tailored to the supervisor’s point of view. How does the new project affect his/her budget? Time? Effort?
- Do what you say you will do – If you say you’re going to do something, do it. If you get approval from your supervisor to create or do something, make it happen. If something occurs that prevents your project from happening, communicate this to your supervisor. Remember communicating your issues in either circumstance will aid your supervisor in being informed.
For some, its not easy selling new ideas to supervisors or even colleagues. But remember, you’re always selling something, whether you realize it or not. Encourage your selling strengths and strengthen your selling weaknesses. Good luck!
NOTE: I am in the process of moving my blog to this new system. Thus, it should be noted that this entry was originally posted on 3/22/08.
I recently attended the Utah Economic Summit in Salt Lake City. In my opinion, this is one of the best economic conferences available for entrpreneurs looking to expand their knowledge about how to further their company. Some of my impressions:
Product Development Coordination
During the first breakout, I attended the Websites and Branding session where one point they emphasized was the coordination of product development, marketing and sales. Marketing of new products occur long-before the product has finished development. Sometimes sales also happens early (similar to building and selling jet airplanes). The important part is that coordintation between all three elements will assist in a successful product release.
Governor Huntsman’s Lunch Address
I’ll be the first to admit that I like Governor Huntsman. He is a good politician (if that phrase is possible, Governor Hunstman makes it so). His address focused on Utah’s positive economic stability. Utah is a good place to do business and many large companies are moving to or new companies are starting in Utah.
Social Networks
The new hipe is social networking and interacting with those social networks. New applications and web programs are being developed all of the time to take advantage of that vast marketplace.
Allow Employees to "Do What They Want"
OK. That statement needs an explanation. I found out that some software development shops allow their engineers to work on their own projects for a certain percentage of their time. For example, Google requires their engineers to spend 20% of their time working on their own projects. Most of the products Google offers were developed by their engineers on their own time. I think that is a really good idea.
Employees as Users
As I mentioned in my blog post Implementing An Unbiased Approach to Software Development there is a disparate usability issue between programmers of a system and users of a system. Requiring (or suggesting) that employees use the systems they develop will actually harmonize what programmers build and what users need. Frankly, an obvious solution to a common problem.
Home Grown Products
The final breakout session I attended focused on Utah grown products. It was interesting to learn the stories of successful entrprepreneurs and how they started. In the end I left the session with a more determined sense of customer service, hard work, and supporting local businesses.
Overall, the conference was a huge success and I look forward to attending next year.
NOTE: I am in the process of moving my blog to this new system. Thus, it should be noted that this entry was originally posted on 3/21/08.
I consult for a local trucking company on developing ColdFusion reporting tools for an existing management system. Its a unique approach to development because I don’t develop at all, I actually train their network admin to develop web-based applications. Its fun and I enjoy doing it very much.
Recently, we’ve reviewed some essentials to ColdFusion development (and possibly other languages). While its not an exhaustive list of what a programmer should know, I’m highlighting the elements that are somewhat difficult for beginners.
IF/ELSEIF/ELSE statements
Programs make decisions. Plain and simple. The basis for developing a program is so that it can make decisions for us quickly and much faster than mere humans. Albiet, those decisions are at a much lower level (a program usually gives us information so that we can make more informative major decisions) but the program still makes many small decisions based on the information it encounters. As a beginning developer, you must understand how to program those decisions using IF/ELSEIF/ELSE statements.
Components (CF), Classes and/or Objects, and OOP
ColdFusion components mimic objects and classes in other programming languages. They are powerful and provide for easier maintenance and much more modular code (can be ported to other applications). Additionally, using object-oriented code can make team-oriented development much more enjoyable. Also, understanding the fundamentals of methods and functions in components is essential to making those components work.
Frameworks
Frameworks allow faster development and also easier maintenance. Mach-II, Fusebox, and ColdSpring are all ColdFusion frameworks designed to assist ColdFusion developers in creating applications faster. If you can get started using one of these, mroe power to you. But remember, you can always develop your own framework (unless you don’t want to reinvent the wheel).
Enjoy programming! While I tend to ColdFusion, its fun no matter what language you’re using.
NOTE: I am in the process of moving my blog to this new system. Thus, it should be noted that this entry was originally posted on 3/18/08.
One of the most important elements of software (whether desktop or web-based applications) is quality assurance. When we (at DSS) sell a product to a customer, they obviously expect a high degree of quality and usability. Not just for their employees, but also for their citizens. Our products will be used by the public citizens of that state and in a sense our products provide a foundation by which citizens will judge the overall quality and integrity of the state and the services it provides. This is why the quality assurance of our web-based sofware is so important to our customers: they don’t want to betray citizen trust (and to avoid looking like idiots).
The sole focus of quality assurance should NOT be from the programmer or developer perspective (as it was early in my programming career). Q&A is so much more than just making sure the programmer thinks the system works correctly. It is ensuring that additions or modifications to software:
- Can be easily used by those who do not fully understand the software
- Performs the expected operations as planned
- Is efficient
- Is simple
- Is security enabled
- Is future-oriented
I’ll briefly explain each of the items:
1) Can be easily used by those who do not fully understand the software
Because programmers and users are so disparate in their usability logic, a pre-defined "link" must be created for programmers to the user. Some teams create this link by hiring a usability expert or interaction designer. This person is usually solely responsible for creating interfaces for consumers; thus, removing the need for a programmer to include interaction techniques in their development which could save significant time. Interaction designers can also train programmers to instill good interaction design techniques.
This quote perfectly portrays one of the major gaps between usability and software development. Programmers develop logically (that is, in a procedural way) whereas users scan quickly (which tends to be more emotional). These inherent differences always cause confusion for the user and difficulty for the programmer. Thus, when programmers perform the following non-exhaustive list of checks, users will have a much easier time adapting to the new application:
- Design interfaces first, then build the backend.
Building functional mockups of systems (or modules of systems) for user testing prior to full development will allow easier and faster modifications to the interface based on user testing results. Waiting until the system is fully coded to perform user testing is much more difficult to modify. - Perform user testing with multiple user groups.
Some users are inherently more skilled at using programs than others. I usually try to get the less-skilled users earlier in user testing, to work out the obvious usability obstacles.
2) Performs the expected operations as planned
This is a no-brainer. If the application does not perform as specified in an evolving requirements document, what’s the use? The application will not do what is expected and should not be built.
3) Is efficient
This is not meant efficiency in programming process (query optimization, efficient array processing, etc.) this is meant to explain efficienies in user interfaces and interface processes. For example, if a user needs to create a question to ask in a survey, have them finish the entire process in one screen. Clearly, adding the question text and adding possible responses (for a multi-choice question) should be done on the same screen. The old screen-refresh-at-submission designs are a thing of past (I admit that I have a lot of work to do). Technologies that assist with this are AJAX and Flex.
4) Is simple
A major application system is simply a lot of smaller components working together. Keeping those smaller components simple will always provide for a stable system.
5) Is security enabled
Don’t plan security into the picture after user testing. Security is an ongoing problem and should be an ongoing concern. Programmers should be routinely and frequently trained in the latest security threats and hacks and those procedures should be implemented DURING DEVELOPMENT; not after it has happened. It is more difficult and more risky to implement security features after development than to implement them during it.
6) Is future-oriented
That’s on odd one, eh? What I mean by "future-oriented" is that programs and applications (whether web-based or not) should evolve. There should be a continual re-evaluation of the application to asess enhancements, modifications and new features THAT MATTER. There is no need developing anything that really won’t matter to users.
In summary, this is simply a short list of a much longer one that may assist with approaching software development properly.
NOTE: I am in the process of moving my blog to this new system. Thus, it should be noted that this entry was originally posted on 2/15/08.
I recently needed a copy of a SQL Server database from a co-worker’s machine. Instead of trying to use the restore option in SQL Server, I just simply copied the .mdf and .ldf files for that database from SQL Server directories (usually, C:\Program Files\Microsoft SQL Server\MSSQL.[dbnumber]\MSSQL\data), and pasted them into my SQL Server directories. I then right clicked on "Databases" and selected "Attach". Browse to the new files, and it adds the database to the list.
Very easy.
NOTE: I am in the process of moving my blog to this new system. Thus, it should be noted that this entry was originally posted on 2/12/08.
When building ColdFusion code, I like to keep it concise and clean. I like the <!DOCTYPE> declaration at the very TOP of the page. Doing this was easy when we were using Application.cfm: you simply place it on the first line of the page. Our transition from Application.cfm to Application.cfc made me realize that doesn’t work.
First of all, you can’t place the <cfsetting> tag above the <cfcomponent> tag. ColdFusion throws an error thinking your trying to process a <cfif> statement. Thus, I placed it under the <cfcomponent> tag. But there was still one hard return and a tab right before the <!DOCTYPE> declaration. To fix this, just place the <cfsetting> tag RIGHT AFTER the <cfcomponent> tag, on the same line. Now there are no spaces, no hard returns or anything before the <!DOCTYPE> declaration.
Oh, and make sure your <!DOCTYPE> is RIGHT AFTER a <cfoutput> on the same line!
NOTE: I am in the process of moving my blog to this new system. Thus, it should be noted that this entry was originally posted on 2/6/08.
Found an issue in our online help system where the content clearly extended far beyond the bottom of the page and yet the vertical scroll bar was missing. The web page with this problem has drag-and-drop capabilities to allow moving elements from one place to another using your mouse. Thus, it contains a lot of CSS, JavaScript, and AJAX code to properly display the drag-and-drop and to save the changes automatically.
I found a <a href="http://www.thescripts.com/forum/thread571528.html" target="_blank">thread post</a> explaining a similar problem and found the following code that "dtc" suggested:
html { overflow: hidden; }
body { height: 100%; width: 100%; overflow: scroll; }
I gave it a shot and it worked. I had to move around some of the elements at the bottom of the page (the copyright) because it was being displayed right in the middle of the content and was just a bunch of gobbly-gook.
I also tried removing some of the CSS to the following:
body {overflow:scroll;}</code>
This was the final fix for both Firefox and IE.
NOTE: I am in the process of moving my blog to this new system. Thus, it should be noted that this entry was originally posted on 2/4/08.
My father recently inquired about how to make his computer run faster. He’s been having problems with it taking several minutes to boot and even longer to start programs. While its not a new computer, I thought about how I should have mentioned a few things when he first purchased it. Here are my top 5 tips when buying and setting up a new computer.
When buying a new computer:
1) Maximize the RAM. This is probably one of the best suggestions I can make. Don’t bother buying subpar amounts of RAM because it equates to subpar performance. If your computer can handle 2GB of RAM, buy 2GB! As of this writing, you should have AT LEAST 2GB of RAM for a home desktop computer. The ideal amount to have with Windows Vista is 4GB. But you should have the same amount for Windows XP too.
2) Speaking of Windows Vista, buy Windows XP. I’m not saying Vista is crap, I’m saying give it a little more time. A lot of programs are still not supported on Vista, but they will soon enough. There is no need to rush out and get the latest and greatest if all you do is surf the web and use MS Word here and there. Give it time to mature and work out the bugs and then buy it.
3) Purchase a robust anti-virus package. The cost is well worth the security. If you’re looking for a good package without the cost, try <a href="http://www.clamwin.com/">ClamWin</a>. Its free and is as good an antivirus as anything out there.
4) When setting up your new computer, or if you haven’t already done so, make sure you DO NOT USE AN ADMINISTRATOR ACCOUNT to do everyday tasks. In other words, your computer should have AT LEAST two user accounts: one administrator and one limited user. Use the limited user to do everything except install programs. NEVER surf the internet with an administrator account. Virus programs and hackers generally need one thing to take over your computer and steal your information: access to an admin account. Using a limited user account significantly reduces your computer’s risk to being compromised by hackers, viruses and spyware.
5) Regularly and diligently update the operating system. Windows Vista and Windows XP have automatic update capabilities of which you should take advantage. This is another suggestion that significantly reduces the risk of being attacked by hackers, viruses and spyware.
Those are the basics. They are nothing new and I’m not claiming to be the first to have said them, but at least my family will think I’m somewhat smart.
Latest Comments