Tom Nunamaker

Subscribe to Tom Nunamaker: eMailAlertsEmail Alerts
Get Tom Nunamaker: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Top Stories by Tom Nunamaker

It was an article by Michael Dinowitz, "Comparisons with CFIF," that made me reevaluate how I was writing my CFIF statements. Since the common was the slowest way to compare two strings, the table of data presented in the article (see Fusion Authority, 1/10/00, www.houseoffusion.com) seemed incomplete to me. I wondered what the performance data would show for integers - and for Boolean tests, as we all write tons of those in our code as well. Other common CFIF tasks were also missing, such as tests for existence and bitwise operator tests. I wanted to know the best way to optimize all of these CFIF operations instead of just string comparisons. I also wanted to update the data with ColdFusion 5 to see if it was still valid or if CF5 had changed the results in any way. I found that the String "COMPARE" function is still the best choice for stri... (more)

Using Integers to Store Bits of Information

Imagine that your client, Fast Eddy's Auto World, asks you to build a data entry form for his inventory. There are several models of cars that use combinations of many options. No two use the same combination. How can you efficiently design the form and database to display the correct options and store the information in a database without constantly adding and deleting fields in your data table? The answer is to use integers and bitwise operators. We first need to understand how integers are stored in binary format. Our society teaches base 10 to manipulate numbers. We are so fa... (more)