OS X El Capitan License: in Plain English

I decided to upgrade my Mac to El Capitan, but my computer said, on one condition: I must "carefully" read and agree with something. It even provided a tiny cozy display window for viewing it: And so I did what anyone else would: I cleared my afternoon schedule and got right down to business; reading, carefully, the entire document. It … Continue reading OS X El Capitan License: in Plain English

Self-validating Ruby objects with ActiveModel Validations

I'm importing lots of CSV restaurant inspection data with Ruby, and I need to make sure the cleaned up data matches the spec. For example, a violation must have a business_id and date. It can optionally have a code and description. My goal was to be able to write a class like this: ...and it would … Continue reading Self-validating Ruby objects with ActiveModel Validations

Python project organization, circa early 2015

The best, current guides I've found Python Packaging Authority's tutorial and sample project Cookie Cutter project templating system, specifically cookiecutter-pypackage Open Sourcing a Python Project the Right Way, and Supercharge Your Python Developers by Jeff Knupp It's hard to find current best practices for organizing a reusable python package. I'm starting a new project to get the world's … Continue reading Python project organization, circa early 2015

Degrees of freedom: Four valid ways to write degrees Fahrenheit in HTML

I was working on my startup's food safety score web app, writing code to clean up imported text like, DELI DISPLAY COOLER HOLDING CREAM CAKE AT 44.6F BUT LOWER CORNER OF UNIT HOLDING FOODS @ 39F We decided to make this as readable as possible without changing the content. And so, the finished text should have improved capitalization, punctuation, … Continue reading Degrees of freedom: Four valid ways to write degrees Fahrenheit in HTML

What’s not a violation of the Law of Demeter

The Law of Demeter: "Use only one dot", or "an object should avoid invoking methods of a member object returned by another method." But when would this not be a violation? Buried within a C2.com wiki page is this excellent exchange: Trying to come up with a more simple (non-foobar) example, is this correct? currentPerson.Account.Deposit(500) … Continue reading What’s not a violation of the Law of Demeter