Danielle Sucher http://www.daniellesucher.com Wed, 02 Jan 2013 00:38:33 +0000 en-US hourly 1 http://wordpress.org/?v=3.5.1 The best books I read in 2012 http://www.daniellesucher.com/2013/01/the-best-books-i-read-in-2012/ http://www.daniellesucher.com/2013/01/the-best-books-i-read-in-2012/#comments Tue, 01 Jan 2013 20:00:53 +0000 Danielle http://www.daniellesucher.com/?p=441 This wasn’t such a great year in books for me (nothing compared to 2011, which was full of winners), but out of the 130 books I read in 2012, there were a few great ones, at least:

Fiction I loved reading in 2012:

  • The Tidewater Tales by John Barth – Long meandering story full of nested stories, about storytellers and sailing and Scheherezade (and a dash of the CIA, but that was my least favorite aspect). When I tried to make grilled chutney bananas as inspired by the characters’ favorite food they weren’t all that good, but the book is worth reading anyway.
  • The Guernsey Literary and Potato Peel Society by Mary Ann Shaffer & Annie Barrows – Startlingly good tale of a journalist/author who befriends a community of rural island folk by becoming their pen-pal shortly after World War II. The bits that truly caught me were the descriptions of how ordinary folks connect with books. This is a book that reminds us how to read.
  • The Mirage by Matt Ruff – The 9/11-inspired novel we’ve been waiting for.
  • Native Son by Richard Wright – Hard to read, in a brilliant way. “I’ll kill you and go to hell and pay for it.”
  • Embassytown by China Mieville – Like his The City and the City, the main value in this book lies in the fact that it has given us a metaphor for describing other things going forward. It’s on this list more for that usefulness than for its literary merit, which was good but not spectacular.
  • Some of the best from Tor.com: 2011 Edition edited by Patrick Nielsen Hayden & Liz Gorinsky – Nearly every story in here was a hit. I am utterly impressed – my like percentages for anthologies are usually much lower.
  • Last Night in Twisted River by John Irving – All of his novels tend to be long and complex and full of intriguing characters and… contrived in a really wonderful way, though I can’t quite think of the word for that at the moment.
  • The Girl Who Couldn’t Come by Joey Comeau – Short stories by the brilliant author of A Softer World.
  • Kindred by Octavia Butler – Time-travel, American history, slavery, feminism, family.
  • An Instance of the Fingerpost by Iain Pears – I don’t typically like mystery novels, but this was excellent. Four unreliable narrators, gender and political issues, science and medicine and experimentation – lots of great stuff going on here.
  • The Persistence of Vision by John Varley – Excellent s/f short stories.

Fiction I loved re-reading in 2012:

  • Wild Seed by Octavia Butler – A fantasy novel of genetic engineering.
  • Flowers for Algernon by Daniel Keyes – Still breaks my heart.
  • The Best of Michael Swanwick by Michael Swanwick – Most of these stories were rereads for me, but there were a few I hadn’t seen before. The man is simply a fucking genius, is all.
  • A Deepness in the Sky by Vernor Vinge – The best thing about Vinge is the way he goes so deeply into the implications of every idea he has.

Books I loved reading in 2012 that related to decision-making and problem-solving and communication:

  • Thinking, Fast and Slow by Daniel Kahneman – This was fucking brilliant and you should all read it right now. Cognitive errors that we all make, understood and named so we can try to be aware of and avoid them more easily, explained in a fun and readable voice! I’d read about a lot of the studies he cites here before, but it was still good to have them all nicely collected and described in a fun, readable voice in this volume.
  • Better: A Surgeon’s Notes on Performance by Atul Gawande – How to go from good enough to better yet. Ask. Don’t complain. Count something. Write. Change. Not as good as his other book, Complications, but a close second.
  • The Most Human Human: What Artificial Intelligence Teaches Us About Being Alive by Brian Christian – The author set out to win the Most Human Human prize as a confederate in the annual Turing Test, and writes about his process in figuring out what human communication involves. Fun, but also helpful in terms of thinking about how to talk and connect with other people generally in life.

I loved a lot of the John McPhee essays I read in 2012:

  • Uncommon Carriers by John McPhee – The best of the lot, for the sake of its first two essays. He follows a truck driver with a thoughtful bent. He discusses how captains of gigantic tankers are trained on scaled down models where even the wind and tides are scaled down by careful choice of location. Fascinating stuff.
  • Pieces of the Frame by John McPhee – Jimmy Carter may be the governor of Georgia, but he’s not the governor of Sam’s canoe.
  • Silk Parachute by John McPhee – I remain astonished that I was bored by the McPhee book I was required to read as a teenager, but love his work so very much now as an adult.

Other non-fiction I loved reading in 2012:

  • Mother Nature: Maternal Instincts and How They Shape the Human Species by Sarah Blaffer Hrdy – After having read about how often primate mothers kill their babies, I’m now even more grateful for my mother not strangling me as a child.
  • Unequal Childhoods: Class, Race, and Family Life by Annette Lareau – Insightful, interesting, and emotionally difficult.
  • What We Knew: Terror, Mass Murder, and Everyday Life in Nazi Germany: An Oral History by Eric A. Johnson & Karl-Heinz Reuband – That’s always been the question. Did they know? How much did they know, and when did they find out? How early on? Point being, of course, how culpable are they? This set of interviews attempts to explore that question. One of the best Holocaust books I’ve ever read, and as the granddaughter of survivors, I’ve read rather a lot of them.
  • The Emperor of Scent: A Story of Perfume, Obsession, and the Last Mystery of the Senses by Chandler Burr – Stupid title. This is actually a story about learning, discovery, and the dirty underbelly of scientific community politics. Also the science of scent.
  • Code: The Hidden Language of Computer Hardware and Software by Charles Petzold – The first 90ish pages got me through middle school Morse code basics &c and high school electronics, and then things started to get really interesting.
  • Confessions of a Pickup Artist Chaser by Clarisse Thorn – I feel dirty but fascinated!
  • The Best American Nonrequired Reading: 2011 edited by Dave Eggers – It was sometimes hard to tell which pieces were fiction and which were not, which was part of the fun.
  • Expressive Figure Drawing by Bill Buchman – Gorgeous prints of his sketches, along with useful exercises and advice.
]]>
http://www.daniellesucher.com/2013/01/the-best-books-i-read-in-2012/feed/ 0
Yak-shaving to install Julia http://www.daniellesucher.com/2012/09/yak-shaving-to-install-julia/ http://www.daniellesucher.com/2012/09/yak-shaving-to-install-julia/#comments Fri, 14 Sep 2012 03:39:06 +0000 Danielle http://www.daniellesucher.com/?p=404 Julia is a nifty, young language that’s the hot new thing in data analysis. As their propaganda explains: “The Julia programming language fills this role: it is a flexible dynamic language, appropriate for scientific and numerical computing, with performance comparable to traditional statically-typed languages.”

I had the sheer pleasure of getting to attend a Julia tutorial today from one of its core developers, Stefan Karpinski. God, have you looked at their benchmarks? It’s seriously enticing. Problem was, Julia just didn’t seem to want to install on my computer (Mac OS 10.7.4)!

I went through a few issues along the way to getting Julia installed, so I figure I ought to write this post for the sake of anyone else who might have similar issues they end up googling around on in the future. I hope that what works for me ends up helping you, too!

I cloned the source from Julia’s github repository. Discovered fairly quickly that I had to get a few preliminaries out of the way – time to upgrade XCode and its command line tools, and oh whoops I didn’t have gfortran installed at all.

I grabbed the HPC version of gcc 4.7 , which includes gfortran, and installed it with no issues.

At this point, I had remnant junk getting in the way from trying to run make before realizing I didn’t have gfortran installed yet, which was giving me errors despite having run make cleanall.

The errors:

getarch_2nd.c:37:48: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
printf("#define GEMM_MULTITHREAD_THRESHOLD\t%ld\n", GEMM_MULTITHREAD_THRESHOLD);
~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
%d
1 warning generated.
Undefined symbols for architecture x86_64:
"__gfortran_set_std", referenced from:
_MAIN__ in sblat1.o
"_main", referenced from:
__start in crt1.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
Undefined symbols for architecture x86_64:
"__gfortran_set_std", referenced from:
_MAIN__ in dblat1.o
"_main", referenced from:
__start in crt1.o
ld: symbol(make[4]: s) not*** [sblat1] Error 1 found
for architecture x86_64
make[4]: *** Waiting for unfinished jobs....
collect2: error: ld returned 1 exit status
make[4]: *** [dblat1] Error 1
Undefined symbols for architecture x86_64:
"__gfortran_set_std", referenced from:
_MAIN__ in cblat1.o
"_main", referenced from:
__start in crt1.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
Undefined symbols for architecture x86_64:
"__gfortran_set_std", referenced from:
_MAIN__ in zblat1.o
"_main", referenced from:
make[4]: *** [cblat1] Error 1__start
in crt1.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[4]: *** [zblat1] Error 1
make[3]: *** [tests] Error 2
make[2]: *** [openblas-v0.2.3/libopenblas.dylib] Error 2
make[1]: *** [julia-release] E

Ooft. Why am I putting up with this? Oh, right! Stefan had a great line earlier: “We’re dragging Matlab users halfway to Haskell.”

So, anyways. Stefan suggested just blasting away openblas and rebuilding that alone from scratch, which went well. Basically, just rm -rf /code/julia/deps/openblas-v0.2.3 (or wherever you cloned it to, &c) and then reinstall that dependency alone from its tarball in /deps. Great, that helped move things forward!

My problems weren’t over yet, though:

dyld: Symbol not found: __cg_jpeg_resync_to_restart
Referenced from:
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
Expected in: /usr/local/lib/libJPEG.dylib

Julia just wasn’t finding what it was looking for in that library, gah. Some googling around led me to this post from 2010.

Oh, it’s a macports-related bug! I’d nearly forgotten that I ever used macports, I’ve gotten so used to homebrew at this point. Right. Apple wants something found only in the Apple version of libJPEG, but was looking for it in the ports version. That’s fixable.

And so, after fixing up the links as follows, I was finally able to get Julia installed:

sudo ln -sf /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib /usr/local/lib/libjpeg.dylib

and

sudo ln -sf /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib /usr/local/lib/libtiff.dylib

Cool beans. Hope this helps!

]]>
http://www.daniellesucher.com/2012/09/yak-shaving-to-install-julia/feed/ 0
How I administer little treats to myself http://www.daniellesucher.com/2012/09/how-i-administer-little-treats-to-myself/ http://www.daniellesucher.com/2012/09/how-i-administer-little-treats-to-myself/#comments Wed, 12 Sep 2012 13:37:02 +0000 Danielle http://www.daniellesucher.com/?p=393 It turns out that Twilio doesn’t allow “spoofing” – you can’t specify a from_number that isn’t a Twilio number, so I can’t just forward a text to a random charity directly, which is what I wanted to do in the first place. Bummer!

So instead, now I (or you, if you’re into that kind of thing) can text 347-756-4559 with ’5′ or ’10′, and it will send back the phone number and code needed to donate that amount to a random charity off the list. (Text anything else, and it’ll ask for a 5 or a 10 kthxbye.)

Walking down the street, pass a Starbucks, get that urge to grab a mocha? Feh, just text to get info on a charity that takes $5 donations by text, and send in one of those instead. Don’t like the charity returned? Text again to roll the dice again, as it were.

List of charities adapted from here. My modified list is somewhat personalized, with a strong emphasis on charities that focus on medical research and poverty relief over religious institutions.

