• DCL (unregistered)

    Frist

  • someone (unregistered)

    Unless I'm seriously stupid, this takes the 1 path 99.5% of the time, not 0.5%.

  • Pjrz (unregistered)

    What IS the result of a "-=" operator in javascript?

  • Robert Morson (google) in reply to someone

    True, but it takes the other path 0.5% of the time.

  • Sam (unregistered) in reply to Pjrz

    -=, like all JS assignment operators (=, +=, <<=, >>=, >>>=, *=, /=, |=, &=, ^=, %=, **=), returns the new value of the variable.

  • RLB (unregistered)

    In other news, Remy has no idea what A/B testing actually is.

  • dpm (unregistered)

    Au contraire: "D-" is still a passing grade. I certainly wouldn't pass this code.

  • (nodebb) in reply to Sam

    Same as in C, C++, and just about every other language that has this sort of operator.

  • siciac (unregistered) in reply to RLB

    He understands what it is in practice. How many UI designers are working out hypotheses and P-values when they do A/B testing?

  • Sole Purpose of Visit (unregistered) in reply to RLB

    That might be unfair. But he hasn't really explained why this snippet doesn't do A/B testing.

    I apologise for stating the obvious, but the point of A/B is pretty much the same point as double-blind tests in science. Take (in this case) 0.5% of the population at random, and do A rather than B.

    Then, of course, you measure the results of applying A rather than B. (And normalise them. I don't need to explain that, either.)

    You can't really do A/B here unless you pass the randomised selection parameter into the function, so, you know, not actually A/B at all. Because, how would you measure the results?

    (Whether or not A/B testing is a good idea is best left to the SVPs with metrics and charts and snake oil and stuff. Me, I'm sort of A/B on the stuff.)

  • Sole Purpose of Visit (unregistered) in reply to siciac

    I'm not sure that he does.

    And how many UI designers would you expect to do the relevant statistical analysis?

    Me, I expect "none." It's not what a UI designer should do. A UI designer should present A and B, according to parameterization which is clearly not present here.

    One other thing about A/B which always bugs me: it's like a referendum. Surprise! It's a binary choice! All subtlety is lost, and you don't get to juggle multivariates. This is not an implementation limitation, obviously, but it turns out to be a [o]Bozo Management[/i} limitation.

    Irrelevant to the present case, of course, where the A/B degree of freedom is ... er ... zero.

  • o11c (unregistered) in reply to Steve_The_Cynic

    But, sadly, not every language that has the operator. shudders

    That said TRWTF is having a single-letter global variable.

  • (nodebb)

    Hmmm. Why does Google Chrome spend about 20 seconds trying to connect to api-widget.soundcloud.com page while trying to load this post from the main page?

  • z f k (unregistered) in reply to KenMitchell

    Google Chrome is A/B testing you.

    CYA

  • trwtf (unregistered) in reply to KenMitchell

    Those improv posts use embedded soundcloud.

  • Simon Clarkstone (unregistered) in reply to KenMitchell

    Something to do with the podcasts on the front page (at the end of May) I'd guess.

  • (nodebb) in reply to Steve_The_Cynic

    It's fairly common for assignments to return some sort of void or unit type. This more accurately represents the side-effecting nature of the operation, and prevents errors where people mix up = and ==. It's a reasonable question to ask about a language you don't know.

  • James (unregistered)

    Some devops shops use the term blue-green testing, rather than A/B.

  • Object delete. (unregistered) in reply to Steve_The_Cynic

    Actually in C and C++ the operators return not the new value, but the variable assigned to as an lvalue (C++-speak "reference"). The value enables just common idioms like a=b=c=0 or while ((c=getchar()) != EOF) But the lvalue gives us gems like ((a+=5) *= 3) &= 0xFF or a += b = c *= 7 for some fun during the review.

  • RLB (unregistered) in reply to Sole Purpose of Visit

    Exactly. And that is a completely different thing from "randomly showing different versions until something sticks".

    (I agree that the person who wrote this code also understands sweet Fanny Adams about A/B testing.)

  • RLB (unregistered) in reply to Sole Purpose of Visit

    Multi-variable A/B testing exists, but is hard to get right. (I suspect, but do not know, much more than polynomially harder than single-variable.)

  • kktkkr (unregistered)

    The assignment operator would make sense in a slightly different context. Want to randomly choose 1 of 5 paths? Just change the value to 0.2 and copy that line 4 times.

Leave a comment on “A/F Testing”

Log In or post as a guest

Replying to comment #:

« Return to Article