Brad Wood
Member since Dec 11, 2008
- Profile: /members/942-brad-wood.htm
- Comments: 45
Recent Blog Comments By Brad Wood
-
Using Labeled Loops In JavaScript
Posted on Sep 7, 2023 at 3:37 PM
That's awesome news. I did a quick Google prior to posting and no docs from either Adobe nor Lucee came up. I've also heard Lucee present it, but not Adobe. Seems both of them need to beef up their docs!... read more »
-
Using Labeled Loops In JavaScript
Posted on Sep 6, 2023 at 5:42 PM
This is possible in CFML, but only in Lucee so far as I know. Rory covers it here: https://rorylaitila.gitbooks.io/lucee/content/control_flow.html#for-loop-with-label... read more »
-
Comparing Java's MessageDigest To ColdFusion's hash() Function In Lucee CFML
Posted on Jan 19, 2023 at 6:54 PM
I assume you know this, but Lucee's hash() BIF just uses the MessageDigest class under the hood. https://github.com/lucee/Lucee/blob/5.3/core/src/main/java/lucee/runtime/functions/string/Hash.java#L90 Furthermore, there is no "stringification" of byte array inputs. All hash... read more »
-
Considering Control Flow And Transient Data Relationships In ColdFusion
Posted on Sep 27, 2022 at 5:50 PM
I would be less afraid of using NULL in this case, but this is a great use case for an Optional. We have a library here that mimics Java Optionals. https://github.com/coldbox-modules/cboptional... read more »
-
Adobe ColdFusion 2018 Compatible Version Of My ColdFusion Custom Tag DSL For HTML Emails
Posted on Jun 17, 2021 at 11:17 AM
@Ben, That's a new one. I did fix an issue in the latest version of CommandBox that output any messages from the console that occurred when stopping a server. That message was likely always there but not showing up. I don't recognize any of it though. Perhaps it's specific to a Mac. Can... read more »
-
Adobe ColdFusion 2018 Compatible Version Of My ColdFusion Custom Tag DSL For HTML Emails
Posted on Jun 16, 2021 at 4:59 PM
The command you showed should start the latest update of 2018 which supports lambdas. Are they not working for you on the server you started? No need to do anything with artifacts, etc. Each version of the engine is a new version of the artifact, so CommandBox will download it as necessar... read more »
-
Adobe ColdFusion 2018 Compatible Version Of My ColdFusion Custom Tag DSL For HTML Emails
Posted on Jun 15, 2021 at 12:50 PM
Adobe ColdFusion 2018 doesn't support fat-arrow syntax for closures. Adobe added this in update 5 and finished fixing the bugs in update 6. Were you testing on an older version of 2018? https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/extending-col... read more »
-
Rethinking Error Type Schemas And Naming Conventions In My ColdFusion Application
Posted on Apr 5, 2021 at 9:33 AM
Yes, same here. But extended info even pissed me off because it MUST be a string! WHY? Why can't extended info be a struct or an array? As far as sub types, the Coldbox framework for example will use a convention where have a namespace with dots like SES.InvalidNamespaceExceptio... read more »
-
Rethinking Error Type Schemas And Naming Conventions In My ColdFusion Application
Posted on Apr 5, 2021 at 9:10 AM
Adding this thought I replied with on Twitter. I wouldn't want to define a class for error types like java does, but I do wish CFML allowed me to have a hierarchy of error types like Java where you "catch" IOEception and then I can extend that with a BradIOException that still cou... read more »
-
Why I've Been Merging Microservices Back Into The Monolith At InVision
Posted on Dec 22, 2020 at 9:47 AM
@Ben, Your comment on your very first experience with OOPS reminds me of the Pilot System as discussed in Fred Brooks' book, The Mythical Man Month . https://en.wikipedia.org/wiki/The_Mythical_Man-Month#The_pilot_system When designing a new kind of system, a team will design ... read more »
-
Why I've Been Merging Microservices Back Into The Monolith At InVision
Posted on Dec 21, 2020 at 1:00 PM
@ben This is a fantastic post and you've learned some great insights that can only come with real world experience! Firstly, great application of Conway's Law. I was actually trying to remember the name of that law just a couple weeks back and I couldn't recall it to save my life. Your p... read more »
-
Installing User Defined Functions (UDF) As An Extension For Built-In Functions (BIF) In Lucee 5.3.2.77
Posted on Nov 13, 2020 at 1:33 PM
Yes, at some point the admin started enforcing that :/... read more »
-
Using NPM Run-Scripts To Execute Shell Commands In Lucee CFML 5.3.6.61
Posted on Aug 19, 2020 at 11:01 AM
I need to sign-up for one of your "CommandBox Zero to Hero" virtual workshops. You're in luck man, because there's a 2 day workshop happening this month! https://www.ortussolutions.com/events... read more »
-
Using NPM Run-Scripts To Execute Shell Commands In Lucee CFML 5.3.6.61
Posted on Aug 18, 2020 at 11:25 AM
Hi Ben, I was going to tell you to just use CommandBox's run-script command, which pretty much works like npm's but is just way cooler. https://commandbox.ortusbooks.com/package-management/package-scripts The only missing piece is CommandBox's run-script doesn't have a prefix arg. I've... read more »
-
Mapping Arrays-To-Structs And Structs-To-Arrays Using Mapping Functions In Lucee CFML 5.3.6.61
Posted on Aug 11, 2020 at 11:00 AM
Yes, to your point, the FP versions of map, each, reduce are always going to be possible via manual iteration and if that's more readable to you, then no issue using it. For me, the difference is more philosophical. An FP approach allows me to forget the collection as a whole for a moment,... read more »
-
Mapping Arrays-To-Structs And Structs-To-Arrays Using Mapping Functions In Lucee CFML 5.3.6.61
Posted on Aug 10, 2020 at 7:10 PM
Or even a little simpler (can't edit my original comment) friends = [ "Sarah", "Danny", "Todd", "Vera", "Seema" ]; writedump( friends.reduce( ( acc, friend )=>acc.insert(friend.lcase(), { 'initials' : friend.left( 1 ).lcase(), '... read more »
-
Mapping Arrays-To-Structs And Structs-To-Arrays Using Mapping Functions In Lucee CFML 5.3.6.61
Posted on Aug 10, 2020 at 7:05 PM
If you want to return a different data type, wouldn't you just use the built in reduce() function? friends = [ "Sarah", "Danny", "Todd", "Vera", "Seema" ]; dump( friends.reduce( ( acc, friend )=>{ acc[ friend.lcase() ] = { '... read more »
-
Canonicalizing A URL By Its Individual Components In Lucee CFML 5.3.6.61
Posted on May 26, 2020 at 1:07 PM
Hi Ben, custom parsing of a URL can be handled much simpler with the java.net.URL class in the JDK. Here's a post I did on it years ago: http://wwvv.codersrevolution.com/blog/Fun-with-javanetURL... read more »
-
Built-In Functions And Member-Methods Return Different Data Types In Lucee CFML 5.3.5.92
Posted on Apr 16, 2020 at 10:53 AM
Yes, member functions "fixed" the return value in most cases to be the original object which is 1000 times more useful for chaining calls. However, the docs were largely just copied (or in some cases shared) with the headless functions. Another issue I've run into is the error me... read more »
-
Executing Command-Line Processes From A Working Directory Using ProcessBuilder In Lucee CFML 5.2.9.31
Posted on Apr 14, 2020 at 10:42 AM
I guess I should probably add an explicit .close() call once the .readLine() starts returning null. You know to be honest, I don't always know when you need to explicitly close streams, but I always do it just for good measure. The trick is, you always want to close them in a finally bloc... read more »