Subscribe: Ben Nadel ColdFusion, jQuery, And Web Development Feed @ BenNadel.com
http://www.bennadel.com/index.cfm?dax=blog.rss
Preview: Ben Nadel ColdFusion, jQuery, And Web Development Feed @ BenNadel.com

Ben Nadel's Web Development and User Experience Feed @ BenNadel.com



Recent blog posts covering JavaScript, User Experience (UX), ColdFusion, Node, and other topics



Last Build Date: Sat, 24 Jun 2017 06:47:26 EST

Copyright: Copyright 2017 Ben Nadel
 



Hello World With Webpack And TypeScript 2.3.4 In React 15.6.1

Fri, 23 Jun 2017 08:28:00 EST

Ben Nadel experiments with React using TypeScript and Webpack. This adds type safety to React without the "propTypes" object....



Using % (Percent) For In-Line Styles In Angular 4.2.3

Tue, 20 Jun 2017 07:36:00 EST

Ben Nadel demonstrates that the "%" (percent) symbol can be used to define in-line CSS styles using the template syntax in Angular 4.2.3....



Reflecting On Data Persistence, Transactions, And Leaky Abstractions

Fri, 16 Jun 2017 08:36:00 EST

Ben Nadel reflects on data persistence, transactions, and leaky abstractions. And, in particular, what how the concept of "changes together" is evolving due to the changing constraints of different persistence implementations....



Using Module Augmentation To Safely Inject Runtime Methods Using TypeScript And Node

Mon, 12 Jun 2017 07:21:00 EST

Ben Nadel explores the concept of "module augmentation" in Node and TypeScript and looks at using side-effect driven import statements as a way to safely and predictably alter the runtime behavior of native (Array) and custom classes....



Implementing Q's .allSettled() Promise Method In Bluebird

Fri, 9 Jun 2017 08:31:00 EST

Ben Nadel attempts to implement Q's .allSettled() Promise method in an application-scoped copy of the Bluebird Promise library....



It's Safe To Use Empty Arrays With The $in Operator In Sequelize

Thu, 8 Jun 2017 07:25:00 EST

Ben Nadel demonstrates that you can safely pass empty arrays to the $in operator in Sequelize. Empty arrays are translated into "(NULL)" collections which side-step SQL exceptions and ensure that no records are accidentally returned....



Using Type Argument Inference When Accepting Generic Callbacks In TypeScript And Node

Wed, 7 Jun 2017 08:06:00 EST

Ben Nadel looks at using Type Argument Inference in TypeScript when accepting generic callbacks. Type Argument Inference is a feature that allows the Type parameter of a method to be automatically calculated from the Type of its arguments....



I Wish JavaScript Had A Way To Map And Filter Arrays In A Single Operation

Tue, 6 Jun 2017 07:08:00 EST

Ben Nadel reflects on the intelligence that jQuery used in its mapping and iteration functions. And, wishes that JavaScript had a similar way to map and filter an Array in a single operation for common use-cases....



Using Element.classList To Manipulate CSS Classes On The DOM

Mon, 5 Jun 2017 07:14:00 EST

Ben Nadel looks at the DOM Element property .classList and how it can be used to add and remove CSS class names without having to rely on manual string manipulation....



The Learn Node Master Package Video Course By Wes Bos Is Awesome

Sun, 4 Jun 2017 09:55:00 EST

Ben Nadel reviews the Learn Node (Master Package) video course from Wes Bos. This course is a robust, polished, and effective learning solution that will get you up-to-speed quickly building Node applications with Express and MongoDB....



Attempted Regular Expression Pattern Search Game For RegEx Day 2017 Using Angular 4.1.3

Sat, 3 Jun 2017 11:50:00 EST

Ben Nadel shares his Regular Expression pattern search game that he was trying to build for RegEx Day 2017. The game proved too challenging to complete; but, it was a fun exploration of Angular 4.1.3....



The 10th Annual Regular Expression Day - June 1st 2017

Thu, 1 Jun 2017 07:04:00 EST

Ben Nadel gears up for the 10th annual Regular Expression Day - a celebration of powerful string manipulation! This year, he's giving away 5 copies of The Regular Expression Cookbook by Steven Levithan and Jan Goyvaerts; an outstanding book that covers everything you need to know about pattern matching!...



The Chalk Module Can Be Used With The Console's String Interpolation In Node

Wed, 31 May 2017 08:07:00 EST

Ben Nadel demonstrates that the Chalk module can be used with the console's string interpolation features in Node. This allows you to create easier-to-read nested styling (with some small caveats)....



Some Reflections On How Express Prepares JSON Responses

Tue, 30 May 2017 07:47:00 EST

Ben Nadel looks at how Express prepares JSON (JavaScript Object Notation) responses; and why the serialization hooks provided by the Express internals should probably be avoided in favor of more explicit, more obvious code....



