Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm surprised that this corner case - the loss of a single frame from the nav camera - wasn't tested.


Maybe is was just "impossible". Hard real time systems are not supposed to lose frames, sometimes provably so.

You have to make some assumptions. For example, that pure functions will always return the same result with the same arguments. In fact, in real life, it is not always true, especially in space where a cosmic ray can flip a bit. You may try do be defensive to account for an unreliable hardware, but you have to draw the line at some point.

Yes, is should have been tested, but it doesn't surprise me that it wasn't even for a company with as good a track record as JPL.


I'm sure this will be added to their set of test cases :)


Corner cases are hard. Here's a little C program; try to figure out what it prints before you compile & run it. It computes a step size between two numbers, given a number of steps:

#include <stdio.h>

int f(unsigned n_steps, int from_val, int to_val){ int step_size = (from_val - to_val) / n_steps; return step_size; }

int main(){ printf("f(3, 0, 30) = %d\n", f(3, 0, 30) ); printf("f(3, 30, 0) = %d\n", f(3, 30, 0) ); }


> Corner cases are hard.

Yeah, they are, but your example is not good enough, it is like an example from a textbook on traps of C.

Corner cases hard when you are trying to do something new, because if you did it before, you'd know the most of them. Or if someone else did it before and wrote a textbook. =)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: