SQL Reporting by time intervals

A version of this article specific to the Oracle DBMS is here. It’s often helpful to use SQL to group information by periods of time. For example, we might like to examine sales data. For example, we might have a table of individual sales transactions like so. Sales: sales_id int sales_time datetime net decimal(7,2) tax … Read more

Stored function for haversine distance computation

In another article I described the process of using MySQL to compute great-circle distances between various points on the earth then their latitudes and longitudes are known.  To do this requires the formula commonly called the haversine formula. It’s actually the spherical cosine law formula, and is shown here. There’s a more numerically stable formula — … Read more

Mean Absolute Deviation

Nassim Taleb wrote a provocative article on Edge.Org calling for using the Mean Absolute Deviation in place of the more popular standard deviation as a measure of the variability of a collection of observations. His reasoning is persuasive to me, especially his claim that the standard deviation is widely misapplied and misunderstood. MySQL (like many … Read more

Top ten ways to make sure your church website works

“Hey, it’s Easter tomorrow.” “Oh, that’s right. We should go to church somewhere.” “Pass me the Yellow Pages.” “Wait, I think the paper has a Church Services listing. Let me look.” Question: What’s wrong with this scenario? Answer: Nothing, for 1970. There was a day when publicizing your church was simple: spend three hundred bucks … Read more

Animation and Imagination for Kids

Jarrett J Krosoczka, the author of the Lunch Lady books, gave a great talk about creativity. The Boyz Club guys love making stop-motion videos. We’re using an iPhone with the Frameographer app. It’s cheap but not free, and it works well. Here are a couple of videos made that way: I’m thinking about showing them … Read more

Sample policy for sponsor links for nonprofits

Non-profit organizations often get asked to display sponsor links on their web sites.  Here is a draft policy for doing that.  (Of course, sponsors get what they want in a lot of cases, but if somebody asks for a policy it helps to have one.) On the sponsor page of our web site, organization displays … Read more