Here is a good article on using information_schema to view database metadata in SQL Server.

At work, my most recent project is to create a script to generate history for a number of tables.  Basically, we have a dbo schema and a History schema, as well as a number of tables which exist in both schemas.  The History tables have a ChangeId as the primary key, which links to History.tblChange.  That gives information such as the person who made the change, when the change was made, and a potential note describing what happened.  In order to keep this relatively generic and applicable to all of the tables, I created a script which checks the INFORMATION_SCHEMA.TABLES view to find out which tables had replicas in History and created a script which will insert a history record for inserts, updates, or deletes.

Here’s what I did (below the fold):

Continue reading


Smell You Later

Dick “7-9 is a good season, right?” Jauron is an ex-Bill.  Perry Fewell is the new interim head coach.  I don’t have a problem with Fewell, though I don’t know how he’ll be as a coach.

This is why Madden ’11 needs the ability to fire coaches mid-season.

C’mon high draft pick!

Sundry Notes

– So Kelo screwed over property rights and the fools didn’t even get anything out of it.  Good job, government; you guys rock.

IQ correlates with stock market participation. Banfieldian question:  is this because smarter people are less likely to buy into the “investing is hard” hype, or a biased variable (that IQ might also correlate with future-oriented behavior)?

– I don’t fault Bill Belichick going for it on 4th & 2 on his own 28.  I’m just glad that the Patriots failed…

How to improve our technology, by Napoleon

First off, this post was not written by Napoleon Bonaparte. I apologize if I led you to think that. First, he’s dead, and zombies are notoriously inefficient at using computers. Second, only blog members are able to write posts on this blog, which means Kevin, me, and theoretically Dan. Third, I’m pretty sure Napoleon didn’t know English, although I don’t know him personally, as he is, as listed above, dead. Ha ha Napoleon! You’re dead and I’m not! Unless this is blog is still popular in the future (I use the term popular loosely) or I die in the next five minutes, in which case I would still have outlived Napoleon, making my life a glorious success.

So, now that we’ve cleared that up, I recently completed The Napoleonic Revolution by Robert Holtman. Holtman primarily argues that while Napoleon is most famous for his military genius and the Napoleonic code, he made contributions to the economy, education, and industrialization of France in particular and Continental Europe in general. One of the ways Napoleon did this was by offering large cash rewards for innovative new technologies, like techniques for farming sugar beets (as sugar cane was hard to come by) or improving the textile industry. Now, Napoleon, being fundamentally a jerk, often reneged on his cash promises, but kept the technology anyway.

I think this idea would be an excellent way to stimulate technological innovation. Announce on all the major TV stations a contest for a particular advance — say practical, efficient, reliable fuel cells as an example — and offer a million bucks of sweet, sweet cash in exchange. Tax free, in a large bag with a dollar sign on it. For a government (and only a government could make it tax free — a private institution could also pay the difference), a million bucks is practically insignificant. However, it would stimulate innovation, and not just from major corporations, but private citizens, as everyone could use another million bucks.

I only see two major problems. One, grifters. As long as a number of scientists look over the idea and ensure it’s valid, and said scientists are not also grifters, this should be easily avoided. Two, I can see corporations dominating these contests. Now, this is a problem only in the sense that it prevents some citizens from participating. They will look at the contest and shy away, feeling they have no legitimate chance to win, and the idea is to maximize the number of people working on this. By the law of large numbers, we’re guaranteed at least one good idea nobody else has thought of before. You could either exclude corporations from the contest, offer more than one prize, or simply use a website of some kind to accept entries. Sure, you’d get drunken college students at 3 am writing “BOOBS RULE!”, but you could always monitor comments. Plus, we can all agree, boobs do actually rule and it doesn’t hurt that we are reminded every once in a while.

Windows 7 ahoy!

I finally got my free copy of Windows 7 from my computer manufacturer. No compatibility problems yet, and things do seem to run smoother and faster. It looks glossier than Vista, but since I got Home Premium 64 bit for Vista, it was already pretty glossy. Task bar navigation is much smoother, and it’s easy to add and remove things. I also like the show desktop button that is now anchored next to the clock. I still can’t launch nuclear missiles, but lots of computer programs of the ability to make irrational decisions (damn it Madden! Let me fire coaches midseason!!), so that’s nothing new. All in all, well done Microsoft.