36 Chambers – The Legendary Journeys: Execution to the max!

August 31, 2009

Quick Notes

Filed under: Curmudgeonliness, Economics — Kevin Feasel @ 10:04 pm

- First you make the moral hazard, then you unmake the moral hazard. Except that the second part never gets done, so just blame “the marketplace” and all is good.

- This I enjoy:  screwing [with] the EU light bulb policy.

- No blood for oil!

August 30, 2009

A Manly Weekend

Filed under: Uncategorized — Kevin Feasel @ 7:47 pm

This weekend, instead of posting like I thought I would, I ended up performing a series of necessary tasks to improve my domestic situation.  First, I did my semi-annual toss-out expedition, eliminating roughly two bags worth of stuff.  Today, I fixed the lighting situation in my living room—it used to be pretty dark because of how spacious the room is—with a couple full spectrum lights.  They do seem to light up the room better than my previous lamps, though I will have to get used to the fluorescent-like lighting.  Unfortunately, those lamps are 4′ tall, so that wouldn’t do at all for me.  As a result, I ended up going and getting 5-gallon paint buckets to put them on.  The base fits almost perfectly on the bottom of these buckets, and I hid them behind a chair and a table, so you can’t see the redneck rigging job I did…

On top of that, I also improved[?] the bike basket situation.  I have a front basket that I’m using on the side, and I used velcro and weather stripping to make the fit there tighter.

Then, if that weren’t enough, I also have plans to shorten a couple of belts (because they’re a couple inches too big for me) and hang up a pair of portraits.  But right now, I’m relaxing with a franchise of Madden 10.  Tony had better be correct that this is a potato of games…

August 28, 2009

No Time…

Filed under: Uncategorized — Kevin Feasel @ 4:38 pm

Well, looks like I won’t get to finishing up the stuff I wanted to do.  I’m learning SSIS via a work example, so that’s my current homework.  In addition, I’m looking over a dissertation draft, meaning that what little time I had is gone as I race to get everything done before Shabbat, as I won’t have any time on Sunday…

There should be a couple of posts this weekend, though, as I still have enough of a guilt-based ethic to keep going every day (even though it’s been more sporadic lately).

August 27, 2009

Quick Notes

Filed under: Curmudgeonliness, Economics — Kevin Feasel @ 7:17 pm

I’ve been a bit busy at work and haven’t had time to finish up my table-valued parameter posts, but hopefully that will happen tomorrow.  I’m also looking at an In The Papers to thin down my stack here.  In the meantime, a few notes…

- High-speed rail does not pass cost-benefit analysis. I’m shocked…  One day, people may finally realize that government planning simply doesn’t do a good job.  If people want to use a particular means of transportation, they will signal it by their willingness to pay, and profitable routes will, in a free market, draw entrepreneurs to satisfy this demand.  Having government throw hundreds of millions to billions of dollars into something that people don’t want is a waste of resources.

- John Stossel points out that light rail doesn’t do any better. Maybe someday I’ll figure out the left-wing fascination with rail…

- Banks are advertising that they don’t need bailed out. As noted previously, this was a) obviously going to happen, b) a normal market function, c) exactly the correct thing to do, and d) detrimental to government planning.  Again, one day, people may finally realize that government planning simply doesn’t do a good job.*

- Jeffrey Hummel thinks that the US government will default on its debt. Arnold Kling thinks that a wealth tax will occur by threat of military force.  I disagree—any politicians who tried that would find their campaigns DOA.  The amount of taxation necessary to pull the American government out of its debt would be high enough that most people would be affected (and politicians who propose tax hikes tend not to remain popular) and money would flow out of the politicians re-election funds and into the funds of their competitors.  Arnold also helpfully provides his priors.

- Let’s destroy property—it’s good for the economy! Excuse me a moment; I have to go fight off anarchist urges…

* – I may have to start using macros like TMQ…

August 25, 2009

Table-Valued Parameters

Filed under: Programming & Work — Kevin Feasel @ 9:01 pm

A work project I just picked up yesterday was trying out whether table-valued parameters would work for our current setup.  I was reading a few articles about them and was quite intrigued.  They are new in SQL Server 2008, so we can’t use them until the server upgrade is complete, but I have 2008 installed on my local machine, so I started to play around with it.

Right now, we use templates to generate a stored procedure to get records.  Supposing we have a view called vwWhatever, we generate dynamic SQL based on the value of variables that we pass in.  One example might look like:

Select * from vwWhatever
WHERE 1 = 1
AND BoardNumber in (select value from dbo.fnDelimitedValues(@BoardNumber, @Delimiter))
AND BoardNumber not in (select value from dbo.fnDelimitedValues(@BoardNumber_Not, @Delimiter))

In this view, we pass in two variables which are varchar(max):  @BoardNumber and @BoardNumber_Not*.  These are fairly self-explanatory:  we are looking for some set of board numbers—say, 1, 2, 3, and 4.  We might also want to exclude certain boards.  The sets of information are delimited by some character called @Delimiter, and fnDelimitedValues is a user-defined table-valued function which splits the string into component pieces.

This is slow for a couple of reasons.  First, splitting strings in T-SQL is slow, and the CLR isn’t that much better.  Calling that user-defined function for every parameter will slow things down.  In addition, in and not in are very bad for performance, and we’d ideally like to translate those into inner/outer joins.

That’s exactly what Table-Valued Parameters let us do.  Instead of the above query, we can translate it into the following:

Select we.* from vwWhatever we INNER JOIN @BoardNumber boardnumber on we.BoardNumber = boardnumber.Value
LEFT OUTER JOIN @BoardNumber_Not boardnumber_not on we.BoardNumber = boardnumber_not.Value
WHERE 1 = 1
and boardnumber_not.Id is null

Now, @BoardNumber and @BoardNumber_Not are user types.  I made an extremely simple user type:

Create Type CodeGeneratedType
(
Id int NOT NULL,
Value varchar(max) NOT NULL,
Primary Key(Id)
)

I originally had Id as an identity integer, but later problems caused me to change it to a non-identity and let ADO.Net handle those values. The concept here is simple: instead of a delimited string that gets passed to the stored procedure, we create DataTables in the data objects and pass them to the stored procedure to allow for inner/outer joins.  The “good” values should be inner joined—we only want to get the ones which show up in that list—whereas the bad values are outer joined and we’re looking for null records, as we want everything but the “@BoardNumber_Not” set.  I made value a varchar for conversion purposes, as it works for most of our data types, but I’m thinking about creating a more detailed set of user-defined types to optimize for integers, decimals, datetimes, varchars, etc.  I don’t know if this would be a worthwhile endeavour, so I’ll have to do some tests to find out.

By doing this, I was able to turn a stored procedure which required roughly 1,000,000 reads (yeah, it was that bad) into an equivalent stored procedure which required just 35,000 reads and roughly a quarter of the time.

Tomorrow, I’m going to try to finish this with a second post on the data object layer, to show what I did there to get my select query to work as anticipated.

* – There can be a number of other values on that table, but our dynamic SQL only includes the “AND [variable] in (…)” bit if the appropriate string is not null, which it is by default.

August 23, 2009

A Good Birthday Present

Filed under: Uncategorized — Kevin Feasel @ 7:36 am

The European Parliament (yeah, I know…) wants to have August 23rd be a day in commemoration of “victims of totalitarian or authoritarian regimes.”

August 22, 2009

A Few Notes (Glad Tidings Edition)

Filed under: Curmudgeonliness, Economics — Kevin Feasel @ 9:56 pm

- Who are the uninsured? They mostly fit into (at least) one of the following categories:  already covered under Medicaid/CHIPS, non-citizens (many of whom, I would gather, are here illegally), those who are young and healthy, and those who are wealthy enough to afford insurance but choose not to purchase it.  Take those out and you have a much smaller core of individuals for whom you could make the argument that some kind of insurance would be beneficial and for whom taxpayer dollars ought to be spent.  I’d still disagree with that argument, but it’s better than passing along the “there are 950 million uninsured Americans who could die any minute!!!!!!!” hyperbole.

- Thank goodness our federal government is protecting us from the horrors of garage sales. Joe Biden’s on the job!

- I’m sure glad we don’t have a President who makes stupid verbal errors and spits out incomprehensible things. Or maybe he was actually speaking French…

- I’m sure glad that mean ol’ Congressional Budget Office was totally wrong on projected deficits from The Obama Experience. But hey, what’s $2 trillion among friends?

- I’m sure glad Democrats in leadership positions have forgotten that a good chunk of their party don’t even come from San Francisco or (gasp!) New Jersey. (Actually, I am glad about this; that limits what they can do).

- I’m sure glad the ACLU is spying on American citizens. There’s something ironic in the whole story.

- I’m sure glad Democrats, most of whom have never held a real job in their lives, are qualified to determine what form of compensation denotes “excessive” and that health care companies should just spit out all of their documents for propaganda research purposes.

- Finally, Bob Murphy points out one of the problems of regressions. Running a regression against one data sample doesn’t tell you the full truth.  It’s a shame that Krugman the Political Hack murdered Krugman the Economist in his sleep roughly a decade ago…

August 21, 2009

Friday Notes

Filed under: Curmudgeonliness, Economics — Kevin Feasel @ 1:26 pm

Some quick notes before my weekend begins:

- Bob Murphy wants to show you over and over that a good portion of the “credit freeze” was inflicted by government over-reaction.  In other words, when Hank Paulson and Ben Bernanke were saying that the world would end without massive government spending and kickbacks to their buddies, things were not doing nearly as poorly as they claimed.

- The United States Health Postal Service, under criticism…in 1994.  Jesse Jackson, Jr. is trying to replace Ted “It’s not a dump truck; it’s a series of tubes!” Stevens.  You see, the public option is a stamp; it’s e-mail!  You just go to the doctor and he e-stamps you and you’re all good again.  If it weren’t for that stampenmail stuff, it’d cost, like, a billion dollars to e-mail anyone.  Meanwhile, it’s the same price to ship a kiwifruit to your local grocer’s as it is for you to ship a letter to your buddy across the street.  Thanks, government monopolies!

- The first line of a Heritage Founation blog postSen. Ted Kennedy (D-MA) likes to refer to healthcare as “a fundamental right and not just a privilege.” Except for Mary Jo Kopechne.

August 20, 2009

Jobs No Longer Saved Or Created(?)

Filed under: Curmudgeonliness — Kevin Feasel @ 7:36 pm

Cash For Clunkers is dead.  My questions are, 1) whether the 1000 new bureaucrats will be laid off, and 2) whether those 1000 jobs will still be considered “jobs created or saved.”

Joe Biden, meanwhile, sheds a mournful tear as some of his precious charges will now be left in the wayside.

August 18, 2009

Madden NFL 10 – the Review You Can Use [tm]!

Filed under: Reviews you can use [tm]!, Sports, Video Games — Tony Demchak @ 9:25 pm

I’m about a third of my way into my third season of Madden 10 for PS 3. I just noticed something was missing …

The bugs.

For the first time in a long time, I have encountered no obvious bugs or flaws with a Madden game. This isn’t to say the game is flawless — it isn’t. The pass rush is still a little lack luster and you still can’t arbitrarily fire coaches in mid-season. But there’s a lot to like.

Graphics: 9.5. The frame rate is a bit choppy coming into and out of The Extra Point (the Sportscenter style show during halftime and every week), but otherwise it’s excellent. Players look realistic and the action is incredibly fluid. The animations aren’t nearly as bad as they have been in years past, and they’ve included new tackle animations for gang tackles (allegedly up to nine players — never had that happen, though.)

Audio: 9.0. The sounds are first rate, and the music is quite good as well. However, there’s a peculiar downgrade in broadcast quality, which is unusual. Chris Collinsworth was much better in Madden 09 and had more specific player comments, unless this is because I’m playing as the Browns. The commentary on Extra Point is a little too formulaic and choppy to be truly believable, but it’s a good entry into the genre (although the sports radio was still better).

Gameplay: 9.5. Just a terrific game of football. Most of the AI problems have been fixed, although the computer is still a little too good at avoiding sacks. However, the Almost-Sack (tm Aaron Schobel) is now more devastating — get hit as you throw and you’ll suffer. Fight for the Fumble is absolutely moronic. You basically pound buttons as fast as you can to recover the fumble. The only reason it didn’t harm the score more is that you can turn off. My Skill is still a work in progress. If you already have a great team, it’s a way to keep the challenge fresh. However, if you have a mediocre to bad team, the challenge of an ineffective team is greater than My Skill can appreciate. Running the ball is a little harder than in times past, but you can now get decent gains with pure speed runners, like Darren Sproles — the trick is to sprint after you hit the hole and not before.

Replayability: 10.0. Franchise mode is wonderful. They borrowed the potential rating from Head Coach, although they are grades (A-F) instead of numbers. You can unlock this in the draft by scouting, which gives you concrete ratings for skill, instead of claiming every wide receiver is the next Randy Moss. The more you scout, the better you can do. Different scouting agencies either let you scout faster (fewer weeks to unlock the important stats) or more (more people), but scouting is absolutely critical to a quality draft.

I haven’t tried Superstar mode yet, and will make a new post when I have.

This game is a definite BUY. It’s the best Madden I’ve played in a long time, and entirely without bugs! (At least so far.) They stripped out some of the stupid parts that never helped (helllo weapons!) and added new ones, like giving four accuracy ratings for QBs (short, medium, long, and on the run — very handy for knowing how to use your QB). The progression system works well, but not too well — one season will not turn a chump into an All-Pro, but it might give a player six points of ratings increases.. Ratings as a whole are generally lower, so each point of rating is more meaningful — The difference between a 79 and an 80 is bigger than ever. Players progress rapidly as they are young and slow as they age — like the Red Queen, as players get older, you have to run as fast as you can just to stand still.

All in all, a wonderful football game and the best Madden in years.

Older Posts »

The Silver is the New Black Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 94 other followers