Thursday, February 26, 2009

Another "Dreaming In Code" Excerpt

In one part of the book Dreaming In Code, a programmer named Andy Hertzfield describes his programming style. (The excerpt is found on page 67 and page 68 of the book.) I wanted to post this excerpt, because I find my own programming style is similar to Andy's:

"I just designed it and wrote something. There wasn't all the discussion. My way of writing code is, you sculpt it, you get something as good as you can, and everything's subject to change, always, as you learn. But youclimb this ladder of learning about your problem. Every problem's unique, so you have to learn about each problem, and you do something and get a better vantage point. And from that vantage point you can decide to thrwo it out. Code is cheap, but often tells you what to do next."

After I read that, I didn't feel so bad about scraping so much code as I move through the different iterations of a program. It made me realize that this form of programming might not be as wastefull as I thought it was.

"Code is cheap, but often tells you what to do next."

I like it. Reminds me of something that Jody Garnett often says: "Let's stop talking and actually do something."

The Sunburned Surveyor
Posted on 7:07 AM | Categories:

Wednesday, February 25, 2009

The Sunburned Surveyor’s Geospatial Programmer Recognition Award

I believe we live in a world that is obsessed with self-promotion and a quest for glory. We seem to be slaves to our own egos, and have a difficult time improving ourselves through constructive criticism. Even in the open source community you come across programmers that react with an almost violent fervor when there own work is challenged or questioned.

It would seem beneficial to make a concerted effort to tamper our own egos, while looking for admirable qualities in others. This helps us to appreciate our own shortcomings and imperfections, and gives us the chance to reflect on the good parts of other’s personalities that we would like to better imitate.

So I’ve decided to take some concrete steps along this vein. I will occasionally (every couple of months) highlight someone on my blog in the open source geospatial community that has the type of personality I am talking about. I’m going to identify these individuals as the recipient of The Sunburned Surveyor’s Programmer Recognition Award.

The programmers that receive my little award will have made contributions to my own growth as a programmer and/or as a mapper, or will have made these types of contributions to others. These programmers are not motivated by ego or a quest for glory. Instead, they are moved by a desire to help others and a true love of what they do. They are community builders and team maintainers. They are teachers, coaches, and mentors. I’ll be sure to identify what I most admire about each of the programmers, and I will indicate why they are getting the award.

I’ll announce the first recipient of my Geospatial Programmer Recognition Award in the next few days.

The Sunburned Surveyor's Geospatial Programmer Recognition Award doesn't come with a fancy certificate, any free trips to a tropical island, and no trophy. It's really just recognition on my blog (which is likely being read only by myself and my dog). :] This isn't much of an award, but it is one way for me to shine the light on programmers that set a good example for the rest of us.

The Sunburned Surveyor
Posted on 7:56 AM | Categories:

Another Good Book (This one for programmers.)

I wanted to post about another good book. This one is for programmers. The book is entitled “Dreaming In Code”. It’s about the process of writing software, and follows a team developing an open source application called Chandler. (Chandler is a handy task manager that I started using after I began reading the book.) The book is valuable to me because it identifies a lot of the pitfalls and challenges in writing software.

Here is the web page for the book on Amazon:
http://www.amazon.com/Dreaming-Code-Programmers-Transcendent-Software/dp/1400082471/ref=sr_1_1?ie=UTF8&s=books&qid=1235576792&sr=1-1

Here is an excerpt from page 148 of the book, which identifies a pitfall programmers can fall into when testing a software for robustness:

Beyond that, it is the programmer’s job to imagine unlikely scenarios…Programmers call these edge cases, and they are often where the bugs hide. Trained to imagine them with exhaustive thoroughness, programmers’ pragmatic, gut-sense awareness of what edge cases really mater can get rusty. They spend so much brainpower out at the edge that they loose sight of the center.
Posted on 7:51 AM | Categories:

A “Must Read” Book For The Map Enthusiast