Sequelize-Comment: A Sequelize Plug-in That Injects Comments Before Your SQL Statements

Mon, 29 May 2017 06:47:00 EST

Ben Nadel publishes sequelize-comment, a Sequelize plug-in that allows arbitrary comments to be prepended to SQL fragments generated by the Sequelize module. This "best practice" allows for easier debugging of slow_log and general_log queries....



Using JSON.stringify() Replacer Function To Recursively Serialize And Sanitize Log Data

Sat, 27 May 2017 11:47:00 EST

Ben Nadel demonstrates how the JSON.stringify() "replacer" function can be used to recursively serialize and sanitize log data. This is incredibly helpful for nested errors and log items that may contain Personally Identifiable Information (PII)....



JSON.stringify() Will Recursively Call toJSON() If It Exists During Serialization In JavaScript

Fri, 26 May 2017 07:23:00 EST

Ben Nadel looks at JSON.stringify() in JavaScript / Node and demonstrates that the JSON.stringify() method will recursively invoke the custom .toJSON() method as it traverses the object graph....



Validating / Consuming Mount-Path Parameters With Middleware In Express And Node

Thu, 25 May 2017 08:09:00 EST

Ben Nadel looks at mount-path parameters in Express and how they can be consumed and validated using various middleware approaches (some cleaner than others)....



You Can Continue To Process An Express Request After The Client Response Has Been Sent

Tue, 23 May 2017 08:18:00 EST

Ben Nadel demonstrates that the Express Request and the Client response are not the same thing and should not be conflated - the client response is nothing more than a facet of the Request-Response life-cycle....



Understanding The 4 Rules Of Simple Design By Corey Haines

Mon, 22 May 2017 08:02:00 EST

Ben Nadel reviews Understanding The 4 Rules Of Simple Design by Corey Haines. In the book, Corey shares the insights that he's gained from helping thousands of developers as a facilitator at hundreds of code retreats....



Considering When To Throw Errors, Why To Chain Them, And How To Report Them To Users

Sun, 21 May 2017 16:28:00 EST

Ben Nadel writes up the results of his research on error handling in web application development - when to throw errors, why to chain them, and how to report them back to users....



Exceptions Are For Exceptional Circumstances And Thoughts On Cross-Layer Coupling

Thu, 18 May 2017 07:30:00 EST

Ben Nadel considers the phrase, "exceptions are for exceptional circumstances" and how this outlook affects cross-layer coupling in your application....



Sequelize - Validation Error: Validation Not Failed

Thu, 18 May 2017 06:06:00 EST

Ben Nadel clarifies the somewhat confusing Sequelize error: "Validation error: Validation not failed". This is caused by a violation of the "not" rule on your Model Schema....



Centralizing Distributed Locks In Order To Provide Application-Oriented Semantics Around Locking In Node

Tue, 16 May 2017 06:53:00 EST

Ben Nadel looks at how to centralize distributed locks in order to provide application-oriented semantics on top of the locking implementation. This creates more consistent, insightful, and easier-to-consume locks....



Inverse Type Guards Work In TypeScript

Sun, 14 May 2017 08:26:00 EST

Ben Nadel demonstrates that inverse Type Guards work in TypeScript, allowing the code after the Type Guard block to make certain assumptions about the values at hand....



Experimenting With ts-node And Using TypeScript In Node On The Server

Sat, 13 May 2017 14:14:00 EST

Ben Nadel experiments with the ts-node executable, which allows TypeScript to be run seamlessly in a Node environment. This allows you to quickly and easily build Node apps, included Express apps, using type annotations and other transpiled features....



Chalk Styles Can Be Passed Around As Naked Function References In Node

Fri, 12 May 2017 19:17:00 EST

Ben Nadel demonstrates that the style methods, of the npm module - Chalk - can be passed around as naked Function references that retain their composite styling in the consuming context in Node....



Exceptions Are For Programmers, Error Responses Are For Users

Wed, 10 May 2017 07:52:00 EST

Ben Nadel explains that "Exceptions" are for programmers and "Error Responses" are for users - a separation of concerns that was codified in an "ah ha!" moment provided by Mark Seemann. This separation of concerns creates valuable insight into the application and allows for hooks into features such as Internationalization (i18n)....



Experiment: Putting DEBUG Comments In Your Sequelize-Generated Queries In Node

Tue, 9 May 2017 08:39:00 EST

Ben Nadel experiments with monkey-patching the Sequelize instance (in a safe way) in order to be able to prepend DEBUG SQL comments to ORM-generated SELECT statements. This makes the general_log and slow_log performance much easier to debug, from an administrative standpoint....



Thoughts On Defining Coroutines As Class Methods In Node And TypeScript

Sun, 7 May 2017 10:58:00 EST

Ben Nadel considers Coroutines (ie, wrapped Generator function execution) and how Coroutines can be defined as class methods in Node and TypeScript. There seem to be several possible approaches, none of which are perfect....