Posted: September 30, 2007 at 2:29 PM by Ben Nadel
I was not a huge fan of the first two Resident Evil movies. Maybe it's because I never played the video game; more likely, I suspect it's because they just weren't that good. Of course part of the problem was expectation management. I loved seeing Milla Jovovich as an action star and supreme being as she kicked ass in The Fifth Element; and I thin... read more »
Comments (17) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 29, 2007 at 5:58 PM by Ben Nadel
The other day, I put together a regular-expression-based CSV parsing algorithm in ColdFusion . I like to think that I have a pretty good handle on writing regular expressions, but I know that I am not a wizard like Steve Levithan . As such, I asked him to take a look at what I had written to see if it could be optimized. I started off with this:... read more »
Comments (9) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 28, 2007 at 6:18 PM by Ben Nadel
I wanted to give Barney Boisvert's CFImage contest a try, but unfortunately, this week has just beat on me like I owed it money. However, after looking at Barney's posted solution, there is no way that I would have been able to solve the problem anyway. It involved grabbing the underlying Java AWT graphics object and then using that to get font ... read more »
Comments (9) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 28, 2007 at 7:29 AM by Ben Nadel
Today, I was working on some data parsing when it hit me like a bolt of lightening! Why not just use Regular Expressions to parse CSV (comma separated values) data files? For those of you who have seen my previous attempts at parsing CSV data files using ColdFusion , you will see that having to handle embedded field qualifiers and data delimiters... read more »
Comments (13) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 27, 2007 at 8:29 AM by Ben Nadel
Just a tiny discovery here: ColdFusion will automatically convert a Java String Buffer to a string when it is required for a method call. Here's a little demo: <!--- Create a Java String Buffer. ---> <cfset objBuffer = CreateObject( "java", "java.lang.StringBuffer" ).Init() /> <!--- Add some XML tags to the String Buffe... read more »
Comments (2) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 26, 2007 at 2:44 PM by Ben Nadel
I am a HUGE fan of ColdFusion's CFParam tag. I use it, I think, in a more extensive way than most people - both to enforce variable existence and to validate its data type . CFParam allows for many useful types of data type validation, including basic data types such as string, numeric, array, and struct. One type that has always struck me as wei... read more »
Comments (7) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 26, 2007 at 8:54 AM by Ben Nadel
Looping over a list - hey and thank you for all your help your the best!!!! I have a list I created 6,7,4,29,32,12 etc ... #theList# ... Each number is a record ID from the database. Now I want to loop over the list and pull a field from the record based on the ID. I cant get it man. When I first got this email, I thought I would just whip up a q... read more »
Comments (14) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 25, 2007 at 6:40 PM by Ben Nadel
As a design pattern, developers like to create and cache Singleton objects in persistent scopes within an application. To do this, you basically create a ColdFusion component instance and store it in something like the APPLICATION scope (or within another object stored within the APPLICATION scope). This is, effectively, caching that instance for ... read more »
Comments (9) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 25, 2007 at 2:47 PM by Ben Nadel
Yesterday, when I was working on my GarbleText() ColdFusion user defined function , I begrudged the fact that I was, for the hundredth time, writing a Java Pattern Matcher and then looping over it and messing with String Buffers. This stuff is just so routine and boiler plate (if you work with Java regular expressions)! Then I had this awesome id... read more »
Comments (20) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 24, 2007 at 4:50 PM by Ben Nadel
Earlier today, I was talking about the clever SPAM mail I got; it used randomly inserted characters to prevent anti-spam engines from matching banned words while at the same time keeping the text human-readable. This made me think of that popular email that went around a while back that demonstrated that as long as the first and last letters of ... read more »
Comments (1) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 24, 2007 at 9:28 AM by Ben Nadel
I know I shouldn't be supporting SPAM in anyway, but this is just cool. I am sure that we've all seen those chain emails that go around with the garbled words that we can read with no problem thanks to the ability of the human brain to organize letters without effort. Well, recently, my SPAM has started to use a similar technique. Check out this e... read more »
Comments (8) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 24, 2007 at 8:26 AM by Ben Nadel
I know that running a loop and testing execution times is NOT a valid way of doing speed tests (but until I get not-lazy enough to learn how to properly load test, this is all I got). I think even doing this is valid in its own way, and if nothing else, at least opens the door for conversation. That being said, I recently found out about the SQL ... read more »
Comments (3) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 24, 2007 at 7:22 AM by Ben Nadel
After recently learning about the SQL PATINDEX() function from Nathan Mische and Sana , I did some Googling to find out more about it. In my research, I came across another SQL function that I didn't know about: CHARINDEX(). Both functions, PATINDEX() and CHARINDEX(), take a substring and find its one-based position within a given string or field... read more »
Comments (10) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 23, 2007 at 2:43 PM by Ben Nadel
This was not a good week of eating for me. Last night, at the gym, the scale read 211 lbs. This is a 6 lb. jump from the 205 that it read a week prior. Now, I know that there is a day to day fluctuation in weight, but certainly, I can chalk this 6 lb. weight gain up to a week of poor choices. That's not fair; I shouldn't say "poor choices". Some ... read more »
Comments (7) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: September 23, 2007 at 12:43 PM by Ben Nadel
After seeing the previews for this movie, I had absolutely no desire to see it; I thought it looked all kinds of bad, and I'm sorry, I just couldn't believe Paul Giamatti playing a hitman, despite the fact that he's an excellent actor. I only went to see it cause I'm a huge Clive Owen fan and I was with some people that were like-minded (re: Clive... read more »
Comments (2) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink