Software

“Engineering”

Object-Oriented JavaScript – Prototypal Class Pattern

Object-Oriented JavaScript – Prototypal Class Pattern 1280 719 Clark

The Prototypal Class pattern is fundamental to JavaScript, especially object-oriented JavaScript. Though used infrequently by developers, this pattern underpins the syntactic sugar provided by the new keyword and the ES6+ class — thus, worth learning.

read more

Object-Oriented JavaScript – Functional-Shared Class Pattern

Object-Oriented JavaScript – Functional-Shared Class Pattern 150 150 Clark

Often referred to as a ‘mixin,’ this compositional style extends an instance to add shared functionality.

read more

Object-Oriented JavaScript – Functional Class Pattern

Object-Oriented JavaScript – Functional Class Pattern 150 150 Clark

The Functional Class pattern, though simple and clear, suffers from its naïveté. Forced to create duplicate methods for every instance, and store significant closure state for each function on the instance, the memory overhead outweighs the clarity of this pattern.

read more

Writing a Rake Task to Generate New Posts for a Jekyll-Powered Blog

Writing a Rake Task to Generate New Posts for a Jekyll-Powered Blog 910 1364 Clark

rake gen:post TITLE="[INSERT TITLE]" [D] [FN] [TAGS] I couldn’t find a good plugin online for using a command to generate Jekyll post-files automatically date-stamped and stubbed with content/YAML front matter. So, I got some practice writing a simple Rake task. Here is an easy way to create a custom post…

read more

The Active Record Pattern

The Active Record Pattern 150 150 Clark

This post is meant as a ‘high-level’ survey of the Active Record Pattern, Object-Relational Mapping (ORM), and the Ruby on Rails’ implementation of the Active Record Pattern — the ActiveRecord gem.

read more

You NoSQL?

You NoSQL? 150 150 Clark

In the world of databases and database management systems, the big dog is SQL and all of the systems built on top of SQL. However, in the past few years, a newcomer has started rapidly grabbing market share in the database game (the game be real, yo). This upstart is…

read more

Shakin’ Class: Pianos in Different Area Codes

Shakin’ Class: Pianos in Different Area Codes 150 150 Clark

There are a lot of ways to model objects in our world – a globe to represent earth, a popsicle-stick art project to model a real building, a drawing to represent statue, a mathematical equation to model a beehive, a Minkowski spacetime diagram to model space and time, ad infinitum.…

read more

Enumerable#cycle from Ruby

Enumerable#cycle from Ruby 150 150 Clark

Enumerable#cycle(n = nil) { |obj| block } -> nil Ruby Documentation of Enumerable#cycle Calls block for each element of enum repeatedly n times or forever if none or nil is given. If a non-positive number is given or the collection is empty, #cycle does nothing. #cycle returns nil if the…

read more

Designers’ Favorite Positions

Designers’ Favorite Positions 150 150 Clark

CSS provides powerful mechanisms for positioning elements on the screen – one of the main mechanisms for positioning is the position property. Designers can choose between four different values: static (the default), relative, absolute, and fixed. These values all do different things and allow designers fine-grained control over the positioning…

read more