Tuesday, December 30, 2008

Tis the season for Top 10 Lists

As I sat tonight watching the evening news I was struck with a strong sense of boredom and reminder of why I normally boycott the news this time of the year.

Top 10 Lists drive me nuts.

For the next week the "news" is all about the top "news" items that happened this year. I suppose these news lists are for folks who have been living under a rock because these reminders are for idiots. The top stories "july oil prices at all times high" ... did ya know a black dude got elected to be president ... there was a huge financial market crash ... car makers flew to dc in private jets and then begged for our tax dollars... palin makes all alaskans look like idiots ....

Mr & Ms News Reporters - if you must spend this week summarizing about what just happened, how about a list about the top 10 stories you missed because the above stuff has dominated the headlines all year long!?

Wednesday, November 12, 2008

Google templates

In a recent past life I wrote business plans for competitions held amongst Washington universities. I converted one of my winning plans to a Google Template and donated it to the Google templates team.



Given how sad the economic market is looking, it might be a great time to sit down and write down that idea you have been mulling over for years. You just don't know when you might need to find new employment.

Sunday, November 9, 2008

OpenFileDialog.showDialog hangs on Vista

OpenFileDialog began hanging when called directly from some of my code. (I'm dealing with C# 2.0 here.)

Turns out it doesn't run in it's own thread, but takes over your main thread. Vista just isn't a big fan of this. To get around it you need to invoke OpenFileDialog from within another thread. I stumbled upon this code that will work nice any time you need to popup another dialog window (such as a process indicator or built in ones like OpenFileDialog). Hopefully our pals over in Redmond fix up OpenFileDialog to just do this by default in the future.

I stumbled upon this code out in the blogosphere (https://forums.microsoft.com) awhile ago.

public class Invoker
{
public OpenFileDialog InvokeDialog;
private Thread InvokeThread;
private DialogResult InvokeResult;

public Invoker()
{
InvokeDialog = new OpenFileDialog();
InvokeThread = new Thread(new ThreadStart(InvokeMethod));
InvokeThread.SetApartmentState(ApartmentState.STA);
InvokeResult = DialogResult.None;
}

public DialogResult Invoke()
{
InvokeThread.Start();
InvokeThread.Join();
return InvokeResult;
}

private void InvokeMethod()
{
InvokeResult = InvokeDialog.ShowDialog();
}
}

Usage :

Invoker I = new Invoker();

if (I.Invoke() == DialogResult.OK)
{
MessageBox.Show(I.InvokeDialog.FileName, "Test Successful.");
}
else
{
MessageBox.Show("Test Failed.");
}

Saturday, February 9, 2008

Religion and Politics



If you have 40 minutes, this is a interesting talk by Obama on his view of Religion and Politics. In particular important is the addressing of Secular America.

Two interesting quotes:

We live in a pluralistic society. I can not oppose my own religious views on another. I was running for senator of the State of Illinois, not the minister of Illinois. - In response to his opponent Keys saying he wasn't a real Christian.

And longer quote:

Moreover, given the increasing diversity of America's population, the dangers of sectarianism have never been greater. Whatever we once were, we are no longer just a Christian nation; we are also a Jewish nation, a Muslim nation, a Buddhist nation, a Hindu nation, and a nation of nonbelievers.

And even if we did have only Christians in our midst, if we expelled every non-Christian from the United States of America, whose Christianity would we teach in the schools? Would we go with James Dobson's, or Al Sharpton's? Which passages of Scripture should guide our public policy? Should we go with Leviticus, which suggests slavery is ok and that eating shellfish is abomination? How about Deuteronomy, which suggests stoning your child if he strays from the faith? Or should we just stick to the Sermon on the Mount - a passage that is so radical that it's doubtful that our own Defense Department would survive its application? So before we get carried away, let's read our bibles. Folks haven't been reading their bibles.

This brings me to my second point. Democracy demands that the religiously motivated translate their concerns into universal, rather than religion-specific, values. It requires that their proposals be subject to argument, and amenable to reason. I may be opposed to abortion for religious reasons, but if I seek to pass a law banning the practice, I cannot simply point to the teachings of my church or evoke God's will. I have to explain why abortion violates some principle that is accessible to people of all faiths, including those with no faith at all."

Wednesday, January 23, 2008

Expelling Scientology from the Metaverse



I'm inclined to think there is no "we" behind this video and it is due to one very creative individual - but regardless - given the number of views on YouTube is it a fascinating statement on our society. I wonder if more people are beginning to understand the danger of "cults"?

Wednesday, January 9, 2008

Make a Profit off your College Bookstore

I have said it once, and I'll say it again - textbook rentals are not the solution to expensive textbooks, but I do have another suggestion.

Buy your used books from Amazon.com or another used book retailer like Half.com, or AbeBooks.com.

At the end of the term sell your books back to your bookstore for a profit. Yep - your bookstore doesn't distinguish between books bought from Amazon or their own bookstore, and since you can buy used books for less than 50% of the retail price - and most bookstore buy them back at the end of the term for 50% of retail, you can actually make a profit!

I did this for several years in college, so it worked at my college at least. Go ahead and try it out. At the least, you'll save money by buying your books online.