Friday, June 28, 2013

LED lighting by trial and error

We seem to be getting to the tipping point with LED lights, where they have become sufficiently performant and low-enough in price to be worth installing. Now, you usually can't find anything brighter than the average glow-worm (nothing above 4w that I can remember) on the shelves in bricks'n'mortar lighting departments be it at the sophisticated end with John Lewis or the general DIY of Homebase, but online at the reduced prices available through the usual aggregator, you can find some decent kit, and I've tried a range of models, finally turfing out the remaining few incandescents outside the 60w candle bulb in the bedside sunrise alarm, and the ones in various appliances.

Now despite the equivalent wattage ratings printed on the packs of compact fluorescent twisty bulbs, I've usually found the rough equivalence there of 11w ⇒ 60w incandescent and 20w ⇒ 100w incandescent; and have in most cases been pleasantly surprised by the LED lights outperforming the CFLs watt for watt.

So here are what I've tried (in some cases using an E27 to B22 adapter):

  • 10 Watt, B22 Bayonet, Daylight White — brighter than an 11w CFL, somewhat directional beam, and rather blue for normal indoor use. I've replaced 100w incandescents in bulkhead lights in greenhouse, attic and garage with this model, for which it is a more than adequate replacement, and where the clean colour is preferable.
  • 10 Watt, B22 Bayonet, Warm White — similar to the above, but a better colour for normal indoor use. Suitable for traditional pendant fittings with a diffusing shade (I still use the paper globes like it was the 1970s), and somewhere between an 11w and 20w CFL in perceived brightness.
  • 6 Watt R63 reflector spotlight, E27 screw, Warm White — brighter than the 60w incandescents they replaced. A definite win.
  • 5 Watt Corn Style, E27 screw, Warm White — called 80w equivalent, and, despite its deceptively small size, certainly a match for the 60w incandescent it replaced in the downstairs loo in a ceiling fitting where it's horizontally mounted in a diffuser dome with a reflective plate above.
  • 10 Watt Corn Style, E27 screw, Warm White — adequate replacement for a similarly small-size 11w CFL in a wall light, horizontally mounted in a diffuser dome. I expect that they would work equally well vertically mounted in a simple diffuser as a bedside light, where the mainly-sideways illumination is at the right height for use.
  • 12 Watt Corn Style, E27 screw, Pure White — a clean white light (not as blue as the daylight white above), which is working well in the grey, blue and white bathroom (ceiling mount as above). Not so good mounted vertically as a pendant light, because it shines mostly sideways, leaving the floor underneath darker by comparison than the walls, so the subjective experience is poor there (but it is likely this could be mitigated by using a different shade or fitting).

Some other subjective considerations may apply -- I like the instant-on, though I do know people who find the slow ignition of a CFL useful for a bathroom light when staggering out of bed in the middle of the night and would find the immediate bright white a painful experience. For me, OTOH, between street-lights and the charge indicator for the ceiling hoist immediately above the loo, I find I already have enough illumination for nocturnal micturitions without reaching for the pull-cord; and hate the dingy interval when starting to shower or run a bath.

As we have a stock of CFLs to use, I've not completely replaced those -- as CFLs don't take so well in cases where a light need only be on for a short while as LEDs do, I have put LEDs in non-core-use rooms, and left CFLs in places where they will be in use from dusk to bedtime, or bedtime to settling down time.

Thursday, June 27, 2013

FxCop Rule CA1021:AvoidOutParameters — Not just for Morts

When you really have to return two values (like a return state with various values for success and failure, and some more substantive sought object on success

), resorting to an out parameter seems so obvious, and the relevant static analysis rule does say

It is safe to suppress a warning from this rule. However, this design could cause usability issues.

So "real programmers" will reach for that, regarding the rule as one to mollycoddle junior developers; and will shy from the clunkiness of an anonymous tuple type (even now we have them in core .net languages). But there is still a point where they cause pain, and that is when the parameter is on an interface method, and you want to mock that method.

At this point you have to individually specify each invocation of the mocked method and its pre-computed out parameters -- even though with modern mocking frameworks like Moq, you can use a lambda to compute the return value based on arbitrary inputs, and make a normal mocked method algorithmic over expected inputs.

rather than

Upshot -- the usability issue is not that the caller has to look at two values like a success state, and then if relevant a different value, rather than look at fields in some carrying type; it's that your customers (in the Total Quality sense) will end up with rather more coupled and brittle unit tests when they try to abstract your component away through its interface.


Wednesday, June 26, 2013

Constable Country Pub Crawl, '13


View June '13 in a larger map

Is it so wrong to choose a holiday on the basis of country pubs lying on or near the route?

So I did the Needham Market -> Dedham -> Lavenham loop like I did a couple of years back, on that basis. The difference was this time I used a hire bike, rather than my own, which meant that I had to get the saddle height right and accustom myself to the gearing, especially on the fairly crinkly terrain of the Stour valley.

So I'd barely left the base when it started to rain, first a nuisance scatter, then heavily, necessitating a stop and change to wet weather gear, so I ground away until the rain stopped -- then wondered why my legs were already tired (answer: because the saddle was too high and I was having to over-extend on the down stroke). And then fun with recalcitrant gears that didn't change if there was any significant load being applied, so a lot of get off and push if I didn't change down in time, when I really wanted to still be in high gear on the down slope.

Poppies

Blood red poppies, just after rain

Consequently, I didn't get past Copdock until going on 1pm, and opted for the Tattingstone White Horse for lunch. Being Sunday, the place was quite busy, so I'd supped one pint of Wherry by the time my bangers and mash arrived, and was on the second. Then it was time to take rather less of a detour (modulo the need to cross the A12 in places) on the way to the Sun Inn at Dedham.

Posts

Tattingstone

And of course there was more weather -- after coming through Capel St. Mary (where'd stopped to take on provisions), I could see a wall of rain approaching, but hoped I might be able to pass it to one side.

No such luck, so I arrived at Dedham quite damp, and sat watching the rain over a couple more pints at this agreeable watering hole. When it seemed that the weather had eased off, I headed the last mile to Milsoms, getting the benefit of one last shower of rain.

This time the menu was a bit disappointing compared with the previous visit -- I ended up with bread and oil, chilli and rice and an ice cream sundae.

Monday started dull and breezy, but at least it was dry as I wended my way to Stoke-by-Nayland (avoiding the crinkliest of the terrain by taking the main road a while); and then with the road closed that I would have otherwise taken, took off cross country to Sudbury (cadging a coffee from my surprised parents).

Suburbia in the middle of nowhere

A few semis in the middle of nowhere

Then I took the easy terrain of the old railway, the first time I had really been able to open up a proper cruising speed, taking a loop aiming at the Cherry Tree in Glemsford. One mishap on this route -- having taken two off-road sections already, I tried the bridleway to Pentlow Street, that started wide and dry, narrowed in a few places, got overgrown in a couple more, and then, within sight of the far end, a short quagmire. So I then needed to find a puddle to wash my shoes in.

Late lunch at the Cherry Tree, and then out into some heavy drizzle for the last leg.

Lavenham afternoon

Approaching Lavenham

Not feeling up to a Marco Pierre White dinner, I opted for the Memsaab and a vegetable dansak, before having a wander in the evening sunlight, a wander than ended up at the Greyhound for a couple of pints, where, as the only customer, I spent the time chatting to the barmaid, an enterprising young lass in her mid 20s who had just moved into her own home in the last few weeks after working all hours and saving the cash -- puts the lie to the moaning about it being difficult to get on the property ladder these days.

Lavenham morning

Lavenham in the morning

Then Tuesday opened bright and sunny, and not quite so windy, so I decided to make a long loop, aiming for Ickworth House, but covering new terrain. Skirting a road closure in Long Melford, looping through Clare -- then discovering that the road thence to Poslingford had such a rough surface that I was having to put a fair amount of effort in maintaining a slow pace even on generally down slopes, and then hit a whole bunch of recent top-dressing on the roads. Upshot -- it was going on 1pm, with ~30 miles still to cover, by the time I was getting close, and when I saw that the last mile to Horringer was just freshly top-dressed, I said "Nope!" and carried on past the turn on roads worn smooth and comfortable to cycle.

Clare

Clare

Once I'd gone past Sicklesmere (a quick refreshment stop at the Rushbrooke Arms, and the cheapest -- by 50p -- pint of IPA I'd had all holiday), the terrain became more rolling, and I could achieve a steadier pace, getting back to base about half past 4, despite a couple of places where I missed turns because of misleading names being signed, and a total of 121.1 miles for the trip.

Buxhall

Buxhall

And so, home

A week in the country

In the second week of the month, I took Karen for a week at the Park House Hotel at Sandringham.

Park House

Park House

Unfortunately, the weather was not as nice as the previous week -- winds off the North Sea bringing cloud much of the time -- but at the other end of the house, there's a large conservatory joining the main building to the Coach House annex, which was amply warm (indeed, needed air-conditioning on the mornings when the sun shone); and the location was sufficiently secluded that we were not disturbed by the neighbours whose house we could see from the bottom of the garden

Sandringham house at evening

The neighbours

The late spring meant that the rhododendrons were at full flush

Rose-red rhododendrons

Rhododendrons

The accommodation was basic, but apart from sleeping we didn't spend much time in the room; and the catering was adequate. Day one was a misdirection with a menu including gyoza to start and locally-reared steak as a main; the clientèle being mostly seniors the food was somewhat unadventurous without quite the plain home cooking feel that Vitalise Netley did. But the location did give perks -- like an estate tour that went into the Royal Stud

Royal Applause

Royal Applause deigns to make an appearance

and into the non-public bits of the gardens.

Sandringham gardens

Sandringham gardens from backstage

We made an independent expedition to the Gin Trap at Ringstead for lunch and Norfolk Lavender for smellies

Harvester

Harvester

And while we skipped the organized outingd to King's Lynn and the Thurston Collection of steam things, we did go to Pensforth, jorneying down narrow lanes in driving drizzle, only to have the sky clear and the sun shine as we arrived to be mugged by waterfowl.

Mugged by waterfowl

Mugged by waterfowl

The red squirrels were rather more obliging

Red squirrel

A red squirrel

Red squirrel displaying

Another red squirrel

Other items of note -- I managed to drink them dry of Adnams by the end of the week, and had to move onto Old Speckled Hen; the wifi didn't agree with the 7 year old hardware and 4 year old drivers of my travel laptop, but fortunately I could get at an ethernet connection instead, or use a tablet. And there are miles of trails in the park (and on the sandy soil, comfortable for going barefoot), so it didn't matter so much that I didn't have a bicycle

Beware of the raven

Beware the Raven

So well rested, we headed home, having loaded up with very tasty local beef from the butcher at West Newton

Terrace

Park House Terrace

Tuesday, June 11, 2013

Anime, year to date

Viewing has been fairly thin this year (only 3 series picked up from Q1, and nothing appealing from Q2 even with the after-action reports coming in, to investigate), and yet I've still been falling behind. So to cover what I've actually completed so far this year:


Inferno Cop

Studio Trigger -- saving anime one frame at a time!

This low animation (everything is a static sprite, with a few exceptions like Inferno Cop's flames) short episode one cour series from the larger bunch of ex-Gainax staffers actually started at the end of last year.

It's an affectionate parody of the 1980s OVA (e.g. Angel Cop) through video games and on to an ending right out of Evangelion. And unlike the last Gainax parody anime, it eschews carrying the series on cute Japanese girls cursing like troopers in English.

And it's officially up on YouTube if you have a spare half-hour - as also is


Little Witch Academy

More traditional animation from Studio Trigger, a cute little tale of the underdog winning at a sort of Hogwarts for Girls.

Available on the Studio Trigger channel.


Natsume Yuujincho seasons 3 and 4

The later cours move from being humorous or bittersweet tales of youkai, and move more to Natsume's teen angst, torn between the friends he's been able to make in both school and those in the spirit world. The introduction of a continuing villain in the Mataba clan, exorcists who view the youkai as a natural resource to harvest doesn't help either.

Still. the series reaches some closure -- even if the manga continues -- by effectively wrapping up the defining event of his life, as he revisits his childhood home for the last time.



Vividred Operation

Strike Witches in hotpants meets Nanoha meets Captain Scarlet and the Mysterons in this tale of magical Science! girls vs alien invaders.

In a typical shot, Captain Black Kuro supervises the Mysterons Alone

This has everything -- alien invaders, magical girls, mascot animal, Captain Black Kuro on the alien side, the power of friendship, power ups via gattai, Graf Eisen, you name it...

It's let down a little at the end when everyone stands around looking gormless for some minutes while the final boss starts to drink up all the Science! energy that would power the Vivids, and we never get the ultimate VividSpectrum gattai, but still harmless, if forgettable, fun.


Puella Magi Madoka★Magica

Madoka is surprised at the downsides of the magical girl gig

This one not finished, but rather put on indefinite hold if not outright dropped after 8 episodes of 12.

Yes, a landmark series from a couple of years ago that made it over the barrier of otaku anime and found popularity in the wider population in Japan; which I picked up when the Manga UK DVDs came out last autumn.

Alas, some series weather complete spoilers (i.e. from picking up after the fact from reading unfiltered popular reaction) better than others -- and this, unlike, say, Gurren Lagann, to name one that I watched with similar levels of knowing what was going to happen, is one that doesn't.

The story really relies entirely on dropping major genre-busting twists every couple of episodes -- and not on the cast of wooden and generally unsympathetic characters; so when you already know the twists, there's not a lot left to carry it. I certainly never saw how come the Japanese fandom came up with so much MadoHomu with what they had had to go on by that point -- their yuri goggles must have been turned up to a level that would have burned them out on Nanoha episode 4 alone!

I wasn't even able to get any real vicarious unspoiled viewing from my wife's reactions, as this one (unlike, say, the Vivids) seemed to leave her quite cold. That was not helped by the choice between the icky-cutesy voiced US dub (much like the one that did its best to ruin A Cat in Paris) and the poorly timed (often a syllable late, always very tight within the duration of the dialog) subtitles that really need a level of speed-reading.

The proper ED, after they dropped the pretense that this was a typical mahou shoujo, wasn't bad.

Saki Achiga-hen

Oh yeah, and the last few episodes of the mahjong mayhem that covered in 13 episodes (plus three of backstory) what the main series did in twice that, so the set-up of the opposing teams and all the mahou-jong powers weren't anywhere near as developed. Harmless fluff, but light in weight even compared with the original.

Recent reading

Time to do some catching up for the last few months...

Neal Asher's Polity (Agent Cormac, Spatterjay, and others)

As one of the few SF writers whose blog I can stand to follow, I thought last summer that it was about time that I went and read some more of his books -- having read The Engineer and Gridlinked back when they were new, well before I even started this blog. So since then I've been slowly pacing myself through everything that the local Waterstone's had on its shelves, trying not to mine out this rich seam too fast. But now, alas, that particular well has run dry for the moment.

Now, why had I left this much to accumulate? After I'd read Gridlinked, I'd felt that the book had gotten close to my squick level; and the description of his next oeuvre, The Skinner made it sound like it would be way over. But another decade on the internet seems to have desensitized me enough to handle the rest, though there have still been a few places where I've thought "I get the point" and skipped to the end of the scene -- you know you're getting off lightly, for example, when someone undergoing radical surgery for an invasive alien parasite is merely described as "looking like an explosion in an abattoir".

So, provided you are OK with the level of mud, blood, body horror and psychotic villainy, and are looking for good solid action adventure SF this is a setting of a messily human, yet generally optimistic far future, without the antiseptic niceness that too often seems a genre staple, where action spans from massive interstellar war-fleets to the poor bastards who have to get up close and personal with whichever menace out of time or space is behind the machinations of the current plot.

I still have no idea how my memories of Gridlinked (before rereading it recently) managed to get confused with what I think must have been Banks' Consider Phlebas which I must have read a decade earlier.

Next up, The Owner...


The Serene Invasion by Eric Brown

And now for something completely different...

Another "golden spaceship" novel in which the human race is enslaved by alien puppet-masters who stay offstage, much like his earlier Kethani. The difference in this one is that, rather than patching up and rewriting broken humans, the aliens rewrite reality directly to prevent the expression of actions that would injure self or others -- including animals (the matter of what happened to surgeons was quietly ignored, when even boxing was rendered impossible).

Consequently there are no riots over the last remaining stocks of bacon as the human race are socially engineered back to locavore subsistence farming under a network of alien-symp soviets. Resistance, such as it is, comes in the form of Morwell, a caricature Murdoch/Maxwell (the name might have given that one away) style media baron and ex-arms manufacturer, and a cartoon alien enemy who, while being able to rewrite reality nearly as well as the S'rene, apparently still find economic use in sending lower races down mines for materials (probably because they're right wingers and do that sort of thing, along with eating babies for breakfast, as naturally as breathing).

