Ben Nadel
Member since Dec 11, 2008
- Profile: /members/1-ben-nadel.htm
- URL: https://www.bennadel.com/
- Comments: 15,961
Recent Blog Comments By Ben Nadel
-
Rest Operator Doesn't Work With Only One Argument In Adobe ColdFusion
Posted on Feb 23, 2025 at 11:51 AM
@Charles, Ah yes, I see this pattern in the use* things in React a lot. I don't know very much about that part of React; but, I've seen enough code to know this is the common pattern. I know this extremely subjective ; but, the fact that React uses destructuring so often always makes ... read more »
-
Rest Operator Doesn't Work With Only One Argument In Adobe ColdFusion
Posted on Feb 21, 2025 at 12:17 PM
@Charles, Yeah, I know they added it at some point, but I don't remember which version :) I don't have much experience with destructuring - I'd be curious to hear where your common use-cases are.... read more »
-
Rest Operator Doesn't Work With Only One Argument In Adobe ColdFusion
Posted on Feb 21, 2025 at 10:38 AM
@Charles, Yes, they have a spread operator as well. I don't think that Lucee CFML 5.x has either (I vaguely remember going to use it and it throwing a compilation error). Maybe it come in Lucee 6? To be honest, I rarely reach for it. ColdFusion has so much parallel functionality that I hav... read more »
-
Rest Operator Doesn't Work With Only One Argument In Adobe ColdFusion
Posted on Feb 20, 2025 at 11:09 AM
I've submitted a bug report: CF-4225664 .... read more »
-
Creating A Marquee Effect With CSS Animations
Posted on Feb 19, 2025 at 9:52 PM
My pleasure :)... read more »
-
Sanity Checking HTTP Method Used After Location() Call In ColdFusion
Posted on Feb 19, 2025 at 5:36 PM
@James, I did not test anything else but browsers. Mostly I was trying to verify that sticking with 302 as "OK" to do. I'm not too familiar with curl , but looking at your output, yeah, it definitely seems like a POST is taking place at the very end there ... but, it's v... read more »
-
Sanity Checking HTTP Method Used After Location() Call In ColdFusion
Posted on Feb 19, 2025 at 12:56 PM
From the RFC for 302 , it states: Note : For historical reasons, a user agent MAY change the request method from POST to GET for the subsequent request. If this behavior is undesired, the 307 (Temporary Redirect) status code can be used instead. Presumably this woul... read more »
-
Hypermedia Systems By Carson Gross
Posted on Feb 19, 2025 at 12:01 PM
@Peter, Thank you for the kind words! That's cool that we wrote idiomorph . I've heard of it (I think a number of frameworks use it, or there might be a successor called ? dommorph ?); but I haven't used it directly. He seems like he knows what he's doing! I'm eager to try using it on o... read more »
-
Hypermedia Systems By Carson Gross
Posted on Feb 19, 2025 at 11:59 AM
One thing that Carson said in the book that didn't sit right with me was is discussion about HTTP status codes. He recommended using 303 See Other instead of 302 Found (which is the default used by ColdFusion in-built location() function). His reasoning being that the 302 (and 3... read more »
-
Hypermedia Systems By Carson Gross
Posted on Feb 18, 2025 at 2:43 PM
@Chris, It also looks like the have a free version online to read, if that helps. It is really fascinating stuff. I've been dabbling with Hotwire over the last year or so, with mixed feelings. But, I think so much of that is also that Hotwire uses Stimulus which is extremely verbose ... read more »
-
Using The XOR Operator To Assert Connascence Of Existence In ColdFusion
Posted on Feb 11, 2025 at 1:02 PM
Exactly.... read more »
-
Using The XOR Operator To Assert Connascence Of Existence In ColdFusion
Posted on Feb 11, 2025 at 12:33 PM
@Charles, Exactly right. And, to be clear, the values simply need to be truthy and falsey . Meaning: ( 4 XOR 8 ) == false Since both 4 and 8 are truthy , the XOR is false despite the fact that the values are not equivalent.... read more »
-
Using The XOR Operator To Assert Connascence Of Existence In ColdFusion
Posted on Feb 4, 2025 at 10:05 PM
And, as a follow-up here, my original code (the code from which this example was extracted) actually defaults the arguments: numeric sectionID = 0, numeric sectionSort = 0 In which case, I could even simplify to: if ( sectionID XOR sectionSort ) I love the fact that ColdFusion is 1... read more »
-
Using The XOR Operator To Assert Connascence Of Existence In ColdFusion
Posted on Feb 4, 2025 at 10:03 PM
@Chris, So actually someone on LinkedIn suggested that I could achieve the same thing by just doing this: if ( isNull( sectionID ) != isNull( sectionSort ) ) { // .... } Since XOR is a Boolean operator, the != comparison is essentially equivalent. Very clever (and perhaps more ... read more »
-
Using Partial Component Paths As Argument Types In ColdFusion
Posted on Jan 25, 2025 at 2:53 PM
@Danilo, Ha ha, that's actually first time I've ever used it in my own writing. I recently learned it while listening to an episode of the Freakanomics podcast 🙃... read more »
-
Using Partial Component Paths As Argument Types In ColdFusion
Posted on Jan 25, 2025 at 1:39 PM
Incidentally, this doesn't seem to work with the CFParam tag. Not the partial path stuff, but using CFC paths in a param[type] attribute in any way. I looked at the docs, and it doesn't mention anything about CFC paths, so this might be a place where an any type is required for passing... read more »
-
Working Code Podcast - Episode 202: Um, Actually
Posted on Jan 25, 2025 at 10:31 AM
@Samuel, Um, actually, now that you say that, I think I remember Adam mentioning something. I used to see College Humor stuff, but only in random searches, so I didn't really follow the goings-on very much. I appreciate the links 🙌... read more »
-
Running Memory Leak Detection After Every ColdFusion Request
Posted on Jan 21, 2025 at 11:58 PM
I don't use much inheritance in my ColdFusion apps. But, I did just try using it to create a base class for validations in my domain model. This taught me that the getMetadata() function doesn't report properties and methods in aggregate. Instead, it provides a "chain" if... read more »
-
Code Kata: Simple Dependency Injection (DI) With ColdFusion
Posted on Jan 21, 2025 at 11:55 PM
I don't use inheritance much at all in my ColdFusion apps. But, I just used some to create a base class for validations in my model. And I realized that my Injector won't see property tags defined in inherited CFCs. Turns out that the metadata is reported as an inheritance chain: h... read more »
-
DateGetTime() To Get UTC Milliseconds From Date In ColdFusion
Posted on Jan 19, 2025 at 11:28 AM
@Toni, Thank you - always glad to help.... read more »