I’ve got a book that needs to be on the reading list of every map enthusiast. The book is entitled “The Mapmakers”. It talks about the men and woman who had an important or pivotal role in map making throughout history. The book is well written and entertaining. I’ve already learned about Chinese mapmaking, the influence of mythology and religion on medieval map making, the first street map (made by the Roman Caesar), and about Eratosthenes, the Greek librarian that measured the Earth. My favorite chapters are about the design of John Harrison’s clock, which allowed mariners to measure longitude, and James Cook, who revolutionized the mapping of coastlines.

Here is the Amazon Books web page for “The Mapmakers”:

http://www.amazon.com/gp/product/0375409297/ref=olp_product_details?ie=UTF8&me=&seller=

You can view the table of contents for the book there.

The Sunburned Surveyor
Posted on 7:40 AM | Categories:

Tuesday, February 24, 2009

Geo Clipboard for sharing between open source GIS programs?

Most of you know about the standard “clipboard” that comes with Microsoft Windows or most Linux distributions. This is the tool that lets you paste text from one cell in a spreadsheet to another, or from one document to another. I can even us it in AutoCAD to paste geometry from one drawing to another.

I thought it would be cool to have a “Geo Clipboard” for open source Java applications. This would simply be a text file stored in a known location (like C:/Program Files/Geo Clipboard/clipboard.txt) that would store items like positions and simple features. You could then write plug-ins for applications like UDig and OpenJUMP that wrote to and read from the clipboard.

Ideally, the GeoClipboard would allow me to select a feature in OpenJUMP and paste it right into UDig. In the standard operating system clipboard each new selection saved to the clipboard overwrites the previous selection. I think it would be cool to associate selections in the Geo Clipboard with a tag or label. That way the user could store multiple selections on the clipboard.

The file format might look like this in XML (I replaced the greater than/lesser than symbols with square brackets.):

[clipboard]
[clipboard_item]
[tag]Road Features East of Interstate 5[/tag]
[date]2009-02-24[/date]
[time]13:07[/time]
[type]simple features[type]
[value]
Simple features would go here…
[/value]
[clipboard_item]
[/clipboard]


Of course, it would be cool if the Geo Clipboard came with a little application that allowed you to view and edit its contents without the need for an external application like OpenJUMP or UDig.

There is no need for the Geo Clipboard to be limited to Java programs either. Since we are working with a text file, you could use it in applications like QGIS to.

The Sunburned Surveyor
Posted on 12:59 PM | Categories:

Using XML To Describe GIS Data Models

ESRI has been the main creator of widely distributed GIS data models. See this page for examples.

An ESRI data model is usually distributed as some type of poster, but other documentation is sometimes included. The data model is usually tuned for ESRI GIS software, although it is possible to extract some of the basic database design from the model.

I'd like to work on some of my own GIS data models some day. A data model for flood control infrastrucutre, survey control, the Public Land Survey System, and for Open Street Map are some that come to mind. I'm not very good at producing posters, but I was thinking there might be a better way to share data models.

What if we had an XML file format that could be used to document and share a data model? That would be a lot more useful than a poster. You could write a little desktop application that could be used to browse and modify the different parts of a model. You could cut and paste parts of a model from on model to another. You could even write a tool that autmatically creates a graphical representation of the model in something like SVG, or make a tool that generates a relational database from the information in the model.

I took a crude stab at an XML file format that describes a data model for Open Street Map:

http://www.redefinedhorizons.com/shared_files/samples/

This is something I would like to explore more in the future. Of course, the XML file is kind of ugly. Ir would need to be accompanied by a cool JAva API and desktop app to be really useful. :]

For now, I need to finish my Feature Photo Manager.

The Sunburned Surveyor
Posted on 12:47 PM | Categories:

Java for desktop applications?

It seems the whole world is developing web applications. Sometimes I wonder if I'm the only guy left developing cool applications (like OpenJUMP) for the desktop. Guess I'm not the only one. Here is a short blog post about growing revenues for Java desktop development:

http://java.dzone.com/news/growing-revenue-desktop-java

The Sunburned Surveyor
Posted on 11:51 AM | Categories: