Live data from Hacker News

Is user a monkey?

developer.android.com

31–39 of 39 posts

Re: Is user a monkey?

#32
post #23
post #15

Earlier quoted context omitted.

Doesn't it defeat the testing purpose if you perform a check to take a different code path when the testing tool runs?

You might avoid doing certain write-esque operations if you know you are in test mode. For example, you wouldn't want to charge a credit card or update someone's facebook status.

That makes sense. It didn't occur to me that someone might want to run a monkey test in a live environment, but I guess it is necessary sometimes.

Re: Is user a monkey?

#33

In 1993, I was taking a course in Software Verification & Validation at the Univ of Houston Clear Lake, next door to Johnson Space Center and down the street from the IBM division doing the Space Shuttle software. That is the group that is CMM Level 5 and gets a bug report about once a year or so. It happened that the instructor of this course was a mid-level IBM tech guy in that organization. And he had stories... A…

That's why modern fly-by-wire aircraft have a crew of two = one man and one dog.

The man's job is to feed the dog, and the dog's job is to bite the man if he tries to touch any of the controls.

Re: Is user a monkey?

#34
post #23
post #15

Earlier quoted context omitted.

Doesn't it defeat the testing purpose if you perform a check to take a different code path when the testing tool runs?

You might avoid doing certain write-esque operations if you know you are in test mode. For example, you wouldn't want to charge a credit card or update someone's facebook status.

On the downside this might prevent some great dramatic literature from being created.

Re: Is user a monkey?

#36

More euphonious in a ternary operator than an if clause: value = isUserAMonkey() ? left : right ; if (isUserAMonkey()) { ... } For an if clause, I prefer userIsAMonkey: if (userIsAMonkey) { ... }

It also sounds better when you consider that the booleans are called True and False:

isUserAMonkey -> Yes/No

userIsAMonkey -> True/False

Re: Is user a monkey?

#37
post #26

Skype must to have a similarly named function in it. In skype chat window, when you press random keys on a keyboard in groups, the other side sees a cat icon in the chat. Kind of neat of them to think of that.

"Catlike typing detected" goes back (I think) to this: http://www.bitboost.com/pawsense/

Re: Is user a monkey?

#38

Doesn't seem to work well, I ran this code on my mom's phone and it returned False. I'll have submit a bug report when I get home...

You're claiming to be directly and immediately descended from a monkey?

Can you come and meet some creationists I know? I can't wait to knock the smug looks off their faces.

Post reply on HN