3 ms·
I read the stack overflow. So someone at Oracle is dumb enough to want to reimplement / and/or wants to see if a future hire is dumb enough to be intimidated b
by VLM 14y ago
I read the stack overflow. So someone at Oracle is dumb enough to want to reimplement / and/or wants to see if a future hire is dumb enough to be intimidated by a manager into doing something dumb (dumb like, say, reimplement /)
OK my solution is connect to a postgres sql DB server and something very much like "SELECT WIDTH_BUCKET(389, 999, 0, 333);" and the result will be something like 129. width_bucket asks for a sample, the highest bucket, the lowest bucket, how many buckets, and tells you which bucket to dump the sample into. You know, for histograms and stuff like that. So you make the largest bucket max_int or 999 in this easy scenario, and the number of buckets precisely 1/3 the number of buckets or 333 in this easy case, and postgres database will figure out the number of the bucket to stick your sample into, which coincidentally happens to numerically match 1/3 the sample.
Its possible Oracle has a function similar to width_bucket from postgres, but I have no idea because a Oracle license costs about 10 times the value of my house so I can't afford it, probably because they pay people to reimplement /.
Another fun way to attack this problem would be to go all trig on them and try to convince them its impossible to divide by 3 because you can't trisect an angle using classical greek construction techniques. Then you hit them with galois theory as relates to solving cubic equations, until their brains bleed and/or you get the job and/or removed by security. This stuff is all 200 years old, or so, but you'll still find cranks who think they can trisect angles using classical greek construction techniques. Maybe being smart enough to understand that overqualifies the applicant from working at a place that things reimplementing / is a wise use of brain power.