We have turkeys in the coop! Anya put the little guys in the coop by themselves, and then she brought our friendliest hens in (one at a time) and hung out in the coop as a referee. Then she brought the Bresse hens in without problem. And finally our least friendly older hens and then each of the roosters. Everyone was fine. And, when I opened the coop this morning, the little turkey guys were out on the floor with the chickens — eating their food and ready for a refill on their water.
Adventure chicken
One of our Bresse hens went for a walkabout last night. We were going shopping, so had to get them cooped up earlier than normal. Normally, it’s sunset when we’re taking them to the coop. And we don’t put more food into the tractor in the evening, so the chickens are ready to head in for a meal. When we’re leaving early, I like to carry the chickens and deliver them into the coop. And have someone opening/closing the door to avoid escapees. Anya evidently just opened the tractor and let them run. Some ran into the coop. Some ran to the compost. And one? She ran for the woods.
She was roosting in a tree last night, but Scott and Anya weren’t able to coax her down. Then she was nowhere to be found this morning. Luckily it was a light misty rain all day and not the rain showers I was expecting. We put the dozen remaining chickens into the tractor and left them do chicken things. By late afternoon, our missing girl was hanging out by the tractor. Anya picked her up and gave her some snuggles, then popped her into the tractor for some food and water. Her adventure seems to have tired her out — she was quiet and snuggly.
We also tried putting the poults in with the chickens today. We’d had them in the baby poultry tractor next to the big chicken tractor for a week so they’d get used to seeing each other. Well — that didn’t work out so well. Introducing the Bresse to the egg layers went pretty well — the egg layers were selected for their chill personalities. The Bresse rooster, however, went after the first poult Anya put into the tractor. So they’re back in the baby tractor for some more introduction time. We’ll have to do some supervised interaction on a nice, warm, sunny day.
Microsoft’s 1601 Time Base
Microsoft uses the number of 100-nanosecond intervals since 01 January 1601. Why? No idea. But I’ve had to deal with their funky large integer for a DateTime value as long as I’ve been working with AD. I’ve written functions to turn it int something useful, but that’s a lot of effort when I see a lockoutTime and need to know how recent that is. Enter w32tm which has an “ntte” switch — this allows me to readily tell that the lockout was at 3:01 today and something I need to be investigating.
Bees!
Chainsaw spline sizes
There are a few things about chainsaws that we’re learning as Scott is working on both this cheap knock-off chainsaw we got from Amazon and an old (very solid) chainsaw his dad brought over. Today’s lesson was spline size — there’s mini, small, and standard. But what’s small mean?
Mini spline – 17mm
Small spline – 19mm
Standard spline – 22mm
Turns out we weren’t wrong — we’d ordered a small spline rim sprocket, and it didn’t fit on our chainsaw because they sent us a standard spline sprocket — 22mm ID instead of 19mm ID. But now I know why we ordered exactly what we needed.
Adventure Turkeys
We picked up four friends for TurkeyGuy on Sunday. I wasn’t going to chance shipping again. We considered getting some of the franken-turk broad-breast things from Meyers down in Polk — I really don’t want to create demand for animals that grow so quickly their bodies give out. And a big draw to raising our own animals is that the animals make more all on their own. Luckily, I found someone about an hour away from here that’s really into breed preservation (and heirloom vegetables too!). So we went on a second adventure over the weekend and picked up four more Spanish Black turkeys. We had a great time meeting the folks at Ohio Heritage Poultry — and got to see all sorts of heritage turkeys. One of the coolest things is that they’ve got a Spanish tom that will sit on the nest — both turkey parents take turns keeping the eggs safe and warm, so each one gets a chance to run around, eat, drink … I’m hoping this is an instinctual thing that carries on with our turkeys because that seems so much healthier than a single bird isolating herself and barely budging from the nest.
Anya fed and watered our new poults before we headed home. The new guys are a little older than TurkeyGuy — we put the new guys into the brooder and they were instant friends. TurkeyGuy wants to be big like them — he stands with the largest poult and stretches his neck out so they’re the same height. Today, Anya set the baby tractor in a shady spot outside and took all of the poults on their first outdoor adventure. They’re such chill critters — they wandered around, pecked at clover, scratched around in the dirt, and napped. It’s going to be colder for the next week … but they’ll be happy to get outside again next week.
On UUIDs
RFC 4122 UUID Versions:
1 — Datetime and MAC based
48-bit MAC address, 60-bit timestamp, 13-14 bit uniquifying sequence
2 — Datetime and MAC based with DCE security
8 least significant clock sequence numbers and least significant 32 bits of timestamp. RFC doesn’t reallly provide details on DCE security
3 — Hashed Namespace
MD5 hash of namespace
4 — Random
6 pre-determined bits (4 bits for version, 2-3 bits for variant 1 or 2) and 122 bits for 2^122 possible v4 variant 1 UUIDs
5 — Hashed Namespace
SHA-1 hash of namespace
In my case, I hesitate to use a v1 or v2 UUID because I have scripts executing in cron on the same host. The probability of the function being called at the same microsecond time seems higher than the pseudo-random number generator popping the same value in the handful of hours for which the UUIDs will be persisted for deduplication.
v3 or v5 UUIDs are my fallback position if we’re seeing dups in v4 — the namespace would need to glom together the script name and microsecond time to make a unique string when multiple scripts are running the function concurrently.
Magic Bees
One of our chickens, Soaring Eagle, manages to escape the chicken tractor rather frequently. Even when I’ve locked it down — Anya doesn’t get the door closed up well, and I know exactly how they escape … but I’ve got that thing locked down. And, still, there’s a chicken in the yard. Because she’s a magic chicken.
We drove out to pick up our bees on Saturday. Scott was apprehensive about them because, well, it’s a big box full of bees. The guy was in the middle of explaining how the box is all sealed up and maybe a bee or two might escape, but they’d buzz around the back window as we drove and it’d all be fine. Except we started noticing a stream of bees coming out of the nuc. We, it seems, have magic bees too. The bee guy put bags around our nucs so we wouldn’t have a hundred bees buzzing around the car as we drove. That turned out to be a really good thing. The one nuc had a handful of bees in the bag. The one we’d noticed the bees coming out of? It most certainly did have a couple hundred bees outside of the box. I carried this box to the back of our property. Getting the bag off was a bit of a challenge even in a bee suit. They weren’t super thrilled about the relocation process. But they’re happily settled now.
Kafka Troubleshooting (for those who enjoy reading network traces)
I finally had a revelation that allowed me to definitively prove that I am not doing anything strange that is causing duplicated messages to appear in the Kafka stream — it’s a clear text protocol! That means you can use Wireshark, tcpdump, etc to capture everything that goes over the wire. This shows that the GUID I generated for the duplicated message only appears one time in the network trace. Whatever funky stuff is going on that makes the client see it twice? Not me 😊
I used tcpdump because the batch server doesn’t have tshark (and it’s not my server, so I’m not going to go requesting additional binaries if there’s something sufficient for my need already available). Ran tcpdump -w /srv/data/ljr.cap port 9092 to grab everything that transits port 9092 while my script executed. Once the batch completed, I stopped tcpdump and transferred the file over to my workstation to view the capture in Wireshark. Searched the packet bytes for my duplicated GUID … and there’s only one.
Confluent Kafka Queue Length
The documentation for the Python Confluent Kafka module includes a len function on the producer. I wanted to use the function because we’re getting a number of duplicated messages on the client, and I was trying to isolate what might be causing the problem. Unfortunately, calling producer.len() failed indicating there’s no len() method. I used dir(producer) to show that, no, there isn’t a len() method.
I realized today that the documentation is telling me that I can call the built-in len() function on a producer to get the queue length.
Code:
print(f"Before produce there are {len(producer)} messages awaiting delivery")
producer.produce(topic, key=bytes(str(int(cs.timestamp) ), 'utf8'), value=cs.SerializeToString() )
print(f"After produce there are {len(producer)} messages awaiting delivery")
producer.poll(0) # Per https://github.com/confluentinc/confluent-kafka-python/issues/16 for queue full error
print(f"After poll0 there are {len(producer)} messages awaiting delivery")
Output:
Before produce there are 160 messages awaiting delivery After produce there are 161 messages awaiting delivery After poll0 there are 155 messages awaiting delivery





