Tech Blog

Jay's Technical blog

Dear Jobs @ Microsoft (or any other big IT Co.)

25 March 2008
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

I want to ask you to stop trying to tempt me to come join your company unless you want to make some changes to your corporate policy. I love a number of your company's products and really would want to work for you except for 1 thing: Redmond, Washington (or anywhere that isn't my chosen location).

Don't get me wrong. I'm all about team dynamics and think that the team needs to get together (I had a recent contract where I spent  a few days in the office, but I worked most of the time out of the office in my home office). I stayed connected via email, IM, and telephone (I do have Vonage, so calling the office is free). When I say I worked remotely, I mean I worked on my corporate machine which was located in the office. One week a month in the office is something I think should be a dynamic you guys need to figure out (and yes, I know it depends on what the person is doing, and, no, I have no idea what Scott Ha or Phil Haacked do on a day to day basis.. my vision is that they hack on code... which is probably wrong).

I keep seeing ads or PM's advertising that they are hiring, but when I inquire the answer is always "you'll have to move to Redmond" (or California, or North Carolina). I know you guys love Redmond and think Washington State is beautiful. I have been there and the environment is much like the state I grew up in (Ohio)... I moved away from there like 10+ years ago.

You may say California is great. The weather in Southern California is very similar to my current home state of Florida (except it's cheaper to live here), and much of my family is all settled in here; besides my wife loves it here.

I'm sure there are other techies/programmers out there like me. I know I'm not some hot-shot programmer (I bet some of them are), but I have done some interesting things with your software, and keep thinking I could contribute something, but I won't move... so quit tempting me!  I want to say yes, but I can't until your policy changes. 

Thank you!

Jay Kimble


DLRScript Update

18 March 2008
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

In the next week or so I will be releasing a new version of my DLRScript. It will have external file sourcing/loading via the src attribute (I have that working right now). I would release it today except for 1 issue.

what is in the file is this

//JS:
jsapi.alert("Hi JScript here");

#Python
jsapi.alert("Hi Python here")

#Ruby
$jsapi.alert("Hi, I'm Ruby and YOU are NOT!")

Here's the issue. I think I discovered a bug (in my code). When you try to launch multiple alert boxes you get 1 of them and errors for the rest. Which makes sense to me (as you the user need to click the button on one of the Alerts. I will correct this.

I also discovered another subtle little issue that I want to account for.  The problem is that since we are moving code Asynchronously there are multiple threads involved.  My current development executes code as it gets code back, but it should execute this stuff in the order it appears on the page (I'll be correcting that one too)

Probably the next week or so, and then I'll be moving forward on my other ideas (most notably the Object Model).

Ruby DOM??

While I'm on the subject of Object Models, I had some discussions with somefriends to see if I should duplicate client-JavaScript's DOM model or if I should create something else.

The wisdom from both seemed to be that duplicating client-JS' DOM for JScript and Python would be good, but you Ruby guys would something that is Rubyish (no, not rubish... I said Rubyish).  I was wondering if I might get a Ruby programmer to help me understand what that means (cause neither of my friends can answer that question).

So here is the question.  If you had the ability to write Ruby code as a client language (and you can with DLRScript) what would the framework look like? 


DLRScript... Now With Added Ruby!

13 March 2008
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

Just a quick announcement.  My DLRScript (use DLR Languages in Script Tags via Silverlight 2) project just released a new version with a new language: Ruby.

I'm really excited to have this working.  As I get time watch for more improvements.


Should you avoid the UpdatePanel? (or constructs like it)

12 March 2008
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

Bertrand Le Roy has an interesting post called "a case for partial rendering." I started to comment and realize that I quickly had a full post, so I thought I would comment here.

-------------------

When I do MS Ajax trainings (I am actually getting paid to do these by ASPSOFT who handles the actual trainings... we will be announcing one in the next month that will be open for the public to register), I like to do a best practices talk.

In that session, we really dig down into the UpdatePanel and what's really going on.  I try to teach my students not to skip the UpdatePanel, but be targeted with it.  So "don't wrap the entire page in an UpdatePanel, but use several if necessary and use filters, and most importantly if something else like a control from Ajax Control Toolbox fits what you are doing look at that closely.  In the demos, I start with a fairly simple form with combo-boxes that auto-postback feeding data to the next combo (with a final message at the end).  Next we move to an UpdatePanel and then to a combination UpdatePanel and Cascading Dropdown Extender (from the Ajax Control Toolbox and then ultimately because the demo is fairly simple, I drop them into an PageMethod for the last retrieval of data.

So in the demos, we analyze the amount of bits flying back and forth.  When I get done with all this, I tell the class that I'm not saying avoid the UpdatePanel, but to recognize it as a tool. I teach them to be aware of other controls in their toolbox.  Of course, there is always the situation where you are in a hurry because of a deadline, and you need to finish.  In those situations, I tell them it's OK to use the UpdatePanel... just realize that it's not always the "best" solution.

I've had situations where I've been asked for advice on how to handle Ajaxifying a rather complex form. In the situation I'm remembering right now, the deadline was past and I told the person who was looking at it that just use the UpdatePanel... the amount of effort expended in to trying to be optimal was wasting precious time.

So when I used the phrase "best solution" above, I meant more of an optimized situation... the UpdatePanel does work and can be used really effectively.

I think what Bertrand is hearing is a situation that some authors are overreacting because they are afraid people won't think when approaching a problem (because they generally don't) and just use UpdatePanels everywhere (because it's easily used).


A couple missing items/solutions -- Silverlight 2.0 Beta 1

10 March 2008
Jay Kimble

[WARNING! This is an archived post and as such there may be things broken/missing here.. you have been warned.]

In the process of updating my DLRScript project to Silverlight 2.0 beta 1, I discovered a few annoyances.

Missing HTML page

The first one is that when you create a Silverlight application, it prompts you to create an extra project (a web project) for hosting your Silverlight app, create an HTML page within the Silverlight application project for hosting the control, or manual/no test host page/project (aka I'll do it myself).

When you take option 2 (create an HTML page within the project), the page seems to be missing. This is especially difficult for a project like mine where Silverlight is being used to extend the HTML DOM model. The page is there... it's hiding in the client bin folder (or it will be once you build the project).

BTW, if you take the first option (which my DLRScript project takes), the HTML page will also be created in a more obvious location.

OnPluginLoaded -- and HTML pages

The second one is something that I know I'm not alone in (and I actually responded to someone in one of the forums once I had resolved the issue).  You'll run into it (well, until they fix it). 

Here's the issue.  When you read the docs regarding setting up communication between your Silverlight app and JavaScript, you'll find references to the OnPluginLoaded event.  You will even see example's using the ASPX server control. And, it works with the server control with no issues, but the moment you try to figure out where to hook it in a standard HTML app you will have issues.  Here's why? The event doesn't really exist... well, that's not really true.  The event's real name is onload, and it's attached to the object tag.  You would think that you could hook it up via the onload attribute, but it doesn't work

In my code, I used a very "hacky" mechanism (but it works).  Here it is:

  1:var ctlID = "Xaml1";
  2:var onLoadFunctionName = "someFunction"
  3:var jsSupportControl =document.getElementById(ctlID);
  4:
  5:// very much a hack, but it's the best I can do to enable both ASPX, and regular HTML access
  6:if(location.href.toString().substr(location.href.toString().length-4).toLowerCase() != "aspx") {
  7:     setTimeout("jsSupportControl.onload = " + onLoadFunctionName + ";", 1);
  8: }

BTW, my script gets loaded at the bottom of the page --after the body tag.

I hope that helps