Friday, December 29, 2006

Book Review: The 22 Immutable Laws of Marketing


This book is on Joel's reading list and was occupying space on Pat's bookshelf so I decided to steal...errrr...borrow it for the week. Working for a company that is heavily driven by marketing, it's important for me to learn as much as possible on the topic. This is the second book I have recently read on marketing. The first was “The Purple Cow” written by Seth Godin. I found both books very good and hard to put down. This book is a little more outdated in terms of the examples that it provides, but is nonetheless a great book. As I was reading the first few chapters, I had the urge to argue in my head the validity of the laws. But after reading the entire book I understand now understand each law and I would argue that each one is indeed immutable.

2007 Goals

The end of 2006 is only days away and I've done a good job accomplishing many of my 2006 goals. Looking back, I'm very pleased but some goals were rather unrealistic, some were just not easily measured. So this year's goals are going to be more measurable. I have also broken out my personal goals and my work goals. My work goals are posted on the door to my office.

My personal goals are as follows:

1. Read for at least 30 mins every day.

2. Run the Draper Mile in under 6 mins.

3. Run a 5K.

4. Do abs three times per week.

5. Bench press 250 lbs.

6. Spend at least 30 mins cleaning the house every day.

7. Try to force myself and my kids to eat at least 1 vegetable every day.

8. Get my weight to 175 pounds.

One of my work goals is to work at least 60 hours every week. Looking back over the last year, I've averaged 51 hours per week. That's just not good enough. So I've laid out a plan to workout less, work more from home and on weekends, and sleep less. If I stick to the plan I shouldn't have any trouble fitting in an extra 9 hours. And since football season is over there is really no reason to even have a TV, so no more TV for me either.

Hopefully all of this will still leave me plenty of time to spend with the kids and most importantly, Velvet. ;)

Sunday, December 24, 2006

Bench Press Results

Friday was the last day of my 12 week workout. I can't believe I started that workout in September. The end result is that I was able to complete each workout successfully, except for the last week. The last week I benched 205 pounds 2 times on the first set, which would put my max at 217 pounds. Seventeen pounds over my goal for the year. 225 is still my nemesis...I'm taking a week off but I'm determined to get it in 2007!

Friday, December 22, 2006

Book Review: User Interface Design for Programmers


The book is written by Joel Spolsky (www.joelonsoftware.com) who provides an entertaining look at user interface design from a programmer’s perspective. Joel is good at seeing things from both a non-technical and technical perspective. He provides some great guidelines in this book, which for the most part I agree with 100%. The book could be updated to reflect a lot of the changes that have occurred over the last few years in the area of web development. The non-web parts of the book are excellent though, and I would recommend this book to anyone who builds user interfaces. The book stays focused on usability and not “use this color and this font” type of issues. The book is not for designers, it’s for programmers, but even designers could learn a thing or two from reading this book.

My two favorite quotes from the book are:

“A user interface is well designed when the program behaves exactly how the user thought it would.”

and

“Usability is not everything. If usability engineers designed a nightclub, it would be clean, quiet, brightly lit, with lots of places to sit down, plenty of bartenders, menus written in 18-point font sans serif, and easy-to-find bathrooms. But nobody would be there. They would all be down the street at Coyote Ugly pouring beer on each other.”

Thursday, December 14, 2006

Book Review: First, Break All The Rules


This book was recommended by Pat and it is based on an in-depth study of over 80,000 managers. The book's title says it all, the world's best managers are not afraid to break every rule held sacred by conventional wisdom. This book is one I would recommend to anyone who is in a management position. As I was reading this book I jotted down several notes and the page numbers for reference. I plan on going back through these notes and making a detailed summary of this book so that I can refer back to it often.

If I had to summarize the book with a picture, I would steal the one from Appendix A, which is summarized in text as:

  • Identify the strengths of every employee

  • Based on these strengths, find the right fit for each employee

  • The right people in the right roles with the right managers drive employee engagement

  • Engaged employees drive customer loyalty

  • Loyal customers drive sustainable growth

  • Sustainable growth drives real profit increase

  • Real profit increase drives stock increase

I strongly encourage everyone to read this book, even if you don't manage people.

Wednesday, November 29, 2006

Book Review: How to Win Friends & Influence People


I’ve decided to make a concerted effort to read more, so last week I started reading the book “How to Win Friends & Influence People” by Dale Carnegie. The book has sold over 15,000,000 copies since being published in 1937. The book was written after teaching over twenty years worth of educational courses on the topic in New York City. The book is divided into four parts, each part ending with a set of principles that Carnegie suggests are the keys to remember when dealing with people. The four parts of the book are:


  1. Fundamental Techniques in Handling People
  2. Six Ways to Make People Like You
  3. How to Win People to Your Way of Thinking
  4. Be a Leader: How to Change People without Giving Offense or Arousing Resentment

Each principle is examined by looking at real life examples either from famous personalities such as Abraham Lincoln and Charles Schwab, to everyday people who he taught in his courses. Carnegie gives examples from business, teaching, parenting, and many other avenues to show that his principles apply to every part of your life. Carnegie gives just enough information about each principle to make his point, but doesn’t bore the reader by repeating the same thing over and over. Carnegie suggests that each chapter should be read twice and I agree.

I was so impressed by this book that I made a cheat sheet with every principle and formatted it onto a single piece of paper. I plan on referencing this cheat sheet on a daily basis so that the ideas will stay fresh in my memory.

Truncating MySQL Log Files

Often I want to have MySQL logging turned on so that when there are problems I can quickly tail the log file to see what is causing the problem. The problem with leaving MySQL logging on for an extended period of time is that the log files can get big quickly. So I usually leave logging turned off and only turn it on when needed. Which works fine, but in order to turn off or on MySQL logging you have to restart the server. This is not ideal in most cases because a restart means that any clients trying to connect during the process of restarting will get an error.

Typical log rotation scripts won't work because when the file is rotated the MySQL server won't recreate the file or log to a new file even if you create it by hand.

Last week I thought of a solution that seems to be working well. I realized that I could leave logging turned on but have a nightly script that simply truncated the file with this command:

echo '' > /var/log/mysql.log

This will reduce the size of the file to zero bytes and at the same time MySQL will continue to log to the file without requiring a restart.

But this method doesn't allow you to actually rotate the log file in case you wanted to keep it around. So after researching a bit, I found this:

shell> mv host_name.log host_name-old.log
shell> mysqladmin flush-logs
shell> cp host_name-old.log backup-directory
shell> rm host_name-old.log
This would allow you to do an actual log rotation instead of just deleting the old file.

If you installed from RPM there is a log rotate script provided, and details can be found here:

http://dev.mysql.com/doc/refman/4.1/en/log-file-maintenance.html

Friday, November 17, 2006

Softball Season

On Tuesday we played our final softball game of the season. We lost 6-4 in the first game of the playoffs. We finished the season 1-11. Our co-ed league has three division: A, B, and C. We joined the B league (A is for the best skilled teams, C is the worse skilled teams) by a majority vote from our team members. This was the first year we have joined a softball league, and the first time I have coached a softball team. We had a number of players on our team that had no softball experience at all, so needless to say we had a lot to learn. I certainly learned a lot about coaching and since hindsight is 20/20 here is a list of things I would do differently or keep the same next year.

