Brad Wood
Member since Dec 11, 2008
- Profile: /members/942-brad-wood.htm
- URL: http://www.codersrevolution.com
- Comments: 36
Recent Blog Comments By Brad Wood
-
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 »
-
Executing Command-Line Processes From A Working Directory Using ProcessBuilder In Lucee CFML 5.2.9.31
Posted on Apr 13, 2020 at 11:55 AM
I did a lot of Googling over the weekend for ProcessBuilder, and I didn't really find a lot of good information. It's funny how good examples of java docs can be a little hit and miss. And processbuilder has been part of the core JDK since at least Java 7! I've found that the API for pr... read more »
-
Executing Command-Line Processes From A Working Directory Using ProcessBuilder In Lucee CFML 5.2.9.31
Posted on Apr 12, 2020 at 8:31 PM
Wow, cool idea to hand closures to the parallel each operation as a trick for running them in a thread. I've always just ran the waitFor() in the main thread and then used cfthread to read from the input stream (which is really the output!).... read more »
-
Rediscovering My Love Of ColdFusion And CFML In 2020
Posted on Apr 10, 2020 at 12:45 PM
Fantastic list!... read more »
-
Array.Sort() Operator Must Return INT-Sized Result In Lucee CFML 5.3.4.80
Posted on Mar 26, 2020 at 12:33 PM
Seemed worth ticketing: https://luceeserver.atlassian.net/browse/LDEV-2793 https://tracker.adobe.com/#/view/CF-4207690... read more »
-
Array.Sort() Operator Must Return INT-Sized Result In Lucee CFML 5.3.4.80
Posted on Mar 26, 2020 at 12:27 PM
Same thing I replied with on Twitter: Right, so technically the docs request -1, 0 and 1 from the callback, not any positive or negative number. So while it's defo buggy, you're sort of bending the rules. This version of your code works fine: https://trycf.com/gist/3a15ed54bb5feaa99976f2d... read more »
-
Exploring Tag Islands (Tags In CFScript) In Lucee CFML 5.3.1.13
Posted on Feb 24, 2020 at 10:32 PM
Funny, three of your main examples were sending mail, queries, and HTTP requests in script: There's a "box" for that :) https://www.forgebox.io/view/cbmailservices https://www.forgebox.io/view/qb https://www.forgebox.io/view/hyper... read more »
-
Exploring The Triple Equals (===) Operator In Lucee CFML 5.3.4.77
Posted on Feb 21, 2020 at 5:36 PM
Yep, it's pretty frustrating that it was implemented in a confusing manner. I had a long discussion with Micha in Slack prior to entering that ticket 3 years ago and he disagreed with me at the time that there was anything wrong with Lucee's implementation. I'm like you, I literally see n... read more »
-
Exploring The Triple Equals (===) Operator In Lucee CFML 5.3.4.77
Posted on Feb 21, 2020 at 2:10 PM
An update, I don't think your examples showing the number and string type comparisons are actually working the way you think. Like I said above, I believe they only return true in your tests because the Lucee compiler is smart enough to re-use the same object in memory behind the scenes. L... read more »
-
Exploring The Triple Equals (===) Operator In Lucee CFML 5.3.4.77
Posted on Feb 21, 2020 at 1:37 PM
I actually hate how Lucee implemented === because they followed how Java works, not how JS works. In Lucee, the === operator is only checking to see if both operands are the same object on heap, not if they are the same type. I put this ticket years ago because I think most people misunder... read more »