Computing Cpk statistics using SQL

Part 1 – Introduction

For the past several years I have performed a myriad of projects for this favorite chemicals company client of mine.  Recently, I was called in to help design and develop a Production Reporting application for them, to meet new requirements from their new, German-based, owners.  The application reports on things like how much product is produced, what was consumed to produce it, production yields, etc.  Several factories are involved, so we’re tieing all the data into one database.

The first challenge involved converting all the English-based measurements into metric.  Yes, I did say it was one of those metric-loving European countries, right?  So, we’ve been going over different conversion equations – some of them are interesting, because they’ve involved variable factors like the energy content of natural gas and the specific gravity of  oil.

Still, though, a piece of cake – just linear equations to convert from one unit of measure to another.  Had more problems with the quality of data (often missing from several plants) than the equations themselves. So, we’re progressing fine on the application; then, one day I’m in a meeting with all the plant managers, and they start talking about CPK statistics. They talked like of course everyone knows what this statistic is.  I’m sitting there, though, going “huh?”  I have a computer science undergraduate degree, with oodles of calculus, differential equations and statistics, and a economics graduate degree with its own heavy mathematical load in correlation analysis and statistics.  Yet, I’ve never heard of Cpk (properly, that’s how the statisticians spell it, C sub pk.  I still don’t know what the initials mean).

Continue reading Computing Cpk statistics using SQL

Cultural Recreation

The Houston International Festival has for a long time been one of our favorite family events to attend. Even before we had kids it was a great weekend of fun, food, and music. We’ve attended most every year that we’ve lived here in Houston. We even slugged it through the years it was held at Reliant Park. Vast parking lots have absolutely no character, so we were very happy when it moved back to downtown!

2005 was an especially good year for iFest – that was the year we participated as a vendor! Connie and Alyson started planning their business venture, Té House of Tea, in 2004, and by January 2005 started searching for a suitable location for the tea house. This took longer than expected – so many locations just didn’t have the right amount of parking, the right rent, or just the right feel for a peaceful, contemporary tea house. Then we noticed the featured country for iFest this was was India, and since Connie had developed an authentic Indian chai recipe (with the help of our dear friend Hema), we decided to throw up a booth at the festival.

Luckily, we got a booth in the India Food Court.

These were the early days of our business planning, and we didn’t have a lot of extra cash for extracurricular adventures, so we made do with hand-painted signs and logos. We were very proud, though, of the final result for our sign, which was pitched above our booth. I hand cut some graceful, Indian architecture-like curves with my trustworthy jigsaw, and Alyson and Hema laid on the paint and paisley patterns. It was gorgeous!

We only had enough time and energy for one weekend, so a boba-tea shop took our booth location the weekend. The weekend we set up was sunny and humid. The crowds were still there, though, and our teas were an instant hit – especially with all the Indian-Americans! All the neighboring Indian restaurants were pitching our chai to their customers, as “fresh and authentic”. Come 5 pm, and suddenly the Indian crowd was in line eight-deep at our booth – Tea Time! It may have been a hot day, but they still wanted hot chai – it’s only right.

We completely ran out of all that we had prepared in the morning, so Alyson and Connie stayed in the back to boil some fresh brew. Mmmm, it was good, the aroma of boiling milk, black tea, and fresh spices filling the air around our little tent.

We completely ran out of our two days worth of tea supplies in just one day, so on Saturday midnight I was at Fiesta buying fresh spices – cardamon, cloves, ginger, etc. – so we could be prepared for the Sunday crowds.

Sunday was just as busy for us, but we are able to keep ahead of demand this time. 5 pm was still a rush, and we were ready.

We were very proud of our success, and our acceptance by the local Indian community. We had recreated a bit of their own culture in the form of local food and afternoon tea traditions, and it fit the general atmosphere of Indian dance and music all around us.

Last weekend, I had the honor of being invited by iFest for a sneak peek of one of their own cultural recreations: a model of a 13th century underground church in Ethiopia. This in preparation for the coming International Festival’s focus on Africa.

I visited iFest art director’s Kati Ozanic-Lemberger home and studio on a recent Saturday, along with a lot of other excited bloggers.  We got a see a bit of cultural recreation in action: the construction of the underground caves leading to the church (the church itself had already been carted away).  With paint and plaster, Kati and team are bringing a touch of this exotic African history right here to Houston, for visitors to see and touch.

It’s not the real thing, but that’s not the purpose.  Visitors get to see and read a bit about something they probably knew very little about before, learn a little history, and ponder.    That is, by crawling in a cave, they’ll get to leave their own little cave.  And that’s good.

Should be a good two weekends: everyone get out and enjoy iFest this year!

Pseudoscience vs. Science

Boiled down:

  • Science = testable hypotheses
  • Pseudoscience = exploiting anomalies in Science

