Skip to main content

PragProWriBlockMo

PragProWriMo has been even more challenging than I'd feared thanks to my sub-gnat concentration span and memory like a... you know, round thing with holes. While others have been trotting out chapter outlines, finding their voice and defining their readership, I've been shuffling along the beach of irrelevancy and gazing out at the ocean of unfinishedness.

It's amazing / pathetic / pathological (select all that apply) just how intimidating this simple daily writing exercise has become. The main problem has been the notion of a book hovering over the writing. No matter how many times I've told myself to treat the writing as a pump-priming exercise rather than an examination, I haven't been able to shake the anxiety of not "seeing the book" in my mind's eye.

But I will not surrender ! Well, that's not quite true because I did a few days ago, giving up on the whole thing as too hard. Now though, I'm putting the white flag back in the cupboard and making a new start. Rather than imagining the goal as a book I'm going to structure it as a set of short web tutorials.

I wonder if I can count this post ?

Comments

  1. You can count everything you write during the month of November toward PragProWriMo! Why not? I counted the ASCII art I drew inline in my writing because I was too lazy to pull up a drawing program.

    Good luck!

    ReplyDelete

Post a Comment

Popular posts from this blog

Circle packing in R (again)

Back in 2010 I posted some R code for circle packing . Now, just five years later, I've ported the code to Rcpp and created a little package which you can find at GitHub . The main function is circleLayout which takes a set of overlapping circles and tries to find a non-overlapping arrangement for them. Here's an example: And here's the code: # Create some random circles, positioned within the central portion # of a bounding square, with smaller circles being more common than # larger ones. ncircles

Fitting an ellipse to point data

Some time ago I wrote an R function to fit an ellipse to point data, using an algorithm developed by Radim Halíř and Jan Flusser 1 in Matlab, and posted it to the r-help list . The implementation was a bit hacky, returning odd results for some data. A couple of days ago, an email arrived from John Minter asking for a pointer to the original code. I replied with a link and mentioned that I'd be interested to know if John made any improvements to the code. About ten minutes later, John emailed again with a much improved version ! Not only is it more reliable, but also more efficient. So with many thanks to John, here is the improved code: fit.ellipse 0)] f Next here is a utility function which takes a fitted ellipse and returns a matrix of vertices for plotting: get.ellipse And finally, some demo code from John: create.test.ellipse 1 Halíř R., Flusser J.: Numerically stable direct least squares fitting of ellipses. In: Proceedings of the 6th International Confere...

Circle packing with R

To visualize the results of a simulation model of woodland trees within R, I needed an algorithm that could arrange a large number of circles within a rectangle such that no two circles overlapped by more than a specified amount. A colleague had approached this problem earlier by sorting the circles in order of descending size, then randomly dropping each one into the rectangle repeatedly until it landed in a position with acceptable overlap. I suspected a faster and more robust algorithm could be constructed using some kind of "jiggling the circles" approach. Luckily for me, I discovered that Sean McCullough had written a really nice example of circles packing into a cluster using the Processing language. Sean's program is based on an iterative pair-repulsion algorithm in which overlapping circles move away from each other. Based on this, and modifying the algorithm a little, I came up with an R function to produce constrained random layouts of a given set of circles. ...