Skip to main content
Ben Nadel at InVision In Real Life (IRL) 2019 (Phoenix, AZ) with: Jackson Dowell
Ben Nadel at InVision In Real Life (IRL) 2019 (Phoenix, AZ) with: Jackson Dowell@jacksondowell )

Recent Activity

Recent Heroes of the BenNadel.com Community

  • Hassam Ali ( hassamali.com ) 7 comments 🤯
    Posted 18 comments since September 2, 2019
  • Chris G. ( frogquest.com ) 2 comments 😍
    Posted 156 comments since October 23, 2012
  • Zac Spitzer 1 comment 😍
    Posted 55 comments since December 11, 2008
  • Brad Wood ( codersrevolution.com ) 1 comment 😍
    Posted 42 comments since December 11, 2008
  • Dawesi 1 comment 😍
    Posted 22 comments since April 13, 2010
  • Gavin 1 comment 😍
    Posted 5 comments since November 24, 2020
  • Danilo Celic 1 comment 😍
    Posted 18 comments since August 12, 2021
  • Johannes Raggam 1 comment 😍
    Posted 1 comment since September 5, 2022
  • Mark DeMoss 1 comment 😍
    Posted 1 comment since September 14, 2022

Recent Comments

Ben Nadel replied to a post Centralizing The Error Response Handling For My ColdFusion Blog

In the code for this blog, I've been using the whole Catch-and-wrap error handling approach in my Workflow layer. However, at work, there's too much existing code to try and normalize on such approach. As such, at work, I've been allowing the Service-level errors drive the error messages. And, hones... read more

Ben Nadel replied to a post Considering Control Flow And Transient Data Relationships In ColdFusion

@Brad, Optional looks interesting. I feel like I'm already giving you some PTSD from your interview of CFAlive where you were ranting about how no one know how much prior art there is in the ColdFusion community 😂 It seems like we eventually kind of get to the same place. Only, I'm using an on-the-... read more

Ben Nadel replied to a post Considering Control Flow And Transient Data Relationships In ColdFusion

@Gavin, @Chris, I think some of the discussion here might be due to me picking an overly simple example. My intent here was that "user" and the "nickname" services weren't supposed to know about each other - and that the "workflow" was the thing responsible for merging the two data-sets together. Bu... read more

Gavin replied to a post Considering Control Flow And Transient Data Relationships In ColdFusion

Chris makes a good point about the helper method. Since I have been on a clean code / clean architecture kick lately, I have more opinions :P Sorry it's long. I usually think that any time you're applying business logic to an entity's internal structure outside of an entity, you have to wonder where... read more

Ben Nadel replied to a post Considering Control Flow And Transient Data Relationships In ColdFusion

@Chris, I think that would make sense, perhaps as a private method in the Workflow component. But, you're still going to have to eventually deal with the transient data. Meaning, internally to the getPreferredName() method, you'd still have to have the same logic. At which point, I think the conclus... read more

Ben Nadel replied to a post Key Conflicts On INSERT Still Increment AUTO_INCREMENT Value In MySQL

Apparently this AUTO_INCREMENT behavior is actually a setting on the InnoDB database. In the "olden days", all auto-incrementing used to use a full-table lock, which is inherently not great for performance since only one INSERT can run at a time on the table. However, it looks like MySQL changed thi... read more

Ben Nadel replied to a post Considering Approaches To Handling MySQL Key Conflicts In Lucee CFML

So, an update on my previous statement - it looks like the AUTO_INCREMENT column is incremented as a byproduct of the ON DUPLICATE KEY UPDATE internal logic, not as a byproduct of the LAST_INSERT_ID() call. Just experimenting with it locally. It looks like this is documented in the MySQL docs, but v... read more

Ben Nadel replied to a post Considering Approaches To Handling MySQL Key Conflicts In Lucee CFML

@All, One thing I just ran into with the approach that uses the ON DUPLICATE SET to get the existing ID - this appears to increment the row ID even if no new row is created. Meaning, imagine that the last row inserted has id:5. Then, I try to run the same query over-and-over 15-times, all returning ... read more