I had the misfortune of running into a 9-11 Truther last week, on a bridge in Houston. I was gracious enough to accept 4 DVDs from him, and was open minded enough to even start viewing one of these videos (along with my son, who’s getting old enough now to actual be curious about politics). 30 minutes in, though, I just had to shout out “Arghh!” and throw my hands up. These guys don’t engage in science, or even scientific dialogue. If you chance to argue with them, to point out alternative, feasible, Occam’s Razor-limited hypotheses, along with the supporting evidence – or even dare to point out the anomalies in their own data and theories – then you’ll be immediately branded as a apologist, a shill for the State, or worse.

I mean, heck, I’m like any other guy: I like good conspiracy theories. It’s great entertainment! And yeah, perhaps “we” have planted evidence or created events as excuses for going into wars before (USS Maine, anyone?). But Controlled Demolition, Missiles, Remote-Controlled Planes, Holographic Plane Images, even UFOs? This isn’t science, falls flat on so many fronts. I’ve got better things to do than read up or view all this. And, better things to blog about. So, I’m off …

A Social Media Drinking Game

Here’s my random thought of the day:

After reading this article: The web, the politician and the prostitute, I was inspired to imagine the following game:

  1. Get with a few of your friends at your favorite bar. One with wireless access;
  2. Start drinking;
  3. When everyone’s getting good and happy, pull out your special deck of cards. You’ll be the first player, the Prosecutor;
  4. The Prosecutor points out one person in the group. He/she is the Accused (got to come up with cuter names, though);
  5. The Prosecutor draws a random card from the deck. These cards have a single crime written on them, stuff like Murder, Rape, Child Molester, Embezzlement, Prostitution, etc. The more heinous, the better;
  6. He shouts, “YOU NOW STAND ACCUSED OF _______ !”;
  7. Everyone else in the group is a Journalist. It is now their job to mine the accused’s social networks for all the juicy bits they can find: incriminating photos, random quotes etc. The more they support the crime the better;  the most outlandish out-of-context statements that prove the accused’s proclivities gets the most points. Digging into obscure connections and long-past history ( is allowed) gets even more points;
  8. Be prepared for a lot of teasing.

This game is good for sobering up before you head home for the weekend.  It’s sobering to see how much privacy we’re willing to give up these days.  🙂

Bridges and Phones – Social Media Economics

In microeconomics, economists like to talk about substitution goods and complementary goods. A classic complementary good to peanut butter is jelly: both are usually consumed together in that delectable sandwich known as PB & J. Economists care about this, because when consumption goes up in peanut butter, you’ll likely see an increase in jelly too, if the goods are tightly complementary. Price changes in one will likely lead to price changes in the other.

A substitute good, well that’s kind of obvious, it’s a good that can easily substitute for another. Soy drink is a substitute for milk – at least, if you’re in my household. Natural gas is a substitute for electricity, when heating your house. If the substitute is easy to switch, a price increase in one will lead to increased demand in another – a nice, easy economics predictive tool. Continue reading Bridges and Phones – Social Media Economics

First thoughts on presentation at HTC

This Wednesday I did a short presentation at the Houston Technology Center’s “Starting a Web-Based Business” lunch series.  My presentation was on “Open Source Tools for Software Development”, and I highlighted several tools that my development team uses regularly.

I’ll post that presentation shortly, but here I just wanted to jot down a few notes from reactions to the presentation – feedback I got after the talk.

  •  One manager, owner of a well-established software firm here in Houston, liked the idea of wikis for organizing his team; but he’s still looking for a better project management tool, something “larger” than Poi, the issue-tracker I demonstrated.  Something that could track milestones, and keep the team on track.

    Yes, I’d like to see better tools for PM too.  Traditionally, we’ve used MS Project.  Problem is, it’s not easy to share – at Interliant, we tried the Lotus Notes-based Project Gateway, but ultimately found it awkward to use.  Basecamp, an online service, looks attractive – not sure yet how well it scales, and compels your team to use it.

    One thing we do, though, when a project gets hot and heavy, is that we fix the milestone dates at regular intervals: once a week or once every two weeks there’s going to be a build.  That stays fixed; what adjusts, though, are which features that make it into the build.  Our only rule is that the feature must be a tangible end-user benefit – we can’t “deliver” just background architecture or design in the next release, and expect that to be considered progress by our client.  Managing at this point becomes simpler, as the project schedule just shows a set of period milestones; ts in the status meetings we discuss which features will make it into the next build – the customer, of course, sets priorities, and there’s some give-and-take on features that may slip because of their complexity, or unexpected problems.

    Still need a tool, though, to capture and display these milestones and feature deliverables!  Must search more …

  • One manager of IT at the Houston Chronicle mentioned they use Capistrano for deployment, instead of Ant.  It’s Ruby-based, but you can use it for automating all sorts of things.  It looks very promising, so I’ll have to check it out.  Ant is cool, is built into Eclipse, and does the job, but it’s XML.  Rather a yicky way to write out deployment scripts!
  • Another fellow approached me after the talk and said his friend is involved in a large-scale application that uses, of all things, Smalltalk!  It does heuristics, and I think it was oil field-related.  I’m hoping I’ll get to meet this guy, and learn more.  I still love Smalltalk … just can’t find any projects where it’s a winner here in town  🙁

Cultural Awareness

OK, I guess I won’t really fault the local tech community for sponsoring not one, but TWO events, both falling on the first day of Chinese New Years. Did anyone check their calendars?! Yeah, yeah, I know … you can’t pick any date without landing on some sort of holiday, be it National Pickle Day or International I-Miss-My-Mommy Month. But, this one day is perhaps a bit more important than others – it’s at least a day where you can expect a lot of family commitments if you happen to be Asian.

So, I’ll be missing the Up Experience, though I’ll likely make it for a short while to the Houston Startup Happy Hour – the latter is always a great chance to catch up with my business friends, in our often very busy schedules. After that though, it’s off to a grand ballroom for a big New Years feast with other friends and family. I think we have booked 3 large tables so far. Should be fun, and filling too!

Objective Journalism is a Myth

Forget what you were taught in school about journalistic ethics. There is no objectivity in the news. Journalists, editors and news corporations come to every story with their biases intact, and select and produce stories that reflect their leanings.

OK … actually, the situation is more subtle and complex than that. I’m not talking about the left-leaning media, or the “vast right-wing conspiracy”. Sometimes the biases are more mundane than that: news stations, to keep their ratings up, must produce entertainment in their news, to keep the viewers watching. And, we all know how this works: shock and gore, gossip and controversy are all grist in the entertainment mill, so stories with shock value will more likely get air time. And, a journalist who can throw in a controversial twist will get more attention from the editors, etc., increasing chances an article will be run.

This “entertainment influence” on journalism seems to be more a factor of TV news than print.

Maybe journalists like to hide behind the cloak of objectivity, but we as savvy consumers of news information need to weigh in on all the influences – economic as well as ideological — Continue reading Objective Journalism is a Myth

Thoughts on GSM

My thoughts on the first Got Social Media Conference:

Erica O’Grady and Kelsey Rutger put on an excellent conference yesterday at the Houston Technology Center. Got Social Media was an advanced introduction to social media today. Many thoughtful presentations. Here’s a few insightful remarks I took away from the conference:

  • “Markets As Conversation” – yes, something I’ve always advocated, and is a sub-text of the “Austrian School” approach to economics. Sorely lacking, though, in mainstream economics.
  • “Customers like having a voice”. Echos of above
  • non-profits online (in social media space) are spending a lot of time saying “thank you”. This is a nice lesson that I think the non-profits I work with will love to emphasize.
  • “Women are motivated by respect, being listened to” – Laura Mayes. Yes, there are gender differences in markets, and marketing. I’ve often stated that shopping is the ultimate expression of capitalism, and women are, stereotypically, the ultimate shoppers … so, by extension, women are the ultimate capitalists! Recognizing this, I think we will see, in the long run, a “softening” of markets and businesses – there will be more listening, more give-and-take … and hopefully less exploitation, fraud, and con games in the marketplace. But, that takes me to: Continue reading Thoughts on GSM

iPhone 1.1.3 upgrade is awesome

Just downloaded the latest upgrade to the iPhone.  While the 1.1.2 upgrade was just some patch fixes, this newest upgrade is really a fantastic enhancement to the iPhone.  Stunning even.  Just one feature to mention: location finding!  Using cell tower triangulation, the iPhone can plot your current location on a map.  Very, very cool.  Click the location button on the Google map, and after a bit of a pause, to do some calculations, the map will zoom into your location, with a circle drawn around the most probable location.

The circle will be bigger or smaller, depending on how accurate the data it’s using.  Sometimes, it hits me dead on to my current location; at other times (like, when I drove along Westheimer, within the loop), it was a bit off, drawing a circle about a mile wide.  In any case, a very, very helpful tool – I guess I won’t be needing a GPS device anytime soon!

Map pinning is a nice new feature too, as is the ability to customize the home screen.  Now I can put my favorite web pages (like the Houston Transtar real-time traffic map) directly on the home screen as an icon, avoiding a few extra clicks – first click Safari, then click bookmarks, then click the Transtar link.  Very convenient.  More apps to come soon, I’m sure, so that’s why they’re making room on the home page.

Stunning.  Now, if I could only think of a cool corporate tax application to write for the iPhone.  Hmmm??!!