Just a tiny little simple Flask app, but it really does make me happy.

]]>
http://www.daniellesucher.com/2012/09/how-i-administer-little-treats-to-myself/feed/ 0
Tea what can be currently found in my home http://www.daniellesucher.com/2012/09/tea-what-can-be-currently-found-in-my-home/ http://www.daniellesucher.com/2012/09/tea-what-can-be-currently-found-in-my-home/#comments Fri, 07 Sep 2012 15:01:56 +0000 Danielle http://www.daniellesucher.com/?p=377 Green
After 5 (Lupicia) (peppermint, spearmint)
Bjorn in Love (green tea, black tea, bergamot flowers, jasmine flowers, rose buds)
Genma Cha (toasted brown rice)
Grapefruit Green (Lupicia)
Jasmine (spheres)
Miss Jasmin # (Lupicia) (jasmine, orange)
Persian Apple (David’s Tea) (apple, pistachio, almond, rose petals)
Rose Congou Green (David’s Tea) (rosehips, rose petals)
Sakura Vert (Lupicia) (slightly salty cherry leaves, tastes like top-quality fresh sakura mochi)
Sweet Kyoto (Lupicia) (green tea, matcha, powdered soy beans, brown sugar)
Toasted Walnut (David’s Tea) (hazelnut brittle, candied pineapple, coconut, walnut, almond)

Black
Apres Ski (David’s Tea) (fig, burdock, orange peel, cinnamon, marigold)
Black Spiral (The Tao of Tea) (gold-tipped black tea)
Blackberry Sage (The Republic of Tea)
Breakfast Earl Grey (Lupicia)
Caramel Macchiato (Lupicia) (caramel, coffee)
Ceylon Chai (Soluna Garden Farm) (cinnamon, ginger, cardamom, black peppercorns, cloves, allspice)
Chaud Les Marrons! (Lupicia) (chestnut, obvs)
Earl Grey (Twinings)
Ginger Peach Decaf (The Republic of Tea)
Hazelnut Chai (homemade blend) (rose petals, cinnamon, cardamom, toasted hazelnuts, vanilla bean pieces)
Jasmine (Ten Ren)
Lapsang Souchong (Twinings)
Miss Jasmin ♭ (Lupicia) (jasmine, bergamot)
Rose Petal Tea (The Republic of Tea)
Snow Bunny (David’s Tea) (walnut, banana, calendula)

White
Jasmine Silver Needles (David’s Tea)
Morning Rain (Remedy Teas) (melon, jasmine)

Oolong
Darjeeling Oolong
Earl Grey Oolong (David’s Tea) (schizandra berries, orange peel, jasmine flowers)
Miss Jasmin (Lupicia)
Quangzhou Milk Oolong (David’s Tea)
Tie Guan Yin (Song Fang)

Herbal
Amaretto (David’s Tea) (lapacho, almond, apricot kernels, orange blossoms, rose blossoms)
Bengal Spice (Celestial Seasonings) (cinnamon, chicory, carob, ginger, cardamom, black pepper, cloves, nutmeg, vanilla)
Exotica (David’s Tea) (lemongrass, pink peppercorns, cloves, cinnamon, cardamom, pineapple, orange peel, coconut)
Mama Mia (David’s Tea) (hibiscus, apples, raisins, rooibos, pineapple, papaya, orange peel, coconut, rosehip, elderberries, mallow, peaches, almond, cinnamon)
Mint Tea (Soluna Garden Farm) (peppermint, spearmint)
Mother’s Little Helper (David’s Tea) (valeria, peppermint, lemongrass, chamomile, rosehips, hibiscus)
Northern Lights (David’s Tea) (apple, peppermint, juniper, raspberry leaf)
Orzo Choccolata (Lupicia) (toasted barley with a rich chocolatey flavor)
Refresh (Tazo) (mint, tarragon)
Strawberry Rhubarb Parfait (David’s Tea) (apple, hibiscus, raisins, carrot, yogurt bits, beetroot, strawberry, rhubarb)
Tahitian Vanilla Hazelnut (Yogi)
Rooibos/cinnamon/apricot/marigold (Kalustyan’s)

(As you can probably tell from the above list, my favorite tea purveyors are Lupicia and David’s Tea! You probably can’t tell that oolong is my very favorite kind of tea, though. Clearly I need to obtain more oolong! My guess is that it’s just not used in flavored blends as often, and it’s just that I have this multi-peaked preference for oolong and for interesting flavored blends that gets me into trouble.)

]]>
http://www.daniellesucher.com/2012/09/tea-what-can-be-currently-found-in-my-home/feed/ 0
Honey from Huffman trees http://www.daniellesucher.com/2012/05/honey-from-huffman-trees/ http://www.daniellesucher.com/2012/05/honey-from-huffman-trees/#comments Thu, 17 May 2012 02:10:54 +0000 Danielle http://www.daniellesucher.com/?p=328 Did you know that NYC Open Data includes latitude/longitude for every tree in NYC? A tree census – amazing! Surely there’s something fun we can do with that!

Well, bees in NYC do a lot of their nectar foraging from flowering trees. It could be interesting to see which kinds of trees my bees are likely foraging from. Bees can fly startlingly long distances to forage if they have to, but my sense is that a 2 mile radius is a decent rough estimate for how far they’re likely to fly in search of nectar barring a barren neighborhood. Sure, there are plenty of other flowering plants in the city (I can certainly taste the clover in my spring honey, for instance), but it’s still interesting to see which trees are likely contributing to the honey I harvest locally.

So, I pulled the tree census data into mysql to play with. (Bread crumbs for the inspired: I wanted to deploy on Dreamhost, so I used an old version of mysql and was stuck with mbrcontains narrowed down with the haversine equation (and cosine approximation, of course) to find only those trees actually within an n-mile radius of my starting point. Postgres and stcontains with a polygon approximation of the circle would be better, really.)

I’m displaying results as a Huffman tree – a visual representation of the data structure you create when you use Huffman encoding.

Visualized with D3.js, with leaf sizes proportional to the percentage of trees found of each type, it looks rather like this:

You can put in your own beehive address (or home, or neighborhood you’re thinking of moving to, whatever makes you happy) and play with my tree-finder here.

