Weekend hacking – and I finally triangulate!

The fruition of some week­end hack­ing in C#:

WP:FRIEND – A Wiki­pe­dia Administrator’s Best Friend

WP:FRIEND is my answer to the deluge of house­keep­ing duties facing Wiki­pe­dia admin­is­trat­ors. Faced with weeks-​​old back­logs of dele­tions, a tool that makes chores easier and faster is what we need. There are exist­ing edit­ing tools, such as AutoWikiBrowser, but they are not par­tic­u­larly suited for admin­is­trator clean-​​up jobs. I’ve just imple­men­ted the dele­tion of images tagged {{Now Com­mons}} so far – and there are plenty of bugs to be fixed and func­tion­al­ity to be imple­men­ted before I’ll release it pub­licly – although that’s the even­tual goal. Here’s the oblig­at­ory plug to Dot­NetWikiBot for sav­ing me hours of pained debug­ging (the inter­ac­tion between the browser and Medi­aWiki is actu­ally quite com­plic­ated, and there is thank­fully an effort to provide a clean API, but it’s not quite done). Les­son of the day: don’t rein­vent the wheel.

FRIEND

Com­pu­ta­tional geo­metry code

Com­pu­ta­tional geo­metry looks all nice and dandy on paper – and as usual the devil is in the detail. It has to be the area of com­puter sci­ence where corner/​special cases require the most care­ful hand­ling. And there we have it! After hours of argh, I have code that tri­an­gu­lates! One inter­est­ing thing to com­ment on is that, whilst cod­ing, I stubbed out some parts that I’ll even­tu­ally write with .NET lib­rary calls (the idea being that I can get to the goal faster) but that turned out to be one of the causes of my head­ache: e.g. GraphicsPath.IsVisible() has unex­pec­ted beha­viour. Les­son of the day: write your own code because you know pre­cisely what it does1.

1 or what it’s meant to do at least.

Triangulation

No related posts.

Tags: , , , ,