Scott Hanselman

Buy an hour of consulting time and help the Tsunami Victums of Banda Aceh

January 19, '05 Comments [2] Posted in ASP.NET | DasBlog | XML
Sponsored By

A bunch of us, championed by Julia Lerman and Stephen Forte are going to auction an hour each of our consulting time to benefit the Tsunami victims of Banda AcehALL of the money will go to help the victims.

Within the next 48 hours the auctions will appear on eBay. Links will be posted as soon as they show up. Here are the participants.

Michelle Leroux Bustamante, Jonathan Goodyear, Andrew Brust, Richard Campbell, Adam Cogan, Malek Kemmou, Jackie Goldstein, Ted Neward, Kathleen Dollard, Hector M Obregon, Patrick Hynds, Fernando Guerrero, Kate Gregory, Joel Semeniuk, Scott Hanselman, Barry Gervin, Clemens Vasters, Jorge Oblitas, Stephen Forte, Jeffrey Richter, John Robbins, Jeff Prosise.


Who will this auction benefit?

In the long run, the auction is to benefit the people of Aceh Province , Sumatra , who have had their island destroyed and lost nearly 100,000 of their people. The waves may be gone, but the devastation continues and the fear of many more dying from disease continues.

We are trying to help, by assisting Aceh Aid at IDEP, an organization that is local and doing amazing work.

There is an area on their website devoted to this work: http://www.idepfoundation.org/aceh_aid.html. (www.AcehAid.org will take you right to this page). I recommend that if you are interested in knowing who you are doing this for, you go peruse that website, read the updates, read about the volunteer search, etc.

WHAT IS IDEP?

IDEP is a small, Indonesian NGO, based in Ubud, Bali . Completed projects over the years have included community based development, sustainable living initiatives, permaculture training, waste management, organic gardens, recycling, etc. The focus is on helping people to help themselves. IDEP's founding director, Petra Schneider is a US -born, Indonesian citizen. The demonstrated and reproducible success of IDEP's small projects in local communities has earned the team an excellent reputation.

IDEP AND DISASTER RESPONSE/RELIEF/RECOVERY

At the time of the Bali bomb, about two years ago, IDEP was an important element of the network of local NGOs and other supporters that quickly responded to the tragedy, in various ways, not only immediately after the bomb, but during the recovery process for the various communities involved. Following shortly thereafter, IDEP received funding from USAid to create a comprehensive set of disaster management materials for Indonesian communities, aimed at children, families, and local leaders (official and unofficial). The materials are in the Indonesian language and suitable for use in rural and urban settings. These materials, including a booklet for children about Tsunami preparedness, were finished just weeks ago, but had not yet been disseminated to communities. Then the tsunami struck.

WHAT IS ACEH AID AT IDEP

Only hours after the news of the tsunami reached Bali, the same network of NGOs and individuals in Bali who had been involved in the relief efforts for the Bali bomb, reanimated and went into action. We started something called the "Aceh Aid Bucket Brigade" (see website), creating and deploying one-family-one-bucket multi-material aid packages from the hands of donors in Bali to the field in Sumatra . We began sending highly skilled volunteers, well-matched to the task within two days of the tsunami (Sam Schultz, Lee Downey, Oded Carmi and others). Our relief, and later, recovery programs in response to the Tsunami are now focused on two fronts. One is direct aid from Medan by road to areas around Banda Aceh. The other is this remarkable joint effort (nothing short of heroic), to the islands off the west coast of Sumatra , which as of yet, have not been receiving aid from any other channels that we know of.

Fine Print:

About the auction: We have 25 amazing consultants and trainers in this auction. Each person has donated one hour of consulting time, to be provided by email or phone (at expense of bidder). The consultant and winner are free to agree upon other arrangements. It will be an Ebay "multi-item" auction where all of the consultants are in the same auction. The top 25 bids will be the winners. The highest bidder will get first choice of which consultant they would like to work with. Payments will be made DIRECTLY to Aceh Aid at IDEP's PayPal account (acehaid@tides.org).

A note about multi-item auctions. Normally and EBay multi-item auction is set up to auction off identical items, such as hammers. Given that they are of equal value, the multi-item auction rules state that the winning bidders would each pay the amount of the lowest winning bid. The .NET Celebrity Auction for Aceh Aid at IDEP will not work this way. Since this is a charity auction, we expect the winning bidders to pay the amount of their final bid. Allowing bidders to select consultants based on their bid rank justifies this, but moreso, the fact that this is a charity auction justifies this.

A note about your tax-deductible contribution. All contributions will be made through a PayPal account that goes to Tides Foundation (www.tidesfoundation.org) which is a  US-based 501c3 non-profit, permitting tax-deductible contributions and supported by many corporate matching programs. Tides Foundation's EIN is 51-0198509. Tides Foundation then forwards the full amount of the donations directly to Aceh Aid at IDEP.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Don't underestimate the power of ToString(IFormatProvider)

January 19, '05 Comments [5] Posted in Internationalization | Bugs | Tools
Sponsored By

UPDATE: I write this update minus one pinky finger. In the comments RichB and Paul van Brenk pointed out two bugs in my solution. First, RichB points out that ':' is a format modifier itself that describes the hours separator . So, that needs to be escaped. It can be escape either like \: or ':'. Paul points out that the final call to ToString should use the InvariantCulture, lest I end up with odd characters. Since I used the double (MM) numeric formats, this isn't a problem in 99% of cultures, but I could change calendars inadvertantly in Thai, in the Maldives, or in Saudi Arabia where different calendars are used.

Do NOT underestimate the power of ToString(IFormatProvider). I caught a fellow trying to to a DateTime conversion recently. He had do a (culture senstive) DateTime.ToString() then started parsing it into the specific format he wanted.

This is the height of pure evil and anyone who does it should lose a pinky. It's harder to parse these strings minus a little finger, and while harsh, this kind of punishment should deter others from making the same mistake.

The original question:

I have a DateTime variable which is holding the value as “1/13/2005 1:29:54 PM” and I want to convert to “20050113132954.000[0:GMT]”.

An answer:

DateTime foo = new DateTime(2005,1,13,13,29,54);
//TOTALLY OPTIONAL, but worth noting, assuming it was local time
DateTime bar = foo.ToUniversalTime();
string myNewDate = bar.ToString(@"yyyyMMddHHmmss.000[0\:G\MT]",System.Globalization.CultureInfo.InvariantCulture);

Notice the escaping on the "M" in the string literal "GMT." That's because "M" by itself is a Month formatter, so we say "no seriously, I meant M" by using "\M". Also, remember that "HH" is "zero-prepended 24-hour time" while "H" is "no-zeros 24-hour time" and "hh" and "h" are 12-hour times respectively. There are similar rules with "MM" for months and "mm" for minutes.

The final tip, don't even bother trying to do this stuff from memory without Chris Sells' FormatDesigner.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Is it case-senstive? No seriously, check and check again. Are URLs Case Sensitive?

January 19, '05 Comments [4] Posted in DasBlog | XML | Bugs
Sponsored By

I spend an hour today debugging a possible problem only to notice that "SignOn" != "Signon"

If I had a nickel for everytime Case-Sensitivity or Case-Insensitivity bit me, I'd have like seven or eight bucks. Seriously.

Moral: Know if whatever you're working on cares about Case, and if it does, make a Post-It to remind you and stick it to your monitor.

Oops, there's another 5 cents. Omar says FlexWiki uses Case-Sensitive Urls so http://wiki.shahine.com/default.aspx/DasBlog.VersionHistory != http://wiki.shahine.com/default.aspx/dasblog.versionhistory

This page says URLs are Case Sensitive if the Web Server exposes the underlying sensitivity of the OS and File System. This guy says yes, also but reminds us that the base domain ISN'T Case Sensitive (DNS doesn't care).

Of course, it gets even more fun when you remember that XHTML is Case-Sensitive (because XML is) while HTML 4.01 isn't. This sensitivity is exposed in the DOM for both.

Sigh. - sCotT hanSELMan

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

The Woe: The ASP.NET Designer has screwed me again! (All my HTML and stuff is changed)

January 19, '05 Comments [1] Posted in ASP.NET | Bugs
Sponsored By

Matthew Adams calls it "The Woe" and has six great tips to help you work around it.  Here's his great description:

You have been happily working in the designer, laying out controls, binding in bits of logic, switching between the code view and the designer view, building, debugging. Then, all of a sudden, half your controls disappear, and/or some move to the top left, and/or all your embedded resources (images in particular) vanish without trace... Control-Z doesn't seem to work quite right... The black gloom of despair fogs the monitor, and you're forced to go and get a really strong cup of coffee. Before you start again.

Some folks see this all the time, others not often at all. Word is, this will be a thing of the past once ASP.NET 2.0 ships, but most of us will be dealing with ASP.NET 1.x for at least the next two years, if not longer.

Here is a summary of his six tips and you can get the complete commentary in his post "What has the designer done now?

Tip 1 - If you have a saved, corrupted file and are trying to recover from the woe, clean up the orphaned fields so that you can reuse the names.
Tip 2 - Always do a complete solution build before attempting to open any designers.
Tip 3 - Always close all of the designer windows before closing the solution.
Tip 4 - Close all designer windows before doing a build.
Tip 5 - In Case of Woe, Don't Panic. Don't press save. Don't press undo. Just close the designer window (and any applicable code windows) and say "no - I don't want to save the changes".
Tip 6 - Remove the references to the assemblies that contain the controls that vanished, and add them back again.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Reflections on turning 0x1F

January 19, '05 Comments [15] Posted in Musings | Tools
Sponsored By

I turn 0x1F* on Saturday which puts me with one foot squarely in the grave. There's no mistaking it, I'm old. I haven't been this old since I turned 0x1E, nearly a year ago.

I'm officially Sir now. I haven't been "dude"-ed at Blockbuster in at least five years, and the way the kid behind the counter looked at me when I asked for "The Breakfast Club" is still burned into my retina. You'd have thought I was asking for a silent film or something.

I went to Red Robin yesterday, a place I've been happily carded for years, but this time my receding hairline and advancing pooch caused the young greeter to immediately offer me a seat at the bar. I suspect he was right on the edge of helping me to the senior section until I shot a stern old-guy look at him.

I'm pulling gray hairs out of my once Magnum-PI-quality moustache. I'm wondering if I need more fiber in my diet. I'm disappointed when Law & Order is a repeat. I Tivo Oprah. I've said "these young punks" while at the mall. I wonder how parents let their daughters out of the house with their butts hanging out while simultaneously wondering where these chicks were when I was in High School. I watched Napoleon Dynamite with the wife recently and explained (in about 20 minutes) all the different sub-classes of Geek (Dork, Dweeb, Spazz, Stoner, Theater Geek, Computer Nerd, etc) and my standing in the genus. I played Bard's Tale on my C64 emulator recently and wonder why the graphics weren't as good as I remember them being. I started with 128kb and now have 2gig. My watch has more CPU power than my own failing mind.

Yep, it's a milestone, with 0x28 not far beyond, and beyond that, death.

On a related note, this Friday, I will be completely and totally prepared to enter High School.  I think I have the tools and emotional maturity now.

* That's 31 in Hex, just an FYI for my cousin Jack, who scored a 13 on the recent Nerd Test. He's "balanced" and goes "outside" and "gets involved with his community." Sheesh.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.