recipe: koofteh berenji

this recipe comes from a Persian family who say that the differences between it and e.g. this recipe are to speed up making it. as in, “ain’t no one got time for all those steps!”

some of the key changes:

  • ground beef and pork (!) is substituted for half of the ground lamb to add fat, which helps the entire thing stick together.
  • no need for egg, but you can add 1 if you want
  • no split peas (if you cook and include these, you definitely need the eggs)
  • don’t pre-cook the rice

ingredients

  • 1 kg ground meat, about half lamb and half fattier
  • 2 cups rice
  • 2 bunches of curly parsley
  • 1 bunch of italian parsley
  • 1 bunch of cilantro
  • 1/2 bunch of dill
  • 1/4 bunch of mint
  • 2 minced or grated onions
  • 2 onions cut into strips
  • 1 can diced tomatoes
  • 1/2 bottle tomato passata
  • 2 cups chicken broth
  • lots and lots of spices. this time we used 1/2 tsp each of:
    • ground allspice
    • five spice
    • ground cinnamon
    • ground clove
    • paprika
  • turmeric (at least 4 Tbsp, things should look quite yellow)
  • salt to taste
  • 1 egg (optional)

instructions

remove stems and chop all the greens finely. you want about 3-4 cups of minced greens (a lot!) add them to a mixer bowl along with the ground meats, the minced/grated onions, the rice, all the spices and egg if using. mix with paddle or by hand or until thoroughly incorporated.

sautee strips of onions and 1/4 of the diced tomatoes in the bottom of a heavy dutch oven until softened and translucent, but not browned. form 6-7 large meatballs from mixture and place in dutch oven. cover balls with remainder of diced tomatoes and juice and broth to just cover.

bring to a simmer over medium heat, then cover and cook for 45 minutes to one hour. serve hot.

welp

apparently i still haven’t moved off of wordpress. it’s at least patched and old cruft deleted.

still, what a pain…

ecchi – a memorial

Last night, my beloved feline companion of 15 years, Ecchi, died. I want to tell her story now. The associated picture gallery is mostly in chronological order, and covers her entire life.

Ecchi was born sometime in 2002, most likely, though her adoption papers guess that she was born in 2001. If I had to guess, she probably spent some time in an attended feral colony, or in a house, before making her way to the Toronto Humane Society. (Later in my house, whenever I’d open a can, she’d come running…though I never fed her regularly from them. I always wondered why she thought there was food for her in a can.)

My ex and I went to the Humane Society and looked at the cats. She picked out “Toshiba” right away – it didn’t take me long to realize she had a way with matching cats to people. The Humane Society told me she was “about 2 years old,” which I suspect was a way for them to get out of their commitment to spay or neuter any under-1 year old cat for free. (grr! She took a few months to come into heat before I could actually get her spayed, which is why I think they were lying to me.)

I adopted her into her “forever home” on 20 May 2003. Picture 1 was taken that first night at home. Just to the right of her in that picture was a mattress against the wall. She used to chase paper balls being thrown at it up the mattress to grab them, then bring them back to me. She loved that game; she played it throughout her life (Picture 7) right up until earlier this year.

For the first year or so that I had her, I fed her a home-made BARF diet – bones and raw food. I went to some effort to mix up ground meat, taurine, and other supplements in a vet-approved fashion. She would try and sleep on my chest, which was adorable, but also gave me terrible nightmares and triggered apnea, so I had to stop her from sleeping on the bed with me. It took a few years before she learned she could sleep at the foot of the bed; this is the one thing I wish I’d done differently raising her. She was very cuddly and loyal during this time. She learned that she could get my attention, then lead me to what she wanted attention with – her litter box needing cleaning, food, water, opening the door, etc.

I wish I had a picture, but that house had a front door with a very tall screen door on it. It had no A/C so I’d leave it open during the day during the weekends. Sometimes, an outside cat would come by and Ecchi would get very defensive – and she’d end up climbing the screen, and getting stuck up there. I’d have to run and get her down. It cracked me up every time. Over time, she started climbing the door just because she could…and I had to stop leaving the door open.

We moved a couple of times before settling down in a large house on the west side of the city with 4-5 other people. Ecchi didn’t really like all the people; during those years, she spent a lot of time hiding out under furniture. Everyone loved her, but they knew you had to be careful petting her, lest you get a nasty scratch or a bite. The pictures I have from her from that time are few and far between, but she left a very good impression on everyone I lived with.

I moved into my house a couple of years later. Between all of my trips, I had to board her for a couple of weeks once. She went off to a “cat house” run by a sweet old lady and her staff on the north side of the city. (The owner died, and the house shut down a couple of years later.) Ecchi spent those two weeks in close companionship with 30+ other cats, and it changed her. She became more gentle, more sweet, like she’d been when I first adopted her. The staff didn’t want to let her go!

Not long after that, she started acting weak, and I had to take her into the vet. She was diagnosed with fatty liver disease, which required a tube to be placed into her stomach and for her to be force-fed for a short while. She stayed at the hospital for a week or so (Picture 2), and when she came home, she took another couple of weeks to get back to normal. I always got the sense that she knew we took care of her; she seemed grateful, or at the very least, happy to be in a comfortable and secure place with people who would cater to her every need. Once the cone came off, she loved lounging on the couch, especially during those long MST3K Marathon parties I used to throw (Pictures 3, 5, 16 & 17).

She loved spending time in the garden (Picture 4), eating grass (Picture 12) or sitting in round things (Picture 11). Her time there was always supervised. She even chased a squirrel up the crabapple tree once! (Picture 8) But without anyone to watch her during the day, I wouldn’t let her out, and she pined at the window. So the cat walk was built (version 1: Picture 6, version 2: Picture 22) between the living room and kitchen windows, which let her experience outside anytime she wanted. She spent many a sunny afternoon out there soaking up the sun and watching the squirrels run back and forth.

Eventually another cat came to live with me – Mu. They never got along amazingly, so the few pictures I have of them near each other are kind of rare (Pictures 13 and 14). They didn’t fight seriously – though they did inspire a song on my last album with their nightly wrestling – but they did seem to appreciate each other’s company. Ecchi was always the smart one, an extremely clever cat.

She was a constant companion. The same day I got my Canadian citizenship, she was hangin’ on the couch, waiting for me to get home (Picture 9). She’d hang out in the music studio (Picture 18) or next to your computer (Pictures 19, 20, 21) waiting to be scritched. When you went away and came back, she’d immediately perch herself on your bag or clothing (Picture 23) to make it clear you were Not To Do That Again Anytime Soon. She wasn’t especially a lap kitty; she preferred sitting or sleeping right next to you. She even enjoyed sleeping on your head in the winter in bed, which took some getting used to. In this way, I always saw Ecchi as faithful, yet not *dependent* on me (except for basic needs). When I adopted her, I needed that influence in my life; she taught me a very important lesson.

The last picture I have of her is from a month ago, October 2017 (Picture 24). She had started to lose weight and was a little dehydrated; she got to spend time on that pillow as a treat. Her weight went up and down, some days better than others. Then last night, after I came home from dinner, she’d pulled herself under the couch and was mewling unhappily. She seemed to have lost all function in her hind quarters. The 24/7 vet said it was probably a saddle thrombosis – like a stroke – combined with kidney and heart failure. It was time to let her go. The last time I cried that hard was when my (grand)mother died – something else that Ecchi helped me get through, shortly after she joined my life.

I’ll never forget Ecchi’s gentle licks – she’d lick a finger if you put it in front of her face, so you could use it to smooth down her fur that she couldn’t get to easily her self, mostly her neck and head. It was a sweet gesture, one that could be counted on to let you know that all was right in the world. It’s one of the special things about her that I’ll miss most.

She was loyal, gentle, and cautious. That’s how I’ll always remember her. Thank you for reading this and sharing in my memories of her.

reading k2000 / k2500 / k2600 / k2661 cdroms on a pc for free

Not too long ago my last SCSI CD-ROM drive failed. I still have a number of Kurzweil CDROM discs with useful sample libraries on them that I’ve been unable to read as a result – they were made prior to the 3.61 update that added ISO-9660 support.

Marc Halbruegge wrote a fantastic program, KCDRead.exe, that lets you read these older CDROMs and dump the files to a folder on a Win 95/NT/2000 machine. Sadly it didn’t work on XP or newer 32- or 64-bit Windows releases…until now.

In newer Windows, there is a SCSI PassThrough Interface (SPTI) that replaces the old ASPI interface. Someone wrote an ASPI-to-SPTI converter called FrogASPI that runs in usermode and requires no kernel module or driver.

To make this work with kcdread.exe:

0) Download KCDRead from http://www.marc-halbruegge.de/kcdread/kcdread.htm .

1) Download FrogASPI from http://www.softpedia.com/get/CD-DVD-Tools/CD-DVD-Rip-Other-Tools/FrogAspi.shtml .

2) Extract the frogaspi.dll file. Rename it to wnaspi32.dll and copy it to the same directory as kcdread.exe.

3) Run kcdread.exe. It will be able to directly read Kurzweil CDROMs in your physical CDROM drive.

Thanks to Marc again for creating such a useful program!

part 1: MH3000 / RoVa3D tools & setup

A while back I went in halfsies on an MH3000 KickStarter printer from ORD Solutions, just down the road in Cambridge, ON. As there’s still under 100 of these printers out there, it can be a bit hard to find information on how to get going with one. Here’s some tips from my first 100 hours of operation.

Links are not affiliate-type, so if you want to thank me for putting this together, send me a tweet @wohali or reply to this post.

Essential Tools

You absolutely need these tools, or you’ll be pulling your hair out in short order. Buy them while you’re waiting for your printer to ship. I keep all of these right by the printer.

  1. Protective safety gloves. I recommend: one, two. Don’t burn your hands on 240C nozzles or 70-100C beds. Your fingers are more precious than a $2000 printer.
  2. Calipers, analogue or digital, with metric readout. I recommend: one, two. $20-$30. You’ll be using these all the time to measure all sorts of machine tolerances, printer parts, filament width, things you want to replicate with your printer, things you print out, etc.
  3. Hobbyist long nose pliers. I recommend: one, two. $5-30. These are great for getting in underneath the print head and pulling off globs of melted filament, and keeping your fingers far away, safe and not burned. I use these all the time to deal with oozing PLA just prior to a print.
  4. Hobbyist diagonal cutters, full or semi flush cut. Many options, here’s one. $5-30. I use these to cut filament, wires, strip wires (carefully), and sometimes stray printed filament off of a print in progress. You need this more often than you realize, and small cutters are easier to use than scissors or a larger pair.
  5. Hobby knife with extra #11 blades. I recommend: one. These are useful to clean up printed items, but more importantly these help keep your nozzles clean if they drag through printed parts accdentially as you can scrape off the filament easily. You can also use the blades (carefully!!!) to lift parts from the print bed. If you do this, remove the blade from the knife and place the entire blade edge flat against the print bed at a low angle. Work the blade slowly under the part until it detaches. Do this at multiple points around the perimeter of the part.
  6. Feeler gauges. I recommend: one, two. $10-25. You’ll need these to “gap” the space between the print bed and the nozzles, and to re-validate anytime you adjust the print carriage. The Lee Valley set here is superior because they’re 5 1/2″ long and focuses on thinner sizes, even though you’ll need to convert from imperial to metric. (Most sets at e.g. auto supply shops are only 2-3″ long.)
  7. 5″ (short) 10mm wrench. I recommend: one. This is required for adjusting the height of the print nozzles. I believe KS2 backers now get this included, but I might be wrong.
  8. 6″ adjustable wrench. I recommend: one, though mine is thinner. For tweaking all the various nuts on the printer without needing a full wrench set.
  9. Some clean rags / washcloths
  10. 100% Acetone. $5-10. Available at any paint store.
  11. Window cleaner in a spray bottle. $5. You’ll want this to apply Kapton tape to your print bed. Mine’s citrus based because it smells nicer than melted plastic. :)
  12. Old / inactive / promotional credit card. I use an empty Tim Hortons gift card (they’re free!) You’ll use this to “squeegee” the tape.

Filament storage

One thing that I had to figure out for myself is that PLA and ABS both like to absorb moisture from the air. Have a drying solution figured out before you unseal the filament from the bags as they arrive. This means a resealable air-tight container with a dessicant large enough to hold the filament spools – the ORD spools are 10″ in diameter.

I assembled containers from buckets to keep my filament dry. The cost is about $25. You need:

  1. A clean bucket, anything from 3.5 to 7 gallon works
  2. Gamma Seal Lid
  3. Reusable SIlica Gel Dehumidifier
  4. 5cm of hook and loop tape (e.g. Velcro)
  5. Your filament, of course!

Assembly instructions:

  1. Spin ring off of Gamma Seal lid. Place on top of bucket. Invert and apply mallet or foot until well seated.
  2. Attach dehumidifier to lid using strip of hook and loop tape.
  3. Place spools of filament into bucket. A 5 gallon bucket will hold 4 ORD Solutions spools.
  4. Spin on lid.

