September 1st, 2008
So I was trying to do my civic duty and investigating our presidential candidates, and I found out about this web site that Obama sponsored. It’s pretty interesting, but it’s hard to get your head around numbers that are in billions. McDonald’s hamburgers or contracting dollars, the numbers just seem so large as to be meaningless.
One death is a tragedy; a million is a statistic.
–Joseph Stalin
Posted in life | No Comments »
August 4th, 2008
So, a few years ago I entered an idea contest here in South Carolina and get runner-up with my idea for a construction equipment theme park. Finally, someone else did it so I can take it off my list. Whew!
Posted in life | No Comments »
July 2nd, 2008
I was browsing around this morning (which is unusual for me) and I came across the IBM Many Eyes web site. It lets you upload data and visualize it using a lot of interesting chart types (bubble charts, clouds, etc.) Just to play around with it, I plugged in poker starting hands’ expected value data from TightPoker.com and after a little tweaking I came up with this visualization:
Click on the starting position in the left column and you’ll see how the various starting hands stack up. The difference between values in the big blind and the dealer position is, as expected, huge. It’s clear how huge when you can look at the data this way.
Posted in poker, interesting | No Comments »
June 23rd, 2008
Wow, I’m a terrible blogger. I think that the problem is that I’m always busy doing stuff so I never have time to write about doing stuff. I spent the weekend in Raleigh, NC playing free poker tournaments (made two final tables, woo hoo!) and helping my friend load a UHaul. I’m soooo sore today, but I had a blast. Sometimes it’s nice to get far away from your everyday routine to get some perspective. Today I have a boatload of perspective, along with some scrapes and really sore muscles.
Another weird thing happened this weekend, but just explaining how weird it was would take too long. Maybe next month 
Posted in life | No Comments »
May 23rd, 2008
This video is hilarious. I’m pretty sure it’s a made-up product, but not 100%, which is why it is so damn funny:
http://www.youtube.com/watch?v=iVGPDKcRdKg
Posted in funny, life | No Comments »
May 22nd, 2008
I just submitted my final version of Serendipity to this development contest sponsored by Truveo and run by TopCoder. Check out my application here:
http://smeans.com/truveo
It’s basically a video search tool that takes the results of one search, finds “interesting” words in the descriptions of the matching videos and searches some more. Check it out!
Posted in coding | No Comments »
May 8th, 2008
I was really starting to get irked at Apple because it seems like they want me to pay $1.00 (ok, $.99) every time I want to turn one of my songs into a ringtone. I’ve already paid for these songs once and now every time I want to play 18 seconds of it I have to pay another $1? Crazy.
This guy is a genius. I just tried this Make Free Ringtones tutorial and it worked like a champ. Go Ed Zachary!
Posted in iPhone | No Comments »
May 6th, 2008
At least the shared stuff is. I’ve spent at least four hours today trying to get my SQL 2005 database configured on their server. Since they don’t allow remote access through SQL Server Management Studio, I’ve been forced to use their not-so-powerful web-based administration tool. Compounding that is the fact that I used to have references between two different databases on my local server that I now need to merge into a single monolithic database, I’m not a happy camper.
As part of this process I’ve had to populate a bunch of tables with application-specific values. After wrestling with the crappy CSV import function that GoDaddy gave me I decided to write my own little tool to generate SQL INSERT statements for the data in my tables. Since WordPress won’t let me upload it, here’s the code:
/*
* Created by SharpDevelop.
* User: smeans
* Date: 5/6/2008
* Time: 11:58 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.IO;
namespace sql2insert
{
class sql2insert
{
public static void Main(string[] args)
{
foreach (string dsn in args) {
Console.WriteLine("writing files to " + System.Environment.CurrentDirectory);
using (SqlConnection cn = new SqlConnection(args[0])) {
cn.Open();
DataTable dt = cn.GetSchema("Tables");
foreach (DataRow row in dt.Rows) {
for (int i = 0; i < dt.Columns.Count; i++) {
if (((string)row[3]).Equals("BASE TABLE")) {
dumpTable(cn, (string)row[2]);
}
}
}
}
}
}
static void dumpTable(SqlConnection cn, string tableName) {
SqlCommand cmd = new SqlCommand(String.Format("SELECT * FROM [{0}]", tableName), cn);
SqlDataReader sdr = cmd.ExecuteReader();
if (sdr.HasRows) {
Console.WriteLine("writing data for table " + tableName);
using (TextWriter tw = new StreamWriter(String.Format("{0}.sql", tableName))) {
tw.WriteLine(String.Format("SET IDENTITY_INSERT [{0}] ON", tableName));
tw.WriteLine("GO\r\n");
StringBuilder sbCols = new StringBuilder();
for (int i = 0; i < sdr.FieldCount; i++) {
switch (sdr.GetFieldType(i).ToString()) {
case "System.Byte[]": {
} break;
default: {
if (sbCols.Length > 0) {
sbCols.Append(", ");
}
sbCols.Append(String.Format("[{0}]", sdr.GetName(i)));
} break;
}
}
tw.WriteLine();
while (sdr.Read()) {
tw.Write(String.Format("INSERT INTO [{0}] ({1}) VALUES (", tableName, sbCols.ToString()));
for (int i = 0; i < sdr.FieldCount; i++) {
if (sdr.IsDBNull(i)) {
if (i > 0) {
tw.Write(',');
}
tw.Write("null");
} else {
switch (sdr.GetFieldType(i).ToString()) {
case "System.Int32": {
if (i > 0) {
tw.Write(',');
}
tw.Write(sdr[i].ToString());
} break;
case "System.Decimal": {
if (i > 0) {
tw.Write(',');
}
tw.Write(sdr[i].ToString());
} break;
case "System.Byte[]": {
} break;
case "System.DateTime": {
if (i > 0) {
tw.Write(',');
}
tw.Write(String.Format("'{0}'", ((DateTime)sdr[i]).ToString("M/d/yyyy h:m:s tt")));
} break;
default: {
if (i > 0) {
tw.Write(',');
}
tw.Write(String.Format("'{0}'", sdr[i].ToString().Replace("\'", "\'\'")));
} break;
}
}
}
tw.WriteLine(")\r\nGO");
}
tw.WriteLine(String.Format("SET IDENTITY_INSERT [{0}] OFF", tableName));
tw.WriteLine("GO\r\n");
tw.Close();
}
}
sdr.Close();
}
}
}
Posted in sql, .Net, coding | No Comments »
May 2nd, 2008
My daughter never speaks. Most weeks I spend two or three hours total driving her around in my car, and she never speaks, she just looks out the window. I often wonder what she’s thinking about, and today when I got the school newsletter I saw this poem she wrote:
Memories
Selene Means
Team 73
I am a piece of paper;
clean and blank,
now written all over
by others.
Words written in sharpie;
written in ink.
Staying there.
Forever.
Everything is written.
Everything.
Praises.
Compliments.
.Kindness.
Lies.
Hatefulness.
Misery.
Anger.
Sometimes it seems,
just seems,
kindness is outnumbered
by hurt.
But still,
I am a piece of a paper.
A home to these words.
Written in sharpie.
Staying with me.
Forever.
In memories.
It makes my heart ache, because I can’t give her any of my experiences, just watch her form her own. And hope.
Posted in life, kids | No Comments »
April 28th, 2008
|
Ok, so maybe not, but I can dream, can’t I? After watching the Smoky Mountain Shootout nine ball tournament this weekend, it’s more obvious than ever that I’m probably not cut out to be a top-flight billiards pro. But now that I have the table set up at home, maybe Skyler can be. I’m trying not to push him too hard, but then again, if it worked for Tiger Woods, maybe it’ll work for Skyler… |
Posted in pool | No Comments »