Thursday, October 29, 2009

Intelligent Editorial

An Intelligent Editorial from the News Tribune.

Felonious behavior is becoming more dangerous, if two recent incidents are any indication.

During a home invasion on Oct. 5, one of the intruders was shot and killed by one of the occupants of the mobile home.

And an armed assailant is recovering from wounds after he was shot Oct. 13 by one of the people he was attempting to herd into a building housing law offices on East Capitol Avenue.

In the first case, the weapon was kept in the home, which always has been allowed to defend people and property.

In the second incident, the assailant was shot by someone who qualifies under the conceal and carry law.

Sheriff Greg White is a proponent of the conceal and carry law, passed by lawmakers in 2003 after Missouri voters rejected a similar law in 1999.

The law requires people to attain a standard of proficiency with weapons before they are permitted to carry a concealed gun. Proponents of the law believe it offers a greater sense of security and decreases crime by prompting felons to consider the consequences of armed confrontation.

We confess to harboring some reservations about the concealed carry law. Our fear was an increase in guns in public would result in more guns being displayed prematurely and/or more accidents.

White said recently: “All the fears over conceal and carry have never manifested.”

We concede the point.

Anecdotal evidence does not suggest an increase in accidents or unprovoked gunplay.

The evidence, however, does show people defending themselves from harm.

The message being sent to felons is don't bring a weapon to a crime unless you're prepared to accept the risk.

Thursday, October 22, 2009

Government Run Healthcare

The Virginia Pilot is reporting that Senator Webb is calling for an investigation of the Hampton VA Medical Center.

Webb said that since 2007 his office has received 149 complaints about the facility, ranging from abusive patient treatment to wrongful death. A 2008 assessment by the VA's inspector general found that the center failed to comply with a number of policies and guidelines, he said, and its scores on a patient-perception survey did not meet targets.


I needed to get MRIs done on both of my knees. I called to make an appointment and was told that I needed to see my primary care person before getting a consult for the MRIs. So I ask to make an appointment and four months away is the soonest I can get in. A few weeks later I get a letter in the mail telling me to report to the Lab two to ten days prior to my appointment for bloodwork.

A week prior to my appointment I drive up to Hampton and and go to the lab. I take a number and stand in line and wait for the lady to call my number (Think DMV). Once my number is called I exchange pleasantries with the lady and she looks me up in the computer. After a few minutes of clicking she starts to mumble to herself about people not having orders. I ask if that she is referring to me and she says, "there is no order for lab work so I can't help you". I show her the letter telling me to come to the lab and she shrugs and tells me to go to primary.

Now that I am left standing there I look around and head over to the sign that says "Primary Two" and stand in line again. After a while the lady calls out, "Next Veteran" and it is my turn to approach the counter. I show her the letter and explain that the lab did not have an order. She tells me that, " she cannot do anything until I see the Care Provider. So I guess that the letter telling me to report to the lab is meaningless.

A week later on the day of my appointment I am an hour early and I go to check in at the front counter and stand in line. It appears that only a few people are working at the check in counter and there are a number of empty spots but I am not sure and it is not lunch time. After about 20 minutes it is my turn and the gentleman looks me up in the computer. He is rather polite and nice but he appears a bit harried. He prints out two lines on a piece of paper, hands it to me and points to Primary Care. I walk over to primary care and stand in line. Once it is my turn I hand over my letter and paperwork and tell the lady I am here for my appointment. She looks me up in the computer and gestures over to the waiting seats and tells me someone will call my name.

So I sit with all of the coughing and sneezing people and wait for about 45 minutes. It is about 30 minutes past my appointment time now and I finally get called back. The Nurse takes my vitals and asks a bunch of questions,typing my answers into the computer. She is rather nice and explains that they are short of help. While in the room another nurse comes in and asks to borrow one of the machines because there are not enough for all of the rooms. The nurse now directs me to another waiting room, called the Green Room. There are no empty seats so I stand in the corner and try not to breathe in from the guy coughing on the other side.

After about another 20 minutes a different person call my name. This lady is a physicians assistant. She will be the one that takes care of me. She asks a bunch of questions and types the answer into the computer. Offers me a consult for cane, a Hepatitis C test, a Flu Shot, some other tests and what have you. What I really came here for is the MRIs for my knees. Oh well we have to schedule another appointment for that and the wait is about NINE MONTHS!!

So at best it will be 13 months from the time I called to even get to the MRI machine. We cannot afford Government Run Healthcare. Anyone stupid enough to think that we should have Government Run Healthcare should be required to get their health care from the VA and see how it really works.

Thursday, October 15, 2009

MySql Update Select From

I have had to solve this same issue a number of times. It seems that every time I have to do it I cannot remember exactly how to do it. I then end up searching the Internet to find the solution so I am going to post an example here so that I do not have to search for it and hopefully it will help someone else.

The problem I have encountered is Updating a table in MySql with data Selected from the same table. It appears that MySQL doesn’t allow referring to a table that’s targeted for update in a FROM clause.

The latest issue was normalizing a table in a database I inherited. This had started out as a small database that served its purpose but as the organization grew it created more problems. In this example each person's entire name was stored in a single column.


+--------------------+
| name |
+--------------------+
| John Doe |
| Billy Joe Bob |
| James \"Jim\" Dean |
+--------------------+


I wanted to split this into first, middle, last and nick names for different purposes. So first let us define a table.


create table people ( id int primary key, name varchar(45) );

