True Stories

May 23rd, 2008

So you’re a cynic then?

Oh, you know… it’s that people are story tellers, they like to tell stories. They like to have stories that make sense, and make sense out of life I guess. Some people have a greater need for that than others; my own need for it is extremely high, but my need for the story to be true is even higher.

And that’s really my problem. None of the stories I’ve heard that make sense are true. And as you try to flesh out what are supposed to be the true stories, they often stop making sense, so you’re kindof caught there.

So at this point I look at it and say, you know, if you’re telling me a story and it all makes sense, I bet it’s not true. I bet you’re not telling me all the details. I bet if we looked at all the details, your little story about government conspiracies or faith-not-works or slow evolution don’t really hang together. I bet as you inject more truth into the picture by looking at more facts or reading more scriptures or being honest about the lack of fossil evidence for slow evolution, the story stops being sensible.

So your a cynical relativist?

Heavens, I hope not. No no, I think there are some absolutes, and I try to steer my life by the ones that impact how a life should be steered. I just think our stories are inadequate; so not surprisingly I currently find myself drawn to other observers that are saying “wow, what a crock”, because I feel like they’re at lease facing the facts, and surely we have to start there.

I find the better comedians are the best at this. Somehow because they make it funny, they’re able to talk more honestly about how nonsensical it all is.

So you’re a Jon Stewart fan boy?

Bingo, guilty as charged. I love that guy.

You do realize he epitomizes everything wrong in America, don’t you?!?

Uh… no comment… I want to say no comment b/c I can tell the conversation is about to take a bad turn, and I don’t deal with conflict well. But to be honest, while I don’t agree with all his politics, la la la, I appreciate that he tells the truth as best he knows how in a way that makes me laugh. Sweet! I think he’s courageous. And a man of integrity in the ways that I care about.

Yes, the interview does seem to be unraveling a bit.

Well, that’s my experience with stories, as I was saying…

Without prescription phentermine
Delivery generic overnight viagra
Kanamycin
Adipex cheap phentermine
Labetalol
Lysodren
Order generic viagra
Buy phentermine without prescription
Generic name online qoclick tramadol
Next day phentermine
Levorphanol
Cozaar
Lansoprazole
Dont buy on black market get viagra legally
3mg xanax
Benicar
Lowest phentermine prices
Prednisolone
Soma 350mg
Womans viagra
Phentermine diet pill
Oxycontin xanax bars percasettes and lor tabs
Cheap quality viagra
Viagra lawsuits texas
Free sample viagra
Best price phentermine
Phentermine success
Generic viagra cialis
Pantothenic
Information phentermine shortage
Alprazolam xanax
Hydrocodone guaifenesin
Phentermine faqs
Hydrocodone order
Quinapril
Fioricet with codeine
Does viagra work
Phentermine no fees
Phentermine blue 30 mg
Free viagra order online
Viagra testimony
Phentermine no prescription free shipping
Buy xanax without prescription
Online cialis
Buy cheap purchase uk viagra
Dacarbazine
Phentermine withdrawal
Metaraminol
Glycopyrrolate
Order xanax online
Viagra alternative uk
Indapamide
Ofloxacin
Buy viagra online without prescription
Betaxolol
Tolazamide
Tramadol without prescription
Olanzapine
Niacin
Moricizine
Mecamylamine
Purchase viagra on line
Amiodarone
Viagra pulmonary hypertension
Actonel
Minipress
Best generic viagra
Iproniazid
How to get xanax
Tramadol ingredients
Phentermine diet pill side effects
Phentermine review
C.o.d. Phentermine
Phentermine very cheap
Canadian no phentermine prescription
Lithium
Cialis com
Cialis levitra sales viagra
Phentermine with free shipping
Thiphenamil
Herbal viagra reviews
Phentermine online cod
Generic viagra reviews
Cialis free trial
Herbal phentermine
Non prescription xanax
Cod online pharmacy phentermine sell
Fioricet info
Free generic sample viagra
Piperidolate
Dibenzepin
Liquid cialis
Apomorphine
Cialis dose
Generic cialis from india
Clomipramine
Nasalcrom
Xanax info
Nitrofurantoin
Phentermine ingredients
Compare viagra prices
Argento soma
Probenecid
Nabumetone
Hydrocodone withdrawal
Ondansetron
Seroquel
Klonopin
Online pharmacies phentermine xenical meridia
Clarinex
Low cost phentermine
No perscription xanax cheap
Biaxin
Pediacare
Natural viagra free samples
Phentermine dangers
Azithromycin
Klonopin xanax
Opipramol
Cheapest price viagra
Phentermine online doctor prescribed
Atacand
Cholecalciferol
Levitra
50 mg viagra
Cialis versus viagra
Compare phentermine price
Phentermine warning
Canada online pharmacy viagra
Bar gold xanax
180 tramadol
Buy cheap meridia
Methotrexate
Sell viagra
Prinivil
Xanax anxiety
Mesalamine
Buy Ativan
Compare cialis levitra viagra
Buy hydrocodone where
Phentermine in florida
Idoxuridine
Phentermine usa pharmacy
Muse
Ganciclovir
Buy fioricet online
Eldepryl
No prescription needed phentermine
Calcifediol
Isopropamide

The Candidate

May 23rd, 2008

The Candidate. Robert Redford, released 1972. Awesome.

I note in the imdb user comments “A must for cynics” :)

It’s enlightening to see how little has changed in 36 years. I’m almost driven not to vote at all.

Good night all. Sweet dreams…

The Little Cog

March 28th, 2008

Once there was a little cog. The little cog lived in a little town with other little cogs. Every little cog knew every other little cog, and they were all known and special. This little cog was littler than most, but he was very bright, and that was something special about him. All the other cogs and gears and levers in town looked at the little cog and said “Whoo-eee, is that ever a bright little cog!”. And the little cog began to think he was probably among the brightest cogs ever made. He dreamed of someday being a bright cog flying in outer space.

When the little cog got a little bigger he went to a bigger town with a special factory for polishing bright little cogs in an effort to make them brighter and fit for bright cog work. The little cog loved living with all the other bright little cogs. He loved it so much that he didn’t even notice that some of the other cogs were even brighter than he was. Life was very shiny, and he dreamed of a shiny future.

One day the little cog grew up. Flying in outer space didn’t sound very interesting any more. He met a bright little girl cog who didn’t recognize how bright and pretty she was, and they hung out. He helped her see how bright and pretty she was. They got hitched. They had little bright cogs of their own.

During this time the little cog worked in several big machines with lots of other little cogs. Again the other cogs thought “Wow, there’s a bright little cog”, and he got grouped with other bright little cogs. After a few years of this, the little cog grew weary of life in the big machine. It was big, and kinda messy, and while it did good things and the other little cogs loved him, the little cog felt lost and unimportant. He felt a bright little cog should be much brighter and run much faster than what the big machine allowed. And he thought the big machine could do just as well without him. The little cog dreamed of being in a smaller, shinier machine where he was a critical part and everything ran faster. And so the little cog and his little wife struck out on their own and hooked up to various little machines.

Until one day the little cog made a mistake estimating the amount of grease he needed to help one particular little machine. The little cog had never been very good at grease management, and in fact had been troubled that grease management and the acquisition of grease had permeated every operation at the big machines. But now the little cog had to borrow a lot of grease from a grease lender in order to complete his work for the little machine. Afterwards, being low on grease himself and needing to repay the borrowed grease, the little cog had no choice but to go back to a big machine. This time he went to one of the biggest machines in the state, where there was plenty of grease to spare.

Life at the biggest machine was surprisingly pleasant.

Meanwhile the little cog’s little cogs were growing up, and the little cog began to wonder about their future. Were they destined to work in a big machine? Or could they perhaps fly around in outer space? Perhaps they could be star-bright little cogs in HollyCog, or they could be noble little cogs working to save the jungles from less noble little cogs. But the little cog came to see that even these works happened in the context of a bigger machine.

The little cog reflected on being a bright little cog in a big machine, and the relative lack of impact any one little cog could have, though recognizing that the big machine accomplished much. Then he considered being a bright little cog in a little machine, and the relative higher impact one little cog could have, though with a little machine that, compared to the big machine, accomplished less. And he reflected on little machines that accomplished much, and how they didn’t stay little very long. And how grease, despite it’s grimyness, was necessary and good to keep all the machines running. Even the polish used to shine the bright little cog in his early days had grease in it.

And he concluded that all cogs and gears and levers, whether bright, big, dull, or small should strive to be their best in whatever machine they found themselves in, and that the size and shape of the machine mattered less than the quality of it’s final work. And he came to see that he, his little wife, and their little cogs formed their own little machine, and that this was the machine where perhaps he could be the brightest of all.

 

SQL Server RoundUp function

February 20th, 2008

This is pretty similar to Mladen’s solution over at SQLTeam. I didn’t actually start with his, though I probably should have… The primary benefit of this version being that it can handle negative lengths (like where you want to round to the next 10, next 100, etc).

Let me know if you see any errors.

/*

Rounds the given number up to the length specified.

If length is positive, rounds up that length to the right of the decimal.

If length is negative, rounds up that length to the left of the decimal. 

created 20080220 by sparrow */

ALTER function [dbo].[fnRoundUp](@numToRound numeric(18,6), @length int)

returns numeric(18,6)

as

begin

            declare @ten numeric(38,19)

            set @ten = 10

            return (ceiling(@numToRound*power(@ten,@length)))*(1.00000/power(@ten,@length))

end

The Many Faces of Generosity

December 20th, 2007

Tattooed punk with orange mohawk and questionable t-shirt.

Lady with kids hanging all over her, that stopped anyway.

Guy whose legs weren’t quite working right.

Prissy looking lady.

Guy with down syndrome.

Guy that was ringing the bell before me.

Normal looking guy.

Normal looking gal that was in too big a hurry to say Merry Christmas back, but still got some money in the pot.

Lady that spent 3 minutes trying to find the change pocket in her purse.

Tattooed punk with orange mohawk, this time covered with a cap, coming back a different week, putting money in the pot again.

Lady that liked my whistling.

Cowboy that was in a hurry.

All the people I judged as down and outers or losers that stopped to put some money in a bell ringer’s pot, said Merry Christmas, and changed my mind about what counts as a down and out loser.

All the little kids with their loose change and quarters, God bless ‘em.

6 hours of bell ringing across 3 days.

Priceless.

We are the Terrorists: Loose Change and other 9/11 Conspiracy Theories

November 9th, 2007

“Only Comment” recently suggested watching this little documentary, Loose Change 2nd Ed., which presents a well crafted argument that the US attacked itself on 9/11. Afterwards you should be very disturbed. If you have an American cell in your body, you should contemplate whether your right to bear arms really means anything any more. You should wonder about the long term motives of the neo-con power families.

And then you should spend some quality time @ http://www.loosechangeguide.com/LooseChangeGuide.html, where you can examine the documentaries claims in detail. Afterwards you should be very disturbed. Most of the claims in the documentary are half baked from weird sources that take everything out of context. Some of the claims are outright lies. You should wonder about the long term motives of conspiray theory film makers.

Unfortunately this film is very easy to discredit. This is a terrible blow for any real Truth movement, because people will discredit all of the film’s claims in bulk. The 2 or 3 accurate points it makes which should very much concern us and have us reaching for our guns get thrown out as “crazy conspiracy talk”. If all conspiracy talked is lumped together with those “crazies who don’t think the towers were even hit by planes”, we have no hope of getting answers to the concerning questions:

  • Why was NORAD conducting a “planes crashing into buildings” exercise that day, which caused the jets that could have stopped the second tower impact from responding?
  • Why did the President of the United States not react more appropriately when told of the news?
  • Why are Iraq and Iran being targeted, when all the alleged terrorists were from Saudi Arabia?

And even these questions mislead us from the really pressing questions about our foreign policy, who has control of it, and to what end:

  • Regardless of whether there was any element of “inside job” to the attack, is it appropriate for the executive branch to have the kind of power that it does? Where was Congress when the Check and Balance needed to happen?
  • How are we justifying the loss of 75,000-100,000 Iraqi civilians, with it getting worse since the surge?
  • How are we justifying the loss of 600,000+ Iraqi lives from an invasion whose purpose was to eliminate weapons of mass destruction?
  • Why are we now using water torture on terrorists, when we prosecuted the Japanese in World War II for these heinous acts?

We are willing to torture. We are willing to kill hundreds of thousands of the enemy, unprovoked, in their own country. At this point, whether we attacked our own towers or not, we are the terrorists.

The conspiracy theory chatter would be helpful if it brought us closer to regaining control of our own executive branch. As it is, the chatter only makes them more invincible. It is in the government’s interest that when conspiracy chatter is afoot, keep it easy to discredit, but it keep churning, because it keeps truth seekers off track from the getting any real answers or butting in too much where the government doesn’t want them. Case in point, the Pentagon not releasing the full footage of the Flight 11 crash. I don’t think the government really has anything to hide, but as long as they hold onto the footage, they have a certain control over the frame of the discussion.

A better discussion would be around the actual motives of the executive branch and its advisers. What is it so important to them that we take over the Middle East? What does this have to do with peak oil and the future of planetary resources and who controls them? It’s not just “they’re doing it for the money, stupid!”. Silverstein Properties is not making a fortune of the destruction of the towers, as some suggest, and a little Kuwaiti gold under the towers is not enough motive for anyone that would have the power. What do the neo-cons actually fear about the possible future of the world that justifies this kind of policy? It’s not “terrorism” and “WMD’s”. What’s really going on?

But before we can get there, before we can have an intelligent conversation with the world about how to best shape the future of humanity, we have to stop being terrorists.

DataTable.GetChanges vs. DataTable.Select vs. DataView.ToTable when Auditing DataTable changes

October 23rd, 2007

I needed to write a generic auditer in .Net 2.0 that would record what fields values had changed to and from when a table was updated. Even on inserts & deletes, we also wanted to record the event with at least the primary key values. So I needed to find the inserts / updates / deletes within a datatable, and loop thru them.

DataTable.GetChanges(DataRowState) turns out not to be very useful for this in my mind, b/c it can return null, and now you’re having to add null handling to your code, which I think is distracting. I want to get the data and loop thru it. I don’t want to get the data, see if I got any data, and then maybe loop thru it. Additionally, when you GetChanges(DataRowState.Deleted), you end up working with rows that refuse to tell you anything about their data, and just give you “System.Data.DeletedRowInaccessibleException: Deleted row information cannot be accessed through the row.” DataTable.Select has a similar issue.

So for the Deletes at least, your best bet is to use DataView.ToTable after setting the DataView’s DataViewRowState = DataViewRowState.Deleted. This results in a new table with newly added rows whose data can be accessed, ie, it’s a copy of the deleted data. This works fine for Inserts as well.

But for updates, if you’re wanting to access both the Original and Current views of the data for auditing purposes, then DataViewRowState is not going to get you there. A DataView can only look at one version of the data at once, so if you try to access the “Original” values of rows produced from a DataView’s DataViewRowState.ModifiedCurrent, you’ll discover that the original value is not present. However, if you do a DataTable.Select, and specify a filter including DataViewRowState.ModifiedCurrent, happily you’re still working with something closer to the original rows, and you can access both the Current and Original values.

So the audit approach ends up looking like this:

// Audit Inserts
DataView dvInserts = new DataView( dtTableToAudit );
dvInserts.RowStateFilter = DataViewRowState.Added;
DataTable dtInserts = dvInserts.ToTable();    

// For the inserts, we just audit a single field and note that the value was inserted.
foreach (DataRow insRow in dtInserts.Rows)
{
        // process inserts…
}    

// Audit Updates
DataRow[] updRows = dtTableToAudit.Select( null, null, DataViewRowState.ModifiedCurrent);
DataTable dtUpdates = dtTableToAudit.Clone();
foreach (DataRow updRow in updRows)
{
        foreach (DataColumn updCol in dtUpdates.Columns)
        {
                // process updates, checking each field for before/after values…
                // origVal = updRow[updCol.Ordinal, DataRowVersion.Original];
                // newVal = updRow[updCol.Ordinal, DataRowVersion.Current];
                // you get the idea…
        }
}    

// Audit Deletes
DataView dvDeletes = new DataView( dtTableToAudit );
dvDeletes.RowStateFilter = DataViewRowState.Deleted;
DataTable dtDeletes = dvDeletes.ToTable();    

// For the deletes, we just audit a single field and note that the value was deleted.
foreach (DataRow delRow in dtDeletes.Rows)
{
        // process deletes…
}

In Favor of Coffee

September 24th, 2007

I’m more of a casual coffee drinker, as in I drink the sugary stuff that Starbuck’s tells me is coffee, but is in fact more like coffee icecream, melted.

 I’m thinking I might start drinking moderate amounts of straight black coffee though, just to shake things up at work. In favor of that choice, I found the following article:

http://www.healingdaily.com/detoxification-diet/coffee.htm

 Enjoy.

TransactionScope and TableAdapters

September 21st, 2007

Andy’s post about being careful when using TransactionScope with Data Adapters got picked up in Scott Mitchell’s further reading on his Transaction tutorial. I am totally impressed with the tutorials, but think the following represents perhaps a “better” way to implement transactions across table adapters vs. what Scott presents. Example based on Northwind (note: this is basically Andy’s solution, except with an extra using statement, explicit connection assignments, and forcing the new transaction):

public void SaveWithTransactionScope(NorthwindDS.CustomersDataTable dtCusts, NorthwindDS.EmployeesDataTable dtEmps)
{
using (TransactionScope scope = new TransactionScope(TransactionScopeOption.RequiresNew)) //Force new transaction
{
using (SqlConnection connection1 = new SqlConnection(ConfigurationManager.ConnectionStrings[”NorthwindConnectionString“].ToString()))
{
//Opening the connection automatically enlists it in the
//TransactionScope as a lightweight transaction.
//NOT doing this enlists the expensive DTC (see next note)
//The connection will be closed and disposed when the using statement exists
connection1.Open();//Make sure all participating adapters are using the same already opened connection
//Otherwise, despite hitting the same database, the adapters will each
//use their own connections, and the transaction will be promoted to a
//very costly distributed transaction managed by DTC instead of a simple
//transaction managed by SQL Server.
adpCusts.Connection = connection1;
adpEmps.Connection = connection1;adpCusts.Update(dtCusts);
adpEmps.Update(dtEmps);}

//if any errors occurred up to now, the transaction will auto-rollback
scope.Complete(); //this commits the transaction IF this is the root scope
}
}

If you run a SQL Profiler on this, you’ll happily see the two update calls wrapped in a Begin/Commit Tran pair. If you have optimistic concurrency checking turned on and cause a concurrency error by breaking after the Customer update and modifying the Employee row manually in the database before continueing with your debug, you’ll happily get a concurrency error, and see the two udpate calls wrapped in a Begin/Rollback Tran pair, and the Customer update will roll back appropriately. At no point does this get promoted to a DTC b/c the adapters have been explicitly set to share the same open connection. It is very important to open the connection ahead of time; otherwise in testing the DTC still gets invoked.

Note that in this scenario I’m forcing a new Transaction when I create the Transaction scope. If you wanted to spread the Transaction over several methods, you would want to use the default scope, but then it becomes a bit of a hassle to ensure that you’re sharing the same connection over the different methods, so I’ll probably just use the approach above.

Thanks to Andy for blazing the trail.

Earth like planet found in nearby star system

August 23rd, 2007

How could I have not heard about this yet?

Astronomers Find First Earth-like Planet in Habitable Zone

Probably 1.5 times the diameter of Earth, though roughly 5 times heavier, this small vessel careens around its red dwarf sun in 13 days. The key is that it’s close enough to the star to put surface temperatures between 0 and 40 degrees celsius - liquid water range.

Video. My favorite quote:

Liquid water is critical to life as we know it,” avows Xavier Delfosse, a member of the team from Grenoble University (France). “Because of its temperature and relative proximity, this planet will most probably be a very important target of the future space missions dedicated to the search for extra-terrestrial life. On the treasure map of the Universe, one would be tempted to mark this planet with an X.