So In the first quarter, I managed 269 miles on my own bike -- a lot more cycle commutes in March than I had expected -- plus 75 on the hire bike for holiday -- putting me 1/3 the way to my target of 1000 for the half-year.
To use up some carry-over leave from last year, I booked the last possible use-by dates, and decided on the cyclebreaks Tudor Treat package, so that even if the weather was awful, I could at least be pampered. As it was, having been their last customer out last year, I was their first out this -- and doing so, I caught the last day of the glorious early summer, before a return to more normal conditions. So on the first morning in glorious sunshine I set off, and let the miles roll past:
Setiing out about 09:30, I didn't decide on what route I'd take until getting to the Red Lion at Martlesham, where I turned right, and made the same sort of loop around Ipswich as I did last time I was there -- only this time, I paid more attention to the cycle-route signs when having to clip the corner of the built-up area (where motorists were queueing to full up cars and petrol cans), and then down the only really busy piece of road, the B1113 through Sproughton, which combined up-hill with constant traffic both ways.
I went through the old village at Copdock, rather than slogging up the old dual carriageway, then through the obvious route to the White Horse at Tattingstone, getting there just after midday; by which time it was warm enough to have taken off the brushed cotton shirt I'd started with. And after a pint -- too early yet for lunch (despite the tempting menu) after a huge breakfast -- warm enough to strip down to shorts as well. From there, the cycle-path around Alton Water began shortly after, then to the Suffolk Food Hall for a light lunch.
The return route was pretty much forced into backtracking some of the way in until turning north at Belstead; then having made mistakes in the in-bound route last time, I followed the more direct way to the city centre and then followed the cycle-route signs out East -- no long spells of pushing, only the first little bit around that multiple roundabout -- and out along the country lanes to the hotel.
Sum total, 45 miles; so I was a trifle creaky when having freshened up, I went down for a much needed pint at the hotel bar.
Friday opened sunny, and was forecast warm, so I started on the loop down to Felixstowe, to look over at Harwich; but cloud soon bubbled up and socked in completely, with a raw northerly wind, so by the time I got onto the unpleasantly busy road south of Kirton, I thought this was no longer a day for going to the coast, and took the only way out that wasn't back, aiming for the Dog at Grundisburgh for a light lunch; and then took a rather indirect amble back to the hotel, for just over 30 miles in total, before setting off home to beat the evening rush.
Although the second day was more the weather I had been expecting, cold northerly aside, it was really nice to be out and enjoying the countryside in spring -- cowslips, daffodils and primroses running riot in the verges, and daffs in most patches of woodland.
A long while ago (turn of the century) I wrote a little Win32 utility to drag and drop files to get their MD5 and SHA-1 hashes -- useful for verifying downloads. And when I composed the hex-string hashes into a std::string, it looked almost 'C' like, thus (repeated once per hash):
<string> being the only bit of C++ in sight, in fact
After the recent Going Native C++11 bash I decided to dust it off and revise it using Boost and the TR1 features in VC++ 2010 (which has most of the C++11 goodness all by itself). So now that section looks like:
which gets called in another lambda that is
for_eaching over a vector of tuples containing hash contexts.
The code size has gone up (down if you count discarding hand-written MD5 and SHA1 for the CryptoAPI -- which adds its own error-handling bloat); but the increase includes half a dozen little RAII classes, and code to discover a better monospace font than SYSTEM_FIXED_FONT, albeit from a hard-coded list of Inconsolata, Consolas, Lucida Console and finally Courier New.
My immediate reaction is that the provision of lambdas now makes the standard algorithms actually usable -- no more functor classes remote from the point of use -- and I can program it in the more functional style that I'm now used to.
More of what the compiler does without you realising it, only this time in a C# sample.
The absolutely simplest sort of method, which you can clearly completely cover by calling it once. Right?
That's what I thought until I tried running OpenCover over code rather like this, and it told me I had only covered one of two possible branches.
So naturally, I go "WTF?", and wonder whether it's the return or throw alternatives out of
.First that it's alluding to and to be certain, crack open ILSpy, and see that first line expands to
which actually involves first caching the delegate corresponding to the lambda, if it hasn't been already; or using it on subsequent calls.
The release build is much the same; it lacks the initial
nop, and the meaningless jump-to-next-instruction at offset 0x23.
Move the constant string out into the method, and make the lambda close over it
and the caching goes away : a new instance of
ClassLibrary2.Class1/'<>c__DisplayClass1' gets created every time, debug or release. And with it goes the branch.
As usual at this time of year, high pressure usually means socked in 8/8 cloud, or fog after a clear night; and with sunset around 6pm, a prompt return from work and/or some remote working after dinner when cycling. Despite that, a clear night before the full moon meant good conditions for cycling to and from dinner; and since then I've managed three days (out of seven possible) cycling to work when it wasn't foggy and/or drizzling.
The garden continues to progress - primroses now all in flower, not just the ones in the sunny places that have been going a month or more; viburnum still, a solitary daffodil, can crocuses and snowdrops giving way to the early dwarf tulips. I've even had the mower out a couple of times now.
Still a lot of April chores ahead -- lawn work, clearing weeds from the various beds; but I've made a start on some of that already, mainly last Sunday when we had the first warm day where I didn't need a jacket going to the garden centre for supplies.
After a foggy start, yesterday was bright and mild; a perfect day for spring to open. Let us hope that the month does not exit in too leonine a fashion.
All winter, when the cats have complained about being kept on strictly measured rations, as the vet says they could do to shed a few ounces, I've told them to go and catch something if they want more to eat.
So yesterday, they celebrated spring by leaving a pile of entrails on the kitchen floor, as token that one at least had found a reasonably sized rodent to supplement the kibble.
Previous instalments at Life before Blogging.
Forum Administrator : EvaGeeks.org — An Evangelion Fan Community
-----BEGIN PGP SIGNED MESSAGE----- The demon.co.uk address is obsolete -- do not use -----BEGIN PGP SIGNATURE----- Version: CTC2.1 iQCVAwUBWAPNzLiuOxyD0TQxAQEK+QQA31hdDBP61+yoBJQwWtsk7BZx6fz6yJ6v lv7mcvxOjPYDxynPUWOojtt8uTCJ3IQYeQjb2w3rotK2wwdwdP6BbcXUEIdgleGs CNH13YBpWbZt1nckcPzQL46Va16938r+1KyCXJQ6dR56ttG+MhMJvtjBoacbQKPm RWxUEL55Nio= =vhBV -----END PGP SIGNATURE----- -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.3ia Comment: 1024 bit RSA key Comment: The demon.co.uk address is obsolete -- do not use mQCNAi9HqY0AAAEEAOui8XEp6QBFeHl8DOA1Lk2BbjS57YRFNIc6QeZEwX4NaUcZ eeIk90nFVIWdjRRsGobtuMSZMXl9MxZ/cw2xtFfj7JGpU9d1vz12UYebadS+8r2N yuWEtprjZUGrsXMU1Y1cLuClr+kpsh+4DWNuBXELTILNxlsPD7iuOxyD0TQxAAUR tC9TdGV2ZW4gQWxhbiBHaWxoYW0gPHN0ZXZlQHdpbmRzb25nLmRlbW9uLmNvLnVr PokAlQIFEC+JJtZaDS1d3gQnjQEBGEEEAIHzY7xV2KcIHqva6jEjTFI6GVmxAfSz d+KJN8LQAYzG1kVpKIUEvEEn7TayNGky79CBVgvtCCGkPMOzK0A606E1mcef3cbM hxNvn9FFZTGa1HDCdw+N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