Archive for November, 2005

I’m Less Smarter Now

Saturday, November 12th, 2005

Because I had my four wisdom teeth taken out on Friday.

(more…)

Business Logic != Database Logic

Friday, November 11th, 2005

Databases are good for one thing: storing data. But so are spreadsheets, PDF files, and the like. What separates out a good database from other data storage facilities is the ability to retrieve and store records in the database efficiently.

(more…)

Modeling People in Rails

Thursday, November 10th, 2005

Many of the examples and tutorials around Rails describe a table People around a model of a Person. It’s a bit generic, but it gets the point across nicely.

I was thinking about this model today a little bit and how it relates to a new project I’m hacking on at work. I had this basic thought (in pseudocode):

class Person < ActiveRecord::Base
class Customer < Person
class Vendor < Person
class Employee < Person

My thought here is to create a Person class that holds all of the details a person would have - name, age, sex, telephone number, alimony payments, etc.

Then, define (at least as far as this system is concerned) types of people. From a business logic standpoint, in my mind there really only are three types of people. People that work for your company, people that you sell stuff to, and people you buy stuff from. Granted, sometimes a vendor may later be a customer, and you may hire a customer as an employee some day, so there will need to be some underlying rules to handle these rogue instances, but for the most part I think this is a sound decision.

But it got me thinking - would this kind of functionality serve well as a Rails plugin? Something where you can drop some files into the vendor directory and have access to some standard models that might be of value to many projects?

I’ll bet a large number of projects have a users table (or some equivalent). Maybe creating a standardized (and customizable) add-on package would be beneficial to a lot of projects.

Food for thought, I suppose.

Apple Butter

Thursday, November 10th, 2005

I’m always been fascinated with Apple Butter, because it’s tasty and it’s a bit “unconventional”, in the sense that it’s not an extremely common item.

(more…)

Professors

Wednesday, November 9th, 2005

A recent Doodleblog post made me think about old college professors.

(more…)