You are viewing hudebnik

Previous 10

May. 7th, 2013

devil duck

Brave new green world

As of some time today, the newly-installed photovoltaic panels on our roof have been turned on, and the electric meter is actually running backwards (I checked a few minutes ago).

The traditional stumbling block to home solar panels has been up-front costs. In recent years, a number of companies have started leasing rather than selling solar panels: they pay the up-front costs, take care of the maintenance, claim the tax breaks (as owner), and take a monthly lease payment in exchange. We're working with one such company, Sungevity, which offers a wide range of financial options: if you've got the cash, you can pre-pay 20 years' worth of lease payments (but they're still responsible for maintenance), or you can pre-pay nothing at all and do it all monthly, or you can pre-pay various amounts in between. The more you pay up front, the less you pay in total.

ETA: If anybody reading this is interested in going with Sungevity, contact me so we can count it as a "referral", and you and I both get a couple hundred bucks bonus.

May. 4th, 2013

devil duck

Spring is here, a-su-pu-ring is here...

The Greenmarket has ramps, and asparagus, and lilacs, and potted chervil, and....

May. 3rd, 2013

devil duck

garden pests

Last fall I posted this about our quince trees (which have just come into bloom in the past three days -- yay!)

Update: from the Web research I've done so far, this is probably two separate infections: a primary attack by the Oriental fruit moth (the closely-related codling moth would have gone straight for the seeds, rather than honeycombing the flesh), followed by an opportunistic brown-rot infection.

Oriental fruit moths overwinter, and then go through three or four generations in a summer: the first generation eats leaf shoots, leaving them wilted (which we did see last year), while later generations eat fruit. There are a variety of control mechanisms: parasitic wasps (Glabridorsum, Trichogramma, Macrocentrus); pheromones that disrupt the breeding cycle; a new virus brand-named Madex HP; bacteria-based pesticides Dipel (Bt) and Success (Spinosad); chemical insecticides methoxyfenozide, chlorantraniliprole, and flubendianide. I'm calling local garden stores to see what they've got that makes sense on my scale, for an orchard of two (2) trees.
Tags:

Mar. 24th, 2013

devil duck

For the three people I know who don't listen to NPR...

this story is mind-boggling. It's about the Social Security disability program, how it is being abused, and how it begs to be abused.

Mar. 22nd, 2013

teacher-mode

That was fun (classroom report)

I'm teaching a class on design and analysis of algorithms, and trying to have as much of the class as possible led by the students. All this week the students have been presenting homework solutions, and today one of the sharper students presented a comparison between a naive implementation and a cleverer, "optimized" implementation of the heapsort algorithm. He walked us through his code, both heapsorts and the timing code wrapped around them, ran through a toy-sized demonstration of each on the board, and then I said "So, do you have results?"

"Yes, I do." He ran the program: the naive implementation took 1.5 milliseconds, and the optimized implementation took about 30 microseconds. Beautiful!

He ran it again, with similar (though not identical) results. And again, and again. Pretty convincing... except that he was sorting an array of 8 numbers, on which even the stupidest heapsort shouldn't take 1.5 milliseconds. Furthermore, looking at the algorithms, I concluded that the speedup should be at best a factor of 2, not a factor of 50. So I asked him, on a whim, to swap the code segments to run the optimized implementation first, and the naive implementation second.

The optimized implementation took 1.5 milliseconds, and the naive one 30-some microseconds. Consistently. The presenter looked like he'd been hit with a pole-axe. The rest of the class were amused, but equally puzzled. We discussed possible explanations, and eventually concluded that it probably had to do with loading a Java class file from disk on the first demand for it. (1.5 ms actually sounds low for that, unless he has a solid-state drive.) After suggesting a couple of ways to correct for this, the students agreed to sort another array first, without timing it, and then try the timed runs. They also suggested moving the timing code in closer, so that it only measured the parts of the code that differed from one algorithm to the other.

The optimized implementation took 30-some microseconds, and the naive one 20-some microseconds. That again, and again, and again. This wasn't such a shock, really, as the presenter's own toy-sized demonstration had actually done more work under the "optimized" algorithm than the naive one; it was predicted to work better, in the average case, on reasonably large heaps. So we tried size 8000, and the naive algorithm still won. Then 10000000, and it was pretty close: the optimized algorithm won one match out of five, and lost only narrowly the rest of the time. Then 20000000, and the optimized algorithm won fairly consistently.

So some valuable lessons were learned about empirical efficiency-testing. Not what we set out to do, but you take teachable moments where you find them.

Mar. 18th, 2013

teacher-mode

CS education in Vietnam

Google computer scientist Neil Fraser spent some time in Vietnam and took the opportunity to visit some elementary-school CS classes. Here's his report.

Mar. 13th, 2013

devil duck

tentative optimism

Among the news reports and speculations on who the new Pope would be was a mention that the new Pope would have to choose his name, and that the name would signal something about his priorities. I thought for a moment "What name would I pick, if somebody made me Pope? I don't know a lot about saints, but probably Francis."

Half an hour later comes the announcement of Pope Francis.

Mar. 8th, 2013

devil duck

Word of the day

aibohphobia, n. fear of palindromes
Tags:

Mar. 3rd, 2013

rant

Must-read on health care

If you care about the U.S. government's budget deficit...
If you care about the competitiveness of U.S. businesses...
If you care about economic fairness...
If you care about preventing individual bankruptcies...
If you care about health care for all...

you must read Steven Brill's detailed exploration of the costs of the U.S. health care system.

If you already know how incredibly inefficient and corrupt the system is, read the article anyway: it's even more inefficient and corrupt than you thought.

Feb. 9th, 2013

devil duck

Weather, etc.

When we woke this morning, the snow had already stopped falling. There was about a foot on the front sidewalk, so I shoveled it off, saw shalmestere off to her gamba class, and took the Things to the park.

After shalmestere got back, we went to the local art theater to see "Life of Pi", which was gorgeous and surreal and disturbing and all that. Walked home amid melting snow.

Posted via LiveJournal app for iPhone.

Previous 10