Changes for next year:

  • Join the C league. We had absolutely no chance of beating some of the better teams in the B league. There were 2 teams in particular that were way better than us. There were 2 teams I thought we could beat, and 2 teams that were slightly better than us. But if I had to do it over again, I would join the C league, nobody likes to lose every game.

  • Buy equipment not uniforms. We pooled our money to buy everyone a cool looking, tight fiting, uncomfortable shirt for the season. They had a really great design with our number and nickname on the back. They were extra expensive because of the lettering and the company that made the shirts made them too small and they felt as if they were on backwards when you wore them. Funny stuff, but I think our money would have been better spent on a couple of good bats. I don't think anyone on our team realizes how a good bat can make all of the difference in the world. I'm sure our team average would have been better if we had a few good bats. I do appreciate all of the hard work that Manny, Cameron, and Velvet put into those cool shirts.

  • Better batting instructions. I spent so much time each practice going over fielding, relays, defense, etc that we never had much time to break down each persons swing and go into details on how to become a better hitter. We had so much work to do fielding wise that I never felt that batting would matter that much, and it probably didn't, but in those few close games that we lost an extra run or two would of put us over the top.

  • Walk. The real difference between the good teams and the bad teams is that good teams don't swing at bad pitches. Good teams generate a lot of walks. I never drilled this point home enough. The best teams beat us by 10 or more runs each time we played them, but they didn't hit 20 home runs. They hit one or two home runs, but the bases were usually loaded when they hit those homers. They know how to take a lot of pitches, get base on balls, and not strikeout. It's a lot harder than it sounds and it takes practice. When you get a strike your natural instinct is to swing at the next pitch no matter where it's at because you don't want to strikeout. But the better hitters know how to identify a ball and not swing, even if they already have a strike.

  • Don't keep statistics. Who cares anyway? Let's focus on wins, not stats.

  • We need more females. League rules require that half of the team on the field is female, half is male. We barely had enough females each game and it made substitutions really hard. I wish I had more options so that I could put in a pinch hitter or move people around in the field. I'm proud of the girls we had, they played hard and gave 100%, I just wish we had more of them.

Things we did right:

  • Practice. Our team was pretty dedicated when it came to practicing. I'm proud of them for working so hard, we came a long way from the first practice to the last game. Heck, we even skipped the first game because we had a scheduled practice. :)

  • Cut-Offs. There are two points I worked on over and over in practice and the first one was hitting your cut-off. From the first game to the last game we did an excellent job of knowing where to be and who to throw the ball to when we had it.

  • Backing Up. The second point I worked on over and over was backing up the cut-off. We did this better than any team in the league, I have no doubt about this.

  • Base running. I thought for a first year team we did an excellent job running the bases.

  • Communication. On defense we did a great job of yelling out where to throw the ball, and when we were base running we did a great job helping the runners along. I've seen teams do this terribly and for a first year team we did a great job.

  • PK's. Thank goodness for a cold beer, hot pizza, and the camaraderie of friends after each game.

Looking at our defense:

  • Outfield. It didn't take long for me to realize that our fastest players needed to be in the outfield. The majority of the hits go to the outfield and there is a lot of territory to cover. I thought after the first few games we got it right and were doing a great job out there. Brian probably had more outfield assists than anyone else in the league and gets my vote for team MVP.

  • Pitching. Mike was our only pitcher the entire season. It's way harder than it looks and he did a great job. It took about half the season before I realized he was gripping the ball wrong resulting in too many walks, but overall he did a great job. I still don't know who I would of put at pitcher if he wasn't there every game.

  • Catcher. Beth was a trooper and probably our most improved player from the beginning of the year to the end. That first few games the umpire did more catching than she did, but by the end of the year she was doing awesome. It's a tough gig back there and she never once complained.

  • Shortstop. Becky was by far the best female shortstop in our league

  • Second base. I'll never forget Marisa missing that one throw and it hitting the dude right in the, ugh, well, “private parts”. Awesome stuff, no way was I putting anyone else at second base after that gold-glove play. :)

  • First base, third base. I had a lot of options to choose from at these positions. I'm sorry I couldn't get everyone all of the playing team they wanted. It's hard to plan out substitutions when you only get to play 4 or 5 innings. I think everyone who played did a great job, we just needed more innings so that everyone could get more playing time.

Overall we came a long way from that first game to our last game. I'm proud of our team. We played together, never argued, never gave up, and were always encouraging each other. Thanks for a great year and I can't wait to kick some (C league) butt next season. :)

The New Blogger

When I logged into blogger today I was asked if I wanted to upgrade to the new version. I have read that the new version was built on Google's well known architecture so I decided to go ahead and upgrade. I wanted to check out any new features they may have added as well. I guess my blog is somewhat large because after waiting a few minutes for the upgrade to complete, I got a message saying that they would send me an email when they finished the upgrade process. One interesting note is that before I was allowed to upgrade I had to supply a valid GMail account to use for future logins...hmmm.

After 20 mins or so I finally got the email and was able to login to the beta of blogger. I love the new spell checker and the improved speed. Seems like there are a few bugs with "Delete Post" and the preview pane, but overall it seems pretty stable. The speed at which blogs are posted is very fast so I'm sure they worked primarily on speed and scaling in this version.

gunzip, grep, sed, awk, sort, and mail

These are by far my favorite UNIX commands. I use most of them on a daily basis. Let's go through a simple problem to help understand how to use each tool.

Let's say that your UNIX server is configured to rotate your email logs nightly. After the log rotation you want to setup a script that will give a quick summary of the top email recipients on your server.

Here is some example output from the log:

[root@server1 root]# tail -n 40 /var/log/maillog

Nov 17 09:40:28 server1 postfix/qmgr[31224]: E602E44C002: removed
Nov 17 09:40:35 server1 postfix/pickup[6300]: DDD6C44C002: uid=0 from=
Nov 17 09:40:35 server1 postfix/cleanup[6045]: DDD6C44C002: message-id=<20061117144035.ddd6c44c002@server1>
Nov 17 09:40:35 server1 postfix/qmgr[31224]: DDD6C44C002: from=, size=805, nrcpt=2 (queue active)
Nov 17 09:40:36 server1 postfix/smtp[6060]: DDD6C44C002: to=johnsmith@webmail.us relay=192.168.127.1[192.168.127.1], delay=1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as E091B44C17E)
...

The only line I'm interested in is the last line, so I can easily 'grep' for that data:

[root@server1 root]# grep "postfix/smtp" /var/log/maillog

Nov 17 09:22:33 server1 postfix/smtp[4077]: A63D444C002: to=johnsmith@webmail.us relay=192.168.127.1[192.168.127.1], delay=0, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as ABB8E44C188)
Nov 17 09:22:58 server1 postfix/smtp[4077]: AAD5244C002: to=jsmith@gmail.com relay=192.168.127.1[192.168.127.1], delay=0, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as ADF86C1DC)

...

That's great, but what I really need is only the email address part of that line, that's where 'awk' is very useful:

[root@server1 root]# grep "postfix/smtp" /var/log/maillog | awk '/.*/ {print $7}'

to=johnsmith@webmail.us
to=jsmith@gmail.com
to=johnsmith@webmail.us
to=vvv@webmail.us
...

Almost there, but I only need the part after the 'to=', here comes 'sed' to the rescue:

[root@server1 root]# grep "postfix/smtp" /var/log/maillog | awk '/.*/ {print $7}' | sed {s/to=//}

johnsmith@webmail.us
jsmith@gmail.com
johnsmith@webmail.us
...

Now, the tricky part, I want to group all of the duplicate lines together and get a count of the number of 'johnsmith@webmail.us' entries, luckily I stumbled upon this great awk script which helps me do this:

# histsort.awk -- compact a shell history file
# Arnold Robbins, arnold@gnu.ai.mit.edu, Public Domain
# May 1993
# Thanks to Byron Rakitzis for the general idea
{
if (data[$0]++ == 0)
lines[++count] = $0
}

END {
for (i = 1; i <= count; i++)
print data[lines[i]], lines[i]
}


[root@server1 root]# grep "postfix/smtp" /var/log/maillog | awk '/.*/ {print $7}' | sed {s/to=//} | awk -f history.awk

17 johnsmith@webmail.us
1 jsmith@gmail.com
16 vvv@webmail.us


Now it's easy to sort the list, numerically, in reverse order:

[root@server1 root]# grep "postfix/smtp" /var/log/maillog | awk '/.*/ {print $7}' | sed {s/to=//} | awk -f history.awk | sort -r -n

17 johnsmith@webmail.us
16 vvv@webmail.us
1 jsmith@gmail.com


And finally, let's email the results to myself:

