Free Tools for GIS Developers
Navigation:
  What's New
 
GIS Tools:
 AVPython
 NTXShape
 SHPTRANS
 
Other Tools:
 SciTE
 Tomcat
 
About:
 The Author
 These Pages
 
 Best viewed with Mozilla / Firefox; or with IE and the Google Toolbar.
Powered by Blogger

Tuesday, September 27, 2005

  7:38 PM - Google Adsense and Blogger
The week before last I posted an article on Boo, a Python-inspired language for the .NET framework. I mentioned how Boo's support for late binding can make it simple to access the ArcGIS geoprocessing framework from that other framework, .NET.

Interestingly, this evening I was reading the Boo FAQ when I noticed the Google ads at the right. One of the ads was for a consulting firm, advertising themselves as available to write geoprocessing scripts for ArcGIS.

Yet, if I google for "Boo" and "ArcGIS", I can't find anyone else mentioning them in the same breath. Not even my own post comes up for that search, come to think of it. So how can this be? Surely, Google is quite good at finding relationships between things, but how did they make this connection, if not through my blog post? Of course I understand that search engines can be manipulated, but surely, one solitary innocuous posting would not be enough to tip the scales.

Let me bring it back to more comfortable territory before I close out. Thinking about Google's adeptness at finding obscure connections, and the company's fundamental drive to do it better and better, it's easy to understand their newly awakened interest in geographic data. Geography is, after all, the ubiquitous, intuitive, unstated link that connects so many disparate things in this world. Google's challenge, like ESRI's, is to make those links explicit in ways that make sense to their users.
0 comments [post]  

Tuesday, September 20, 2005

  2:35 PM - Blogger Limitations
Blogger has come a long way since I first started using it, but it is not free of warts. Now that I'm blogging more, I am running into some limitations that may force me to change engines after all, unless I fiind some good workarounds.

Several times last week, I tried to submit a post using the Blogger web interface, but it kept crashing, giving me a "page could not be displayed" error. Then I would have to clear my cookies and try again, usually to no avail. It doesn't matter which browser I use: I've tried both IE and Firefox. Every time I try to post, it croaks. This has been broken for at least a week. It was also broken several months ago. The problem seemed to have cleared up, but now it's back. So, from where I stand, the browser based interface is just not reliable.

I tried enabling the email-to-blogger interface so I could post that way. It worked (nifty), but the markup didn't come out right the first time. So I re-emailed it with the correction. For better or for worse, it didn't overwrite my previous post even though the title was the same. I ended up with two posts with the same name, one of which had a cryptic number appended to its filename to avoid a name collision.

The email interface is handy, and the name conflict detection is pretty robust, but wouldn't it be cool if there there was a way to update an existing page via email? Maybe if Blogger emailed me a response with "Blog entry posted: ID# _____" as the subject, and the content returned as the body, then I could reply to that message in order to do further updates? Just a thought.

Another thing: I would like to be able to do simple code listings in my blog. I want this to be easy. Unfortunately, on the one posting where I tried to do that recently (for Boo), I realized that indentation wasn't going to work. This is a blog and not a Wiki, so the only formatting that it does is to convert newlines to HTML <br> tags. I would have to use non-breaking spaces to get text to indent, or else use <pre> blocks for my code listings. But Blogger's newline conversion doesn't interact nicely with pre blocks, so I had to use &nbsp to indent. (I kept the indentation in that sample to a minimum, so it wasn't too bad.)

You can turn off the newline conversion, and use explict <br> or <p> tags in your posts. Then the <pre> tag works as expected. That would be fine for me, except that it's a global setting. If I turn off the newline conversion for my posts, it is also turned off for user comments. If users want to post paragraphs of comments, I want that be easy for them and I don't want all of their text to mosh together. (Never mind that the only comment so far is one I added myself.)

I could implement some reformatting in the template, using client-side JavaScript to manipulate the text. But that wouldn't necessarily work with RSS, preview mode, the comment entry form, or other places where Blogger doesn't use my template.

So, I'm going to make do with Blogger for awhile, but at the same time I'm going to take a look around and see what else is out there. Hopefully I won't have to change the site layout. I should be able to preserve the old content if I change engines, at least.

In the mean time, what else can I do to relieve Blogger's broken interface for posting? Well, this evening I am experimenting with w.bloggar, a nice GUI tool that integrates with Blogger and many other blogging hosts. It has minor glitches, and far more features than I could imagine using, but I do like it. The main glitch is that its newline handling doesn't quite match Blogger's. Also, it loses its connection sometimes. Also, it can't upload drafts to Blogger. Also, although it's free, it's not open source so I can't fix it. But it's the best I've found so far.
0 comments [post]  

Friday, September 16, 2005

  3:34 PM - Boo! Geoprocessing on .NET
I have been thinking about the geoprocessing framework under .NET. It is hard to access late-bound methods from C# and Java, so the Geoprocessing framework is a pain to use from these environments. I heard ESRI is solving this problem in the next version of the framework by adding wrappers for the standard toolboxes, so that .NET and Java can access geoprocessing functions without having to do introspection / reflection.

However, in the mean time consider this: there is a Python-inspired language for the .NET runtime that can make it very easy to develop geoprocessing models that compile as .NET assemblies. This language is named Boo, and although it isn't released yet, it has been coming along nicely.

