Ben Nadel
Member since Dec 11, 2008
- Profile: /members/1-ben-nadel.htm
- URL: https://www.bennadel.com
- Twitter: @bennadel
- FaceBook: http://www.facebook.com/bennadel
- Comments: 15,208
Recent Blog Comments By Ben Nadel
-
Building-Up A Complex Objects Using Form POST-Backs In ColdFusion
Posted on Jul 7, 2022 at 12:26 PM
@All, As a fast-follow to this post, I wanted to rework the demo into a multi-step wizard . I realized that using JSON to post the pending form state back to the server with each submission actually unlocks some very interesting potential. Specifically, we can break our form up into par... read more »
-
Working Code Podcast - Episode 82: GitHub Charging For Copilot
Posted on Jul 6, 2022 at 2:49 PM
@Will, I've heard people say great things about Tabnine as well, though I haven't tried it myself. Do you have an idea where it gets its test data from? Wasn't sure if it was also using GitHub public repos or something.... read more »
-
Thought Experiment: Splitting A Single Data Table Up Into High-Writes And High-Reads For Better Performance In MySQL
Posted on Jul 6, 2022 at 12:19 PM
@Bryan, My big hesitation with Kafka is that, as a technology, it's not something you can lightly "sprinkle" into an existing application. From what I've seen, pulling in Kafka usually means that you are fundamentally changing the way the application is architected and wired toge... read more »
-
Building-Up A Complex Objects Using Form POST-Backs In ColdFusion
Posted on Jul 5, 2022 at 4:23 PM
@John, I'm just going to have to say that "Great minds think alike" ๐คช but, seriously, I think my code is probably little more than the "more modern" version of what Brian was doing. By that, I just mean that the syntax / build-in methods are lighter-weight and easier t... read more »
-
It's OK To Be Super Explicit In Your Data Access Method Names
Posted on Jul 1, 2022 at 12:12 PM
@Ian, I just used the VALUES(col) in a production query. Woot woot ๐ฅ... read more »
-
The Value Class java.time.LocalDateTime Cannot Be Converted To A Date In ColdFusion
Posted on Jun 30, 2022 at 8:55 AM
@Steve, Oh that's good to know. That could work in a pinch if it wasn't an entire application breaking, but just a small script something. ๐... read more »
-
Using An Array To Power Weighted Distributions In Lucee CFML 5.3.8.201
Posted on Jun 29, 2022 at 9:43 PM
@Chris, I will wait for the math nerds ๐ค the maths is too hard for me!... read more »
-
Using An Array To Power Weighted Distributions In Lucee CFML 5.3.8.201
Posted on Jun 29, 2022 at 2:14 PM
@Chris, ๐ Honestly, I don't even know what the mathy solution would have been. The approach I outlined is the only way I know how to do it. I guess you could have called something like rand() to get a decimal between 0-1 ; then, checked the decimal against the desired distributions ...... read more »
-
Code Kata: Array Intersection, Union, And Difference In Lucee CFML 5.3.8.201
Posted on Jun 27, 2022 at 5:51 PM
@If, To be completely honest, I struggle a lot with truly Functional Programming. A few years ago, I tried reading Functional Light by Kyle Simpson . It was an interesting read. But, most of it went over my head. I think that FP is something you must have to practice a lot for it to m... read more »
-
Case Study: Removing Implicit Variable Access At Scale In Lucee CFML 5.3.7.47
Posted on Jun 24, 2022 at 6:20 PM
@Lionel, Very cool -- taking a look ๐... read more »
-
Looking At The Performance Overhead Of A Read-Only Lock In Lucee CFML 5.3.8.201
Posted on Jun 24, 2022 at 5:01 PM
@Charlie, Oh so awesome, heading over to read it now!... read more »
-
Updating My Mental Model For Shared Array / Struct Iteration In ColdFusion
Posted on Jun 24, 2022 at 11:47 AM
@All, In this demo, I'm in a read-only mode. But, if I needed to mutate the shared data some time , then I'd have to put a readonly lock around the data for the reads, and an exclusive lock around the data for the writes. This got me wondering if a read-only lock has any overhead in a... read more »
-
Updating My Mental Model For Shared Array / Struct Iteration In ColdFusion
Posted on Jun 23, 2022 at 4:24 PM
@Will, I am running the simulatedRequests.each() method in parallel: Array.each( operator [, parallel [, maxThreads]] ) So, I'm calling it like so: simulatedRequests.each( operator, true, 20 ) ... to simulate parallel threads all trying to access sharedData .... read more »
-
Updating My Mental Model For Shared Array / Struct Iteration In ColdFusion
Posted on Jun 23, 2022 at 2:53 PM
@Chris, I think struct iteration has always been safe. And, I think the fact that array iteration used to cause contention in Lucee was maybe a low-level bug. I'm with you, though, I don't really understand how Synchronized objects works internally. It's just magic ๐คฉ I think the case ... read more »
-
Considering A Stale-While-Revalidate Pattern To Caching In ColdFusion
Posted on Jun 23, 2022 at 12:23 PM
@All, After this post, I started to think about shared access of variables in native ColdFusion data types; and, I started to wonder if my mental model for iteration over shared data structures is out of date. As such, I wanted to do some experimentation in ACF + Lucee CFML: http... read more »
-
Considering A Stale-While-Revalidate Pattern To Caching In ColdFusion
Posted on Jun 23, 2022 at 12:21 PM
@Charlie, So, from a "page level" caching perspective, it was actually the HTTP Content-Control header that got me thinking about this in the first place. There is a stale-while-validate header value that will allow the browser (as I understand it) to do this naturally. ie, t... read more »
-
It's OK To Be Super Explicit In Your Data Access Method Names
Posted on Jun 20, 2022 at 1:25 PM
@Ian, Yes, thank you so much for your patience in hand-holding through to this realization. Much appreciated ๐... read more »
-
It's OK To Be Super Explicit In Your Data Access Method Names
Posted on Jun 20, 2022 at 12:09 PM
@Ian, Ooooooh! I see what you're saying now - the VALUES() function is for the value I was going to insert , not the value that was already in the row . That's the part that wasn't clicking for me. For whatever reason, my brain just was not getting that from the documentation.... read more »
-
Adding jreExtract() To Pluck Captured Groups Using Regular Expressions In ColdFusion
Posted on Jun 20, 2022 at 11:59 AM
@Aaron, Patterns are everywhere once you get the "RegEx bug" ๐คฉ though, I will admit that Regular Expressions aren't always the answer - a lot of the time it depends on your wiggle-room for "correctness" vs. complexity. Often times, it's easy(ier) to make a pattern ... read more »
-
Using The OWASP Java HTML Sanitizer In Lucee CFML 5.3.7.48 To Sanitize HTML Input And Prevent XSS Attacks
Posted on Jun 20, 2022 at 9:47 AM
@Lionel, +1 on the Lucee community being super responsive on the Dev-forums. That's been my experience as well. Also +1 on the documentation sometimes being a little lacking (though I feel bad because I know it's open-source and I could technically help ๐จ). Sounds like fun stuff that you'... read more »