Live data from Hacker News

Have you ever hurt yourself from your own code?

blog.nikitas.link

11–20 of 432 posts

Re: Have you ever hurt yourself from your own code?

#14
I've been slowly building a homemade quadcopter over the last few years. One of the first times I tested it out it with all 4 motors it immediately headed my direction and caught me in the ankle before I could get out of the way. Nothing a bandaid couldn't fix but it sure sucked.

It's tethered to a test-stand now.

Re: Have you ever hurt yourself from your own code?

#16

Is there a reason why you might want to mix endianness within a file format? Wouldn't it just be extremely error prone as demonstrated in the article?

Yeah I was kind of confused about this when I was reading through the spec trying to figure out what went wrong. I wanted to touch on this in the blog post, but I wasn't able to find a good resource explaining the advantage for mixing endianness in a file format.

Re: Have you ever hurt yourself from your own code?

#19
Mistake #1: Should not have had my volume that loud.

I always keep the volume low enough that a full-amplitude noise wouldn't be anywhere near physically painful to listen to, but then again most of the stuff I listen to is ultra-compressed already...

Of course, the actual bug is that the audio is in units of samples, which are only 1 byte in the case of mono 8-bit format, so treating the file as being 8bps mono when it could be 16bps mono, 8bps stereo (far more subtle difference in the case of byte misalignment), 16bps stereo, or any of a number of other formats is always going to lead to cases where this could occur.

Re: Have you ever hurt yourself from your own code?

#20

Is there a reason why you might want to mix endianness within a file format? Wouldn't it just be extremely error prone as demonstrated in the article?

Yeah I was kind of confused about this when I was reading through the spec trying to figure out what went wrong. I wanted to touch on this in the blog post, but I wasn't able to find a good resource explaining the advantage for mixing endianness in a file format.

Because Microsoft.
Post reply on HN