PolyLineM support in Catfood.Shapefile

Updated on Thursday, December 26, 2019

I’ve just updated Catfood.Shapefile, my ESRI Shapefile parser for .NET, with PolyLineM support thanks to a contribution from Stephan Stapel. The solution for the new version has also been updated to Visual Studio 2010.

Download Catfood.Shapefile.dll 1.30 from CodePlex.

Catfood: Klout and Follower

Updated on Friday, February 24, 2017

Klout is building PageRank for people. You get a score between 0-100 based on how large your social graph is and how much you influence it. They also have a simple API and have been kind enough to let me use it as part of Follower so I’ve just released Follower 1.40 with Klout integration.

Follower automates the chore of following new friends on Twitter. It also somewhat automates removing traitors who don’t follow you back – as much as Twitter would let me get away with. One problem with following promiscuously is that you do end up following a lot of spammy and scammy accounts. Adding Klout helps with this as you can now say ‘follow everyone who follows me as long as their Klout score is higher than 15’. This keeps some of the riff raff out. And if a follower’s score rises above the threshold then they’ll be admitted into the club.

You can also use Klout to weed out existing follows with a low Klout. In this mode anyone below a configurable score will be added to the remove list even if they are following you back.

The only snag I hit with API is that while you can lookup a user by Twitter ID the ID isn’t returned in the response. If you query multiple IDs at a time you don’t always get a full set of results so without the ID you can’t reliably tell which result is associated with each ID. For this reason I’m only looking up one score at a time. Twitter has nice bulk methods to grab IDs for up to 5,000 friends or followers, it would nice if Klout could match this or at least fix the ID issue. This is a small problem though and having an automated way of detecting the quality of Twitter accounts is a great addition to Follower. If you use Twitter check it out.

Reviews and links for October 2011

Updated on Friday, February 24, 2017

Ready Player One by Ernest Cline

4/5

It's a homage to the 80s and early computer games set in the ultimate MMORPG of the future. What's not to love?

 

Links

- The Important Field from xkcd.com (Snort).

- Girls equal in throne succession from BBC News - Home (Not really the main inequality of a monarchy...).

- Delta-P from xkcd.com (:)).

- On Tea from Boing Boing (Damned right).

- New Data API Around NASA Data Sets from API Evangelist - Blog (NASA data #API :) #todo @myEN).

- (title unknown) from riot right clit click (The only #SF residents who follow the MUNI front door only rule).

- Royal succession changes proposed from BBC News - Home (Simon Cowell to have final say).

- Ben & Jerry's taste for protest from BBC News - Home (Brave Brand Stand).

- Subscription Service For Kids Activities Kiwi Crate Raises $2 Million from TechCrunch (If they're still going in a couple of years...).

- Eternal Flame from xkcd.com (Nice Jobs tribute from XKCD).

Section 8.2.3.2

Updated on Friday, February 24, 2017

The installation of a kitchen in premises where the number of staff exceeds twenty requires that proper hearing arrangements for those who like pies of high quality are made.

Grape Plasma

Updated on Friday, February 24, 2017

Gill found these instructions for making plasma in a microwave by carefully cutting up a grape and then nuking it. I finally got around to trying it yesterday, and it’s awesome. Even better than microwaving a light bulb in a glass of water. Check it out:

Making plasma in a microwave!

Reviews and links for September 2011

Updated on Friday, February 24, 2017

Neutrino by Frank Close

3/5

Narrow topic, but an interesting book, especially the frustratingly long effort to reconcile observed electron neutrinos from the Sun with reality. Has a rather repetitive recap at the end that ends up recapping some of the recap which rather bogged things down. I definitely know more about neutrinos than I did before though.

 

Debugging Treasure Trove

Updated on Thursday, December 26, 2019

Mark Jackson, my co-founder at Cucku, is blogging re-mastered debugging tips from StackHash. StackHash is now an open source project and all of the great content from the original site has been taken offline. This new project is a great resource for debugging on the Windows platform, especially post-mortem crash dump analysis. If that’s your thing do yourself a favor and subscribe to Mark’s blog.

Sentinel Dome

Updated on Friday, February 24, 2017

Sentinel Dome Route

Slightly easier than Half Dome, and when you get to the top you get to look at Half Dome. What more could you ask for!

Rob & Kate approaching the top of Sentinel Dome in Yosemite National Park

(View in Google Earth)

Hike starts at: 37.715495, -119.584577.

Black Diamond Mines Regional Preserve

Updated on Friday, February 24, 2017

Black Diamond Mines Regional Preserve

Black Diamond Mines Regional Preserve is an East Bay park spanning more than five thousand acres.

I spotted what looked like an easy four mile loop. It was nearly seven, I guess all the .3’s really do add up. The loop we did was a mix of exposed sunny ridgelines and shady canyons. We went on a ‘cold’ day which was still high 80s and a nice sweltering break from the San Francisco fog.

Kate; Jim's Place

Kate taking a break outside of ‘Jim’s Place’.

Gill & Kate

Gill and Kate, again outside of' ‘Jim’s Place’.

Gill; Pittsburg an the California Delta

Gill with a view to Pittsburg and the California Delta.

(View in Google Earth (KML))

Hike starts at: 37.958487, -121.862883.

Basic HTTP auth for an IIS hosted WCF 4 RESTful service

Updated on Thursday, November 12, 2015

Wasted far too long on trying to get WCF to work with custom basic authentication this week. Custom in the sense that I need to look up the username and password in a database and not have IIS attempt to match the credentials to a Windows account. Given how well WCF 4.0 supports RESTful services in general it’s a bit shocking that basic auth over SSL isn’t supported out of the box. It seems like you should be able to derive and hook up a class from UserNamePasswordValidator, set the transport clientCredentialType to Basic and be ready to go. I’ve heard that this works for self-hosted services, but no dice in IIS.

Basic access authentication is a simple protocol and so in the end I added a helper method that checks for access (and in my case returns the user information for later use) at the start of each call into the service. It’s very simple:

  1. Check WebOperationContext.Current.IncomingRequest.Headers for an ‘Authorization’ header. If it’s there decode and validate the credentials.
  2. If the header is missing or the credentials are incorrect add the WWW-Authenticate header to the response - WebOperationContext.Current.OutgoingResponse.Headers.Add("WWW-Authenticate: Basic realm=\"myrealm\""); – and then throw a WebFaultException with a 401 Unauthorized status code.

This triggers a browser to prompt for your username and password and then try the request again. When calling the service in code you can add the ‘Authorization’ header preemptively and skip the 401 response entirely.