Adam Cameron
Member since May 27, 2015
- Profile: /members/12672-adam-cameron.htm
- URL: https://blog.adamcameron.me
- Comments: 20
Recent Blog Comments By Adam Cameron
-
Error "Type" Isn't Always A String In Adobe ColdFusion
Posted on Mar 20, 2024 at 11:53 AM
I can't believe your non-existent tests didn't catch this! Weird... read more »
-
Error "Type" Isn't Always A String In Adobe ColdFusion
Posted on Mar 20, 2024 at 11:42 AM
You just re-subscribed me to this article because reasons. So... did you raise the ticket with Adobe?... read more »
-
Error "Type" Isn't Always A String In Adobe ColdFusion
Posted on Aug 18, 2023 at 10:20 PM
This is a bug. Log it. Type should be a string. And CF should never be bubbling a Java type back to CFML. Also if you check what the type actually is ( writeDump(error.type.getClass().getName()) ), it's just java.lang.Class which will not be intentional. It's just sloppy dev from the... read more »
-
DHH On The Freedom Of Server-Side Programming
Posted on May 1, 2023 at 11:12 AM
Yes. Well. DHH is speaking from a privileged position of being "famous" so he can indulge himself and do whatever he wants because ppl will pay him for being DHH , not because he likes Ruby. In reality, people don't necessarily have the option to just do whatever language they l... read more »
-
Associating Submit Buttons With Any Form Using Button Attributes In Native HTML
Posted on Apr 18, 2023 at 5:44 PM
Ha! I did not know this!! Cheers for writing it up man.... read more »
-
Code Kata: Flattening An Array In Lucee CFML
Posted on Jan 13, 2023 at 9:06 AM
Interesting assessment. You could improve your reduce version by getting rid of a bunch of boilerplate which one wouldn't usually introduce in these simple situations. Here's a running tested example: https://trycf.com/gist/2d6349d9a9cccc1c0312d0b59e488908/acf2021?setupCodeGistId=816ce... read more »
-
I'm Beginning To Think That Much Of Programming Is Wildly Subjective
Posted on Dec 6, 2022 at 10:07 PM
I thought what you were saying is that my lack of experience with Go inherently negates the idea that one can have a subjective experience of a language. Nope, I did not mean that at all, bad wording on my part if that's how you read it, soz. EG: you can legit form some sort subjective... read more »
-
I'm Beginning To Think That Much Of Programming Is Wildly Subjective
Posted on Dec 6, 2022 at 8:59 PM
@Ben, I think you misunderstood anything I was trying to say about CFML / tag islands etc. That was pretty much covered by the first four words of my comment: "Excellent overall sentiment, Ben." Like... I disagree with you on tag islands, but that falls under the remit of "s... read more »
-
I'm Beginning To Think That Much Of Programming Is Wildly Subjective
Posted on Dec 6, 2022 at 7:23 PM
Excellent overall sentiment, Ben. I feel "seen" in the tag islands section. I will not comment further on that (despite feeling like it). One danger with "it's subjective" is ppl too often use it as a reason to stay on that hill they want to die on, rather than it being... read more »
-
Array.Sort() Operator Must Return INT-Sized Result In Lucee CFML 5.3.4.80
Posted on Apr 7, 2022 at 7:39 PM
This is what the sgn function is for... https://cfdocs.org/sgn... read more »
-
Tracking User Interactions And Analytics With Small Abstractions In AngularJS
Posted on Sep 1, 2021 at 3:05 PM
Aw Alex... has someone pissed on yer chip pal? Gentle advice... perhaps invest yer time on a bit of introspection rather than slagging off someone who gives a lot back to his community and is a pretty nice bloke. Maybe consider this: you're making yourself look like a bit of a drip in th... read more »
-
Code Kata: Parsing Strings Like "5mb" Into A Number Of Bytes In Lucee CFML 5.3.7.47
Posted on Jan 24, 2021 at 2:14 PM
That trycf.com snippet I posted works in Lucee 5. It errors as you say in 4.5 though.... read more »
-
Code Kata: Parsing Strings Like "5mb" Into A Number Of Bytes In Lucee CFML 5.3.7.47
Posted on Jan 24, 2021 at 12:36 PM
Re: it's hard to believe there's still no reMatchGroups() function in ColdFusion - extracting parts of a Regular Expression Very hard to believe, especially as it's been there since CF2016 ;-). Ref: https://helpx.adobe.com/uk/coldfusion/cfml-reference/coldfusion-functions/functi... read more »
-
ColdFusion 2016 Skips Over Undefined Elements With For-In Array Loop
Posted on Nov 16, 2018 at 12:52 PM
I am not sure that I entirely agree with the idea that the old behavior was a bug it's a bug in that the behaviour of the tag version and script version should match. It doesn't. I was not making any observation of which of the two behaviours I consider "right" (although now w... read more »
-
OWASP Encoder.cfc - A Java Encoder Proxy For ColdFusion
Posted on Dec 29, 2015 at 8:46 AM
Haha, way to build "suspense"! I was wondering why you weren't just using the native CFML functions for this lot, nor even mentioned they existed... until I saw your comment above. I like your code technique here, but I'd perhaps put your comment caveat at the *top* of the article, cos th... read more »
-
The CFParam Tag Doesn't Care About White-Space In ColdFusion
Posted on Oct 18, 2015 at 1:57 PM
I rather think it is buggy, Ben. CFPARAM is not supposed to trim. That it *does* trim is a bug. It should just do what it's told to do, with the values it's been given. It should not be second-guessing stuff like this. Did you by any chance check your code on Lucee? Cheers for writing this up, fel... read more »
-
Switch Cases Do Not Have To Be Static In JavaScript
Posted on Aug 4, 2015 at 1:46 AM
@Edward: a better description would perhaps be a *constant value*. And the only way to express a constant value in CFML is with a literal. It also, as far as I can tell, must be a simple literal.... read more »
-
Switch Cases Do Not Have To Be Static In JavaScript
Posted on Aug 3, 2015 at 5:46 PM
Just FYI, Ben... Railo and Lucee both handle dynamic case values no worries. It's just ColdFusion that can't manage it. A quick repro case here: https://github.com/adamcameron/cfml/blob/master/language/statements/flowControl/switch/dynamicCaseInScriptWithFunction.cfm -- Adam... read more »
-
Reading Environment Variables In ColdFusion
Posted on May 28, 2015 at 2:07 PM
Nice one @Tom.... read more »
-
Reading Environment Variables In ColdFusion
Posted on May 27, 2015 at 8:53 AM
Re this: "it will return a Struct". You allude to this further down, but it *doesn't* return a struct, it returns a java.util.Collections$UnmodifiableMap ( https://docs.oracle.com/javase/8/docs/api/java/util/Collections.html#unmodifiableMap-java .util.Map-). I presume you're suggesting w... read more »