When a thing is as dorky as it can possibly be, I know it is done right.

]]>
http://www.daniellesucher.com/2012/05/honey-from-huffman-trees/feed/ 0
“What I tell you three times is true.” http://www.daniellesucher.com/2012/05/what-i-tell-you-three-times-is-true/ http://www.daniellesucher.com/2012/05/what-i-tell-you-three-times-is-true/#comments Thu, 03 May 2012 04:21:36 +0000 Danielle http://www.daniellesucher.com/?p=306 My partner, Dave, just received the most amazing email from a brilliant and delightful friend of ours (emphasis added):
 

You were in a dream I had last night, and I thought it might amuse you.

You had a couple tables set up in the foyer of a (nonexistent) restaurant specializing in dumplings molded into cube shapes and sold in powers of two, and you were handing out atheist literature and cookies to people waiting to get tables. The cookies were chocolate chip, except the dough had a sort of smoky cherry taste – like a cherry brandy, not like a cherry jolly rancher – and was purple.

There was a sign announcing you would talk to anyone about anything they wanted to talk about, and you were telling someone that they should solve their problem by trying three times to fix it – any way they wanted, as long as all three attempts were different – and then pick which of their attempts came closest to the desired result and ask an expert how to improve on that. They should keep doing this until they ran out of experts, at which point they themselves were the expert.

“That’s how I learned to communicate with sea lions!” you said. At which point I suddenly noticed the sea lion in a powered exoskeleton and little square glasses hanging out under one of your tables, happily reading one of the atheist books.

I thought it was amusing. Even though I don’t like chocolate chip cookies. :)


I just had to share (with permission, of course), because that’s actually pretty great (and very Dave-ish) problem-solving advice!

(The cookies are nice, too. Seeing as how life imitates dreams, Dave got inspired and had to make a batch of smoky cherry chocolate chip cookies for us tonight.)

]]>
http://www.daniellesucher.com/2012/05/what-i-tell-you-three-times-is-true/feed/ 1
Spring has sprung with a LOT of bees. http://www.daniellesucher.com/2012/04/spring-has-sprung-with-a-lot-of-bees/ http://www.daniellesucher.com/2012/04/spring-has-sprung-with-a-lot-of-bees/#comments Sun, 29 Apr 2012 21:02:20 +0000 Danielle http://www.daniellesucher.com/?p=278 My bees looked a bit sparse and weak going into winter, so when I had the opportunity to order a new package of bees through the Backwards Beekeepers a few months ago, I went for it. I wasn’t sure if my hive had survived winter (or would survive spring), especially given how strange the weather has been, but it was then or never on making sure I had bees this summer. I figured it was worth a gamble – either my hive would die, and I’d want a new package to replace it, or my hive would survive, in which case I could try to sell my package to someone else or (gulp!) start a second hive.

I lost track of time this spring, what with focusing on Hacker School and all. So when I got an email a few days ago saying that I had to come pick up my package on Friday, I was in a bit of a panic. I hadn’t checked in on my bees at all since last fall. I had no idea if I had bees! And I sure didn’t have any spare hive to put the package into if it turned out my bees had made it through after all, or anyone to buy the package from me last-minute.

After some hurried consultation with my delightful bee purveyor, I stopped by Hayseed and picked up a spare bottom board, inner cover, and outer cover along with my package. Can’t hurt to have spares just in case, and if I did need to start a second hive, that was the bare minimum equipment I needed, given that I have some extra medium supers and frames that I tend to use for honey a bit later in the season.

Turns out, I have a LOT of bees.

(Yeah, I need to pick up some more cinderblocks for the new hive to stand on. That milk crate was the best I could find in a pinch!)

You can see that the new hive is just one super at the moment, while the old one is three supers high. (Or was two days ago, anyways.) I use all medium supers for both brood and honey in my hive(s!). And right there in front of the new hive is the box the new bees came in.

A package is a box with about 3 lbs of bees and a little cage with a queen in it. When you want to install a package, you basically just reach in and gently remove the queen cage, then pry the mesh off one side of the package and shakeshakeSHAKE your booty all the bees out into the hive. That’s it, really. I scold them lovingly and literally brush them from the tops of the frames down in between the frames, but mostly just because it’s fun. And finally, you just leave the box out in front of the hive so the rest of the stragglers can follow the queen’s scent and find their way into their new home.

I suspended my queen cage in my hive, then closed it up. The idea there is that the queen is trapped in her cage by a sugar plug. The bees have time to get used to her scent while eating her free, and so are more likely to accept her once she’s out among them. I tend to use a business card and a thumbtack to hang the queen cage between frames in the hive. This time I used Kyle‘s business card (he’s a Hacker School alum who now works with Tumblr), since we’ve chatted by email already and I know I have his contact info saved elsewhere by now. (Hi, Kyle! I hope you’re charmed rather than offended by this. You’ve become part of a rather delightful process, it turns out!)

I went back this morning to make sure the queen was released properly. Tomorrow would’ve been better, but bees depend on weather and my work schedule, after all. They’d mostly gotten through the sugar, but not entirely – her handmaidens were free, but the queen herself was still in her cage. Everyone sounded happy, though, so I manually released her and watched for a moment to make sure that the hive continued to sound cheerful and that they didn’t start balling her immediately. Everything looked fine, so I closed that hive up with a sugar syrup feeder on top and moved on to my older hive.

The weather was nicer today, so I wanted to get deeper into my big hive to see what was really going on in there. They were chill as can be, friendly and relaxed, so I figure they’re probably queenright. I saw some very young larva in there, too, along with some older brood and honey and pollen and assorted bee stuffs. And so many bees! That hive is seriously busy. Not too many queen cells, surprisingly, so they didn’t seem in imminent danger of swarming, but they were starting to back-fill the brood nest with nectar. Time to take action!

No prob. I closed up the hive, went downstairs, and got my last remaining super and set of frames. I checkerboarded the top two of the now four supers on that hive, to confuse their swarming instinct and give them more space to lay and to save whatever nectar they may find this early in the year. I’m going to gave to buy some more supers and frames at Hayseed, stat! I don’t have any spares left for my expanding new hive or to collect honey in the old hive.

One more thing to take care of before I was done. I had a bit of a varroa mite problem last year (remember my snow bees?), and I want to stay on top of reducing the mite population as much as possible. How lucky, then, to discover a nearly fully capped frame full of drone brood!