Here’s a short video of the finished product. The dehumidifier crystals turn clear when saturated with water, and can be “recharged” in an oven for 3h at 300F. They last indefinitely.

If you leave your filament out for even just 24h, it can start to become water logged. You’ll know this happens when you are extruding and you see steam rising or hear a quiet “popping” sound, or for transulcent filament you see bubbles in the extruded filament. To fix this, you can put the spool in a 150-170F oven for 1-3h, and let thoroughly cool before use. Be careful to calibrate your oven before trying this!

Optional tools

I have all of these – you can get by without them if on a budget, but for best results I recommend them. Sorted in priority order:

  1. Den-On 70-51-00 Cleaning Pin Set. $6. Picture here. This is an incredible tool, which is effectively 3 14cm long wires, of 0.8, 1.0 and 1.5 mm gauge, held together by a soft green rubber. You can use these to clear blockages in the hot ends while they’re still hot and push stuck filament out of the extruders.
  2. 9/32″ socket driver. $5. I use a screwdriver that takes various bits and a socket from a kit similar to this one. This is the exact size for the nuts underneath the print bed. With a screwdriver handle you can more easily give all 3 printer bed nuts the same amount of turn and raise the print bed evenly, or offset by 1/8 of a turn if you want to tilt it just slightly.
  3. Zip and twist ties. I use quite a few of these for cable management.
  4. 12″ / 30cm metal ruler. $5-10. I have a cork-backed Westcott R590-12 that I probably bought for school years ago. For general measuring.
  5. IR Thermometer. I recommend the Pro Exotics PE-2. $40 with free US shipping. This unit has an adjustable emissivity setting, which you can use to adjust for the different properties of materials you’re measuring.
  6. 12″ Starrett straight edge or rule. I recommend: one, two. $60. You can’t buy a better straight edge, as these are accurate to ±0.0002″ per foot. This plus feeler gauges will help you determine any warp, bump or cup in your printer bed. I find this a faster approach than mounting a dial indicator to the print carriage and measuring values all over the bed.
  7. Dial indicator + optional metal base. I recommend: one. I used this prior to getting the Starrett straight edge for checking bed flatness. They’re still useful for checking out-of-round for various metal printer parts, but this is an advanced step that many of you won’t need. You can print a holder that mounts to the X carriage to measure flatness of the bed. I don’t recommend this approach anymore, as dial indicators are both more expensive and more fiddly than using a straight edge plus feeler gauges.

Setup

These videos and the text below them walk you through the most salient points. I picked up my printer from the factory, so I skipped the first 3 videos.

Setup tips and tricks

  1. I had a hard time figuring out how to use the lint-free cloth to act as a filament wiper. First, save your twist ties as you unbundle cables. Cut the provided cloth into strips. After feeding filament into the extruder, below the short tube that’s below the extruder, wrap the cloth around and around the filament like you’re wrapping a sprained ankle. Use the twist tie to hold the cloth against the filament. I wrap the tie around 5 or 6 times, then leave about 3cm free for twisting together to apply sufficient friction. You want to tighten the twist tie enough so that, as the filament feeds, most of the cloth stays below the tubing.
  2. When feeding the filament, note that the hole in the extruder is smaller than the hole in the mounting plate. As a result you may find the filament gets stuck in that lip. Don’t force it! I lost a huge piece of my thumbnail when my hand flew up into the extruder gear. You could probably epoxy/fill in the lip to have a smoother infill, but I’ve not tried this yet.

My next article will be about the software stack.

Understanding race-induced conflicts in CouchDB 2.x

Update: This was originally written about BigCouch and Buttant, prior to the release of CouchDB 2.0. Everything in this writeup applies to CouchDB 2.x as well.

Distributed databases with a near-real-time multi-master configuration – such as BigCouch, coming soon to Apache CouchDB – must deal with the potential of simultaneous modifications of a single resource. While the approach taken by multiple single-machine Apache CouchDB servers using regular HTTP replication is well understood, the situation changes a little bit when dealing with BigCouch-style internal replication inside a cluster.

I think it’s time to have a better understanding of what this means, and what impact this has on you as an application developer. Most of the time, there’s no change – to your app, a BigCouch-style cluster looks and feels like a single Apache CouchDB node. But when making near-simultaneous writes to the same document from different clients, you may experience document conflicts that you wouldn’t have with an Apache CouchDB 1.x single server.

How does this happen? Bear with me – this gets a bit complex. Hopefully this diagram will help.

Continue reading