February 17, 2017

Zeno's Paradox of Infinite Loop Scrolling

or Everything Moves but You

My current project has a strange requirement. Given a collection of items, a user should be able to infinitely loop scroll left and right in a carousel. From strictly a UI perspective, this makes sense, when I move to the left, add items to the right and vice versa. From a developer's perspective…

Categories
JavaScriptWeb Development
February 16, 2017

Head Scratcher #1

Making a 2D Array by Sorting an Array of Objects

I am starting a new series called "Head Scratchers." At least once a week (probably once a day), I run into a problem that makes me scratch my head for while. So I'm going to share the problem and my solution with you. If you think of a better way to solve the problem, I want to see it in the…

Tags
React
February 11, 2017

Response to CSS vs Sass

Previously, there was an article here where I argued that another person's opinion on a subject was incorrect. I made a logical argument, supported it with several points of evidence. I demonstrated the incorrectness of his opinion thoroughly. I decided to delete it all. I did this because I…

Categories
Web Development
February 08, 2017

How to Dynamically Render React Components

I am currently working on a React/Redux universally rendered application at work. It has some fun parts and I want to share what I've learned from building them. One of those parts is a component I have called the BlocksLoop . In the design phase of the project, long before I was ever a part of the…

Tags
React
January 20, 2017

Loading State Trick for Stateless Functional Components in React

I want to share with you a little trick I've been using lately with stateless functional components in React. This is probably really old news to some of you, but I'm hoping there are a few of you who don't know this one yet. If you're getting started with React, and especially if you're using Redux…

Tags
React
December 03, 2016

IMHO: Avoid Clever Code

or Code is for Humans, Not for Computers

Yesterday, I was poring through some code when I came across a pattern I hadn't seen used in JavaScript before. The pattern looked like this: This pattern takes advantage of how logical operators work. In the case of && , when the left side is true, the runtime evaluates the right side. Since an…

Previous1234567
8
910111213Next