[root@server1 root]# grep "postfix/smtp" /var/log/maillog | awk '/.*/ {print $7}' | sed {s/to=//} | awk -f history.awk | sort -r -n | mail -s "Daily Summary" jsmith@gmail.com

Oh, I almost forgot, I need to gunzip the nightly version an put it in cron:

[root@server1 root]# gunzip -c /var/log/maillog.1.gz | grep "postfix/smtp" | awk '/.*/ {print $7}' | sed {s/to=//} | awk -f history.awk | sort -r -n | mail -s "Daily Summary" jsmith@gmail.com

Combining all of these really simple tools allows you to create just about any type of report imaginable.

Thursday, November 09, 2006

Computer Science Majors

I had another opportunity to speak to a group of students at Virginia Tech on Monday. I was on a 5 member panel talking to freshman "General Engineering" majors about computer science. General engineering majors haven't yet chosen a specialty such as electrical engineering, computer engineering, etc. The purpose of the panel was to talk about the CS major. The students filled out a survey before the session about their current thoughts on the computer science major and if they were interested in the major. The majority, like 99%, were not interested in CS. The two major themes of the survey were:

1. Computer Science is boring
2. They didn't want to sit at a desk all day.

The other members of the panel represented IBM, Lockheed Martin, and Eastman Kodak. Although I really liked all of them, they all managed to crack me up at one point or another. They tried their hardest to explain that computer science wasn't boring and you don't spend all day coding (one guy said 30 minutes / day was the average). I didn't say it, because I wanted to get invited back, but if you need convincing that CS is a great major, please major in something besides CS.

The best computer scientist could spend all day in front of computer and love every minute. If my programmers only spent 30 mins a day programming I would be an unhappy person. I don't know what goes on at IBM, but at a small nimble company your programmers should be coding / debugging at least 6 hours a day. The other 4 hours are for the meetings, designing, etc. The point I'm trying to make is that you should have a passion for computers, you shouldn't need to be convinced or talked into the computer science major. Sure, I wish there were more CS majors, but on the other hand, people who aren't passionate about CS won't make good developers. And let's face it, that is what CS is all about. Despite how often some professor tells you that CS is more than programming, that's not the real world. CS is about programming, it's about writing great software, and writing it as quickly as possible, with as few defects as possible.

Wikipedia lists the following fields in computer science:

* 4 Fields of computer science
o 4.1 Mathematical foundations
o 4.2 Theory of computation
o 4.3 Algorithms and data structures
o 4.4 Programming languages and compilers
o 4.5 Concurrent, parallel, and distributed systems
o 4.6 Software engineering
o 4.7 Computer architecture
o 4.8 Communications
o 4.9 Databases
o 4.10 Artificial intelligence
o 4.11 Soft computing
o 4.12 Computer graphics
o 4.13 Scientific computing

11 of the 13 fields require programming. CS is about programming, don't let the recruiters fool you. That's why it's important to find a job where you are working on interesting projects that are actually going to be released.

If you want to find people who will be great at computer science, you need to start at the high school level. I'm convinced that students who take any type of programming class in high school have a huge advantage in college. If you want more females to major in CS, start teaching them CS at the high school level. This panel would of been great for high school students, not for college freshman.

Sunday, November 05, 2006

Running 101

Today was the first day of my running workout. Velvet pointed me to a 10 week beginner workout that I'm going to try:

Week Run Walk Repeat Total Time
1 1 min 2 min 7x 21 min
2 1 min 1 min 10x 20 min
3 2 min 1 min 7x 21 min
4 3 min 1 min 5x 20 min
5 4 min 1 min 4x 20 min
6 6 min 1 min 3x 21 min
7 9 min 1 min 2x 20 min
8 12 min 1 min Then run 7 min 20 min
9 15 min 1 min Then run 4 min 20 min
10 20 min
Leap for joy

20 min

Today was rather easy, but I can tell that I'm really out of shape when it comes to endurance. My goal here isn't to run marathons, I'm really just trying to become more fit. I don't think I've ever run more than 15 mins at a time, here goes nothing...

Webmail Mobile w/ Treo 600

I have a Treo 600 and the new Webmail Mobile works great, but one tip that took awhile for me to figure out is that there is a bug in the Treo 600 that prevents cookies from working.

The solution is to delete the cookie file. From the main application screen hit Menu->Delete scroll down until you see the entry "Web Cookies", highlight it and delete.

My Blog

Last night while hanging out with friends watching the VT game, Pat gave me some great feedback on my blog. Pat's feedback was:

1. He hates how my blog is on so many random topics.
2. He could care less about my bench press statistics and other personal topics.
3. The technical topics are often too technical.

I love user feedback. I have spent much of the last 24 hours debating in my mind what I should do differently. So I started thinking about my blogging over the last year, my favorite bloggers, and blogs I wish other people would write.

I like my blog because I find it a very convenient place to record information about my life. For instance, if I learn about a useful new UNIX command that I won't necessarily need everyday, but I might want to use it in the future, I put it on my blog so that I can easily google for it when I need it. I certainly could put this information on my desktop or on the network drive someplace, but I like the fact that Google will crawl my page and make it easy for me to find later. I also believe that other people will find the information useful and I've certainly had enough feedback over the last year to know that to be true.

I realize that some people don't like the mix of personal and work related posts. But my work is a huge part of my life and I like having a single place to record everything. I'm certain that the majority of my readership is either co-workers or family and I'm certain that they care about both work and personal topics. I think I would split my blog in two if I blogged about a very specific topic often. For example, if I decided to focus on a specific topic like MySQL and put myself out there as a MySQL expert I would certainly break that blog out into a new one.

But that's not what I'm trying to do, more times than not my goal is simply to record the information so that I can reference it at a later date.

I have several personal goals when it comes to weighlifting, but the main one revolves around bench pressing. I certainly don't blog about bench pressing because I'm bragging or I'm the biggest guy at the gym. I'm certainly proud of where I'm at and where I want to go, but I'm still a really small guy. I blog about it because it's an easy way for me to track my progress. It's also very motiviational because I know my co-workers are reading this blog and I will be less likely to quit if I'm trying to prove that I can reach the goals I set for myself.

My blog really only focuses on these topics:

1. Goals
2. Work
3. College Football
4. Hobbies
5. Family

I could definitely stop blogging about college football. It's my favorite sport and I love
talking about it, but I would hardly consider myself an expert. So from here forward, no more
college football posts.

I consider baseball, softball, and golf as my hobbies. I like blogging about them, again, to
track my progress and have some sort of history recorded.

I think I'll keep my blog the way it is, except I'm going to cut out talking about my favorite
sport. Thanks for the feedback Pat, it was good to hear and gave me a chance to reflect on
exactly why I blog. The cool thing about blogging is that it is super easy to "unsubscribe". ;)

This also gave me the oppurtunity to review the blogs I subscribe to and why I like reading those blogs. Here are my favorite blogs:

Joel on Software
----------------
Joel is always spot-on when it comes to software development. His blog is very focused and rarely drifts off topic. I think it's the type of blog that Pat would love to read because you gain
useful knowledge with each post. He rarely posts but when he does the article is usually gold.

Jeremy Zawodny
--------------
Jeremy's style is much like mine. He is all over the place and you usually have to filter out the topics that don't interest you. But overall it's a very entertaining blog and well worth following. Similar to how Pat doesn't care about my bench pressing, I really don't have any interest in hearing about Jeremy's flying hobby. I follow Jeremy's blog because he doesn't have any problem telling it how it is and calling out BS when he sees it. It's a good window into Yahoo! too.

Liz
---
Liz's blog is great because she's not afraid to blog about anything. She'll tell you exactly how she feels about a topic and you can really tell it's genuine and not faked. I only know Liz via her boyfriend Jesse, but by following her blog I feel like I know more about her than I do Jesse.

That's a pretty amazing statement considering I knew Jesse for four years in college. I like people who blog often enough that you get the feeling that you know them, even though you may have never even met.

I wish many of friends who blog more often. Here are the people I wish blogged more and why:

