Stop treating me like an idiot!

Posted on August 29, 2008 10:52 by mamanze

Really shouldn't have to say this, but _again_ I've just been bitten by mistakenly assuming that the .net framework developers believed me to be a competent programmer. It's just rude. Seriously.

 

What is it this time? Check out this pattern:

using(var resource = new Resource()) {
  // do something with resource
  using(var utility = new Utility(resource)) {
    // do something with utility.
  }
  // do something else with resource...
}

let's walk through that:

  1. _I_ create a resource. It's mine, I'm taking responsibility for it.
  2. Use my resource.
  3. Create a utility and hand it a reference to my resource.
  4. Destroy the utility.
  5. Use my resource.
  6. Destroy my resource.

Very straight forward, and certainly not an uncommon pattern.

Now, at step 4, would you expect the utility to destroy my resource? No.

What'd they do when they wrote the StreamReader class's dispose method? Destroy my resource.

Seriously, WTF? Do they think I'm that much of an idiot that I can't manage my own resource?

What's worse? They gave their own developers access to an overload that doesn't assume developer idiocy, but not us.

Blah, time to rewrite yet another framework class.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Loving Mesh

Posted on August 26, 2008 16:42 by mamanze

Recently started using Live Mesh (I'm a big fan of most live products, in case you are curious) and am absolutely loving it. Currently have a dozen or so folders synced up between my two laptops and two desktops. This is fantastic because A) it is 5 gb of space, B) I don't have to do anything to maintain it and C) almost any folder can be a mesh folder (except nested for some reason).

K, that's the main feature of mesh, syncing folders across computers (and the web of course). The other big feature though is remote access from anywhere. And by that, I mean, anywhere. For example, I use it almost every day to remote into my work machine from home. The other way to get into that machine is to use a VPN client (non-64b, so have to use a laptop) and RDP in. Mesh gives me nearly the same experience without the VPN. Connection is tunneled over HTTPS, so no firewall issues. Speed is surprisingly decent, even over Comcast's clamped down cable service.

So, give it a whirl, http://www.mesh.com

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Exchange 2007 OWA: Search folders

Posted on August 26, 2008 16:16 by mamanze

Took a bit to track down why I didn't have search folders in my OWA account. Turns out there are a few things that need to be done to set them up:

  • You must open the account in outlook and access the search folder.
  • You must do the above while in "online" mode.
    • Note: Default, when you let Outlook set up the account, will be "cached exchange mode", which of course is not "online".

 

One thing that's striking me as odd is that while most of the OWA UI is very similar to outlook, the collapsed left pane doesn't have the "favorite" folders... Why?

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

SBS doesn't like it when you disable IPV6

Posted on August 26, 2008 16:12 by mamanze

Was debugging some DNS issues I've been having on my desktop, and as a random attempt, turned off IPV6 on the network adapter on my SBS machine... Turns out, this disables Exchange, RDP and causes most of the explorer windows to crash. Few hours until I realized that if I restart in Safe Mode, I can probably get the network window to come up... quick fix from there. So, here's a tip: Don't do that ;)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Effects of a missing initializeBase call...

Posted on January 29, 2008 00:26 by Mamanze

Just ran into a very unexpected issue. I've been developing an app for the past two months, mostly AJAX work. Turn off debugging for the first time today to do a production deploy and boom, I get errors. Long story short, turns out that in debug mode, a missing initializeBase call doesn't really matter. ASP.Net Ajax must be doing the extra plumbing for me. In release mode though, the method call is required before the prototypes are flushed out.

 

So, if you do a release build and get the nice error that "a.beginUpdate is undefined', check your intializeBase calls.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

The danger of trusting Microsoft

Posted on January 21, 2008 15:47 by Mamanze

To enable some downloads the other day I placed https://*.microsoft.com into my trusted sites zone. All well and good, until I tried to log into MSDN subscriptions today. Follow along with me:

 

Step 1: Go to MSDN subscriptions homepage, http://msdn2.microsoft.com/subscriptions

Step 2: Hit sign on.

Step 3: Redirects to live to get passport credentials, https://something.live.com/somehing

Step 4: Credentials found (via live toolbar), redirect back

Step 5: Browser sent back to http://msdn.one.microsoft.com

 

Those paying close attention will notice that we've bounced from the Internet Zone to the Trusted sites zone and back to the Internet zone. Now, given that MS is great with security, ponder this: Does the site in step 5 have access to the passport credentials retrieved in step 4?

 

The answer would be no.

 

Great, what does it do then? Loop back to step 3. Indefinitely.

 

To make this even more fun, each time IE bounces between zones, it opens a new tab in the IE window currently configured to that zone.

 

I must say, my "kill IE as fast as possible" skills have gotten very rusty. Haven't had a need for them in a long time.

 

So, note to those out there willing to trust Microsoft: You must either trust them or not, no half measures.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Adhere to Common Standards

Posted on January 16, 2008 21:34 by Mamanze

Alright, I don't think it will come as a surprise to anyone who has worked with JavaScript for more than a few seconds that there's a long held standard of using camel case for names. Particularly, method names. Just take a gander at the DOM. Ok?

 

So why is it then that I keep seeing JS libraries that use Pascal Case for method names?

 

Particularly annoying to me of late is the Virtual Earth API. Can't tell you how many times my fingers have typed something in camel case only to have it break as soon as I debug. Argh!

 

While I don't think all standards are golden, not following something simple like this is just stupid.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

QT: Virtual Earth Tip

Posted on January 16, 2008 09:17 by Mamanze

Make sure the container is visible before calling LoadMap(). I was trying to pre-load the map into a popup... no workie, it couldn't figure out where it was ;)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Consulting

Posted on January 14, 2008 08:29 by Mamanze

Consulting is usually a tough business. Not many of us last long. Most of the time, we're being beaten down by frustrations, whether our own or our clients'. In the 4 years I've been consulting since leaving college, I've never left a project that fit all of these:

  • Client is happy
  • I am happy
  • Project is complete
  • Project is successful
  • I am satisfied with the result

Until yesterday that is. 60% is pretty common. 80% less, but has still happened a few times. This is the first time for 100% though.

Hasn't quite sunken in yet.

Woot!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

QT: Free, Simple Icon Extraction

Posted on January 12, 2008 13:21 by Mamanze

Combo of tools:

 

1) Batch Icon Extractor: http://www.rw-designer.com/batch-icon-extractor

Pass the DLL path as a command line parameter and it'll extract everything to ./icons

2) Paint.Net with Icon file type plugin: http://paintdotnet.forumer.com/viewtopic.php?t=1152

Allows Paint.Net to open any icon file.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5