Skip to main content
Ben Nadel at the jQuery Conference 2010 (Boston, MA) with: Eileen Koven
Ben Nadel at the jQuery Conference 2010 (Boston, MA) with: Eileen Koven@psychotropek )

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 154 comments since October 23, 2012
  • Zac Spitzer 1 comment 😍
    Posted 55 comments since December 11, 2008
  • Dawesi 1 comment 😍
    Posted 22 comments since April 13, 2010
  • 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 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

Ben Nadel replied to a post Detecting Rendered Line Breaks In A Text Node In JavaScript

Here's a fast-follow to demonstrate how I am intending to use this line-extraction technique in order to help write text to the <canvas> object: https://www.bennadel.com/blog/4311-rendering-wrapped-text-to-a-canvas-in-javascript.htm Essentially, with Canvas, there is no "wrapped text" concept. As su... read more

Ben Nadel replied to a post Detecting Rendered Line Breaks In A Text Node In JavaScript

@Mario, I think I played around with the TreeWalker API a number of years ago because I was trying to access Comment nodes in the DOM and jQuery, at least at the time, didn't make it super easy to get at non-Element nodes. To be honest, I don't have my head wrapped around the full use-cases for Rang... read more