Normally I don't hold a writer's repugnant political views against them (I actually enjoy China Miéville's F/SF writing, ffs), but this sanctimonious piece of work comes straight out of -- or, rather, dives straight into and never again emerges from -- the low information leftist/watermelon reality tunnel.

It's the third strike, and you're out, I'm afraid, Mr. Brown.

Later: And the attention to detail is so great -- while humanity is being guided to hand-knit its own lentils, nothing is said about what you do with the billions of farm animals that you can no longer eat or even castrate. Or what you do when your horse breaks a leg, or your cat has a stroke and goes mad with terror.

None of that matters when you're getting off on fantasizing that your hate figures are sexual inadequates -- that's much more important to consider after the new Year Zero.


Milkweed (Bitter Seeds et seq.) by Ian Tregillis

Mad English warlocks vs twisted Nazi psychics? Yes please!

So runs Cory Doctorow's blurb on the back cover of the first volume of this Weird War II trilogy, summing it up most concisely.

This one caught my eye from the striking cover design of the series, the blurb piqued my interest, and the teaser synopsis did the rest.

Although there are a few lapses of nuance that betray the writer as American in this trilogy set in an alternate world where the Commonwealth -- and in particular, the most secret part of British Intelligence -- stands alone against the Nazis and then, later, the Soviets and their superhumans, the whole was a gripping read.

Friday, June 07, 2013

For once, a touch of flaming June

It seems like this is the first time in many years that we have had such a run of good weather, bright crisp rather than sticky, warm but not too hot -- certainly while I've been on holiday, it is.  It's been good to just kick back and enjoy after a fairly gruelling spring, in terms of both weather and work, potter a bit in the garden, start to do some real cooking for a change, and get out on the bike just for the sheer  enjoyment of it.  And without going on any endurance rides, averaged 15 miles each day so far, more than I would have done if it were a working week.

Wednesday, June 05, 2013

Too nice a day to be in the office...

Well, actually it has been all week, with mostly clear skies and temperatures in the high teens, moderated by a cool northerly breeze, those perfect days of early summer. So it's just as well I've not been in the office.

Just the sort of weather when a trip to the shops can be enlivened by a 10-15 mile detour on the way there, and finding places and ways ever so nearby that I've never been before despite having lived in the current place for over 25 years now, from little corner cuts to joining up places I'd never connected before.


Saturday, June 01, 2013

Wet and Dry

Despite some wet weeks which cut down the cycle commuting, May made up with both Bank Holiday weekends being fine and dry. So at the end of the month I was at 6659.3 miles, or 294.1 miles in the month with long rides on the holiday weekends and 1066.4 for the year to date (1150 when counting the holiday in March), which compares with just over 600 this time last year; and 2840 miles in 12 months (ignoring hire bike miles).

The wet did give me a slot to get the bike overhauled and a new chain fitted after having been in heavy use for the last six months, so ready for summer, which seems to be arriving.