Velvet
------
I love Velvet's flickr site, you can really get a feel for her personality from her pictures. I
love her blog too, but I just wish she posted more frequently. She has accomplished so much with her running, weight loss, and raising two great kids that I feel she is holding back on us.

Pat
---
I'm guessing Pat would like to blog more often but probably has trouble find the time. I think Pat is the expert when it comes to email hosting and he should just lay it all out there. I also think many of our employees could learn a great deal about sales, marketing, and running a business from Pat and he could use his blog to help educate us all.

Mike
----
I'm sure Mike learns something new about web development everyday. I would love for him to start sharing this information with the rest of us. Teach us about prototype, javascript, php, browser bugs, etc. I consider Mike to be an expert at web development and I would love to see him become more widely recognized as such.

Bill
----
This cat knows more about spam, smtp, and infrastructure than anyone. Please share!!!


My Developers
-------------
I wish it was a requirement for all of my developers to blog daily. Give me a paragraph on what you accomplished today. What better way for me to stay on top of everything but at the same time stay out of your hair. :)

OK, this post is getting long, I'll stop now. But just for you Pat, I'll give you an update on my running in a bit... ;)

Friday, November 03, 2006

Velvet's Birthday

Velvet turns 29 again on Sunday, be sure to wish her a happy birthday!!!

Wednesday, November 01, 2006

Doctor Visit

One of my goals for this year was to visit the doctor and have a physical. Two weeks ago I finally made the appointment with a doctor that was new to me. I haven't had a physical in ten years. I thought this was really bad, but my new doctor says that's not too bad when you are young. I was told after this visit that I don't need another physical for 3 more years. Already I was very happy. So after several basic checks I had lab tests on my blood and urine. He said if everything was OK he would send me a letter in about 3 weeks with a detailed explanation of all the tests. If something was wrong he would give me a call.

Yesterday I received in the mail the letter he promised. (Luckily I never got the phone call.) Everything looks great including cholesterol. The only issue is that my "good" cholesterol levels are low. He recommends eating fish (not fried), nuts, vegetables and fruits. OK, no problem, I can handle a piece of fish every week, and we'll see if in 3 years I can get this number up a bit.

In just 56 days I turn the big 3-0. I'm not overly depressed or anything. But, this letter certainly cheered me up a bit. In my head it's a clear green light to continue eating what I've been eating for the last 10 years. :) For the most part I feel like I eat healthy, but I'm not the kind of guy that's going to turn down a slice of pizza or a basket of cheese fries if the opportunity presents itself. ;)

I also wanted to start running now that baseball and softball seasons are over. I need to do some cardiovascular exercises so that I'm not completely worthless when basketball season rolls around. I'm also very inspired by Velvet and how fit she has become over the last year. So I asked my doctor if he saw any reason not to start running. His advice was to start slow and run on surfaces that were not hard on the knees. So this weekend I'm going to start running, hopefully with the help of Velvet. More on that later...

Monday, October 30, 2006

Hackathon Lessons



Pat mentioned on the Webmail blog that we have learned many valuable lessons since our first Hackathon. I thought I'd go into a bit more detail and tell you exactly what we have learned and why Hackathon III was our most successful Hackathon yet.

1. Pick projects that are small enough to complete in one day.

Developers believe they can accomplish the world in one day, so chances are they are going to pick projects that are just too big. They see a small task, assume it will take only a few hours, and they won't want to do it. If someone finishes a few hours early that is great, they can usually help in other areas.

2. Design before the Hackathon

In the weeks prior to the Hackathon we have found it valuable to design the project before the actual day of the Hackathon. It helps ensure that the project is small, but the main reason is that our graphic designer won't get overwhelmed with requests on the day of the Hackathon. Having the designs early is crucial to getting the coding finished in one day.

3. Don't upload the same day.

It's important to finish the project the same day as the Hackathon, but getting it uploaded on the same day isn't necessary. It causes too much pressure on quality assurance and nobody wants to fix bugs after working all day. It's nice to go out, have a nice dinner, and not have to worry about that last upload that might be causing issues. Don't skip on QA because you are trying to get everything finished the same day.

4. Limit the presentation time

Limiting the presentation time to three minutes certainly helped us get through all the projects in a reasonable time.

5. Order the pizza early

Don't wait until people start getting hungry to order the pizza. Velvet made sure this time around that the food was here at 12:00pm sharp.

Thursday, October 26, 2006

lighttpd

We've been testing out lighttpd for over two months now in a production environment. I'm very happy with the results thus far. The performance is slightly better than Apache, but the configuration is much simpler. It amazes me how big and complex Apache's httpd server has become and I was glad to see that lighttpd was so simple. The stability has been there too, so I think eventually all of my web servers will be running lighttpd instead of Apache.

If you haven't heard of or tried lighttpd yet I highly recommend it.

NCTC Fall Gala



Last night several of us from Webmail went to the NCTC Fall Gala in Roanoke. NCTC events are usually fun and entertaining and last night was no exception. The keynote speaker was very entertaining and there was even a surprise visit from Senator George Allen. Velvet was kind enough to get a picture of the group.

The keynote speaker was Jason Dorsey. His talk was focused on "an insider'’s perspective for business and community leaders seeking to retain and motivate Generation X and Y." I was glad to hear someone like Jason reinforcing many of the ideas and values that are already present at Webmail.us. I hope the other companies at the Gala learned something so that as a region we can attract more talent to this area.

Clemzon

Sometimes I'm wrong. I'm sure my avid readers are shocked by this statement....but even when I'm wrong, I'm still right. Case in point is my ability to predict the VT football record. At the beginning of the year I predicted a two loss season. I was just wrong about which two games we would lose. I predicted we would lose to Clemzon and Miami. I'm going to go out on a limb here and say I think we will beat both Clemzon and Miami. I just have a gut feeling that the Hokies can pull off a miracle tonight. Plus it's been two whole weeks since a Hokie football player was last thrown in jail, think about all of the additional film time that buys us. :)

Tuesday, October 17, 2006

College football made me sick this weekend...

Are you kidding me? What a turn of events in college football. First, the Hokies are much worse than I ever thought. This team lacks leadership, starting at the top (that's you Beamer).

Second, Miami's bench clearing brawl was one of the more disgusting events I've seen in awhile. I understand fighting, but come on, stomping on people when they are laying on the ground defenseless and swinging your helmet as a weapon is a bit over the line. I expected several Miami players (especially the dude who was stomping on people and then running away cowardly) to be kicked off the team. Well, guess what, that guy is the defensive captain, so let's just suspend him for one game. ARE YOU KIDDING ME? According to Miami's president Donna Shalala:

"I believe that the young men we have recruited for our football team are young men of great character," Shalala said. "But they did a very bad thing."

Ya think? Hmm, maybe the one game suspensions you handed out will teach them a lesson....maybe not. Donna, wake up, any player who was out there trying to maim or end the career of another player should be kicked off the team immediately. That would send the message. You have done nothing to dissuade these players from doing this again.

At least FIU got it right. They kicked two players off of the team and suspended 16 others indefinitely.

As for my Hokies, according to Frank Beamer "What we're going to do is work like heck to make people proud of how we play on the field and what we do off the field." Blah, blah, blah. We've heard this same song and dance for years now. So far this team has had 3 players arrested this year. Each receiving a one game suspension. Give me a break. Four personal fouls last week against BC makes me so proud to be a Hokie. :(

Careers in BIT Panel

I had the privilege today to be a panelist for the Pamplin College of Business "Careers in Business Information Technology Night" at Virginia Tech. Anytime I have the opportunity to meet students at Virginia Tech I take it, but honestly, I know nothing about "Careers in BIT", haha. But I'm glad Pat hooked me up with the opportunity because I enjoy going on campus and meeting new people. Gary Kinder is the Director of Undergraduate Career Services and he did a great job of moderating the event. Here were some of the questions and my answers:

1. What was the one thing that "sold you" on the field of information technology?

I knew going into college that computer science was the major for me because of the excellent computer related classes I took in high school. Our high school was small, but I had the opportunity to learn how to program from a really good teacher and I had no doubts this was what I wanted to do as a profession.

2. What's the two or three most helpful classes you had in college and why?

Any CS class was very helpful, but outside of CS I really enjoyed my two economics classes. Getting an "A" in econ was really exciting for me because there were a lot of business majors in my class who struggled. I guess I liked proving that I could handle more than programming.

3. When looking at applicants for positions within your company, what are the skill sets you find to be best suited for the positions?

I look for people who have two basic characteristics; they are smart and can get things done.

4. What types of things do you read, as far as professional journals, trade papers, industry material, etc.?

I follow the blogs of individuals from my industry that I believe are smart, on the cutting edge technology, and have similar jobs / goals as I do.


There were many other questions but those are the ones that stand out in my memory. A general theme of the night was how to decide on a career path. My advice was to do as much research as possible as early as possible. Co-op, intern, get a part-time job, talk to employers at career fairs, talk to graduating seniors, get a feel for the types of jobs that are available and how they line up with your interests.

The best part of the night was receiving a VT coffee mug as a gift for being on the panel!

Thanks again to Gary and Pat for the opportunity to participate! Gary, if you need help with the "Careers in Marketing" panel on Thursday just let me know. ;)

Monday, October 09, 2006

2006 Black Sox Team Picture


2006blacksox
Originally uploaded by kevin_minnick.

Our team picture has finally been published. I'm on the front row, third from the left ( or right ).

Other team members (back left to front right):

Ricky Smith, Adam Harber, Mike Mayo, Scott Minnick, Mannin Dodd, Zac Adelman, Brad Mullins, Paul Bielema, Sam Wood, Edwin Whitelaw, Me, Jason Ferritto, Tom King

Not Pictured:
Frank Bartin

Wednesday, October 04, 2006

Web Sox Win !!!

Last night we won our first softball game. Our softball team is composed of primarily Webmail.us employees and several of our close friends. Until last night we were yet to play a full game because our team is usually losing so bad that they call it early (known as the "run rule"). We came through last night though and won an exciting extra inning affair. Bill scored the winning run off of a nice hit by Brian Hartsock. It was a close play at the play but Bill was way too speedy and determined to get caught at home.

It was a true team effort and it felt like a thousand pounds were lifted off of our shoulders after that win. We are gaining confidence every week and are starting to gel as a team. I'm looking forward to our remaining games. So far this certainly has been a draining experience and it takes a lot to keep your head up after being killed game after game. But our team showed that we are not quitters and we can play in this league. Thanks to everyone who gave such a great effort, I'm looking forward to our next win and celebratory dinner at PK's.

Sunday, October 01, 2006

Black Sox: 2006 NRV MSBL Champions !!!!

It was a beautiful day for a baseball game. We won 15-7. I think everyone on our team is a bit shocked that we were able to rip through the playoffs and win the championship. This is the third year of the league and we have played for the championship twice. The first year there were only 4 teams, we won the first playoff game, lost the championship game. The second year the league had 6 teams and we lost in the first round. This year the league had 8 teams, and we won 3 straight games to take home the championship. After finishing the regular season in 5th place I don't think many of us believed we would be able to make it to the championship, much less win it. But, like most single elimination tournaments, anything can and will happen.

There were three key events that won today's game:

1. We scored 11 runs in the first inning, giving our pitcher tons of breathing room, after that we just had to play good defense and hang on.

2. We have played this team so many times we know how to play each batter defensively. Most importantly, after the butt kicking they handed us the last game of the year, we knew not to pitch to their fourth batter. He is an amazing hitter, it's better to just walk him and pitch to their other batters. This kid was the Babe Ruth of our league.

3. Ricky Smith. Ricky has been on our team all three years. He is a good player but had a really rough year at the plate. Ricky was put into the game in the 5th inning to play left field. In the 7th inning we were in a tight spot. The Warriors had managed to load the bases with two outs when Babe Ruth steps into the box. I was thinking to myself, let's just walk him (scoring a run) and pitch to the next guy. Our pitcher threw a pitch about 3 feet outside and Gerald (his real name) drives it deep to left field. I start yelling "Back! Back! You got room! Back! Back!". Ricky is running hard straight back. I'm sure he's thinking he will hit the fence at any point but snags it 2 feet in front of the wall. We all scream in excitement, understanding that Ricky just saved the game. If that ball isn't caught, 3 runs score and all of a sudden our win is in doubt. Our pitcher gave Ricky a big hug in the middle of the field as we trot off to the dugout.

I'm sure our team wasn't the best team in the league. We were probably the 4th best team talent-wise. But, the most talented team doesn't always win the big game. Our team is a good example of why we actually play the games. String together several hits, play good defense, and don't make mistakes and anything is possible.

Great job Black Sox! Just think, every time we take the field next year we take it as "Defending League Champions". ;)

Thursday, September 28, 2006

Bench Press

I'm stuck at 200 pounds. That was my original goal for this year, but I reached it so early in the year I feel like I should easily hit 225 by the end of the year. Hmm, so how do I get over this hump? Well, I did some Googling and found some good tips and a workout that I'm going to try:

1. Improved Form

I have a tendency to pick up my feet and let my elbows get away from my sides when the weight gets heavy. I'm going to try to correct these problems ASAP.

2. Squats

I haven't worked my legs all summer. I give the pitiful excuse that since I play baseball I don't need to do them, the reality is that I am a lazy fool when it comes to lifting legs. So today I did my first leg workout in months and I'm forcing myself to do squats. Now, how can doing leg exercises help your bench press? Well, it all comes back to the level of testosterone in your body. After reading this article I was sold and I'm going to force myself to do squats every week, no more excuses.

3. Start Over

I'm going to completely change my workout. I typically do

135 x 12
155 x 8
175 x 5
185 x 2
195 x 1

Starting next week I'm going to do this workout over a 12 week period:

Week Weight Sets Reps
1 135 3 6
2 145 3 6
3 155 3 6
4 165 3 3
5 175 3 3
6 185 3 3
7 155 3 6
8 165 3 6
9 175 3 6
10 185 3 3
11 195 3 3
12 205 3 3


This means that by Dec. 22nd I should be lifting 205 three times, which means I should be able to bench 225 one time easily (according to this chart, which seem correct). The above workout should be easy until week 6, I'm a little scared after that. :)

I'll be doing this the rest of the week:

Monday - Light Bench, Curls, Calves
Tuesday - Squats, Leg Extensions
Wednesday - Pull-Ups, Hamstring Curls, Shoulders
Thursday - Off
Friday - Bench, auxiliary Chest

I'm putting my faith in the workout, wish me luck.

Sunday, September 24, 2006

Rain Rain Go Away

Our championship game today was suspended in the 2nd inning due to rain. The good news is that we were winning 12-1 when it was called. The bad news is that there are 7 innings left to play....

My college football poll remains unchanged, but look out for Florida, they are really starting to impress me. They should fire their AD for scheduling Alabama, LSU, @Auburn, and Georgia consecutively. If they can make it through that stretch they will be #2 in my poll.

At the beginning of the year I picked Va Tech to beat Georgia Tech...boy was that stupid. I am looking forward to the game, but the Yellow Jackets have an above average defense and the best wide receiver in the country. Not to mention a quarterback that can scramble which is something the Hokies have always had a hard time stopping.

Andrew turns one year old this Thursday. His walking skills are really impressive. I enjoy watching him go from object to object and laughing at himself when he makes it without falling. We are going to have a birthday breakfast for him Saturday before we head over to the tailgate.

Thursday, September 21, 2006

VT Recruiting

It's recruiting season at Virginia Tech. I spent a few hours on Monday and Tuesday on the Virginia Tech campus hanging out with computer science students. On Monday through our membership in the Computer Science Resource Consortium at Virginia Tech I attended a luncheon for all of the CS majors who won scholarships over the last year. I'm not sure how I didn't know this, but it turns out the number of CS majors is dropping every year. And the percentage of CS majors that are women is dropping every year too (I actually knew this part). Women only account for 6% of all CS majors. I'm sure that means that in many CS classes you will be the only female in the class, not good.

