Miscellania


Naming Things

One of the famously ‘hard things’ in programming is naming things – I’ve found following a few conventions in naming help you reason about a program. For example, variables should be named to describe what they are and functions for what they return.

Take this function:

function convertName(name) { const firstInitial = name.slice(0, 1); const otherInitials = name.slice(1).toLowerCase(); return firstInitial.toUpperCase() + otherInitials; }

This function is named for how it being used. What it [...]

Read The Rest Of This Post

Shoulders

A man crosses the street in rain,

stepping gently, looking two times north and south, because his son is asleep on his shoulder.

No car must splash him. No car drive too near to his shadow.

This man carries the world’s most sensitive cargo but he’s not marked. Nowhere does his jacket say FRAGILE, HANDLE WITH CARE.

His ear fills up with breathing. He hears the hum of a boy’s dream deep inside him.

We’re not going to be able to live in this world if we’re not willing to do what he’s doing with [...]

Read The Rest Of This Post

The Once A Year Card

Are you the sort of person that never remembers to buy cards? Birthdays, Christmas, Get Well…. it just doesn’t occur to you.

It’s not that you don’t love the people in your life, you’re just not the sort to express it by buying stationery.

Here’s your solution: The Once A Year Card

It’s a card that very directly and clearly states that I am sending it to the recipient because I want them to know that I occasionally think of them, that I [...]

Read The Rest Of This Post

Accumulated Links

HTML5Pattern – A list of patterns that can be applied to many common form inputs  To celebrate the 12th birthday of metafilter @mathowie bought the domain of the first site ever submitted: cat-scan.com Very long but good article about keyword research 6 Essential PPC Landing Page Optimizations Lessons From A Rewrite by Rebecca Murphey. I’m always impressed with her writing

Read The Rest Of This Post

Amazon: The Hidden Empire

This presentation is a comprehensive look at the ever expanding (and ever innovating) business of Amazon.com.

Read The Rest Of This Post

This Week’s Reading

ThinkBack, Playing with ThinkUp’s New API

The newest beta of ThinkUp adds an API to the app for the first time, allowing developers to easily build apps on top of data coming from ThinkUp.

The JSON API was created by Sam Rose, a 20-year-old student from Wales and an active contributor in the ThinkUp community. His 7,000 line contribution — composed of 40% new tests and 40% documentation —earned him first place in the ThinkUp bounty contest and a brand new iPad 2. Congrats, [...]

Read The Rest Of This Post

Monopoly: Real Life Edition

(crossposted from a post I made on reddit)

In an attempt to keep the game relevant, they’ve changed a few rules to better reflect modern times. In the new version, one player is chosen at random to be the banker. That player owns all of the properties and has all of the money.

The other players attempt to make it around the board without losing [...]

Read The Rest Of This Post

Coder’s Vocab #1 : Idempotent

In programming, the term idempotent describes a method that can be called multiple times without changing the result. Sometimes it can be a symptom of madness or incompetence – I’ve seen code where a save() method was called repeatedly "just in case." 

Besides scratching the itch of the insane among us, idempotent routines are important. For a simple example, consider the "Checkout Button" on a typical ecommerce form. Often you will see strong language around the button asking the user to [...]

Read The Rest Of This Post

Now you have 1000 problems

Behold, the world’s greatest collection of "you’re doing it wrong" examples.

Read The Rest Of This Post

Pecan Crusted Pork Chops

Made these last night – Amanda has demanded an encore so they must be pretty good.

Instructions:

Preheat the oven to 350f. In a food processor, process a handful (about a cup) of pecans, a small handful (maybe 1/8 cup) for dried dates and about 10-12 wheat thins into a coarse meal.

Season pork chops with salt and pepper and pat dry. Dip the chops into an egg wash (one egg beaten with a tablespoon of water) and press into the crust [...]

Read The Rest Of This Post