"...took some time to run."



  • @blakeyrat said:

    Compared to the ass talk, I'd much rather have the statistics. I didn't realize that was the trade-off...
    They don't have to be mutually exclusive. How many standard deviations from the norm do you suppose Dhromed's ass is, hairiness-wise?



  • @intertravel said:

    But isn't one standard deviation about an inch?
    I would hope not, considering 96% of data is within 2 standard deviations of the norm, and 3 standard deviations are only freak outliers.  This would mean that almost all women are within about 5 inches height of each other.



  • @Sutherlands said:

    @intertravel said:

    But isn't one standard deviation about an inch?
    I would hope not, considering 96% of data is within 2 standard deviations of the norm, and 3 standard deviations are only freak outliers.  This would mean that almost all women are within about 5 inches height of each other.

    Well, two inches is about the same as an inch, for estimates of that sort of accuracy, and they're certainly almost all within a foot or so - possibly even 4 s.d.'s worth.



  • 2 inches may be close to an inch, but as far as standard deviations go, they're not at all the same.

    Standard deviation seems to be 2.8 inches.  This means that 96% of women are within about a foot of each other, which is 2 sds from the mean, not 4.



  • @Sutherlands said:

    2 inches may be close to an inch, but as far as standard deviations go, they're not at all the same.

    Standard deviation seems to be 2.8 inches.  This means that 96% of women are within about a foot of each other, which is 2 sds from the mean, not 4.

    Er, perhaps it is. But I was estimating for the purposes of working out how unlikely a 50-foot woman was on that basis, so we're still not making a meaningful difference to the order of magnitude of the answer. Whether it's 100, 200, or 300 s.d.'s is immaterial.


  • Dammit, back to the boring statistics talk, well I'm out of ideas, ass talking was the only thing that made sense, other topics that come to mind are "me" related so they are boring as well.  blakey you are the one with all that free time, ideas?


  • Trolleybus Mechanic

    @C-Octothorpe said:

    @serguey123 said:

    That would make dhromed ass so lonely

    I'm hoping this is some kind of language barrier thing?

     

    There used to be an apostrophe, but dhromed put it in his ass. 



  • @Lorne Kates said:

    There used to be an apostrophe, but dhromed put it in his ass. 
     

    And the surprise noodle???



  • @serguey123 said:

    Dammit, back to the boring statistics talk, well I'm out of ideas, ass talking was the only thing that made sense, other topics that come to mind are "me" related so they are boring as well.  blakey you are the one with all that free time, ideas?

    I dunno, I keep trying to get people posting by putting stuff in General, like asking about OneNote, but those don't ever really go anywhere interesting.



  • @blakeyrat said:

    @serguey123 said:

    Dammit, back to the boring statistics talk, well I'm out of ideas, ass talking was the only thing that made sense, other topics that come to mind are "me" related so they are boring as well.  blakey you are the one with all that free time, ideas?

    I dunno, I keep trying to get people posting by putting stuff in General, like asking about OneNote, but those don't ever really go anywhere interesting.

    Maybe you should ask it again in that new forum.



  • @blakeyrat said:

    @serguey123 said:

    Dammit, back to the boring statistics talk, well I'm out of ideas, ass talking was the only thing that made sense, other topics that come to mind are "me" related so they are boring as well.  blakey you are the one with all that free time, ideas?

    I dunno, I keep trying to get people posting by putting stuff in General, like asking about OneNote, but those don't ever really go anywhere interesting.

    Dude, it is OneNote, what do you expect?



  • @serguey123 said:

    @blakeyrat said:

    @serguey123 said:

    Dammit, back to the boring statistics talk, well I'm out of ideas, ass talking was the only thing that made sense, other topics that come to mind are "me" related so they are boring as well.  blakey you are the one with all that free time, ideas?

    I dunno, I keep trying to get people posting by putting stuff in General, like asking about OneNote, but those don't ever really go anywhere interesting.

    Dude, it is OneNote, what do you expect?

    Well at least I'm trying! sob


  • ♿ (Parody)

    @serguey123 said:

    Dude, it is OneNote, what do you expect?

    Maybe he confused OneNote with BrownNote?



  • @boomzilla said:

    @serguey123 said:
    Dude, it is OneNote, what do you expect?

    Maybe he confused OneNote with BrownNote?

    Best Mitchell and Webb skit The Green Clarinet!

    Actually, Cheesoid might be the best one... but still.



  • @SEMI-HYBRID code said:

    "oh, look, your browser still manages to spin the spinner.gif, so the server is definitely making progress!"
    i love those

    That's because Everything's Better With Spinning.



  • @dhromed said:

    @Nelle said:

    @dhromed said:
    'Long' is defined as 10 or more seconds. This is a webpage, after all.



    I recently started implementing long reports by asking for an e-mail adress, generating the report on the server and sending the notification with a link to the generated document when the thread has finished.

    Creative, but I'm not sure if that's good from a UI perspective. Maybe it works fine and people  are happy — in which case I completely retract my objections — but it seems that not even showing a webpage trying to load is even worse: you're literally showing absolutely nothing at all. The app's basically saying "It'll be done when it's done. Don't call us. We'll call you. Now shoo."




    If you start copying files and you see that it's going to take longer than a minute, are you really going to stand there and look at the progress bar ?



  • Wow, this thread became frightening while I was away from it.  Not as frightening as this code, though.  I do understand what made someone set a crazy-huge timeout, though.  The app starts off sanely enough, quering a table for a number of records based on some conditions that are at least plausible.  Then it goes downhill.  Fast.  It enters a large, multiply-nested set of loops, beginning by iterating down the list of records it retrieved earlier.  Inside all the nonsense is another query.  I have no real clue what it's doing with all this data -- there's an innocent looking function call that wound up being almost 1300 lines of undocumented math-spam, buried in another file.  But I have worked out how many times it hits the database.  For n records returned by the original query, the program makes [n (n+1) (n+2)] / 6 additional queries.  Yes, that's the formula for the nth tetrahedral number, and means that this program runs in O(n^3) time.  I think it's safe to assume there are some additional WTFs there.  Of course, whatever's causing this to fail isn't the timeout.  If it timed out, I'd see an error message.  Instead, after about 2 hours, the page stops loading.  There's just nothing there.

    Not that I have any freaking clue what should be there.  The person who uses this train-wreck doesn't know either, really.  It turns out that number is supposed to go in a space on an archaic corporate form, to be reported daily.  The person who gets it doesn't know what its for either.  But, he says, it wouldn't be on the form if it wasn't important. There's nothing resembling documentation.  There's nothing resembling context, either.  There are no input conditions; when you go to the address for this failwhale of a program, it starts its cycle of server abuse.  The only output statement in the entire debacle drops (or, rather, is supposed to drop) a single number to the screen without formatting, guidance, or hope for human nature:

    response.write(out_number)

    And now it can't even get that right.  Not that I blame it, really.



  • @Serpentes said:

    Wow, this thread became frightening while I was away from it.  Not as frightening as this code, though.  I do understand what made someone set a crazy-huge timeout, though.  The app starts off sanely enough, quering a table for a number of records based on some conditions that are at least plausible.  Then it goes downhill.  Fast.  It enters a large, multiply-nested set of loops, beginning by iterating down the list of records it retrieved earlier.  Inside all the nonsense is another query.  I have no real clue what it's doing with all this data -- there's an innocent looking function call that wound up being almost 1300 lines of undocumented math-spam, buried in another file.  But I have worked out how many times it hits the database.  For n records returned by the original query, the program makes [n (n+1) (n+2)] / 6 additional queries.  Yes, that's the formula for the nth tetrahedral number, and means that this program runs in O(n^3) time.  I think it's safe to assume there are some additional WTFs there.  Of course, whatever's causing this to fail isn't the timeout.  If it timed out, I'd see an error message.  Instead, after about 2 hours, the page stops loading.  There's just nothing there.

    Not that I have any freaking clue what should be there.  The person who uses this train-wreck doesn't know either, really.  It turns out that number is supposed to go in a space on an archaic corporate form, to be reported daily.  The person who gets it doesn't know what its for either.  But, he says, it wouldn't be on the form if it wasn't important. There's nothing resembling documentation.  There's nothing resembling context, either.  There are no input conditions; when you go to the address for this failwhale of a program, it starts its cycle of server abuse.  The only output statement in the entire debacle drops (or, rather, is supposed to drop) a single number to the screen without formatting, guidance, or hope for human nature:

    response.write(out_number)

    And now it can't even get that right.  Not that I blame it, really.

    This seems like the perfect time for $rand



  • @Quietust said:

    That's because Everything's Better With Spinning.
     

    great.

    now the project i should be working on instead of browsing through that page will be even more delayed...

     



  • @Serpentes said:

    [cascading wtfs]

    Bravo! Be sure to keep us updated!



  • @Serpentes said:

    this program runs in O(n^3)
     

    CUBIC?!

    I thought you'd only end up with that kind of thing if you did some freestyle experimental coding, or a contest for runtime-anti-golf.



  • @dhromed said:

    @Serpentes said:

    this program runs in O(n^3)
     

    CUBIC?!

    I thought you'd only end up with that kind of thing if you did some freestyle experimental coding, or a contest for runtime-anti-golf.

    We've got some cubic code running in production. :-/ It's a godawful sorting algorithm written in a proprietary "business user"-oriented (read: retarded VBA-wannabe) non-Turing-complete functional language. The goal and purpose of this language is for business document mapping and formatting, and to that end it's not SO bad, yet we're using it to sort data -- because the data supplier can't be bothered to add a ORDER BY in their sql. Let's see if I can remember how the algorithm works... I recall it being crippled by its linear seeks of everything. There are no temporary variables or accessible variables at all, just trees of complete datatypes. As a result, there are a lot of full linear scans.

    The algorithm is something like... There's a group of group of items, but not assumed to be sorted in any useful way. It does a full scan of the inputs to find an item for the first output group. It takes this, does its thing with it, then drops it off in the appropriate output slot. After that, it does another full scan to find another item of this group, and then does a full scan of the group of outputs to find where it should be inserted in order. So, it touches each item (n), and while doing so performs a full scan of the input on each item (another n) and full scan of the (increasing) output on each item (sort of another n). I guess since the output increases with processing, it's not exactly n^3. I guess it's O(log n * n^2), so I was wrong in calling it cubic. It's a monster in any case, and a completely unnecessary one.



  • @dhromed said:

    CUBIC?!

    I thought you'd only end up with that kind of thing if you did some freestyle experimental coding, or a contest for runtime-anti-golf.

    You could probably call this nightmare "freestyle experimental coding" but that would be an insult to style.  And experiments.  And code.  A year or so ago, I inherited a program with a three-level-deep set of for loops that changed their own control variables, but that wasn't as bad as this monstrosity.  I'm still not actually sure what its doing.  I do know why it takes so godawful long, though.

    Let's say the initial query returned 6 rows.  It actually returns way, way more than 6 rows, but that's not really the issue.  The program then constructs a query to fetch more data based on the last of those 6 rows and each of the 6 rows (including itself), taken pairwise.  Then it does the same thing again with the next-to-last row, taken pairwise with each remaining row.  Repeat until it reaches the first row of the returned data set, which gets one last query, taken pairwise with itself.  That requires a number of queries equal to the nth triangular number (21, for n=6), which runs in quadratic time.

    But we're not done.  Because this process is recursive (althoug it isn't actually called recursively, thank god).

    It then discards the last row of the original data set, and pretends that only 5 rows had been returned.  It then repeats the process as though 5 rows had been returned.  An astute observer would think that this is highly redundant.  Didn't all those pairwise queries get called already, as a subset of the first process?  Sadly, no.  This holocaust of code uses n to compute one of the boundary conditions for the WHERE clause.  During the first full pass (in this example, the 21 queries described above), n is 6 during the entire process.   During the next pass, n is 5.  And so on, until n is 1; this causes a single row to processed, queried pairwise with itself. All in all, if 6 rows were returned initially, there are 56 subsequent queries, the sum of the triangular numbers from n = 1 to 6.  Which means this runs in cubic time.

    What does it do?  Other than make me question whether beauty is possible in a universe that allows something like this?  I ... still have no idea.  At least I know why it needed a really long server timeout, and that's something, isn't it?



  • I am scared.



  • @Xyro said:

    I am scared.

    Me too, actually.  I can't even figure out who wrote this thing.  It apparently wasn't my immediate predecessor, but I was led to believe that he was the only source of godforsaken ASP Classic WTFs that I'd encounter here.  I half expect something Cthulhianic to crawl out of one of these function calls.  Speaking of function calls... 

    function DoMath(nrc,r1,r2,v1,v2,temp)

    That function contains over 1000 lines of code and is what happens to the data created from this mess.  It is called after every one of the pairwise queries, so I know a little bit about what goes in ... but nothing about what comes out.  nrc is sort of "net n", the number of rows in the current pass.  r1 and r2 are the indices of the two rows being handled.  v1 and v2 are ... some values returned by the query (the database tables aren't anymore verbose, so got me what they ARE).  And temp?  Because we all love variables named that, right?  Well ... here's how it is called, everywhere it appears.

    not_out_yet = DoMath(i0,i,i2,di,dj,not_out_yet)

    No.  None of this is anonymized code.  If whoever originally did this happens to see it ... then, good!  They need to confront their sins.



  • @dhromed said:

    @Serpentes said:

    this program runs in O(n^3)
     

    CUBIC?!

    I thought you'd only end up with that kind of thing if you did some freestyle experimental coding, or a contest for runtime-anti-golf.

      I wasn't aware there was anything special about cubic order, or polynomial-time in general.  Do you know some secret algorithm for, say, summing all the elements of an n x n x n array, that runs any quicker than O(n^3)?



  • Well, since n usually refers to the number of elements, I have a solution that runs in O(n) time.



  • @DaveK said:

    I wasn't aware there was anything special about cubic order
     

    I've never done n^3, and never seen it, is what I mean.



  • This just got much, much worse.  At the very end of the process, the last iteration of not_out_yet is assigned to out_number and (supposedly) displayed.  Since those variable names are the closest to comments or self-documentation that I've got, I decided I'd take a look at what they were doing.  After all, if I could see what order of magnitude not_out_yet was as the program progressed, I could at least make a convincing-looking range of outputs via $rand, right?

    Wrong. At least for much of the execution, not_out_yet isn't a number.  It's a string.  It consists of pairs of what seem to be truncated floating point numbers, separated by a comma, with adjacent pairs delimited by pipes (and, sometimes, double-pipes).  And at least once it gets going, it's a very large string.  Like, "does not fit on a single screen" large.  I suspect it is several Mb, at least.  Which ... actually makes me wonder.  Does VBScript/ASP Classic have a maximum size for a string variable other than system memory constraints?

    Anyway, I'm going home.  Hopefully for the weekend, but if management feels strongly about this nonsense, maybe just until tomorrow.  In the meantime, I'm going to cling to the misguided hope that this is a naive implementation of some format of something that really exists, and not a totally custom form of mathematics to go with the totally custom cubiccode.  So, if anyone has ever seen a pipe-and-comma-delimited string of floating point numbers and has ANY FREAKING CLUE what I've inherited ... erm, please, feel free to drop a hint as to what I've got.



  • @Serpentes said:

    During the first full pass (in this example, the 21 queries described above), n is 6 during the entire process.   During the next pass, n is 5.  And so on, until n is 1; this causes a single row to processed, queried pairwise with itself. All in all, if 6 rows were returned initially, there are 56 subsequent queries, the sum of the triangular numbers from n = 1 to 6.  Which means this runs in cubic time.
     

     ...not n factorial? oh, such a pity, that would be so many ways awesome



  • @Sutherlands said:

    Well, since n usually refers to the number of elements, I have a solution that runs in O(n) time.

    Yeh, but if I increase the size of the array by a given amount in all dimensions, your idea of n goes up in proportion to the cube, not in linear increments, so you're just hiding the polynomial behaviour by defining a substitution.  Your n' is my n, cubed.


    Srsly.  There are plenty of real-world algorithms that take time > O(n^2), see the wikipedia entry on big-O notation for a table.


  • I didn't known about Interpolation Search. It makes perfect sense and is very obvious, in retrospect.

    Anyways... "linearithmic" is my current favorite adjective. I could totally imagine a band named "Linearithmic and The Quasilinears".



  • @rad131304 said:

    @intertravel said:
    @boomzilla said:
    However, if you use a normal curve as your statistical model, it will give you a nonzero probability of a -30 foot person and a 50 foot woman. Clearly, this is not correct, but the probabilities are so small that it doesn't really matter.
    But isn't one standard deviation about an inch? Your fifty foot woman is hundreds of standard deviations from the norm - the probability is infinitesimally tiny, even if technically non-zero. I was never much cop at this stuff, but I understood that it's all about approximations anyway? Surely that's the whole point of stats? It doesn't give you an exact answer, but simply the probability of an event occurring.

    I should go away and read some more, right? :)

    The 50' woman should have a non-zero probability; the -30 foot person should not - one value is technically possible, despite the fact that it may be impractical. I'm not sure I want to argue the "point" of statistics, but that's what they often get used for. In the case of heights, Gaussian statistics do a decent enough job of predicting height that there is no point in using more complex statistical models. That doesn't make them right, but it does make them a useful substitute to reduce computational complexity in this class of problems.

    @blakeyrat said:

    Is there some kind of scientific study on what factors cause a thread to get so boring? So we can identify and remove the causes?
    Nobody's making you read this ....

    I dare to say that there are no "right" statistics out there. Everything in statistics, physics and related fields is only a model of reality and thus always flawed in some way.

    There's only "allows for reasonably accurate descriptions/predictions under these certain circumstances".



    Because that's what is done in a lot of physics. Take the mathematical vs the physical pendulum - the latter one needs to be treated with fourier transformations (and thus can only be calculated numerically), while the former one can be solved analytically. However, the mathematical pendulum is only valid for angles smaller than five degrees.

    Or take quantum mechanics - really complicated shiznit with imaginary numbers, probability densities and bra-ket-notations. And it still is only a model that allows us to do predictions. Nobody believes that an electron is a cloud of probability around a slightly denser probability cloud of protons, right?



    tl;dr: Everything we express in formulas is not "right", only a "meh, close enough!"



  • ^This! To say any collected statistics are accurate is to say you can write a true random generator.



  • @Rhywden said:

    I dare to say that there are no "right" statistics out there. Everything in statistics, physics and related fields is only a model of reality and thus always flawed in some way.
    There's only "allows for reasonably accurate descriptions/predictions under these certain circumstances".

    I think you're running two separate things together here.  There are such things as "right" statistics; for instance, if I tell you that the average of 1, 3, and 5 is 69102, that is very definitely wrong statistics, whereas if I tell you the average of them is three, that is very definitely right statistics.  The IMO entirely separate issue that you're conflating it with here is the accuracy/realism of models, which is separate from the accuracy of the calculations done on those models.

    @Rhywden said:

    Because that's what is done in a lot of physics. Take the mathematical vs the physical pendulum - the latter one needs to be treated with fourier transformations (and thus can only be calculated numerically), while the former one can be solved analytically. However, the mathematical pendulum is only valid for angles smaller than five degrees.

    See here, it seems you are explicitly talking about the domain of validity of a particular model.  But you agree that the statistics (and any other math) done on those models is correct, and even that for angles smaller than five degrees it actually corresponds with reality?

    @Rhywden said:

    Or take quantum mechanics - really complicated shiznit with imaginary numbers, probability densities and bra-ket-notations. And it still is only a model that allows us to do predictions. Nobody believes that an electron is a cloud of probability around a slightly denser probability cloud of protons, right?

    Well that's a matter of interpretation - Copenhagen or Ensemble?  And, you know; why shouldn't it be?  After all, it appears to behave exactly like a cloud of probability; what possible grounds apart from anthropocentric prejudice could lead you to conclude that the universe can't work that way, just because it seems odd to our ape-descended minds?  They evolved to deal with concrete problems, after all, like "how do I get that banana?"; there's no inherent reason why the constructs and concepts they have developed should necessarily have any simple mapping that allows them to be used to represent or describe the actual underlying physical structures and processes of the universe.

    [Edit: Bah, chose two similar interpretations.  Should have said "Copenhagen or Pilot Wave?", or suchlike.] 



  • @DaveK said:

    you're conflating
     

    +1, and also I'm considering getting this shirt.



  • @DaveK said:

    I think you're running two separate things together here. There are such things as "right" statistics; for instance, if I tell you that the average of 1, 3, and 5 is 69102, that is very definitely wrong statistics, whereas if I tell you the average of them is three, that is very definitely right statistics. The IMO entirely separate issue that you're conflating it with here is the accuracy/realism of models, which is separate from the accuracy of the calculations done on those models.

    Your example is not valid as it is an artificial one. In reality, such numbers are almost always riddled with error boundaries as no measurement is actually discrete to the point that you can capture it with 100% accuracy. Furthermore, your average example would be wrong in the sense that it gives the wrong result because of a faulty calculation contrary to its definition. I was not talking about calculation errors...

    @DaveK said:

    See here, it seems you are explicitly talking about the domain of validity of a particular model. But you agree that the statistics (and any other math) done on those models is correct, and even that for angles smaller than five degrees it actually corresponds with reality?

    Again, it's good enough. "Correct" would imply that it is not faulty. However, it is faulty, just not to such a degree that it is unusable. That's why you have the Fourier transformation to fall back to - here you can calculate stuff to an arbitrary precision. You still won't reach 100% precision.

    @DaveK said:

    Well that's a matter of interpretation - Copenhagen or Ensemble? And, you know; why shouldn't it be? After all, it appears to behave exactly like a cloud of probability; what possible grounds apart from anthropocentric prejudice could lead you to conclude that the universe can't work that way, just because it seems odd to our ape-descended minds? They evolved to deal with concrete problems, after all, like "how do I get that banana?"; there's no inherent reason why the constructs and concepts they have developed should necessarily have any simple mapping that allows them to be used to represent or describe the actual underlying physical structures and processes of the universe.

    And that's exactly why you have to be strict about models not being correct just accurate. It gives a false impression. I mean what happens when the model of Quantum Mechanics turns out to be incomplete and we suddenly discover that at some weird subatomic level we have discrete particles again? Like it did for Dalton? Like it did for Rutherford? Like it did for Bohr?

    Never assume that science has any absolute truths. That we depicture reality with 100% reality. That our models are the truth. Because they'll almost certainly always be incomplete in some way - and thus they cannot be the truth. Because if they were, we could use them to describe all phenomena of reality.

    But we can't. For example, we still can't explain why superconductivity exists or how it comes to be, exactly which properties of the superconductor allow for superconductivity to occur. Yes, we have BCS. We also have the unusual superconductors.



  • @Rhywden said:

    @DaveK said:
    I think you're running two separate things together here. There are such things as "right" statistics; for instance, if I tell you that the average of 1, 3, and 5 is 69102, that is very definitely wrong statistics, whereas if I tell you the average of them is three, that is very definitely right statistics. The IMO entirely separate issue that you're conflating it with here is the accuracy/realism of models, which is separate from the accuracy of the calculations done on those models.
    Your example is not valid as it is an artificial one. In reality, such numbers are almost always riddled with error boundaries as no measurement is actually discrete to the point that you can capture it with 100% accuracy. Furthermore, your average example would be wrong in the sense that it gives the wrong result because of a faulty calculation contrary to its definition. I was not talking about calculation errors...

    Because no one ever collects statistics about things that can be measured accurately.


Log in to reply