• 0 Posts
  • 49 Comments
Joined 3 years ago
cake
Cake day: June 24th, 2023

help-circle

  • Correct answer - depends.

    Option 1 if enabling led is action itself, not side effect. This would justify having enable/disable specific side effects in those functions. This is unlikely for given example. Enabling/disabling led likely side effect itself. You don’t want to put side effects into side effects.

    Option 2 if it’s a side effect of bigger process. Option 2 makes harder to add side effects which will drive (but not guarantee) better separation of concerns.

    Though, I’d go with option 1 anyway since I trust my self to not nest side effects even when code doesn’t hint me






  • I recently started setting up home server on Raspberry Pi 5. Having issues with raid1. I have 2 nvme PCIe gen 4 SSDs. There was power outages while writing. Now second disk keeps randomly falling. Though, I’m not sure if that’s the reason because I don’t know what was raid status before outage, also disk passes checks. First time it degraded, it tried to recover and it failed. I removed that disk from raid, recreated partition run some test using nvme-cli. Disk looked healthy. I re-added disk, rebuild started and completed successfully. Then I’ve written around 500Gbs of data and it degraded again. At that point I took a break.

    There are two things I’m yet to try:

    1. Change configs to use gen 2 PCI, currently it’s set to gen 3, but AFAIK pi 5 does not support gen 3 officially.
    2. Remove, format and write data to problematic disk directly. I hope this will give me an idea is this hardware issue or software issue

    I’m frustrated and will appreciate any hints.



  • Omg this is so true, I had 3 engineers which supposed to work on component. It took me almost a day to explain context, requirements and how work is split. Two of them were busy with other work. One did their part. After reviewing I realized they still lack understanding and need to rework what was done.I made an experiment and implemented whole thing myself. Since coordination part was eliminated it took me 3 times less than initially estimated.