Wednesday, August 15, 2012

Change Schema assigned to a User in SQL Server 2008 R2

Yeah, I needed to do this the other day. When I restored a database, the users who came along with it came with their own schemas. I wanted them to be under the dbo schema.

Pretty easy to do. Open Query Analyzer and type:

Alter User With Default Schema = ;

database name = name of the database (duh)
user name = name of the user you want to change the schema for
schema name = name of the scheme you want to user to use

Do this for each user you want to change schema for. Sucks if it's a bunch!

Home Made Icepack, Home Made Heatpack

For those weekend warriors out there who might have overdone it....

Home Made Ice Pack
Got a boo-boo and need to ice it? We've all seen those gel cold packs you put in the freezer. Easier than ice becasue it stays pliable. Instead of buying one, make your own. Fill a ziplock bag with dish soap and freeze it! It remains pliable and cold for quite some time. Keep a couple in the freezer....

Home made Heat Pack
Looking for heat instead of cold? Fill a sock with rice and put it in the microwave for 30 seconds to a minute (or until it reaches the desired heat level). It holds heat incredibly well.

Wednesday, August 08, 2012

Breaking out of a Funk

Mant people often suffer from mild depression and felt detached and unenthusiastic. This is often just from stress, which causes the brain to protect itself and shut itself into it's own little, sad world.
Every suggestion here involves breaking out of that confine. Every suggestion requires a GREAT ACT OF WILL to get the ball rolling, which may require more or less effort, depending on how much juice you got at the time.

It is often tempting to let your brain and life coast and take the easiest route, but this route is easy because it is well-tread. What novelty and joy of discovery--what meaning--was there is likely long-ago used up. To find fresh meaning we have to do fresh things. We have to fearlessly cultivate new perspectives.

Perhaps you want the meaning first, and for your actions to follow that. The reverse must sometimes be necessary. Do something fresh you care nothing about, and let the meaning come from that.
  1. Act without expectation. Do stuff even if you don't want to and aren't feeling it. A friend just invited me to the batting cages-- an activity I had zero interest in. I went anyway and before long really got into the challenge of it. I've been thinking about it all week- this stupid, pointless activity- and fondly remembering how good it feels to get that perfect contact and watch it fly. Pull a Jim Carrey and be a Yes Man for a while. Give yourself time to get into things.
  2. Explore new topics. Watch documentaries, even if they seem boring on the outset. Human Life or Blue Planet or anything about space. Read. Meaning is not found in bite sized snippets. Meaning is found in webs of association, attachments and collusions. This requires in-depth exploration. A rain-forest from a plane might seem like one boring green expanse. Plunge in. I'll also recommend Grant Morrison's "The Filth". It's a graphic novel intended to cure just this. It is psychedellic, unsettling and completely awsome.
  3. Listen and ask questions. If people are starting to bore you, it is likely you're not having the right sort of conversations. Talk to the people you're close to (or random old dudes in coffee shops) and try and get them to reveal their motivations and hopes. Ask them what excites them and listen. This can backfire. Some people are terrible drains if they're in a negative mood. This is how you've probably been. People may not be talking to you about what excites them if they think you'll sap their enthusiasm with your "meh" attitude.
  4. Embrace your ennui. Read some Camus and Satre and revel in their understanding of the futility and pointlessness of existence. Sometimes when we can't escape melancholy or boredom, it is at least good to have a friend there.
  5. If it gets really bad, go talk to a therapist. There's a chance you have a mood disorder. I personally prefer psychologists over psychaiatrists as they're less prone to jamming pills down your throat.

Friday, August 03, 2012

What is Double Clutching?

Double clutching is a downshifting technique that promotes smoother transitions and lower transmission wear. It is useful for road racing, prolonging transmission life, and giving you an overall smoother ride.

In normal driving, with modern cars- you don't need to double clutch. When you shift, devices called "synchronizers" or "synchromesh" in your transmission help your shifting by matching the rotational speeds between meshing parts. Why do you need to match the speeds between transmission parts when you shift? Simple - they won't go together unless they're all traveling the exact same speed. Your synchros take care of this, so you don't have to worry about matching revs much in normal driving.

So the question now is why do you need to double clutch? It's useful in racing, it's required for non-synchro transmissions, and it's a damn cool racing skill to master. Think of your transmission as being separated into two functional halves. One half is connected to your engine, and the other half is connected to your wheels. The split between the two halves is right at your gears.

Let's say you're driving down the street in 5th gear. Assume that your gearing is 1:1 all the way though, just for simplicity's sake. Your engine is turning 3000rpm, and so are all the parts in your transmission. You want to downshift to get higher up in your powerband to pass someone, so you mash the clutch pedal, shift to 4th gear, then lift off the clutch pedal. If your 4th gear ratio is twice what your 5th is, your engine is now spinning at 6000rpm (along with the "engine half" of the transmission) while the "driveshaft half" of your transmission is still spinning at 3000rpm. Your car is still moving at the same speed, but you're higher up in your engine's powerband. Now you have more power to pass the person in front of you.

What normally happens when you downshift and don't match revs? You feel the car lurch some while the transmission forces the engine to a higher rev level. The synchros grip against each other to match the gear speeds, the gears mesh, and when your clutch grips it pushes the engine higher... and you feel the rough transition.

To smooth this out, you can raise the rev level of your engine and the "engine half" of the transmission so the synchros have less work to do, and so your transmission isn't pushing the engine around.

How do I double clutch? I never thought you'd ask.
  1. Push clutch pedal down
  2. Shift to neutral
  3. Lift clutch pedal up
  4. Tap the gas to raise engine speed
  5. Push clutch pedal down
  6. Shift into lower gear
  7. Lift clutch pedal up
You just double-clutched!


Thursday, August 02, 2012

Going off to College Dorm Room Essentials

Basic essentials:

  • Bed sheets -- Get 2 sets. Trust me, you'll need 2. Dorm beds are usually twin XL (unless your building hasn't been renovated recently, then it might be standard twin) but double-check with the school's website.
  • Pillows -- These are almost never provided. Bring your own.
  • Towels -- Bring at least 2 for the shower, 1 hand towel, and 1 dish towel.
  • Mattress pad -- Usually the mattress you have is hard and uncomfortable (it's designed to not harbor bedbugs easily). Add a pad to it, and you'll sleep a lot better, especially when your neighbors decide to blast loud music through the walls.
  • Clothes -- Take about a week's worth minimum, plus something you'd wear to a job interview and gym clothes. Also be sure everything that needs to be hung has a hanger for it. You want to fill the washer to capacity on wash day; otherwise, you'll be wasting money. Don't forget to bring laundry detergent, etc. If you expect to attend a lot of formal functions (e.g. if you want to join a fraternity) also bring an iron and ironing board.
  • Toiletries -- You'll inevitably go through everything you bring, except possibly an electric or straight razor. But it's important to have it right from the start. Don't forget: tooth brush, toothpaste, hand soap, shower soap, shampoo, shower shoes, razor, shaving cream. If your dorm is the old style with communal bathrooms, also bring something to carry these things. If it's the newer suite-style or the fancier apartment-style, also bring toilet paper and a plunger.
  • Cleaning supplies -- You need something for glass, something with ammonia, and something with bleach (but of course, never mix the two). Don't forget the sponge and toilet paper, and perhaps a rag (inexperienced drinkers + lots of booze = people throwing up everywhere). If you have a private bathroom, also bring a brush and cleaner for the toilet.
  • Storage space -- Most dorms provide a desk and a dresser. This is usually not enough storage space. Bring a couple crates to begin with, then buy more storage space as you need it.
  • First aid kit -- Invariably, you'll get a cut or a small scrape at some point. It's important that you can take care of the problem yourself. The RA can't do much except call an ambulance, which will cost you hundreds if not thousands of dollars.

School essentials:

  • Computer -- Even if it's not a listed requirement by your school, bring a computer. Also install a basic antivirus program (Windows Security Essentials is usually good enough) because most technology departments require them.
  • Cable lock for your computer -- If it's a new/high-end computer, especially if it's a Mac, you'll need it to prevent your computer from being stolen.
  • Computer peripherals -- Think about them, and determine what you need. I had a printer, headphones, and a mouse. If you have a printer, don't forget paper and ink.
  • Headphones -- I list these separately because they're especially important in a dorm, where you might want/need to listen to something on your computer without creating a lot of noise. Even if you don't listen to music or you have a portable MP3 player, there may still be course-related materials with audio. If you use loud speakers, your roommate/neighbors will hate you, and you may even get in trouble with the RA/police.
  • Pens and pencils -- You'll need both of these to take the exams, which are still on paper for most classes. Multiple choice usually requires #2 or darker pencil, while essay questions require pen.
  • Notebook paper and binders -- There will always be at least one class where you can't take notes on your computer. If you're a science/engineering major, there will be many. Some professors have banned computers in class after seeing too many students on Facebook.


Read your dorm's rules before you buy or bring anything related to cooking. Many of them ban certain appliances. Others provide appliances, and bringing them will just leave you with a lot of junk you won't use.
  • Refrigerator -- Although you'll probably have a meal plan, at some point, you'll want something to eat when the dining hall is closed. Some of it will have to go in the refrigerator. Consider buying a refrigerator with a lock -- an RA is more likely to ask you to open it, but your roommate won't be able to raid it while you're away.
  • Microwave oven -- Get a small one; there's usually a power limit. And understand how it works; you don't want to do something with it that will bring the RA to your room.
  • Rice cooker -- If it's allowed, it'll make rice cooking easy and worry-free.
  • Plates, bowls -- Make sure these are unbreakable. There will always be someone who will knock them to the ground.
  • Utensils -- Knives may be prohibited. But either way, it's better to have reusable utensils than to always use disposable ones.
  • Tupperware -- Use these to save unfinished portions of food for later.
  • Coffee maker -- Dining hall coffee costs only marginally less than Starbucks. Why not see if you can get a free coffee maker for your dorm room?
  • Tea kettle -- More likely to be banned than the coffee maker, but more versatile.

Useful things to have:

  • Carpet -- Be sure it's approximately the size of your room. The floors are usually hard and cold.
  • Vacuum cleaner -- If you have a carpet or the room comes with it, you'll need it to clean the carpet.
  • Furniture -- Look for small, easily folded furniture such as butterfly chairs and futons. Be aware that many types of lamps are not allowed.
  • Spare bulbs -- Only for the lamps you bring. Dorms usually replace the bulbs for fixtures they provide.
  • Posters -- The dorm walls are usually bare at best and prison-like at worst. Try to avoid posters that are pornographic (this is usually a turn-off to the women) or feature booze/weed (this will put you at odds with any RA who walks into your room). Remember that people who enter your room will judge you based on your choice of posters, so choose wisely.
  • Sticky hooks -- For hanging things. Screws, nails, and even tacks are usually not allowed (and some walls won't accept them at all).
  • Reusable adhesive -- For hanging posters; see above.
  • Condoms -- Better have them when you need them than need them and not have them.
  • Fan -- If the air in your room is hot, stale, or has a smell you don't want in your room, you'll need a fan to blow it out the window.
  • Air freshener -- House plants usually don't last long in a dorm, but you'll still need to prevent the air from getting stale. It's also important to cover smells when the fan isn't enough.
  • TV -- If you like having people over, the room with the TV usually becomes the hang-out spot. But be careful not to get distracted from college life (studying, partying) by the TV.
  • Game console -- Multiplayer games are another great way to turn your dorm room into a hangout spot.
  • Speakers -- When you want to play music to everyone in the room, you'll need speakers to do it.

Things not to bring:

  • Any booze or drugs -- If your roommate turns out to be "straight edge" and you have these things, you might start the year by getting in trouble. Wait until you've met your roommate before you buy any. Same with shot glasses and red cups.
  • Large pieces -- It's a lot harder to hide a 3 foot bong than it is to hide a small pipe, pack of papers, or portable vaporizer.
  • Any appliance banned by the dorm rules -- These are also usually hard to hide.
  • Anything expensive -- These often get stolen.
  • Addictive video games -- Many people miss out on the college experience because they were too drawn into their MMORPGs to live it.
by LurkinGrue

Wednesday, August 01, 2012

On Joining the Military

Pretty much matches my thoughts:

A friend recently asked me what I would tell a young man thinking about enlisting in the military. (He had in mind his son.) I would tell him this, which I wish someone had told me:
Kid, you are being suckered. You are being used. You need to think carefully before signing that enlistment contract.

First, notice that the men who want to send you to die were draft-dodgers. President Bush was of military age during Vietnam, but he sat out the war in the Air National Guard. The Guard was then a common way of avoiding combat. Bush could do it because he was a rich kid who went to Yale, and his family had connections.

He dodged, but he wants you to go.

Vice President Cheney, also of military age during Vietnam, also didn’t go. Why? When asked by the press, he said, “I had other priorities.” In other words, he was too important to risk his precious self overseas. He dodged, but wants you to go.

If you take the time to investigate, you will always find this pattern. The rich and influential avoid combat. Harvard, Yale, and Princeton do not send young men to Iraq. The editors at magazines that support the war, National Review for example, didn’t fight. They are happy to let you go, though. The reason for the All Volunteer military was to let the smart and rich avoid service and instead send kids from middle-class and blue-collar families. It works.

In talking to recruiters, you need to understand what you are up against. You are probably nineteen or twenty years old, full of piss and vinegar as we used to say, just starting to know the world. Which means that you don’t yet know it. (Do you know, for example, what countries border Iraq?)

You are up against a government that hires high-powered ad agencies and psychologists to figure out how to lure you into the military. Over many years they have done surveys and studies on the weaknesses of young males to find out what will get them to join. They know that young men, the ones that are worth anything anyway, want to prove themselves, want adventure, want to show what they can do. Everything a recruiter does is carefully calculated to play on this. They go to recruiting school to learn how.

“The Few. The Proud.” You don’t think that came out of the Marine Corps, do you? These phrases—“An Army of One,” “Be All You Can Be"--come from ad agencies in New York. Nobody in those ad agencies, I promise you, was ever in the Marine Corps. New York sells the military the way it sells soap. It has no interest in you at all.

Recruiters know exactly what they are doing. They are manly, which appeals to gutsy young guys who don’t want to be mall rats. They are confident. They have a physical fitness, a clean-cut appearance that looks good compared to all those wussy lawyers in business suits. They invite you to come into a man’s world. They promise you college funds. (Check and see how many actually ever get those funds. Read the small print.)

And of course the military is a man’s world, and it is an adventure, and it does beat being a mall rat—until they put you in combat. Driving a tank beats stocking parts in the local NAPA outlet—until they put you in combat. Days on the rifle range, running the bars of San Diego far from home and parents, going across the border into Mexico—all of this appeals powerfully to a young man. It did to me. It beats hell out of getting some silly associate degree in biz-admin at the community college.

Until they put you in combat. Then it’s too late. You can’t change your mind. They send you to jail for a long time if you do.

Combat is not the adventure you think it is. Know what happens when an RPG hits a tank? Nothing good. The cherry juice—hydraulic fluid that turns the turret—can vaporize and then blow. I saw the results in the Naval Support Activity hospital in Danang in 1967. A tank has a crew of four. Two burned to death, screaming as they tried to get out. The other two were scalded pink, under a plastic sheet that was always foggy with serum evaporating from burns where the skin had sloughed off. They probably lived. Know what burn scars look like?

The recruiters won’t tell you this. They know, but they won’t tell you. Ever seen a guy who just took a round through the face? He’s a bloody mess with his eyes gone, nasty hole where his nose was, funny white cartilage things sticking out of dripping meat. Suppose he’ll ever have another girlfriend? Not freaking likely. He’ll spend the next fifty years as a horror in some forsaken VA hospital.

But the recruiters won’t tell you this. They want you to think that it’s an adventure.

Other things happen that, depending on your head, may or may not bother you. Iraq means combat in cities. Ordinary people live there. You pop a grenade through a window, or hit a building with a burst from the Chain gun, or maybe put a tank round through it. Then you find the little girl with her bowels hanging out, not quite dead yet, with her mother screaming over what’s left. You’d be surprised how much blood a small kid has.

You get to live with that picture for the rest of your life. And you will live with it. The recruiter will tell you that it doesn’t happen, that it’s the exception, that I’m a commy journalist. Believe him if you want. Believe him now, while you can. When you get back, you’ll believe me.

A lot of things in America aren’t what they used to be. The military is one of them. The army didn’t always use girl soldiers to torture prisoners. For that they had specialists in the intelligence agencies. You won’t get assigned torture duty, almost certainly, because the Army got caught. Ask your recruiter about it, just to be sure.

Don’t expect thanks from a grateful nation. Somebody might buy you a drink in a bar. That’s about all you get. Many will regard you as a criminal or a fool.

Wars seem important at the time, but they usually aren’t. Five years later, they are history. About sixty thousand GIs died in Vietnam. We lost. Nothing happened. It was a stupid war for nothing. Today the guys who lost faces and legs and internal organs back then are just freaks. Nobody gives a damn about them, and nobody will give a damn about you. A war is a politician’s toy, but your wheelchair is forever. If you want adventure, try the fishing fleet in Alaska.

Think about it.


Edit: I've a bit to add. The military can be a very good experience. But if you are seriously considering joining, don't join the Army or Marines. These are the guys fredoneverything is talking about. If you absolutely have to go into one of these services, try to get a support position.

The Air Force or Navy is a better bet with a much lower risk of danger. Or the Coast Guard. Although the Coast Guard does get deployed to protect foreign ports. They also run drug interdiction along our coasts. They do the mission every day.

Join and learn a skill. Marching around and shooting a gun is not a skill. Mechanic is a skill; planes or cars or helicopters. Fix Generators or jet engines. Learn how to load a plane. Civil engineering is a skill. Air Traffic control is a skill. Fixing communications equipment is a skill. Insalling network stuff is a skill.

If you're going to do it, do it smart. Use the military for your goals and do your best to prevent them from using you for theirs.