On Tuesday, I had the opportunity (again via our membership in the CSRC) to join a panel that would attend a junior level CS class and answer questions from the students. It's funny how I remember doing this as a student back in 1999. Back then our class size was triple the size of the class I attended on Tuesday. It's pretty scary how few CS majors are out there and how huge the demand is going to be over the next few years.

The other members of the panel were from:
Vanguard (11,500 employees)
MITRE (6,000 employees)
Microsoft (61,000 employees)
Northrop Grumman (24,000 employees)
Lockheed Martin (135,000 employees)
SWIFT (1577 employees)

Webmail.us has 40-ish employees.

Needless to say I had an unfair advantage over all of these companies. One, I was the highest ranking person on the panel. Two, our company is local, so they can stop by and see me whenever they want. Three, poking shots at Microsoft is almost too easy. Four, start talking about time tracking at a defense contractor and you can almost get the recruiter to start looking for a new job. :)

Perhaps the most interesting question was "What don't you like about your job?". I was the only one who said "Nothing." And it's true, I love my job. We were also asked:

1. What's your opinion on the job market?

Crisis. The U.S. over the next five years will see the largest shortest of (wo)manpower in it's history. Good for students, bad for employers.

2. Define computer science.

The other members gave good definitions, I just added: CS is a discipline that allows you to solve problems in a creative and artistic manner. Beauty is in the eye of the code reviewer, tester, and user. (I just thought of that last part, but it sums up my long winded answer nicely.)

3. How do I keep my skills sharp and stay on top of the latest technologies?

Find the right job. Find a job that allows you to do this type of stuff during work. Wouldn't that be awesome? (I can see the defense contractors squirming in their chairs, hahaha). But, if you do accept a job with one of these other companies, stay on top of things during your free time, it will be well worth it when it comes time to find a new job.

4. When looking at resumes, do you favor students with master degrees over bachelor degress?

NOPE. We hire smart people who like to get things done.

Tuesday, September 19, 2006

We Won ?!?!!!


I was simply shocked when I found out yesterday that the Black Sox destroyed the NRV Boyz on Sunday 23 - 7. Wish I could of been there for that butt kicking. NRV Boyz were the #1 ranked team going into the playoffs. I thought we had a shot at winning, but 23 - 7 ? Wow, nice job guys. The rumor at the beginning of the year was that the championship game would be played at English Field on the Virginia Tech campus. I've never played on that field, it should be fun. Unfortunately we play the Warriors again, the team that crushed us the game before the playoffs started. I'm sure we will be able to give them a better game this time around.

Sunday, September 17, 2006

A Long Drive

After the Tech football game on Saturday Velvet and I packed up the kids and headed down to VA Beach for my niece's 5th birthday party. We get down there in good time (about 5 hours flat) and hung out with my sister for about two hours before heading over to the hotel. On the way to the hotel it became more than apparent that my son was not feeling good. After a couple hours of cleaning up and doing some laundry I finally make it to bed around midnight. The kids wake up around 7:00am and Andrew is not any better. I called my sister to inform her we wouldn't be able to stick around for the party and by 11:00am we were on the road back to Blacksburg. We made it home around 4:30pm. So I wasn't able to watch very much college football on Saturday, but based on the highlights and scores here is my new "top 5 teams most likely to play in the national championship" game list:

1. Ohio State

No change here, but with Michigan's unexpected win over Notre Dame it makes their season finale really interesting.

2. West Virginia

Only one opponent on their schedule can beat them.

3. Michigan

A very weak schedule with the exception of Notre Dame and Ohio State. If they can beat Ohio State in Columbus they will probably be #2 in the country.

4. Auburn

A nice win over LSU, if they can win out they are in, but a tough road ahead.

5. USC

A nice win over Nebraska, but was anyone else unimpressed with the game overall? I'm losing faith...

Honorable Mention: Louisville

And for you Hokie fans out there, I hope you paid attention to that Clemson game. It's going to be an interesting Thursday night when Clemson comes to town.

Friday, September 15, 2006

Amazon EC2

Today, with the help of Wenjie, I was able to provision my first 4 development servers at EC2. It was a really easy process. I had no problems installing the software needed for a MySQL cluster. Although I was unable to figure out the sql-node part of the cluster, I was able to get everything else running in under an hour. EC2 seems like a perfect environment for a test system. Having the ability throw away or create servers with one command is amazing. Setting up firewall rules was really easy too, I definitely recommend checking out EC2.

Sunday, September 10, 2006

National Championship Predictions (Week 2)

My updated list of the most likely teams to play for the National Championship (not necessarily the best teams in the country):

The top 3 are the same:
1. Ohio State
2. USC
3. West Virginia

I guess I screwed up with Miami and Penn State, here are my replacements:

4. Notre Dame

An impressive home victory over Penn State. If they can beat Michigan at home next week it's smooth sailing until the USC game the last week of the year.

5. An SEC team

OK, so this is the easy way out, but my goodness look at all of the SEC teams in the top 15: Auburn, LSU, Florida, Georgia, and Tennesse. I don't see how any team in the SEC could come out with zero losses, but if one does, they deserve to play in the big game. I need to watch a few more games before I pick a winner here.

Honorable Mention: Louisville

Black Sox Win !!!

The first round of the NRV MSBL is over and the Black Sox have advanced to the second round by pounding their first round opponent 22-10. We took it to them and never let up and it was an easy win. I went 2-3 with a triple and 4 RBI. A triple? Amazingly enough that was my first extra base hit of the year but it was by far my best hit of the year. I crushed the ball over the left fielder's head and just kept running. Next week we face the NRV Boyz. The first place team in the regular season. Win that game and we are in the finals. It will be a tough opponent but I hope we can pull through.

One problem for me though is that my niece is turning five next Sunday and is having a birthday party in Va Beach that I'm suppose to attend. Hmm, what to do, what to do...

Thursday, September 07, 2006

Black Sox Regular Season Finale

Tonight we played our final regular season game at Calfee Park in Pulaski. For those of you who don't know the area that well, Pulaski is a small town about 20 miles south of Blacksburg. Calfee Park is home of the Pulaski Blue Jays, a rookie affiliate of the Toronto Blue Jays. The park was built in 1935 and is simply an amazing place to play a baseball game. We rarely have an oppurtunity to play there, but since the Blue Jays season is over, we had the oppurtunity to make up one of our rained out games there tonight.

We typically play all of our games on high school fields in the area. It's amazing the difference between a high school field and one that is used for minor league baseball. The field doesn't raise or lower an inch from the backstop to the warning track. The infield is so smooth you just want to run around on it all day because it makes you feel fast. The infield grass is cut so close you would think it was the green of the 18th hole of a golf course. The pitching mound is the proper height and there are no big holes to slip and fall into. The batters boxes don't have huge divots from people standing in the same spot all year. The fence is so far away you couldn't imagine ever hitting a homer. The dugouts are actual dugouts (like lower than the field). The stands and bleachers look nice and comfortable. There are actual bullpens to warmup relief pitchers in between innings. I love playing on this field, you feel like a professional the moment you step on the field.

Unfortunately, we got our butt kicked tonight. We barely made it out of the first inning. I think the final score was 26-15 or something crazy. (Although scoring 15 runs is pretty good for our team.) I was 0-3, I guess I've been playing too much softball. Although we lost, I had as much fun playing as I have had in awhile. First, I know most of the guys on the opposing team and if you are going to get hammered I'd rather it be by a team that is a good group of guys rather than a bunch of a-holes. Second, I got to play catcher for three innings. I normally play centerfield, and I got to play second base several times this year, but I really don't like being the catcher. But, my opinion of the position changed dramatically tonight. I really had fun back there behind the plate tonight. One reason is that the pitcher did a good job of keeping the ball out of the dirt. That's the hardest part of being a catcher is trying to stop all the balls from going to the backstop on those low pitches. Second the pitcher didn't throw particularly hard or have nasty stuff. I would say he had decent stuff, but it's stuff that is very easy for me to catch. Last year I had to catch for Mannin and he throws pitches that are unbelievably hard to catch. Just really nasty pitches that break hard, late, and are thrown really fast. Last summer I caught an entire game for him on the hottest day of the summer and I thought I was going to die. Tonight, totally different. It was a blast and I'd definitely do it again, but not for Mannin, haha.

Our first playoff game is this Sunday at 10:00am. Yep, 10:00am. We get the first game of the quadruple header for our league at Calfee Park. It should be a blast. We finished the season in 5th place, which means we get to play the 4th place team in the first round. A game that is very winnable (we have already beat them 2 times this year). But nothing is ever easy for the Black Sox so wish us luck, we will need all of the help we can get.

MySQL Cluster 5.1

I've been researching MySQL cluster today and my brain is on a bit of information overload so I thought it would be wise to jot down some key points I have learned thus far.

MySQL cluster differs from a traditional MySQL installment because it is designed to work across multiple machines. In the traditional setup you install MySQL on one node and have several slaves that replicate the data and serve as backup servers in case of failure. In the cluster scenario there are a minimal of 4 machines (technically 3, but if you care at all about your data you will need 4). Machines fall into one of three categories:

1. Management Nodes
Management nodes are important for defining the roles of each of the other nodes in your cluster. Here you setup config files that the other servers read to understand how the cluster is setup. You would need at most two of these, one just sitting there in case the primary fails. If the primary does fail, it will not cause the cluster to stop working.

2. MySQL Client Nodes
Client nodes are the machines that actually perform all of the queries received from clients. You can setup as many of these as you load demands, preferably at least two in case of failure. In MySQL 5.1 these nodes do perform caching, but there are some gotchas that you should read in the documentation.

3. Data Nodes
The nodes use the NDB storage engine to replicate your data across multiple machines. This is layer I have the most questions about and I'm trying to find out more. Prior to 5.1 all database data, including indexes was stored in memory. So if you have large tables you need to make sure your data (and indexes) will fit into the available memory. A new feature of 5.1 is the ability to store only the primary key information in memory and store the rest of the data on disk. This will help a lot of really large data sets.

So if you had 2 management nodes, 2 client nodes, and 2 data nodes any of the nodes in the cluster could be shut down and there would be no loss of uptime or data.

A nice feature added to 5.1 is the ability to replicate clusters. So if you are paranoid and afraid that an entire cluster could go down then you could fail over to the secondary cluster. I didn't read the entire doc on this topic, but it seems complicated and probably overkill for most situations.

It's important to understand how indexes are implemented in the cluster scenario. Primary keys are implemented as a hash index type. They do this so they can partition your data based on the hash. This brings up two key points that must be understood when looking into the clustering:

The following queries will work great and be very fast (from the performance pdf available online):

SELECT * FROM tbl WHERE pk = 5;
SELECT * FROM tbl WHERE pk = 'ABC' or pk = 'XYZ';

The following queries will not use the primary key index:

SELECT * FROM tbl WHERE pk < 100;
SELECT * FROM tbl WHERE pk_part1 = 'ABC';

The last example is especially important to understand. If you have a primary key that uses multiple columns (pk_part1, pk_part2) you must specify the value of both columns in order for the index to be used.

Ordered indexes are implemented using T-tree's instead of B-tree's. This is for memory saving purposes and the need to not have to worry about disk-seek times (everything is in memory). This really should make any difference to the client but I mention here because I thought it was a great idea.

Data retrieval in a clustered scenario is very important to understand. If you do a query based on the primary key, the client node can go directly to the data node that has your row and retrieve it. If you do a query which results in the client having to use an ordered index, the client must query in parallel every data node in the cluster. This may be really fast, but would result in much more network traffic than a primary key lookup. The worst kind of query would be one where the client node must do a full table scan. In this scenario the query must be sent to all nodes. Prior to version 5.0 the "where" clause was not sent to the data nodes so that meant that the entire data set was returned to the client for scanning. If you had 2 million rows, all 2 million would be sent over the network for scanning. Since 5.0 you can enable an option to perform the "where" on each data node and only return the rows that match the where clause.

I think picking a primary key is especially important when implementing a table that will reside in the cluster. Pick the wrong key and I think your queries will be much slower than the traditional database. On that note, it's not uncommon for a clustered database to be slower than a traditional database. If you look at everything that must happen to perform a query in the clustered scenario that makes sense. But I think the clustered database kicks but in the ability to maximize throughput.

As I mentioned earlier, my main questions so far are in regards to the data nodes. I haven't found any documentation that covers how data is spread across the nodes. For instance, if I had a configuration with 50 data nodes, and I have a database with 100 million rows, how much of the data would be on each node? Is the data triple replicated? Double replicated? Which data nodes are safe to shut down at the same time? Does anyone out there know or could point me in the right direction?

Cool GUI Tools for MySQL 5.0

I just found these tools for 5.0, awesome stuff, but I'll probably still do most tasks the old fashion way. :)

http://dev.mysql.com/downloads/gui-tools/5.0.html





MySQL Partitioning

Bill asked me to look into the new paritioning features with MySQL 5.1. I have to say this has to be one of the best features I've seen added to MySQL in a long time. Check it out:

http://dev.mysql.com/tech-resources/articles/mysql_5.1_partitions.html


Finally the admin has some kick-ass control over how the data is split across files and disks. And it makes pruning old data super-easy.

Wednesday, September 06, 2006

College Football is broken, here is how I would fix it

I love college football. It's infinitely more interesting than pro football (unless you play fantasy football, which I don't). But it could be even better, here is what I see as college football's biggest problems:

1. Rankings
2. Every game matters too much
3. Out of conference scheduling
4. No playoffs

Rankings matter too much, we shouldn't care about Coaches Polls, AP Polls, computer polls, etc. There are too many polls and none of them should matter when deciding a national champion.

It's really tough for a one loss team to win a national championship, which means colleges that are smart will schedule as many "Northeasterns" as possible. Ideally, colleges should want a tough out of conference schedule to get them ready for the post season.

Without a playoff system, the teams that are extremely lucky and highly thought of in the polls play in the big game. Nothing is decided on the field and there will always be the one or two teams that make tremendous strides during the regular season but have no chance of proving they are the top team in the country.

Here is how we fix this mess:

1. The winner of each major conference (there are 7) gets an automatic bid into the playoffs. This does several things right out of the gate: we no longer care about polls, we can schedule tough out of conference games, and losing one or two games doesn't really matter.

2. The press still gets to pick the 8th and final playoff spot from the remaining conferences and independent teams. (So yes Notre Dame fans, it's still fixed for you.)

3. Force each team to only play 10 games (plus 1 for a conference championship if needed). This will mean that the football season won't last any longer than it currently does (don't forget that they currently take over a month off before the bowl game). And only 2 teams will play an additional 3 games max, so we are talking 14 games maximum, and some teams currently play 13.

4. We can still have several bowls to satisfy the other teams that didn't make the playoffs but had good years. I think the fans would still go to these games and they would still generate lots of money. But let's get real and reduce the number of bowls in half.

Amazingly enough, college basketball has everything right. Polls don't matter that much, they have a great playoff system, and teams schedule tough opponents to HELP their chances of making the playoffs. What an amazing concept!

MySQL: InnoDB vs MyISAM tables

MySQL gives the user several different storage engine options when creating a new table in a database. The two primary options for traditional databases are InnoDB and MyISAM. I won't go into the history of each engine, but I'd like to discuss when you would choose one versus the other. InnoDB has several features that MyISAM does not provide:

http://dev.mysql.com/doc/refman/5.0/en/innodb-overview.html

So why would anyone ever use MyISAM? First, it's been around longer and is very reliable. People are also more comfortable with the one file per table concept. And maybe most importantly it is the default engine when you create a new table. I've used both and like both, and when I was testing MySQL 5.0 over the last few days I decided to put both to several speed tests on a rather small table (45,000 rows). Each row contained about 470 bytes of data. Every test I ran showed that each database had similar performance. I was hoping that one would be superior to other but it just wasn't the case. On the other hand, my table size was pretty small. And I did discover that with large text based primary keys, MyISAM was much faster. But when the key size was reasonably small InnoDB had slightly better performance. I'm going to try to insert a tera-byte of data into each database and see which one performs better. I love all of the different options available for InnoDB storage that are available so it should be fun to try out different parameters and see which ones perform best.

Sunday, September 03, 2006

National Championship Predictions

OK, after one weekend in college football I've seen enough to know who has a legitimate shot at playing for the national championship.

1. Ohio State

A great team with two Heisman candidates. A tough opening schedule, but if they survive at Texas and can hold off Penn State in week 4 there will be no stopping this team.

2. USC

All of their "tough" games are at home (Nebraska, Arizona St, Oregon, California, Notre Dame.) Plus they don't play a conference championship game.

3. West Virginia

Their schedule is laughable and no conference championship game.

4. Miami

Underrated and an easy schedule.

5. Penn State

A dark horse candidate, but if they manage to somehow beat both Notre Dame and Ohio State they deserve to play in the big game.

Teams that will NOT be contending, but are good teams:

1. Texas

Their schedule is tough, Ohio State, Oklahoma, and Nebraska. If they do somehow manage to beat all of those teams they deserve a shot in the big game.

2. Notre Dame

I can't see anyone beating USC, especially @ USC.

3. Any SEC team.

SEc schedule too tough, plus they play a championship.

4. Florida State.

Overrated.

Friday, September 01, 2006

Football Season Already?

Awesome.

Tailgating starts tomorrow, I’m REALLY looking forward to this, I’ve missed tailgating. But enough about that, here is my prediction for the 2006 Hokie football season, go ahead and call Vegas:

Northeastern – Win
North Carolina – Win
Duke – Win
Cincinnati – Win
Georgia Tech – Win
Boston College – Win
Southern Miss – Win
Clemson – Lose
Miami – Lose
Kent State – Win
Wake Forest – Win
Virginia – Win

Gator Bowl here we come!

I spent zero time on research and analysis but without an experienced quarterback our defense and running game won’t be able to overcome Miami nor will it keep pace with a good Clemson team.

The sad part about the VT schedule is the mediocre opponents out of conference. This schedule is garbage and the AD should be ashamed of himself. The good part about a weak schedule is that everyone stays in good spirits after the game and makes the post-game tailgate better than the pre-game tailgate. I can’t wait!!!

Our first softball game

Tuesday night we played our first co-ed softball game. Our team consists of Webmail.us employees and our friends. It was Bill’s idea to start the team and we wanted to play so that we would have something to do together and have some fun. Of the 19 people on our roster, I’m pretty sure only 5 or 6 have ever played in a real softball game before Tuesday night. To say we are inexperienced would be a gross understatement. However, our team is a very competitive and eager to learn group of people. I have volunteered to coach the team to the best of my abilities.

We have been practicing for several weeks now and the improvement from week 1 to now has been dramatic. Our team is much better at all aspects of the game and they understand terms such as “cut-off”, “backup”, “calling for the ball”, etc.

So game time rolls around on a dreary and rainy Tuesday night at Tom’s Creek Park. As soon as the game before us finishes they are calling for lineups for our game. I decided to keep myself out of the lineup for several reasons, but mainly I wanted everyone to get a lot of game time experience. I hand our lineup in and we proceed to warming up. I’ve never really seen such a short warm up period but in what had to be under 5 minutes the game was starting. We were the away team so we batted first. We quickly went down 1-2-3 and were in the field for the first time.

For anyone who hasn’t been to a softball game lately the pace of the game is much, much quicker than the baseball you see on TV. Almost every pitch is hit and the bases are very short so doubles are very common. There also isn’t a lot of down time between pitches. So at the start the bottom of the 1st inning their leadoff batter grounds out to second for an easy out. Cool, 1 down 2 to go. Unfortunately the next five hitters get hits and before you can spin around twice in your chair we are down five runs. We finally get the last out right before they bat around.

As the team comes off the field I can see the shell shock on everybody’s face. So I tell everyone to huddle up and listen. I pause for a second or two and everything is real quiet. What do you say in this situation? I decide to crack a joke and say “Welcome to Softball.” Everybody laughs and I think we all relaxed at that point and the rest of the game went fairly well. Like I told my team, if you take out the first inning and the 4 run inning they had because of a two out error we would have won 5-4. :)

As far as coaching goes I think I did an OK job. There will always be things I can improve on, but overall I really enjoyed it. My favorite parts were watching people backup each other, just like I told them to do time after time in practice. Watching people line up cutoffs and actually hitting those cutoffs, just like I taught them to do. And hitting fly ball after fly ball, just like I told them NOT to do. (We’ll keep working on it.)

Tuesday, August 29, 2006

New (to me) UNIX Commands

I often have the need to compare two files on different servers, now I can do so without having to scp the file and then run diff:

vimdiff scp://webmail1//home/kminnick/tmp.txt scp://webmail2//home/kminnick/tmp.txt

I also often have the need to take a file and split it into several small pieces:

man split

Friday, August 11, 2006

Query Optimization

One of the more enjoyable parts of my job is finding and eliminating bottlenecks in our system. Yesterday I was faced with a problem of a moderate load average problem on our RSS servers. I could tell that our system has been growing and that there must be a query that just wasn't performing as optimally as when we first launched. I know the RSS code fairly well, so I dove in and starting looking for queries that could possibly be the culprit. It didn't take long to find a query that when executed on the live system took over 5 seconds to finish (table names and columns changed):

SELECT s.id, s.u, s.d
FROM s, i
LEFT JOIN p ON s.u = p.u
AND s.d = p.d
AND p.pr = 'RSS_E'
WHERE (p.val IS NULL OR p.val != '0')
AND s.fId = i.fId
AND s.lDItem < i.rTime LIMIT 1;

OK, so I looked at the columns of the tables and two columns (lDItem and rTime) were not indexed. So I added indexes to both columns and ran the query again. This time it actually took 10 seconds to execute! As my 4 year old daughter would say, "What in the hecka in the world?!?" I've never really seen MySQL slow down after adding indexes, but I know the query optimizer logic is very complex, so I decided to help it out a bit by giving it a hint as to which index to use:

SELECT s.id, s.u, s.d
FROM s, i use index (rTime)
LEFT JOIN p ON s.u = p.u
AND s.d = p.d
AND p.pr = 'RSS_E'
WHERE (p.val IS NULL OR p.val != '0')
AND s.fId = i.fId
AND s.lDItem < i.rTime LIMIT 1;

Now the query only takes .48 seconds to execute! Excellent. I also dropped the lDItem index and the query speed stayed the same, so I only really needed the one new index and a simple little addition to the query to achieve a 10x improvement in the query. This little fixed has eliminated all of the CPU bottlenecks on the RSS servers today. This stuff makes me so happy. :)

The point is that query optimization is not always a matter of just adding an index (many times it is, but not always). I had to experiment several times before I got the results that I expected.

Thursday, August 10, 2006

MySQL Chain Replication

This took me awhile to figure out, but here is the option you need to configure chain replication w/ MySQL. This is useful for geographically dispersed MySQL servers. From the MySQL documentation:

--log-slave-updates

Normally, a slave does not log to its own binary log any updates that are received from a master server. This option tells the slave to log the updates performed by its SQL thread to its own binary log. For this option to have any effect, the slave must also be started with the --log-bin option to enable binary logging. --log-slave-updates is used when you want to chain replication servers. For example, you might want to set up replication servers using this arrangement:

A -> B -> C

Here, A serves as the master for the slave B, and B serves as the master for the slave C. For this to work, B must be both a master and a slave. You must start both A and B with --log-bin to enable binary logging, and B with the --log-slave-updates option so that updates received from A are logged by B to its binary log.