insert into people values( 1, 'John Doe'),
( 2, 'Billy Joe Bob'),
( 3, 'James \"Jim\" Dean');


For now I want to split the first and last names into separate columns.
First we need to define those columns so we will add them to the existing table;



alter table people add column fname varchar(20) after id;

alter table people add column lname varchar(20) after fname;



Now that the columns are added we can split the names and insert them into the same table.



UPDATE people p SET fname=(
SELECT SUBSTRING_INDEX(name,' ',1)
FROM ( SELECT * FROM people ) AS X where p.id=X.id );


The Substring Index splits the first name. Then select from the table as X works because MySql materializes subqueries in the FROM clause as temporary tables. This allows us to bypass the problem.

Thursday, October 8, 2009

Console Vault Review


Up for review this month is the Console Vault by Unique Security Solutions, billed as the Ultimate High Security In-Vehicle Storage System. For those times when you need to secure your personal items in your vehicle, and stuffing them under the seat just doesn’t seem like the smartest idea in the world, the console vault may be just what you need. The Console Vault is advertised as a specially designed insert that fits into the console space of your truck or SUV while still allowing the console to close normally. The vault is constructed of 12 gauge steel and has a five point high security locking mechanism with a spring assisted lid. The manufacturer claims that the unit can be installed in under 10 minutes without any modification to the vehicle. Models are currently available for over 26 different trucks and SUVs.

In the past I have owned some of the other in car safe like containers. Most were built from rather flimsy metal and did not hold up well. One container in particular that comes with a long cable for securing the container into the car and can be purchased for about $29.95, was not very secure at all. I was able to pry it open in under five minutes with a large screwdriver. Still it is better than nothing.

My first impression of the Console Vault is that it is a solid bit of kit. It is rather hefty and does not feel cheap at all. Time to take a look and see if it holds up to scrutiny.


Rolling the vault over and getting an overall look, one of the first things that catches my eye is one of the mounting holes in the bottom was not punched all of the way out. You can see that the top right hole in the picture was not punched all of the way out. I was able to knock it the rest of the way out with a hammer and a punch.




Continuing to look the vault over I noticed that from the inside I could see daylight through some of the joints. Taking a better look at the welds on some of the joints that you can see in the picture on the right. I don't think that I would expect this thing to be watertight but I think some of these welds could have been better.



I measured the thickness of the steel at the side of the vault. At the point that I measured the steel is folded over on itself to form the edge. Therefore I should measure a thickness that is twice the normal value of 12 gauge steel. As you can see in the picture I measured a thickness of 0.184 inches and according to The Engineers Edge the thickness of 12 gauge sheet steel is 0.1046 and since this edge is doubled over it should measure 0.2092 inches. It looks like it is a little thinner than 12 gauge. 13 gauge sheet steel should be 0.0897 which is 0.1794 inches doubled over. I am not positive about the tolerances in measuring the thickness of sheet steel but it seems a lot closer to 13 gauge that 12 gauge steel. Now in reality is the difference between 12 and 13 gauge steel going to make much of a difference.


My curiosity was piqued by the description of the five point locking mechanism and the spring assisted lid, so taking a better look at the underside of the lid we have the picture on the right.

I can make out the spring assisted hinge and in fact the lid does open rather smoothly. With small bumpers under the lip. the lid opens and closes without a metallic sound, a very nice touch. As far as a five point locking mechanism, unless they count every part of the hinge I have to wonder where they learned to count.



Enough looking at it, lets get it installed. The only thing in the box was the vault itself and a skimpy set of instructions. Most of the instructions were about how to change the combination. Since there were no screws in the box we should probably use the ones already in the vehicle and indeed there are four screws in the console of my truck that line up nicely with holes in the bottom of the vault. After taking the screws out I was a little disappointed to to see that the four screws are your typical automobile dashboard screws. I don't think that they would provide much in the way of holding force so I went a little further and took the console even further apart and found a few brackets underneath that are spot welded to the body and I used a longer carriage bolt to bolt the vault down to the bracket. This ended up taking me more than 10 minutes but I won't hold it against Ford or the console vault because I wanted to be a bit more secure with my install.



I put the console back together and secured the last few screws. The vault came with a piece of fabric to lay in the bottom of the vault to cushion your belongings. On the left is picture of the vault installed in my truck. Overall the fit into the vehicle is nice. There is plenty of room in this model. Enough to fit at least two 1911s and a GPS with room to spare. Although if you have a different model truck your console size may be different.



Here is a shot of the vault closed. You can see the combination lock which uses a three digit combination. I prefer a combination lock to a key as I don't have to worry about losing the key.








I can close the console all the way without any problem.











Overall I am impressed with the fit and functionality of the Console Vault. The finish quality left a bit to be desired and I still don't get the "five-point" locking mechanism but once it was installed it blends in nicely and usage on a daily basis is very nice with no complaints. It did take me longer than 10 minutes to install but again I went further than I needed to because I did not have confidence in the screws that were already in place.

Most of the time you will find the Console Vault listed at about $250 online. At that price I was hesitant to buy it. However I found it at Costco's online store for less that $200 shipped during a sale. It is normally $250 at Costco but I have seen it on sale two different times now and Costco's sale items seem to repeat every quarter or so.

There are a few quality issues that I may be overly picky about, but this appears to be one of the best ways to secure personal items in you vehicle with the possible exception of a steel box welded into your trunk. It is definitely better than most of the other options out there.