Archive for October, 2010

Published by breki on 23 Oct 2010

Fresh Catch For October 23rd

These are my new delicious links for October 23rd:

<br/>

Published by breki on 20 Oct 2010

Fresh Catch For October 20th

These are my new delicious links for October 20th:

<br/>

Published by breki on 20 Oct 2010

OpenStreetMap: What’s Wrong With The Picture

Justin O’Beirne wrote a couple of blog posts about his “outside” view on OpenStreetMap Web maps (Mapnik layer, basically). When I say “outside” view, I mean that he talks about how and what data is presented on the map from the point of a visitor to the OSM site, and not from the point of someone who is an active OSM mapper and knows the root causes of these problems.

And this is just the point: a well intentioned criticism from someone outside of the community should be received as such. I think the OSM community is more and more becoming self-centered and disregards some basic issues about why this project exists in the first place. Why should Justin (or anybody else) care what “Mapnik” or “Osmarender” means? Why should he care about the tagging mess which resulted from the anarchical way the project is (not) being led? Not everyone wants to become a mapper – most of people just want to find something on the map.

Reading through various OSM mailing lists and forums, one gets the feeling there is very little concern about how the data that is being collected by hardworking individuals will be useful in a practical way. I see two main problems here:

  • Inconsistency of how things are tagged. And the project’s inability to set some strict quality guidelines for tagging. The “everybody can tag the way she likes” slogan starts to wear off once you want to use such data for something more than just displaying it on the OSM web map.
  • High barrier to entry if you want to access the data. Sorry, but not everyone has the technical means and knowledge to import 12 GB of zipped planet.osm XML file into a database and then run queries just so he can access the latest data for his local area. OSMXAPI is great, but it’s unstable and has a limit of how much data can be retrieved. Country extracts help, but the problem is that they are country-oriented. What if I do not want my data to be cut along the border? Some time ago I suggested providing grid extracts instead of country ones – the user would choose which grid cells to download and then merge the data himself.

Anyway, enough ranting… Going back to coding.

Published by breki on 19 Oct 2010

Fresh Catch For October 19th

These are my new delicious links for October 19th:

<br/>

Published by breki on 18 Oct 2010

Web Testing & Gallio: A Little Helpful Trick

When doing automatic testing of Web apps using unit testing frameworks, it can be a pain in the butt to pinpoint the proper HTML element. A lot of times tests will fail because you used a wrong locator, but since the browser will automatically close after the test, you don’t have an access to the HTML code of the page to look at what’s actually there.

Fortunately Gallio provides a class called TestContext which contains the current information about the running test and which you can use to determine if the latest test is successful or not. This can then be used to run your custom handling code during the test teardown:

        [TearDown]
        protected virtual void Teardown()
        {
            if (TestContext.CurrentContext.Outcome.Status == TestStatus.Failed)
            {
                using (TestLog.BeginSection("Failed web page HTML"))
                    TestLog.Write(WebDriver.PageSource);
            }
        }

In the above snippet, we record the current Web page’s HTML code into Gallio’s log (the TestLog class). To avoid spamming the log, we do this for failed tests only.

Gallio provides a powerful framework which I think is very much underused, mostly because the documentation is not very detailed (to say the least).

Published by breki on 17 Oct 2010

Fresh Catch For October 17th

These are my new delicious links for October 17th:


Published by breki on 04 Oct 2010

Fresh Catch For October 4th

These are my new delicious links for October 4th: