ReactJS Slide Puzzle

. I put together a simple 3X3 slide puzzle as a first attempt at React.js. I was inspired after running through Brian Barnett's great Tic Tac React tutorial, and therefore mine shares much of the same code. I really recommend his post if you're interested in learning about React. By

Making inheritance make sense with Object.create()

. JavaScript itself is conflicted about its prototypal nature. In a prototypal system, objects inherit from objects. JavaScript, however, lacks an operator that performs that operation. Instead it has a new operator...Prototypal Inheritance in JavaScript, Douglas Crockford The goal is to create a new object with a given prototype link.

The Downside to Ajaxing WordPress

. "Hijax" is a term used to describe a progressive enhancement in which internal site links are "hijacked" by JavaScript in order to load the content dynamically. It reveals to developers a whole new world of interactivity control. It's a fancy and futuristic world—a world not without a gotcha

Code Snippet: Re-enable Ctrl/Cmd-click when using e.preventDefault()

. In Windows and OSX, pressing control or command while clicking a link opens it in a new tab. Using event.preventDefault() on anchor tags breaks this native behavior, but you can use this code to restore it. // allow command-click and control-click to open new tab if (event.metaKey || event.ctrlKey)

Recursion: Nature's Cheat Code

. In his famous 1979 book Gödel, Escher, Bach: An Eternal Golden Braid, Douglas Hofstadter coined "Hofstadter's Law" to describe when computers would best humans in chess: Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law. Douglas Hofstadter, Gödel, Escher, Bach: An Eternal

Scratch Style Guide

. Welcome to Scratch! This is your guide to writing beautiful blog posts. All of Scratch's default formatting options are summed up right here. Table of contents Headings Text Blockquotes Lists Media Syntax Highlighting Tables Helper Classes Headings In Scratch, <h1> tags are reserved for site and post titles.