Tuesday, April 01, 2014

Texas Drivers License

So I got my new drivers license today and I noticed a real long number with a label of DD. Being the curious guy I am, I wanted to know what that meant. A Google search instantly showed a lot of wrong answers. Some people answered with authority that it was a Defensive Driving number. Hmmmm, I've taken defensive driving, but it as been more than 2 years. Looking further, others said it was a DPS audit/tracking number and is used to help you replace a DL that's lost or stolen. Hmmm, that didn't necessarily make sense to me.

I kept searching and searching, and I think I got the answer. It is a Document Discriminator. A what? Well, I looked for the definition of that and found this in relation to REAL ID.

Document Discriminator
Number must uniquely identify a particular document issued to that customer from others that may have been issued in the past. This number may serve multiple purposes of document discrimination, audit information number, and/or inventory control.

OK, I'm an IT guy who has worked with databases most of his career. In DB terms, this is a unique record ID. It is used for the drivers license. This is the record ID of the DL and if you look at an old DL, you'll see a long number printed along side your photo. That's the record ID of that DL.

So I guess as long as DPS has been computerized, everyone has had a DD for the DL. I wonder how long they keep this info. My old DL has an 11 digit DD. My new DL has 20 digits. In six years, if they stick to digits, I guess it might be 25 or 26 digits.

I wonder why they haven't mixed letters into the DD. It would help reduce the length. I guess they think it is better to 10 key, but that's not necessary since DLs have magnetic strips.

Another change I've noticed is they now have two bar codes on the back instead of just one like they had back in 2008. One looks like Code 3 of 9 and the other might be PDF417. Hmmm, I need to see if I can decode these and see what they represent.

Also, when I got my license renewed, they scanned my finger prints. I don't remember doing this the last time. Is it really necessary to have someone's fingerprints to get a DL?? So I guess the only way to stay annonymous and fly under the radar is to never get a SSN, which I think you are required to do for your child after they're born so you can claim them on your taxes, never work at a school where they require your fingerprints, never get arrested and booked, and never get a DL. I'm sure there are other situations where the gov gets your fingerprints, but those are the ones off the top of my head.

Anyway, if you've read this far, I hope this was interesting.

Sunday, March 09, 2014

Table Backup in MySQL

Here's what I believe is the most efficient way to backup a table:
Through Navicat, open a console window on the server/database you are backing up to.
Then do this:
mysql>; create table backup.errorCdrs_20140309 like clover.errorCdrs;
Query OK, 0 rows affected
mysql> insert into backup.errorCdrs_20140309 select * from clover.errorCdrs;
Query OK, 5260808 rows affected
Records: 5260808  Duplicates: 0  Warnings: 0

I don't have a timing to support my claim that this is the most efficient, but I think it is because it is done at the server, so the traffic should be within the server. You could just go to the file system and make a copy the table files and maybe that would be more efficient, but I think it is better to work within the MySQL system.

Saturday, March 01, 2014

What is the Trivium?

In medieval universities, the trivium comprised the three subjects that were taught first: grammar, logic and rhetoric. The word is a Latin term meaning "the three ways" or "the three roads" forming the foundation of a medieval liberal arts education. This study was preparatory for the quadrivium, which consists of geometry, arithmetic, astronomy, and music. Combining the trivium and quadrivium results in the seven liberal arts of classical study.

Source: http://en.wikipedia.org/wiki/Trivium

Definition of a Human Being

A human being should be able to change a diaper, plan an inva­sion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
 – Lazarus Long, Time Enough For Love

Sunday, October 27, 2013

Really Get Paid to Shop

Everyone likes rebates, right?

Well, Ebates really does pay you back. I've received a couple of checks for the purchases I've made. If interested, click the link below:
ebates

Friday, October 11, 2013

Formatting Numbers in MySQL

I like SQL output to align properly for numbers, so I did some digging and came up with this:
lpad(format(seconds/60,2),9,' ')

The lpad function will pad the output from the left with whatever the 3rd argument is. In this case, I set it to ' ' (a space between quotes) for 9 characters.

The format function will round the output to the number of decimals specified. The example is set for 2 decimal places.

The "seconds/60" is obviously a math equation to convert seconds to minutes. The seconds is the data field I am formatting.

In Navicat, under Tools>Options..., I set the Grid Font (found under Appearance>Font) to DejaVu Sans Mono at 8 pt. This is nice, smooth mono-spaced font.

Monday, July 29, 2013

Pay Attention to Your Receipts

Fast food and restaurant receipts usually offer some kind of discount for your next visit if you answer their survey.

Pie Five will give 20% your next order.
Panda Express gives you a free entree item with a purchase of a 2-Entree Plate.
Sonic will give you a free 44oz drink.
Long John Silvers will give you a free 1pc. fish & fry basket.
El Fenix will give you a free cup of chili con queso on your next visit.
Outback will give you a 15% discount if you come back within 10 days.
Black-eyed Pea will give you $5 off your next order over $25.

Some are not so great.
Taco Bell just gives you a chance to win $500.
Five Guys gets your contact info and gives you a chance of being one of 10 people to get a $25 Five Guys Gift Card.
Raising Cane's Rocks Concert Getaway 2013. Win an international rock flight. Ugh! You have to figure out two captchas to enter.
Olive Garden has a drawing for $1,000 upon entry of a survey.

As I come across more, I'll add to this post.