Showing posts with label bugs. Show all posts
Showing posts with label bugs. Show all posts

Electronics - Features and bugs

When something doesn't go according to plan when you are programming, it's called a bug.

When that same things turns out to be useful, it's called a feature.

It's a handy distinction, and is used a lot in the software industry for marketing an faulty product.

When my fish hit their feed lever, the program is supposed to feed them one dose of feed, then restrict them from having any more for a set period. The thing is, my software allows them an extra feed if they haven't fed for a while. I cant figure out why, but I suspect it has something to do with the fact that there are two programs running simultaneously. Or at least pretending to. The chip actually just takes it in turns running one line from each program.

Actually there are three programs running...


1. checking everything over and over for changes in things like permission to feed.

2. checking over and over for lever presses.

3. reporting over and over how many feeds so far have been given for the day.


Now I think what is happening, is that the bit that checks for lever presses, diverts the program after a fish hits the lever to change a few things. For one thing it changes the permission for the fish to get a feed to "no".

But I think the part of the program that is checking to see if the fish are allowed to feed, sets the light on and activates the lever to allow a feed, before the bit that did the feeding can turn it off. The result is, there is a delay between giving the feed, and having the device decide it has actually done that.

If the fish were allowed to feed, say 5 times so far today, but haven't, they are allowed two feeds in a row.

That's a feature.

I invented that.




120 things in 20 years - In electronics, like aquaponics, sometimes bugs are features.

Aquaponics - Beasties

I found some alien beasties in my new grow bed.


It's not often that you get to mark out three square metres or so of clean wet stuff on a high contrast background, and see what moves in overnight. In the morning, there were some bug deaths, some bugs just getting on with their lives, and my first bug births. I have no idea what they are, but they only took 12 hours to move into my new grow bed. 



Very very small beasties

I put a few hundred litres of water into the grow bed to test my silicone, and to weigh it down.

I'm hoping the truck that delivers my gravel will be able to dump it directly into the grow bed saving me a stack of time. It wont be able to, but it keeps me from thinking about having to shovel gravel.

It's no wonder people buy bulldozers.

Popular Posts