1st 5k Race (32:32, 10:30pace)

Avanti and I had Signed up this 5k race down at the clear lake on Nov. 12th called “Run through the Brooks”. It was the most painful 1st race for me. The 1st mile feels like never ends. Avanti already dropped me and charging ahead after 1st mile. While she gradually disappeared from my sight. I held on and ran through the finish line. Surprisingly, luckly me, a 32:32 gained me a 3rd place in my age category! All the suffers suddendly all paid off at that moment. It was really an encouraging for me to move on to train for my 1st half and think it is not all impossible!

Easy Runs and Long Runs

Kevin had gone out to our neighbourhood and using the birthday gift I bought for him (a Garmin Edge 305 GPS) and marked up the mile marks for me to run on. The big circle around the neighbourhood is just 0.1 mile short of 1 mile. Before he did that, I thought it is no big deal. Just 0.1mile short! But as I starting training for 5ks, that errors started to matter. So what Kevin did really helps me. Not only did he marked the mile, he also mark the 400 and 800 distance!!!

So that’s where I did most of my easy runs on. And every Saturday, Avanti and Heather will meet me at Memorial Park for long runs. Kevin will measure the running loop (the 3-mile loop) on google earth first so we know where exactly are the stopping points for the miles we are going to run. By the end of 1st month, we had done 5 miles weekend long runs.

Half Marathon Training Guide (Hal Higdon)

So Avanti, Heather and I all very excited about the 12 weeks training we are going to do for our 1st half. Kevin had found us this Half Marathon Training Guide (by Hal Higdon)” http://www.halhigdon.com/halfmarathon/index.htm and we started following the one for ”Novice” runners.  

How I Started Running

October 2006, I got a message from Kevin at work. “You want to sign up for the Half-Marathon in Jan?”. At first I went “what?!!!”. First, I’ve nerver even run a half mile before without feel dying. Second, I have not been doing any workout for almost 2 yrs and I was totally out of shape. But then I thought, isn’t a great time to start get back to shape? By doing something I’ve never done before! So I willing accept the offer. As it turns out, I am not alone in this journey of taking up running seriously…

Lutz Roeder’s Reflector – A Treasure

I had this Lutz Roeder’s Reflector installed on my machine for a month and havn’t used it. Until last week, I found its use.

  • Callback Signatures for ADF

When a user triggers an event that needs to reload map control (extent change, selection change, layer data change…), it is easy to just attach any none map related callback strings to Map Control Callback Collections.

When map doesn’t need to reload, but I still need to do callbacks, I found out how ESRI ADF handls callback by digging through the “display_dotnetadf.js” came with ESRI ArcGIS Svr WebADF. Which contains ehe signature of callback argument lists that ESRI ADF handles on clientside after callback.

Basically, each argument list use  “{0}:::{1}:::{2}:::{3}” signature which [0=controlType, 1=controlID, 2=action and 3=cotent of the callback]. and if I need to have more than one argument list, just concatnate them together using “^^^“.

Using Reflector, I can see ESRI.ArcGIS.ADF.Web.UI.WebControls.CallBackResult.ToString() does the same thing.


public override string ToString()
{
      StringBuilder builder1 = new StringBuilder();
      builder1.AppendFormat(“{0}:::{1}:::{2}”, this.ControlType, this.ControlClientID, this.eventArg);
      for (int num1 = 0; num1 < this.parameters.Length; num1++)
      {
            builder1.AppendFormat(“:::{0}”, this.parameters[num1]);
      }
      return builder1.ToString();
}

  • a .NET UnitConverter

I need to UnitConverter to convert in between different distance unit. Instead of try to write my own, I start looking around the internet and surprising, I couldn’t find any one that is already in .net and I can just use it in my project. And I know ESRI must already had this logic build!

So using Reflector, I found that in “ESRI.ArcGIS.esriSystem”

 IUnitConverter:

 double ConvertUnits([In] double dValue, [In] esriUnits inUnits, [In] esriUnits outUnits);

esriUnits

public enum esriUnits
{
      esriUnknownUnits,
      esriInches,
      esriPoints,
      esriFeet,
      esriYards,
      esriMiles,
      esriNauticalMiles,
      esriMillimeters,
      esriCentimeters,
      esriMeters,
      esriKilometers,
      esriDecimalDegrees,
      esriDecimeters,
      esriUnitsLast
}

FireBug & AJAX

Today, I discovred FireBug.

It is three weeks into my new job, I started to get into ArcGIS Server ADF 9.2 beta 2 (final release is due out in the coming month). 

Early this week, I found out from ESRI that the beta 2 do not support the Synchronous Call for their ADF controls. By default, all the controls use Asynchronous call. (ha, isn’t this fun, or not?!)

So I spent a whole day yesterday and find out that there are 3 types of Tool I can create for my Toolbar:

  • a tool that ESRI ADF takes care of everyting

For something like Zoom In/Out, Pan  (doesn’t need any customized server processing , not returnning any dataset either)

Client-Side data collection:

ESRI provides default action types (Point, DragRectangle…)

Server-Side data processing:

Using matching ESRI ADF avialable assembilies to take care the action.

Client Data passing to Server-Side

ADF take care that, I don’t have to worry a thing.

  • a tool that ESRI ADF takes care the Client-Side while I take care of the Server-Side

For something like fixed-Zoom  (do need customized server processing but still not returnning any dataset)

Client-Side data collection:

ESRI provides default action types (Point, DragRectangle…)

Server-Side data processing:

Write your own handler by Implementing IMapeServer..

Client Data passing to Server-Side

ADF pass-in the data as EventArgs and server-side can use it

  • a tool that I have to take care of both Client and Server sides.

Now comes the fun one!!! (AJAX)

For Map Identify or Measure Tool (do need customized server processing, and need to return either dataset)

Client-Side data collection:

Write my own JScript to caputuer user data (that’s not fun at all) and Trigger Call-Back to post data to server for processing

Server-Side data processing:

Write my own data processing and send results back to client for display

Client Data passing to Server-Side

Utilize ASP.NET Call-Back mechanism. XMLHTTP request.

I love AJAX approach for its customizability But I do hate to write tedious thick client-side Jscript. Considering there is not much documentation on ArcGIS Server 9.2 beta ADF yet. The existing documenation are half blank. And trying to figure out how to caputer the point data when when user drag a rectangle select on the map is no fun at all.

I struggled to get the MapIdentify and MapMeasure Tool to work in AJAX way. That’s after 4 hours pulling hair trying to figure out why the Call-Back didn’t result any data back. Gee, there are so many things can go wrong in between a click and the next click.

Is it

1) Not doing callback like it suppose to?  OR

2) Does callback but the user data didn’t get pass on to server correctly?

3) Server got the data but didnt’ read it right?

4) Server somehow ignore the request and didnt’ process it?

5) Server didn’t find any data that can post back?

6) Post back data got lost in transaction?

7) …

Thanks god, instead of guessing around with no clue, I decide to find out HOW TO DEBUG AJAX. AJAX is faily new but not that new. Somebody must have done something to make everybody’s life much easier.

And in deed, there always somebody out there willing to do just that. Joe Hewitt’s FireBug (for FireFox) made my afternoon.

FireBug Console tracked every single xmlHTTP post (callbacks) and the Post and Response data. By reading the string sent to server and the results sent back to client, I found out that my MapMeasure tool (Polyline / Polygon) does the callbacks correctly but the data didn’t get processed on the server-side, thus no data to post back to client-side.

Important things I learned this week of trugging ghrough to get by:

  • If you are going to write a User Control doing AJX, be aware that the Client-Side ID is not going to be the same as Server-Side. (most ESRI samples using “Map1″, if it is in a control and when it got rendered on a page, the name will be “Control_Map1″ or it could be a random name.) But since Callback relies heavily on DIVID of that control, I really have to be carefully not hard-code any id…

  • When you put multiple tools in one control, each of them has its own callback signature and triggers different client-side JScript and when it got to server side, raised the callback, you have to find out which EventArg to use for switching to do different data processing.

  • Contain each tool’s function in its own class since pretty soon the object that implements the callback will be pretty soon overwhelmed on handling various callbacks from different functions. My oject servers more like directly callback trafic now…

It is by reading EventArgs that I discovered that I didn’t use the right EventArg Pair to decide when to do Identify and when to do Measure.

 

When the 9.2 final realease come out, will it come with full documentation?. (A half-done documentation is like showing my dog Sally a nice treat but not giving to her. She got anxious and pretty soon will pond on the patio door until she gets it)

Life needs to go on, even without documentation…

Design

Language is just a tool to get to build what I want to build.  Just like computer, it is a tool.

Over the last year, I noticed that I have paid more thoughts on Application Design and Concepts and Ideas. I had seen myself outgrew my own programming languages era. I had put in 8 years of my life in one job learning various language every year. It never seems to end and will not I realized.  Now I obtained my tool, what am I going to build?  

The thing always perplexs me  is I saw job candidate sometimes had 10, 15 different programming languages listed in they Resume. So he/she has purchased all the tools avialble, but can he/she build something really useful? 

This week more of reading Design Documentation on the project I suppose to take over and work on. It is a pretty good and intersting design.

Do I have the ability to turn a good design into product?

Without a Clue

I love watch Mystry Channel, it is such a thrill to see the mistry starting to unveil and all the clues came together. That’s TV and this is real life, where is my clue?

My 1st project is going to be using a ArcGIS Sever Web Application. Uhm, I know Web App, What is ArcGIS Svr Web App?

It turns out that ESRI has a ArcGIS Developer Platform (ADF) for both .NET and JAVA. It is quite new but provided developers to program with ArcGIS Server.

Most currently avialble GIS Web App out there are done via Arc IMS. ArcGIS suppose to be more powerful and go beyond just internet mapping…

This week mainly reading documentation week. The most helpful 1st documentation I read is ArcGIS Server Administrator and Developer Guide (ESRI EDN Site). Gave me an overall idea of what is what and what can do what…

Hopefully next week I will have more clue what I am going to do…

The Beginning

The beginning of any new thing is difficult, but i didn’t hesitate to step into this unknown world of GIS Programming. I always enjoy challenges, within my limits…

The week on job is quite daunting. Surrounded by GIS experts who quote their jargons like I eat my watermellon seeds (you do can eat watermellon seeds real fast). I told myself, ok. I need to turn myself into a GIS programming expert, fast.

But where do I start? The fact that I have been programming with .NET for a couple of years up to this moment doesn’t seem to help me ease my worry.

Although I don’t know how it will turn out, I belive the expereience will be dauting yet fun. So here I am going to GIS my experience and share with whoever happen to come visit my site (some GIS grils, please?) and who had gone or will go through the similar career change like I decide to …

Read On… 

Is there a blogger in Me?

Is there a blogger in Me? Origionally I wasn’t thinking about blogging and just used DNN’s multi-page module to document my IT related thoughts on my personal website. It turned out that that is more of a struggle and high maintainance effort… So I am here now…

Newer entries »