Boo is not Python. Rather, it is a statically typed language like C#, designed and written specifically for the .NET runtime. Yet, it does have a very convenient, non-intrusive mechanism to access properties and methods that are not known at compile time, much like you can in Python. This mechanism is called duck typing. (The basis of the name: "If it walks like a duck, and talks like a duck, it may as well be a duck.") When we enable duck typing on a given object, we take responsibility for using valid properties and method calls for that object. This can fail at run time, in which case we get an exception, but in practice this is quite rare in well-written code. Usually we know what kind of object we should expect, and what we can do with it, based on the context.

Duck typing, late binding, or whatever you want to call it is the standard behavior in Python, Avenue, and most other scripting languages. In Boo, since it is a statically typed language, you do have to ask for it explicitly. You do this simply by declaring a variable as the special type "duck":

def Dispatch(progid):
  return System.Type.GetTypeFromProgID(progid)()

gp as duck = Dispatch("esriGeoprocessing.GPDispatch.1")
gp.OverwriteOutput = true
gp.CreateFeatureclass_management("d:\\temp", "test.shp", "POINT")

The compiler then takes care of generating all the introspection code for you, hiding the pain, and accessing the requested properties and methods just as easily as you can in Python.

Boo can be used as an embedded scripting language, or it can function as a compiler. In the latter mode, the output is a plain old .NET assembly that can be accessed from C#, NUnit, or wherever else. Even aside from its fit with the Geoprocessing framework, this is definitely a project that I am going to keep my eye on.
0 comments [post]  

Thursday, September 15, 2005

  2:38 PM - Ajax por accidente
It seems that, unbeknownst to me, I delivered an Ajax application last fall.

Ajax is a technical approach based on Asynchronous JavaScript and XML. It leverages the XML HTTP Request object (available from most browsers in some form) in asynchronous mode, along with timers, events, DHTML, and JavaScript to provide a smooth, responsive user experience.

This is the approach that Google used extensively in its map interface. It is how Google Maps downloads new content in the background to provide the seamless panning and other nice interactions. However, on a different scale, this is the same thing that we did in a custom HTML based Tracking Server / AVL client implementation to help a city manage its snow removal operations.

The difference is that Google did it on purpose and found ways to leverage Ajax throughout their application, whereas for us it was more of an ad-hoc design choice to solve a very specific problem. I took this approach to animate the ploughs, backhoes, and other equipment based on a live data feed from Tracking Server. Without Ajax, the application would have had to freeze every few seconds while it retrieved new data from the server. With Ajax, it's smooth and responsive.

Of course, when we did it, it didn't occur to us that the approach was anything novel, and we certainly wouldn't have guessed that it was going to get a high enough profile to be given a name. Google Maps wasn't even out at that time, so we hadn't yet seen how far it could be taken. Nevertheless, it's cool to find yourself ahead of the curve, and I plan to put these techniques to use "on purpose" in upcoming projects.
0 comments [post]  

Tuesday, September 13, 2005

  4:39 PM - Comments enabled
Some folks have probably noticed that my main page is powered by Blogger. Well, in the few years since I have started this site, Google has been enhancing the Blogger service relentlessly. At first the improvements were mostly behind the scenes: better performance on Blogspot, an improved editor with fewer crashes, etc. But lately there have been some bigger improvements, including post pages and support for comments. These latest improvements require changes in the template itself. So at last, it was time to roll up my sleeves.

My Blogger template is from scratch, not one of the canned templates. I designed it to mesh with the general look of the site (the rest of which is generated using a Perl-based template engine that I wrote). When I enabled post pages (generates an individual page for every post), it broke a few things because of the directory structure that it uses. However, I think I fixed all the links and it should be OK now. (Before, everything was in the same directory and my links didn't require a path. Now I'm using paths that start with '/' and everything is working again.) I don't really need the post pages; the archives that Blogger generates were fine for me. However, the comment interface requires post pages, so I had to enable both.

The comment interface is a nice simple design, flexible enough to support a custom presentation of the comments, albeit with a non-customizable interface for the data entry form itself. The comment feature seems to work even when the pages are not on blogspot, which is good, since I prefer to keep my pages where they are.

I don't know whether people will use the comment interface. It will probably depend whether I have anything interesting to say... But still, I'm a geek at heart, so I couldn't 'not' set it up.
1 comments [post]  

Monday, September 12, 2005

  8:21 PM - Reformat
There has been a movement inside of ESRI to publish more of what goes on internally, through developer blogs. David Maguire has one. Another interesting one is by Brian Goldin. Other notable ESRI bloggers include Andrea Rosso, Keyur Shah, and Art Hadad. I'm sure there are others that I haven't explored yet.

Anyway, my point: with the launch of ESRI Developer Network and all of these blogs, maybe it's time to start giving the "blog" portion of my site more of an ESRI focus. Not to the exclusion of the many interesting open source projects that I've played with after hours, but as something else that's in scope for this site.

We'll see how it goes. It should be good. Truth be told, the projects that fill my days are often a lot of fun. If nothing else, lately they tend to be more eventful than my after-hours tinkering. So perhaps this will lead to a reinvigorated website.
0 comments [post]  

  7:09 PM - Demon cat recovering, and SciTE installer ready
Ok, that wasn't so bad. Oliver the demon cat is still not back to 100% but he's getting there. Pretty good considering that he was lying in the tub waiting to die just a few weeks ago. Anyway, it seems that his capacity for evil has not been diminished at all by the ordeal.

Meanwhile, in other news, the setup wizard for 1.66-wbd-1 is now available here.
0 comments [post]  


|
Make your own free website on Tripod.com