Ben Nadel replied to a post Working Code Podcast - Episode 92: The Power Of No

@Danilo, That's an interesting idea. I'm pretty sure that Adam (on the podcast) uses comma-first for a lot of his code specifically for the reason you outlined: the Pull-Request shows only the line that was changed. I feel like I remember the Golang auto-formatter also doing the same thing (for the ... read more

Danilo Celic replied to a post Working Code Podcast - Episode 92: The Power Of No

Regarding SQL code hints after a comma: Consider using a comma first format, that is, the comma is at the start of a line, not at the end of a line. The main reason I like it is from a source control perspective, when you add a new column to the SELECT, then the changeset is only the line that was c... read more

Ben Nadel replied to a post Using Type Guards To Narrow Down Error Handling Types In Angular 14

@Hassam, Yeah, I only learned about unknown while I was looking up some documentation for the Type Guards. I don't think (or don't remember) hearing about it before that. I agree that it likely makes more sense, at least if you are intending to reach down into the error object. As far as where to ha... read more

Hassam Ali replied to a post Using Type Guards To Narrow Down Error Handling Types In Angular 14

I think unknown is more appropriate because then compiler forces the consumer to properly typecast the variable before using. I think its good feature to know. In production application where do you prefer to handle the error and give feedback to user. I noticed some people use a central service to ... read more

Ben Nadel replied to a post Adding An Angular 14 Front-End To My ColdFusion Feature Flag Exploration

After publishing this Angular 14 UI, I kept feeling like something was amiss in my error handling. As such, I went back and added Type Guards and Type Narrowing into my error handling workflow: https://www.bennadel.com/blog/4324-using-type-guards-to-narrow-down-error-handling-types-in-angular-14.htm... read more

Ben Nadel replied to a post Strangler: Building A Feature Flag System In ColdFusion

In the last month, I've dribbled in some effort to rebuild the Admin UI as an Angular 14 application: https://www.bennadel.com/blog/4323-adding-an-angular-14-front-end-to-my-coldfusion-feature-flag-exploration.htm It still leaves much to be desired, and there's plenty of "best practices" in the Angu... read more

Ben Nadel replied to a post Bucketing Dates Using floor() In ColdFusion

As a fast-follow to this post, I wanted to look at using ColdFusion's native dateTimeFormat() and parseDateTime() functions in order to approach "bucketing" from a different angle: https://www.bennadel.com/blog/4317-tokenizing-date-time-values-in-lucee-cfml-5-3-7-47.htm This technique generates "hum... read more

Chris G. replied to a post Using jSoup To Fix Post-Marriage Name Changes In ColdFusion 2021

@Ben Haha, you make great points. Keeping the .md files updated feels like more of a type-a problem. I can relate 100% btw. While if love for my markdown and db to agree, I tend to shift the source of truth to the DB once converted. The MD files then become a relic.... read more

Ben Nadel replied to a post Using jSoup To Fix Post-Marriage Name Changes In ColdFusion 2021

@Chris, So, I plan to do that as well at some point. But, something like that can "go wrong"; where as, since this is being done on-the-fly, there's no persistence to it. But, there's another wrinkle to my thinking. I actually author all my posts in a .md (markdown) file - like an actual file just s... read more

Ben Nadel replied to a post IntersectionObserver API Performance: Many vs. Shared In Angular 11.0.5

@Ramzi, It sounds like maybe the List directive isn't being included. In you "parent element" (<ul> in my case), make sure you're including the intersection observer directive: <ul bnIntersectionObserverBList class="items"> ... note the attribute I have here - this is the selector that Angular is u... read more

Ben Nadel replied to a post IntersectionObserver API Performance: Many vs. Shared In Angular 11.0.5

@Ramzi, The bnIntersectionObserverBList directive will be instantiated just once on the UL. Then, that instance will be automatically made available as an dependency-injection token in each of the bnIntersectionObserverB directive instance (the LI attribute directive). So, the LI directives are inst... read more