See how it bulges out? Drones (males) are bigger than workers (females), so they need more space to grow when developing. Worker brood has flat caps, but, well, you can see why we also refer to drone brood as “bullet brood”!

Varroa mites preferentially lay in drone brood. Drone brood takes longer to mature, and is bigger, so it gives the mite mama more bang for her buck, as it were. (Catch me in person and ask me tell you of my scheme to miniaturize my bees at some point, by all means! I have theories and plans. But it has been a hectic spring, so that will probably wait for next year.)

Point being, in addition to sprinkling powdered sugar everywhere, you can also cut down on your mite population by taking capped drone brood and sticking it in the freezer. The mites die, and then you return the frame to the hive, where the bees will clean it up, lay more drones, and restart the process. Frankly, my ladies don’t really need more drones around anyway. They’re not terribly useful. So we can do this all summer to try to reduce the number of bugs on my bugs. Fantastic!

So basically, what I’m trying to say here is that all is gorgeous and amazing out in the Brooklyn sky, which is where I’ll be most Sunday mornings for the next few months.

Happy spring!

]]>
http://www.daniellesucher.com/2012/04/spring-has-sprung-with-a-lot-of-bees/feed/ 0
The why and how of it all http://www.daniellesucher.com/2012/04/the-why-and-how-of-it-all/ http://www.daniellesucher.com/2012/04/the-why-and-how-of-it-all/#comments Tue, 17 Apr 2012 15:42:41 +0000 Danielle http://www.daniellesucher.com/?p=249 Idealist asked: “Tell us: What quotation reminds you to keep your priorities straight? #favoritequotesroundup”

I’m such a literary packrat that I couldn’t fit my answer into 140 characters, so here goes instead:
 
 
From my best-beloved Buckminster Fuller, in his Everything I know (emphasis added):

“I’ve wanted you to think about, “Why are humans here?” “Why do they have that beautiful mind and why they have access to the great principles of Universe itself, of the great design nothing else we know has access to?” I say we, common to all human beings, in all history, completely independent of any ethnic nuance or whatever it may be have problems, problems, problems because WE ARE HERE FOR PROBLEM SOLVING. Not to have problems out of the way in some stupid, sublime something called peace. We’re here strictly for problem solving, and the better you get at it, the more problems you’re going to get to solve.

 
 
Also from Buckminster Fuller:

“When I am working on a problem I never think about beauty. I only think about how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong.”

 
 
From Annie Dillard’s The Writing Life (via PC Wordsmiths):

“Write as if you were dying. At the same time, write as if for an audience consisting only of terminal patients. That is, after all, the case. What would you begin writing if you knew you would die soon? What could you say to a dying person that would not enrage by its triviality?

“…One of the few things I know about writing is this: spend it all, shoot it, play it, lose it, all, right away, every time. Do not hoard what seems good for a later place in the book, or for another book; give it, give it all, give it now. The impulse to save something good for a better place later is the signal to spend it now. Something will arise for later, something better. These things fill in from behind, from beneath, like well water. Similarly, the impulse to keep to yourself what you have learned is not only shameful, it is destructive. Anything you do not give freely and abundantly becomes lost to you. You open your safe and find ashes.

“After Michelangelo died, someone found in his studio a piece of paper on which he had written a note to his apprentice, in the handwriting of his old age: ‘Draw, Antonio, draw, Antonio, draw and do not waste time.’”

 
 
From Keith Olbermann:

“…the simple idea that those other people you see every day, the background characters, the extras in the movie that is your life, that they count too, and that the only obligation you truly have in life is to try to do something, something for them, even if you will never meet them, even if you will never know them. Something. Not everything. Something. …You will die and I will die and everybody you will see tomorrow will die and so will their children and their descendents, and we will be, at best, memories. And by what are all those who preceded us judged? Name anybody in history—name anybody we all know or somebody only you know—by what are they judged? The answer, stripped of the bells and whistles, is not wealth nor fame not beauty nor power, but what impact did they have on the lives of others?”

 
 
From Neil deGrasse Tyson:

“For me, I am driven by two main philosophies: know more today about the world than I knew yesterday and lessen the suffering of others. You’d be surprised how far that gets you.”

 
 
From Kasey Chambers:

“The miles take time, but the time is mine, and always moving suits me fine. I’ll catch my breath when I sleep. And after all that I’ve done, I’m not half what I’d hope that I’d become. There is still a long way to go.”

 
 
And a few from Oliver Wendell Holmes, Jr.:

“The riders in a race do not stop short when they reach the goal. There is a little finishing canter before coming to a standstill. There is time to hear the kind voice of friends and to say to one’s self: ‘The work is done.’ But just as one says that, the answer comes: ‘The race is over, but the work never is done while the power to work remains.’ The canter that brings you to a standstill need not be only coming to rest. It cannot be while you still live. For to live is to function. That is all there is in living. And so I end with a line from a Latin poet who uttered the message more than fifteen hundred years ago: ‘Death plucks my ears and says, Live – I am coming.’”

“Alas, gentlemen, that is life. I often imagine Shakespeare or Napoleon summing himself up and thinking: ‘Yes, I have written five thousand lines of solid gold and a good deal of padding – I, who would have covered the milky way with words which outshone the stars!’ ‘Yes, I beat the Austrians in Italy and elsewhere: I made a few brilliant campaigns, and I ended in middle life in a cul-de-sac – I, who had dreamed of a world monarchy and Asiatic power.’ We cannot live our dreams. We are lucky enough if we can give a sample of our best, and if in our hearts we can feel that it has been nobly done.”

