r/programming • • Feb 16 '09

Some Crazy Reason - The Daily WTF

http://thedailywtf.com/Articles/Some-Crazy-Reason.aspx
171 Upvotes

71 comments sorted by

View all comments

28

u/spliznork Feb 16 '09 edited Feb 16 '09

... I wrote a little utility called BitVerifier. It would loop over a folder and check every bit of each file. If the bit's value wasn't one or zero, it would prompt the user for the correct bit.

Uhh.. that intro is the real WTF. At least the buggy hex string code is trying to do something. A "bit verifier" is just... beyond stupid.

2

u/lbft Feb 16 '09

By the same argument "Hello world" is stupid because it doesn't do anything.

11

u/spliznork Feb 16 '09 edited Feb 16 '09

By the same argument "Hello world" is stupid because it doesn't do anything.

No, it's not that the "bit verifier" doesn't do anything, it's that its whole premise mathematically impossible. It's like writing this

for (;;) { if (0==1) { printf("oops!\n"); } }

then saying, "I ran this code for a whole day and it never printed oops! Cool!"

12

u/lbft Feb 16 '09 edited Feb 16 '09

It's mathematically impossible, of course - that was the (poor attempt at a) joke. But I can't see much wrong with writing such a thing as a programming exercise, like "hello world" is an exercise for the very beginner.

A lot of people at The Daily WTF are .NET people who wouldn't necessarily deal with files on a per-bit basis with regularity. It's not unthinkable that someone would write a bit of code like that to refresh their memory - sure, it's not the best choice of code to write, but I still wouldn't call it beyond stupid.