November 01, 2006

Back from darkness + CODE CAMP IS NEAR!!!!!!!!!!!!!

Blogging has been on the backburner for a while due to project deadlines at my current client. After AJAXifying a couple of pages, making them IE and FireFox compatible and fixing some JSON, it looks like the project is sitting in good shape, so I'll rip out a few blog posts again. :)


As Mr. Bock points out, Twin Cities Code Camp is coming up in less than 2 weeks (11/11/2006, yes that is a Saturday but come on out and build the community and/or learn something!). If building community or learning (voice of Austin Powers here) "aren't your bag baby" (back to my voice, sorry), you can at least come out and win some fabulous prizes donated by some very generous contributors.

jk

October 31, 2006

VB 6.0 + Microsoft InteropForms Toolkit 1.0

Brad Abrams posted a link to the Microsoft InteropForms Toolkit 1.0 on his blog today. This should be very helpful in gracefully pulling existing VB 6.0 resources into the .Net Framework.


jk

October 15, 2006

Arithmetic overflows/underflows in C#; yes it is possible

I've been meaning to write about this for a few weeks; better late than never!

On day 3 of Building Connected Systems, Mr. Brown mentioned that it is possible to overflow numeric variables in C#. This surprised many other students in class (myself included) as developers assume 'managed code' takes care of this like it does with array bounds checking. From my understanding, VB.NET does not allow this scenario (I have not verified this, but trust Mr. Brown's assertion)!

When I started writing this entry, I was just going to do Int32, but after expanding to other integral and float types, I noticed differing behavior in how the .NET runtime handles this scenario. So, to try this out, I fired up a C# console app Visual Studio 2005 and here's what I found:

  • int.MaxValue + 1 == int.MinValue (it overflows and wraps around with no exception)
  • uint.MaxValue + 1 == 0 (it overflows to zero since it is unsigned; no exception thrown)
  • float.MaxValue + 1 == float.MaxValue (yes, the runtime handles the overflow, no exception is thrown, but it behaves differently tha int and uint)
  • double.MaxValue + 1 == double.MaxValue (same as float)
  • decimal.MaxValue + 1 throws a System.OverflowException

Keith's recommended turning on overflow checking for all C# projects and then using the 'unchecked' statement if you really need to squeeze performance out of your code. (My aside on this is that if you're really writing high perf code, perhaps managed code is not the optimal tool for the job?? One of my favorite Fergesonisms (circa 1998) is: "Use the right tool for the right job".
To turn on overflow/underflow checking in your C# project:
1. Right click on your project in the Solution Explorer and select Properties
2. On the Build tab, click the Advanced button
3. Make sure "Check for arithmetic overflow/underflow" is checked

An FxCop Rule or source control checkin policy would be two good tools to build around this! :)

jk

October 12, 2006

New metasyntactic variable or What is a Manamana?

I think that Manamana would make an excellent metasyntactic variable.

If not, at least you can watch the video and get a moment of levity during your work day! :) It is highly recommended to start scrum meetings with :)

cheers
jk

Cat cloning company "Declawed"

Who ever would have guessed that cat cloning is not economically viable?!?!?!?!?!

Associated Press Business News: Cat-Cloning Company to Close Its Doors - MSN Money

jk

October 03, 2006

WSSF for WCF RC1

For those who missed Aaron Skonnard's post on this today, the PAG team just released the new version of the Web Service Software Factory for WCF RC1. This is the same WSSF that I was referring to on Day 2. This is just the WCF version and not the ASMX version.

jk

September 29, 2006

Time wasters for today

Sometimes we all need to dis-engage the mind for a bit.

Isaac, the QA engineer on our project team, has a knack for finding fun diversions:

Line Rider
Flash laser game

cheers
jk

September 26, 2006

Lost email, culture and hiring

Someone was kind enough to email from this blog after reading a post asking about Magenic culture and what it's like to work here. I apologize for not replying, but I (insert embarrassed smiley face here) lost your email.

Please feel free to send another email and I would be happy to talk to you!

This brings up a good topic; in case you're aggregating this feed and don't visit the site, Magenic is always looking for good people. Check out the Careers page for more info.


jk

September 25, 2006

IIS 7 Resources

Last week while I was in training, Eric Deily, a Program Manager on the IIS 7 team, came in to talk about the work they are doing. I tried to take good notes to pass along!

  • They have their own web site with code samples/demos/forums. http://www.iis.net. Eric says the product team members actively monitor and watch the forums.

  • There is a link to the feature matrix  

  • There is a much better extensibility story. Developers will be able to swap in/out components. e.g. if you don't like how the static file handler works, you can write your own and replace the one that ships with IIS (via config)

  • That beast Metabase.xml is going away, replaced with a much better configuration UI and XML structure (much rejoicing there)

  • For those using PHP, there will be a module to support you

  • CGI is turned off by default (in the spirit of reducing your attack surface area)

  • It has web services exposed for remote server config (no more DCOM here) secured via Transport Layer Security (TLS/HTTPS)

  • Appcmd.exe will replace the admin scripts

  • They are VERY concerned with backwards compatibility - no web site left behind :)

  • Inetfino.exe is not installed unless you install the "IIS 6 management compatibility" component. This is a BIG CHANGE if you have scripts/developers who use iisreset on a regular basis.

  • Much more diagnostics/tracing built in. You will be able to do a dump at the app domain level if needed.

  • Microsoft PSS helped write more detailed error messages with suggested courses of action

  • You can play with this before Vista/Longhorn server comes out at http://virtuallabs.iis.net

  • IIS7 will NOT BE on SERVER 2003. Eric said this was a technical limitation, not a marketing one!

  • For Longhorn Server, the team is focusing on the server-farm scenario

  • Eric did a very cool demo/sample at http://iis.net of writing your own module to replace the directory browser to build a photo gallery type of feature!

jk

September 22, 2006

Building Connected Systems - Day 5 (the last day)

WOW, what a great week; this was a top-notch experience all-around!


Kudos to Pluralsight for putting on a great class. Covering this many topics in a week is a tall order but they pulled it off admirably!


The class was held at the Redmond Marriott Town Center where we received first class treatment and accommodations. I hope Pluralsight is able to keep using this location for future events.  (As a bad pun, their employees were very 'service oriented') :)


Clearly, Pluralsight has some of the best instructors in the industry (which is why I wanted to come here in the first place; if you're going to spend time and money on training, it had better be good training!).



Today, we're down to the eye-candy topics: WPF, Fritz did an AJAX demo with Atlas.


From a personal standpoint, I got to see my friend Brian (a Microsoftie) a couple times. Eric Deily from the IIS7 team came out to talk about features of IIS 7.0 which was very intresting. The IIS7 team has spent a great deal of effort in allowing you to swap in/out modules via config at a server->application level. This helps an admin pare down the server features to reduce attack surface, which is a good thing. If you want to write your own modules, you can swap out the built-in ones with your own (e.g. if you think you can build a better static content handler, go-for-it)!


Please feel free to email me (jeffk at Magenic dot com) if any of the blog posts about this week raise questions, etc...espically the areas of WCF and security!

It's fun being here in Seattle, but I'm realy looking forward to getting home again!

jk