“The rule of joy and the law of duty seem to me all one. I confess that altruistic and cynically selfish talk seem to me about equally unreal. With all humility, I think ‘Whatsoever thy hand findeth to do, do it with thy might,’ infinitely more important than the vain attempt to love one’s neighbor as one’s self. If you want to hit a bird on the wing, you must have all your will in a focus, you must not be thinking about yourself, and, equally, you must not be thinking about your neighbor; you must be living in your eye on that bird. Every achievement is a bird on the wing.”

]]>
http://www.daniellesucher.com/2012/04/the-why-and-how-of-it-all/feed/ 0
How to get an accurate recipe from your grandmother http://www.daniellesucher.com/2012/04/how-to-get-an-accurate-recipe-from-your-grandmother/ http://www.daniellesucher.com/2012/04/how-to-get-an-accurate-recipe-from-your-grandmother/#comments Fri, 06 Apr 2012 13:54:56 +0000 Danielle http://www.daniellesucher.com/?p=232 If your grandmother is anything like mine, she has an incredible repertoire of recipes from the old country which involve a set of ingredients and no measurements whatsoever. Everything is by feel, by sight, by years of experience rather than lists of precise numbers. It’s amazing, but hard to learn from.

I like numbers. They are clean in my head, and lead to reproducible results. I also like chicken paprikash and palacsinta and all sorts of delicious things that my grandmother cooks so well, and want to be able to make them myself.

This came up in conversation yesterday, when a fellow I was chatting with mentioned that he has the same problem getting accurate recipes from his mother. I told him my trick for getting accurate recipes from my grandmother, and it occurs to me this morning that I’ve never written it out before and probably ought to share.

It’s simple, really. I collect multiple data points for each recipe by asking my grandmother (and my mother, when she can remember) for the same recipe multiple times on different days and times of day. I push them each time to just give me their best guess at what the measurements are, based on their memory of what they do by feel and sight, and write down what they tell me. This can involve some hand-holding, and tends to go rather like this:

My grandmother: “You put in some paprika.”
Me: “How much paprika?”
Her: “Until it looks right.”
Me: “Is it more than a cup of paprika?”
Her: “Oh, no no no.”
Me: “Is it more than half a cup of paprika?”
Her: (longer pause, then) “Noooo.”
Me: “Is it just a teaspoon? That can’t be right. The taste is too strong.”
Her: “About three tablespoons, maybe. More if you need it.”
And so on.

After a few iterations of this (three per family member seems to both work and not try their patience too much), I average out my data as follows: For each ingredient where there is a mode (a measurement that appears more often than any other measurement), I take the mode, and for each other ingredient, I take the mean.

That’s it, really. Dead simple, if you have the sort of family where you’re encouraged to be a loving but pushy nudge as needed. But it works! I can cook amazing, authentic Hungarian food in the style of the old ladies of Tarpa and Kisar this way! So, go forth and gather awesome recipes. Then come back and teach me them! I can always use more awesome recipes.

Oh, and if that made you hungry, here’s my approximation of my Hungarian grandmother’s recipe for stuffed cabbage.

]]>
http://www.daniellesucher.com/2012/04/how-to-get-an-accurate-recipe-from-your-grandmother/feed/ 1
Nantucket: an accidental limerick detector http://www.daniellesucher.com/2012/04/nantucket-an-accidental-limerick-detector/ http://www.daniellesucher.com/2012/04/nantucket-an-accidental-limerick-detector/#comments Tue, 03 Apr 2012 17:40:40 +0000 Danielle http://www.daniellesucher.com/?p=224 How can you not name an accidental limerick detector Nantucket? I think there may be laws about that. Point being, I wrote a program that takes any text and tries to find any accidental limericks that might be hiding within (based on syllable counts and rhyme, ignoring punctuation and intent).

Limericks have a fairly loose form. The rhyme scheme is always AABBA, but the syllable count can be anything along the lines of 7-or-8-or-9/7-or-8-or-9/5-or-6/5-or-6/7-or-8-or-9. And as if that weren’t loosey-goosey enough, they can have either anapaestic meter (duh-duh-DUM, duh-duh-DUM) or amphibrachic meter (duh-DUM-duh, duh-DUM-duh)!

So, rather than write a limerick detector that looks for anything even remotely resembling a limerick, I chose the following as the canonical example to work from (at least for now):


There was a young student from Crew
Who learned how to count in base two.
His sums were all done
With zero and one,
And he found it much simpler to do.

Going by the canonical example above, Nantucket is set to look for limericks that are AABBA (rhyme scheme) and 8/8/5/5/9 (syllable count per line). It currently ignores meter, but I may add that requirement in later. It also only looks at words through an American English accent.

How to implement such a thing? Well, I started simple – I used the CMU Pronouncing Dictionary (“cmudict”) as accessed through NLTK (Python’s natural language toolkit) to get each word’s syllable count and pronunciation, and just had Nantucket give up on any potential limericks that included words not in cmudict. It tokenizes the text, then walks through each word in the text in turn, checks to see if there’s a limerick starting with that word, and gives up if it hits a word it can’t analyze or a limerick form violation (such as a word that overflows the end of a limerick line, or a rhyme scheme problem).

(It turned out I had to know Python or Java for the Stanford Natural Language Processing class I started two weeks ago. Er. Okay! This came in very handy as soon as I decided to build Nantucket last week – apparently Python has better natural language processing (“NLP”) libraries than Ruby, so it was absolutely the right choice for this project.) (I want Python’s scientific libraries, but with RSpec. Is that too much to ask?)

So, that was pretty fast to throw together. I defined a rhyme as being any pair of words which have identical last vowel sound plus all sounds following the last vowel sound. That’s not precisely right in American English, but it’s pretty damn close. This was easy to do with cmudict, because every vowel phoneme in cmudict ends with a digit denoting stress, but consonant phonemes never include digits.

So, that was a long bit of geekery. Time for a poetry break!

from Proust’s Swann’s Way:

bad conduct should deserve Was I
then not yet aware that what I
felt myself for her
depended neither
upon her actions nor upon my

was wonderful to another
How I should have loved to We were
unfortunate to
a third Yes if you
like I must just keep in the line for

to abandon the habit of
lying Even from the point of
view of coquetry
pure and simple he
had told her can’t you see how much of

That was a fun start, but I really wanted to handle the tons of words that just aren’t in cmudict. I tested Nantucket on James Joyce’s Ulysses repeatedly throughout this process, to come up with fantastic lists of words I was failing to catch at every step along the way.

I like to break projects down into small enough chunks that I get a sense of accomplishment frequently enough to keep myself motivated to keep on pushing forward. Here, words naturally fell into two categories – words which land in the middle of a line in a potential limerick, and words which land at the end of a line of a potential limerick. Syllable count matters for both, but I only really care about pronunciation for words that have to rhyme.

Next step was to create a function that determines the approximate number of syllables in any given word. A syllable contains a vowel sound, which can map to anywhere from 0 to 3 vowel graphemes (letters, not sounds) (aeiouy). I figured I could count the vowel grapheme groups, add 1 for each grouping of more than one vowel grapheme that isn’t a common digraph (group of graphemes that generally signifies a single phoneme (sound)), add 1 for the common apostrophe-in-place-of-vowel instances, and subtract 1 for the circumstances where ‘ed’, ‘es’, or ‘e’ are likely silent at the end of a word, and get pretty close.

def approx_nsyl(word):
      digraphs = ["ai", "au", "ay", "ea", "ee", "ei", "ey", "oa", "oe", "oi", "oo", "ou", "oy", "ua", "ue", "ui"]
      # Ambiguous, currently split: ie, io
      # Ambiguous, currently kept together: ui
      digraphs = set(digraphs)
      count = 0
      array = re.split("[^aeiouy]+", word.lower())
      for i, v in enumerate(array):
           if len(v) > 1 and v not in digraphs:
                count += 1
           if v == '':
                del array[i]
      count += len(array)
      if re.search("(?⟨=\w)(ion|ious|(?⟨!t)ed|es|[^lr]e)(?![a-z']+)", word.lower()):
           count -= 1
      if re.search("'ve|n't", word.lower()):
           count += 1
      return count

With that in place, I had Nantucket keep going when it came across non-cmudict words that fell in the middle of potential limerick lines, but give up on any potential limerick that hit a non-cmudict word that would fall at the end of a limerick line and have to rhyme. Better, but not good enough. I needed a way to figure out when words not in cmudict rhyme!

Grapheme-to-phoneme conversion (“g2p”), or converting a list of letters into a corresponding list of sounds, is a fascinating and non-trivial problem. I spent a lot of time falling down the rabbit hole of reading intriguing papers on how to design machine-learning algorithms that can take context into account when doing g2p. There are two big problems with g2p in American English. First, there’s the issue of alignment – there just isn’t a consistent correspondence between the number of graphemes and the number of phonemes. And second, there’s the issue of context – the same grapheme (or group of graphemes) can correspond to a different phoneme depending on the other graphemes in the word (think about the “pol” in “politics” (ah) versus “political” (uh)), or even whether the word is a verb or a noun (the “de” in “defect”, for instance (dee versus deh)).

At a glance, I figured I could do a rough pass at the problem by creating a last-syllable dictionary based on cmudict, which I promptly did. It was actually surprisingly helpful, but still missed a lot of words, and wasn’t as accurate as I wanted it to be. (More on this later.) So, I kept thinking and reading about the problem.

Poetry break!

from James Joyce’s Ulysses:

grace about you I can give you
a rare old wine that’ll send you
skipping to hell and
back Sign a will and
leave us any coin you have If you

then he tipped me just in passing
but I never thought hed write making
an appointment I
had it inside my
petticoat bodice all day reading

meant till he put his tongue in my
mouth his mouth was sweetlike young I
put my knee up to
him a few times to
learn the way what did I tell him I

The most promising idea I came across is implemented as free software already as Sequitur (that link links to the paper it’s based on, but you can also find a a free pre-publication copy of the manuscript here). It uses expectation maximization and viterbi training to create a model for g2p for any language, given a suitable dictionary to train from first. (It argues that it’s method is better than other methods I came across earlier, which generally involved hidden markov models or, in the simplest promising paper I read, going from right to left and looking at three graphemes to either side for context).

So, I installed Sequitur and gave it a whirl, training and testing it with huge portions of cmudict. It took hours to train, though, and I ultimately wasn’t thrilled with its accuracy. (To be fair, I only tested its accuracy overall, not its accuracy for last syllables only).

It occurred to me during this process that my needs were actually simpler than that. I don’t need to be able to do g2p for complete words in order to have a functional limerick detector. I only need to do g2p for the last syllable of each end-of-limerick-line word. That simplifies my alignment problem right off the bat, because I start by aligning my grapheme list and my phoneme list to the right (as in the second paper I link to above), and I don’t go far enough to the left for them to have much opportunity to become misaligned to any relevant expect. It also resolves a large portion of my context problem – there’s less flexibility in last-syllable graphones (pairs of graphemes and phonemes) than in entire-word graphones.

As completely fascinated by machine learning algorithms as I am, I decided to go back to the last-syllable dictionary I’d created and see if I could attack the problem by improving its accuracy instead.

I created it by going through every word in cmudict and pulling it out what looked like the last syllable worth of graphemes and the last syllable worth of phonemes, catching the graphemes with:

graphemes = re.search("((?i)[BCDFGHJKLMNPQRSTVWXZ]{1,2}[AEIOUY]+[BCDFGHJKLMNPQRSTVWXZ]*(E|ED)?('[A-Z]{1,2})?)(?![a-zA-Z]+)", word).group()

And catching the phonemes with:

val = min(vals, key=len)
i = -1
while i >= 0 - len(val):
      if isdigit(val[i][-1]):
           str = " ".join(val[i:])

To improve my accuracy, after a few iterations I chose to grab up to 2 consonants prior to the my best estimate of the last vowel sound in the word, and include copies without the first and without either, in my list. For example:

clotted AH0 D
lotted AH0 D
otted AH0 D
ders ER0 Z
ers ER0 Z
rs ER0 Z

This gave me gleeful flashbacks to a childhood parlor trick that my brothers and I can still all do in unison, where we chant at blazingly fast top speed: “everybody-verybody-erybody-rybody-ybody-body-ody-dy-y!”

Poetry break!

from Dostoevsky’s The Brothers Karamazov:

eyes with a needle I love you
I love only you Ill love you
in Siberia
Why Siberia
Never mind Siberia if you

are children of twelve years old who
have a longing to set fire to
something and they do
set things on fire too
Its a sort of disease Thats not true

and be horror struck How can I
endure this mercy How can I
endure so much love
Am I worthy of
it Thats what he will exclaim Oh I

Anyways, once I had modified set of last syllable graphones (pairs of letter lists and sound lists), I used some sweet little command line tools to sort the results into a list of unique types with frequency counts, like so:

sort < suff_a.txt | uniq -c | sort -nr > suff_b.txt

My last step in creating my cmudict-based last-syllable dictionary (“suffdict”) was to keep only the most likely set of phonemes for each unique set of graphemes, and reformat the list to match cmudict’s format so I could just use NLTK’s cmudict corpus reader for my suffdict as well. I did that like so:

def most_prob(file):
      uniq_suffs = []
      goal = open('suff_c.txt', 'a')
      with open(file) as f:
           for line in f:
                suff = re.search("\s[a-zA-Z']+\s", line).group()
                if suff not in uniq_suffs:
                     uniq_suffs.append(suff)
                     new_line = re.sub("\d+\s(?=[a-z])", "", line)
                     new_line = re.sub("(?<=[a-z])\s(?=[A-Z])", " 1 ", new_line).strip()
                     goal.write(new_line + '\n')
      goal.close()

The above code catches only the first instance of any given grapheme set, which gives me the most probable instance, because I'd already sorted everything in order of highest to lowest number of occurrences.

Now when checking for last-syllable phonemes for a word not in cmudict, I use the same regex I used when creating suffdict to check whether the last syllable worth of graphemes from that novel word is in suffdict, and if so, return the corresponding last syllable worth of phonemes from suffdict. If not, try without the first letter, or without the s or 's at the end.

Fantastic! I was then able to test my accuracy by running every word in cmudict through cmudict and through my suffdict, and then seeing whether the resulting phoneme lists rhymed.

Poetry break!

from Mark Twain's Huckleberry Finn:

he suspicion what we're up to
Maybe he won't But we got to
have it anyway
Come along So they
got out and went in The door slammed to

and see her setting there by her
candle in the window with her
eyes towards the road and
the tears in them and
I wished I could do something for her

I went through a few iterations of tweaking my suffdict creation method to eke a few extra percentage points of accuracy out of it.

My first attempt, which looked at every possible pronunciation for every word in cmudict when creating my suffdict, gave me 80.29% accuracy.

Next, I realized that since I was always using the shortest possible pronunciation when running words through cmudict, I should probably only look at shortest possible pronunciations when creating my suffdict, for consistency's sake. That brought me up to 82.20% accuracy.

After that, it occurred to me that if I included up to 2 consonants at the beginning of each last-syllable grapheme list in suffdict instead of just 1, I would have a bit more context and catch a few more words correctly. Which I did! That got me up to 85.78% accuracy.

This was getting pretty exciting, but still not as good as I wanted it to be. I thought about what I was doing, and decided to revisit the function I'd written that checks whether lists of phonemes (in the cmudict-style, but from any source) rhyme. Maybe the problem was there instead.

And, oh, yes! My rhyme_from_phonemes function was checking to see whether the last vowel phoneme and all phonemes thereafter were identical in both words - really, truly identical, that is. It disqualified even pairs of words that had exactly the same sounds but different stress patterns. This might make sense if I were paying attention to meter or defining rhyming differently, but it wasn't really what I was going for here at all. So, I rewrote that function to ignore the digit of the last vowel phoneme (which denotes stress only) and instead check whether it and all following phonemes were otherwise identical, like so:

def rhyme_from_phonemes(list1, list2):
      i = -1
      while i >= 0 - len(list1):
           if isdigit(list1[i][-1]):
                if i >= 0 - len(list2) and list1[i][:-1] == list2[i][:-1] and (i == -1 or list1[i + 1:] == list2[i + 1:]):
                     return True
                else:
                     return False
           i -= 1

That brought me up to 90.85% accuracy.

That feels pretty good, for my purposes!

I was now catching limericks with novel words at the end of lines. Poetry break time!

from Genesis:

in the iniquity of the
city And while he lingered the
men laid hold upon
his hand and upon
the hand of his wife and upon the

Amorite and the Girgasite
And the Hivite and the Arkite
and the Sinite And
the Arvadite and
the Zemarite and the Hamathite

I took a moment after that to make the basic limerick-finding algorithm a bit faster. My first draft was intentionally simple but inefficient, in that it started fresh for each word in the text, instead of saving the syllable counts and phonemes for words checked on previous limerick attempts. It had to re-analyze a word each time that word was encountered.

That worked well enough to let me get to the interesting g2p problem quickly, but once I was reasonably satisfied with my suffdict, I wanted to refactor to make the whole thing more efficient. The current version holds the phonemes and syllable count of each word encountered in a dict, so it can grab them quickly from that dict the next time they're encountered instead of having to figure them out from scratch again and again as it goes through the text.

I have some thoughts on increasing the efficiency further (by having it skip forward more intelligently whenever it hits a word it can't find phonemes for, for instance), but really, it's at a good enough stage that I wanted to share some accidental limericks with you all already!

]]>
http://www.daniellesucher.com/2012/04/nantucket-an-accidental-limerick-detector/feed/ 24
http://www.daniellesucher.com/feed/
www.daniellesucher.com
crawl=CC-MAIN-2013-20
73247
application/http; msgtype=response
sha1:UIYTFANFBK5TRVTYRRUXLMIRUMSCCMMY
<urn:uuid:650d096f-59c5-40c3-9685-81bcc81aee25>
2013-05-20T14:53:54Z
69.163.186.74
sha1:H566TYFLYRVTZYPG7LKX7FNBJY2LXYNW
<urn:uuid:3b18dd06-0f76-4b03-91eb-5cf8f4af594f>
http://www.daniellesucher.com/feed/
response
<urn:uuid:229ae836-d8ca-43f9-9aa6-03eefd97376a>
robots: classic
hostname: ip-10-60-113-184.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2013-20
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for Spring 2013
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf