Skip to main content
Ben Nadel at the New York ColdFusion User Group (May. 2009) with: Mark Drew and Gert Franz
Ben Nadel at the New York ColdFusion User Group (May. 2009) with: Mark Drew ( @markdrew ) Gert Franz ( @gert_railo )

Recent Activity

Recent Heroes of the BenNadel.com Community

Recent Comments

Ben Nadel replied to a post CUID2 For ColdFusion / CFML

Ok, I've removed the warning and updated the Cuid2.cfc to default to sha3-256. This works fine on Java 9+; but, if you are still on Java 8, then it can be explicitly set to sha-256 as a constructor argument. I've updated the blog post to include the optional argument description.... read entire comment from Ben Nadel.

Ben Nadel replied to a post CUID2 For ColdFusion / CFML

I've updated the post with a Warning at the top to indicate that this is an incomplete version of the implementation. Only algorithms using the SHA3 family of hashing can be considered implementations of CUID2. And, since SHA3 wasn't added until Java 9, implementing this for Java 8 would mean loadin... read entire comment from Ben Nadel.

Ben Nadel replied to a post CUID2 For ColdFusion / CFML

@Gary, Honestly, I can't really speak to the pros/cons of UUIDs or CUIDs - I just like trying to build it. I still use Auto-incrementing values in my applications. Over in the CUID2 for JavaScript repository Elliott has some comparisons of CUID2 to other UUID algorithms.... read entire comment from Ben Nadel.

Gary F replied to a post CUID2 For ColdFusion / CFML

Out of curiosity, what's wrong with CreateUUID, apart from it being 11 chars longer? It's also compatible with SQL's uniqueidentifier datatype (if you insert an extra hyphen). I used it in an application that's been running for 17 years 24x7 and it's never clashed. It was interesting to hear how CUI... read entire comment from Gary F.

Ben Nadel replied to a post CUID2 For ColdFusion / CFML

So, my current implementation takes about 60-seconds to generate 1M CUID tokens. Which is not terribly fast. I've been playing around with how to get the performance improved by: Scoping all variable access (ie, adding the arguments. and variables. prefixes wherever they make sense. Using BIF (built... read entire comment from Ben Nadel.

Ben Nadel replied to a post CUID2 For ColdFusion / CFML

I've been trying to look at the low-level performance of the Cuid2.cfc - using some reflection, I'm dynamically instrumenting the methods to see how long they execute during the generation of 1M CUID tokens: https://www.bennadel.com/blog/4390-dynamically-instrumenting-coldfusion-component-methods-wi... read entire comment from Ben Nadel.

Ben Nadel replied to a post CUID2 For ColdFusion / CFML

Here's an article that Eric Elliott wrote about his new Cuid2 approach (and why his previous approach was insufficient from a security standpoint): Identity Crisis: How Modern Applications Generate Unique Ids. It goes into a lot of depth (though much of what is there is also on the Cuid2 GitHub page... read entire comment from Ben Nadel.

Ben Nadel replied to a post Code Kata: Flattening An Array In Lucee CFML

@Adam, This might sound silly, but I've been using member methods for so long now, I literally forgot that the built-in function, arrayReduce(), even existed 😂 Speaking to your point about doing array-reduction instead of struct-reduction. To that point, I also forgot that ColdFusion introduced the... read entire comment from Ben Nadel.

Ben Nadel replied to a post Code Kata: Flattening An Array In Lucee CFML

As another fast-follow, I wanted to look at recursively flattening a deeply nested array: https://www.bennadel.com/blog/4384-code-kata-recursively-flattening-a-deep-array-in-lucee-cfml.htm In the recursive version, I'm passing in a values argument instead of using a variadic, which is why I end up u... read entire comment from Ben Nadel.

Ben Nadel replied to a post Code Kata: Flattening An Array In Lucee CFML

As a quick follow-up post, I wanted to take a look at iterating over the arguments scope as either an Array or a Struct via CFLoop: https://www.bennadel.com/blog/4383-iterating-over-function-arguments-using-cfloop-in-lucee-cfml.htm The CFLoop tag and the arguments scope are both very dynamic, and wo... read entire comment from Ben Nadel.

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel