Showing posts with label Humor. Show all posts
Showing posts with label Humor. Show all posts

Thursday, March 20, 2014

Pizza Day Award

At CPM Healthgrades, we have a monthly Pizza Day. Originally the idea was to honor employee birthdays and work anniversaries, and instead of buying each person lunch on multiple days, leadership bought everyone lunch, specifically pizza, once a month.

Before the pizza would arrive, someone would read a list of employee birthdays and anniversaries. Eventually, leadership realized that the lists were too long and dropped specific recognition. However, they still announce new employees, company news, and honor an employee of the month. Nominations are requested for employee of the month, called the Pizza Day Award, and the nominations, sometimes amusing, are read aloud. The winner receives the Golden Pizza Slice (pictured above).

This month, I was nominated. Twice! Before I get to their nominations, I need to explain a certain recurring theme.

My coworkers, Andrew and Brian, dressed as a horse and stead for Halloween. The company was having a costume contest. Andrew wore a chain mail tunic and a shield with a skull on it (both self made!). Brian wore a horse head mask, and he hefted Andrew on his back for the contest pictures. The pictures were then sent out for everyone to vote for the best costume. (Of course, I voted for them.) The horse head mask ended up in Brian's cubicle, where it still remains.

Inspired by Brian's horse head, I brought in my own horse head, a marble book end. So apparently the Analytics Team's mascot is a horse.

So with that explained, here are their nominations. First, Brian's:
I’d like to nominate Chris Swenson for a pizza day award this month for his hard work on the PDC configuration workbook. He really didn’t horse around when it came to bringing this old mare up to date, he saddled right up and did what needed to be done. Now we have a true thoroughbred of a workbook on our hands, allowing us to configure markets much more rapidly and accurately than ever before. We all really appreciate the hard work he’s put into this project and feel he deserves some recognition for his efforts.
And here's Andrew's:
I would like to nominate Chris Swenson for the pizza day award. Even though he has been yoked down by various research requests, he’s managed to plow through the workbook to make it dramatically more useful. The old version can now be put out to pasture while the improved version really gallops along like the true stallion it is. His efforts have reduced the PDC analysts work load by several hours per request. He’s really a horse of a different color.
At Pizza Day, the reader was instructed to take careful note of the theme. I was selected, and I wonder if it was mostly because of the amusing nominations. At any rate, I received the Golden Slice Award:


It reads:
As a token of our appreciation, please accept this certificate for your outstanding performance and contribution. Your hard work and dedication to this company makes you a ambassador of what CPM stands for. Not only does your attitude make a positive impact on your peers, but it sets the tone for a pleasant and productive work place. Keep up the good work!
Along with the Golden Slice came a $50 gift card!

I appreciate the recognition, especially since the work out team does is quite well hidden, in databases and used in software. Thanks Andrew and Brian!

Friday, December 6, 2013

Happy Birthday to Me, From Me, Sorta

A few years ago, I worked at a company that uses SAS, and has a SAS server set up. I figured out that scheduling a SAS job was a bit clunky in Windows, so I mitigated the problem by setting up a SAS program run any tasks on a schedule, and then scheduling that task in Windows.

Since the program was evaluating dates and times to schedule tasks, I threw in a few happy birthday emails as a joke. A few years later, I woke up today to find this in my email inbox:
Chris,

Happy birthday! I hope you have a great day!

Sincerely,

The [Company Name] SAS Server
Well, I'm surprised that's still running! At least it wasn't sent from my old account on that server: they had at least updated who was running the job. But I'm a bit surprised they still let this go. Either they don't realize that the scheduling code contains the happy birthday emails, or they don't mind.

As a side note, the program also ran CheckLog, which reviews the SAS log output for issues, and it emailed the author about the status of the program. This was better than running CheckLog within a program, since the program could crash before it even got to the end, resulting in no status update when it was the most critical.

At any rate, it's good to  know what I wrote is still useful, even if it contains a bit of questionable code!

Tuesday, November 12, 2013

What is a Data Scientist?


Today on Quora, someone asked, "What are some software and skills that every Data Scientist should know?". I wrote the following as a response, reflecting on my current position and the role I play.



I started adding post-it notes with sub-titles to my name/title tag on my cube, as sort of a joke regarding the question, "What is a Data Scientist?".

Here's the current list:
  • [Client] Analyst
  • [Product A] Analyst
  • Financial Analyst
  • Sales Analyst
  • Contract Analyst
  • Quality Assurance Analyst
  • Call Center Analyst
  • Data Surgeon (aka, data mining with the intent to figure out what's wrong)
  • Data Diagnostician (alternative of above, maybe with no details to examine)
  • [Product B] Analyst
  • Database Developer
  • Bug Finder (as in software bugs)
So it would appear from this list that there isn't a lot of data science going on. And that's partially true.

Each of our clients has its own relational database, so we do "meta-queries" to access them one by one in order to answer a question. That's sort of data science like. Eventually, though, we're going to have one master database with all clients that will cascade into individual databases. So our "meta-queries" will be obsolete.

We deal with a lot of "big data" too, but it's usually not that big of a deal. Even with relational databases, it's okay. Some queries may take a little longer (30-60 minutes), but that's rare. We have some machine learning tasks that pull in massive training data sets, so at that point you have to be more careful about "big data" problems like running out of RAM or disk space. But it can be handled, and rather simply.

What I really wish I could do more of is machine learning, and while I've accumulated several ideas that would enhance products or help us make better decisions in the year I've been a Data Scientist, these other tasks take up most of my day.

In the end, I write a lot of SQL, use the Linux command line moderately, and report on data in Excel spreadsheets. I use Python occasionally to write scripts. And I'm always learning something new (new SQL techniques, Python libraries, Linux command line tools, etc.).

Friday, August 23, 2013

Redundant SQL

Today I wrote some SQL that, when spoke, sounded like "select client from client as client", written:

select  (select client from client) as client ...

Then I thought, could I actually write something even more ridiculous? What about "select select as as from from", and so I came up with:

create table "from" as select 'select' as "select" from dummy;
select "select" as "as" from "from";


The result is a one-cell table:

as
------
select

The table "dummy" is an empty table, used for "selecting" from something not actually in any table. The double quotes make the SQL execute even though it is using special keywords.

I tried adding a "group by group" and an "order by order", but that didn't work as I would have thought. I guess I can take this silliness only so far.

Wednesday, December 12, 2012

An Amended Quote

Today on The Writer's Almanac, Garrison Keillor read a quote by Gustave Flaubert:
"I spent the morning putting in a comma and the afternoon removing it."
I thought this could use some amending for programmers:
I spent the morning putting in a parenthesis and the afternoon removing it.
Or for you SAS programmers:
I spent the morning putting in a semicolon and the afternoon removing it.
How about SQL:
I spent the morning putting in a column and the afternoon removing it.
Or if you write HTML:
I spent the morning putting in an escaped ampersand and the afternoon removing it.
Why not Python:
I spent the morning importing a library and the afternoon removing it.
Essentially, though, these all boil down to:
I spent the morning putting in (an) arbitrary character(s) and the afternoon removing it.
For all you programmers during this holiday season: May your parentheses be matched (your quotes too!), special characters escaped, and code executable on the first run.

Tuesday, June 19, 2012

An Attempt to Answer a Quiz Question

Kyra heard the NPR Weekend Edition Sunday puzzle on the radio the other day: "Think of a common French word that everyone knows. Add a 'v' (as in 'violin') to the beginning and an 'e' at the end. The result will be the English-language equivalent of the French word. What is it?"

I thought, well, I don't know French, but I do know how to write a Python program that can look up the answer. Unfortunately, the puzzle appears to be a bit of a trick. I thought as much as I was writing the code. I was thinking, "I bet some people are going to be mad about the answer, because the question was worded in such a way as to be tricky."

At any rate, the code definitely does not result in the right answer, but it was a good exercise for me. First, I had to find two dictionaries robust enough to have a lot of words in English and French. Then I had to find dictionaries: I located the Debian operating system dictionary on my local computer, did a search in the package manager Synaptic for the French equivalent and any other English dictionaries that might help, and downloaded both. (The English alternative is labeled "insane" for its size, which "possibly contains invalid words (as well as words that are very uncommon)." [1])

Next I had to convert certain French characters into their English equivalent. To answer the question, I looked up all English words that start with "V" and end with "E", then removed those two letters, looking up the "word" in the modified French dictionary. It didn't work, as can be told from its output:

a
a
ah
aire
alu
an
ange
ares
as
er
erg
es
es
il
o
t

Yep, those are definitely not the answers. Some, when you add V and E back, aren't  even really English words. "Vte"? What is that? Oh, and I think A is listed twice due to the missing diacritics.

For anyone who's interested, I posted the code online. (It's not pretty posting a lot of code on Blogger, so here it is in a document.) Keep in mind I'm a new programmer, so I might not have done this task very elegantly. It is a short piece of code, though, and it could have worked.

One other note: If you attempt to run it, it may not work on your system. It's designed for Debian GNU/Linux, as it relies on dictionaries in a Debian system and it uses the "/" as the directory delimiter. Additionally, the "insane" dictionary makes it run a bit slow, and I did nothing in the code to help with that, like buffering the file, so you could run out of RAM or peak the CPU. It works on my system, which is all that mattered to me at the time.

Of course, a more robust program should be more careful and actually take user input in some fashion. Perhaps look up words that with other characters or use different languages. As it is, it's more of a "script" that does one thing and non-interactively. In any case, it doesn't even return the "right" answer!

[1] http://packages.debian.org/squeeze/wamerican-insane

Friday, March 18, 2011

Wednesday, December 9, 2009

Snow Day

If you're living in Wisconsin, you know that today, December 9th, is a snow day. It has snowed over 14 inches in the past day, schools are canceled, and even business days have been canceled. My family stayed home today.

For a very short time, we went outside. My son, Luca has been quite entranced by the snow, staring out the window without any attention for anything else. When we went out, it was a bit difficult for him to move around with all of the winter cloths and all the snow. I thought it would be funny to stick him in the snow drift and take a picture. My wife, Kyra, said the tree near our home would be perfect for the scene:


Luca tried to crawl out of his snow trap... He ended up going face first into the snow right after this shot. We went inside right after that!


We were quite bored inside all morning, so after we came back inside, Kyra suggested that Luca and I play with some shaving cream. I guess he's done this at preschool before, and it sounded like a fun activity to keep him occupied. I spread shaving cream on the dining room table and he went to town. I thought it was quite amusing, so I spread some shaving cream in his hair. When I did that he smeared it all over his face...


We hope the snow will clear up soon, so we can get back to work and our normal lives! Stay safe everyone!

Saturday, June 20, 2009

HEDIS 2009 Complete

We just completed HEDIS 2009!

For those of you who don't know what HEDIS is, the acronym stands for Health Plan Employer Data and Information Set. In order to obtain accreditation from the National Committee for Quality Assurance, health plans must analyze their health care data to generate percentages related to the quality of care provided by the health care providers. The data is used to compare health plans and provide information about where health care can be improved, for the health plans specifically and for our nation in general.

An easy is example of a HEDIS measure is the percent of pregnant women who obtain the recommended number of prenatal visits before giving birth. This percent is part of the FPC measure (Frequency of Ongoing Prenatal Care). Another example is the percent of children who obtain the recommended vaccinations at specific times during their development. This comprises the CIS measure (Childhood Immunization Status). More complex measures, such as CDC or the set of RRU measures, measure the quality of care for diabetics or the cost of care for specific disorders across the health plan (respectively).

Toward the end of HEDIS, I invented a couple of new words related to the process:
  • HEDISache - A headache brought on by working on HEDIS.
  • THEDIS - Pronounced tuh-he-dis. Alternatively, THEDIouS, pronounced tuh-he-di-ous. - An adjective describing what it's like to review HEDIS data: tedious.
  • HEDIlunch - Lunch with other people who worked on HEDIS, usually after successful completion.
I also see a car with the license plate "PBH" on my way home from work just about every day. It reminds me of the measure, "Persistence of Beta-blocker Treatment After a Heart Attack." Each measure has a three-letter acronym, and this one is abbreviated PBH. My wife rolls her eyes whenever I recite the name after seeing the license plate. I guess I"ll remember that one for a while!

Update: I noted the wrong pregnancy measure, PPC, instead of FPC. It is now correct.

Monday, April 20, 2009

Proc SQL

Today at work, the following conversation took place:

Me: A watched proc SQL never quits.
Supervisor: Or worse, generates errors!

(Note: Proc SQL is procedure for using SQL in SAS.)

Friday, April 10, 2009

Are You Sure - SAS Code

Update on May 20, 2009: Users may wish to add "memtype=data" option to the proc datasets statement to drop only SAS tables (see below). I believe the proc datasets procedure will delete formats and possibly other types of data.

Today I wrote a macro program in SAS to delete all of the contents of a specified library. I programmed a pop-up window to ask the user if they really want to delete everything. Here's the code:

%macro DeleteLib(lib);

%let rusure=N;

/* Pop up a window to ask a question */
%window surewin
#1 @20 "DELETING ALL TABLES!"
#3 @20 "ALL TABLES WILL BE DELETED FROM &lib"
// @20 "Are you sure you would like to delete all tables from &lib?"
@81 rusure 1 attr=rev_video required=yes " (Y/N)"
// @20 "HIT THE ENTER KEY TO CONTINUE"
%display surewin delete;

%put rusure=&rusure;

/* Delete all tables if Yes */
%if &rusure=Y %then %do;

data dummy;
run;

proc datasets library=&lib memtype=data;
save dummy;
quit;

proc sql;
drop table &lib..dummy;
quit;

%put NOTE: All tables have been deleted from &lib.;

%end;

/* Put a comment if No */
%if &rusure=N %then %do;

%put NOTE: No tables have been deleted.;

%end;

%mend DeleteLib;


The first and last line are the beginning and end of the macro program. The second line sets the variable "rusure" (that is, "Are you sure?") to "N" for "No" by default. The next block creates the window and pops it up. In the window the user can specify "Y" or "N" to specify whether to delete the library (think of it as a folder or directory with SAS datasets in it). (The code uses a macro variable "&lib" to insert the name of the library.) If "Y", then the code creates a dummy dataset with nothing in it, runs a program that keeps only the dummy dataset and delete everything else, then it drops the dummy dataset and puts a note in the log. If "N", then it just puts a note in the log.

At first I thought of putting another set of code in there as a double-check: An additional window asking "Are you REALLY sure you want to delete the library?" then running another Y/N if statement. But then I thought that might be a little annoying to have to deal with so many windows.

It would have been a funny April Fool's joke to insert a series of windows into someone's program asking, "Do you want to run this program?", "Are you sure you want to run this program?", "Are you REALLY sure?", "REALLY, REALLY sure?", "Wouldn't you rather run another program?". The user would have to keep hitting Y or N over and over again to get it to work. It would be easy to insert a small line of code referencing another piece of code using a %include statement (for example, %include "c:\AprilFools\rusure.sas";). A trickster could even hide the code after a line of spaces far to the right of the window where no one would find it.

If anyone tries that, let me know what happens!

Monday, March 30, 2009

Funny Quote from Former Job

A while ago I found this odd quote from a research paper. Here's the quote (emphasis added):
Online courses provide scheduling flexibility to students facing scheduling conflicts. Also, they afford opportunities to at-risk students, elite athletes and performers, dropouts, migrant youth, pregnant or incarcerated students, and students who are homebound due to illness or injury or homeschooled, allowing them to study outside the classroom. (Watson, 2007)
Why on earth would a someone write a sentence linking pregnant and incarcerated students? I realize it says "or," but it's still just a bit strange to grammatically combine these two types of students. There are other students listed, so why not separate them? Is there something similar about being pregnant and incarcerated?