Open Side Menu Go to the Top
Register
Religion and science Religion and science

07-23-2020 , 11:33 PM
Lol chez.

Spoiler:
sum the logarithms, exponentiate the sum, there's your product


It's a concept. I gave you a concept question, you just didn't bother thinking about it.
07-23-2020 , 11:34 PM
Quote:
Originally Posted by d2_e4
It's a concept. I gave you a concept question, you just didn't bother thinking about it.
QFT
07-23-2020 , 11:40 PM
and if it makes you happy I did not know that you needed to use logarithms to * floats in sql.

I did do logarithms at school though. Even had a slide rule.
07-23-2020 , 11:41 PM
What? Chez, RTFM buddy.

The question was, how do you get a product? If you wanted a straight sum, it has nothing to do with logarithms.

You do know what a product is... right?
07-23-2020 , 11:44 PM
I already edited.

Yes it would have taken me a while to realise you wanted me to go back to o level maths - Why you want it remains beyond me.

Here's a more fun one for you from day 1 of adult maths. By considering root(2)^(root2)^root(2) or otherwise, prove there exists irrational p,q such that p^q is rational
07-23-2020 , 11:48 PM
Quote:
Originally Posted by chezlaw
I already edited.

Yes it would have taken me a while to realise you wanted me to go back to o level maths - Why you want it remains beyond me
Ok, I mean, we can do an object oriented one if you like. I was trying to be kind because I thought that was an easy one.

Explain the concept of boxing. For bonus points, explain the concept of string interning.
--For super bonus points, how do you safely override the equality operator for a user class?

If that's too easy, explain the difference between covariance and contravariance.
07-23-2020 , 11:53 PM
Or, if you like, here's a warm-up. Write a function in pseudocode that takes a collection (array, list, etc. doesn't matter) of floats and returns the average. That seems simple.
07-23-2020 , 11:55 PM
Quote:
Originally Posted by d2_e4
Ok, I mean, we can do an object oriented one if you like. I was trying to be kind because I thought that was an easy one.

Explain the concept of boxing. For bonus points, explain the concept of string interning.
--For super bonus points, how do you safely override the equality operator for a user class?

If that's too easy, explain the difference between covariance and contravariance.
Never heard of them in an O-O context. You've gone past my education or experience
07-23-2020 , 11:56 PM
Quote:
Originally Posted by chezlaw
I already edited.

Yes it would have taken me a while to realise you wanted me to go back to o level maths - Why you want it remains beyond me.

Here's a more fun one for you from day 1 of adult maths. By considering root(2)^(root2)^root(2) or otherwise, prove there exists irrational p,q such that p^q is rational
The simple proof of what you are asking is even simpler than yours. I can take a transcedental to a transcedental power and show that it is not only rational, but a natural.

Check it out, e^ln(2) = 2

I think you meant to put some conditions on your question that at least one of the numbers needs to be algebraic. I'll let you ponder that, from whichever day of adult maths class that was.
07-24-2020 , 12:02 AM
Quote:
Originally Posted by d2_e4
Or, if you like, here's a warm-up. Write a function in pseudocode that takes a collection (array, list, etc. doesn't matter) of floats and returns the average. That seems simple.
Lotsoftakingpiss(Piss)
if not outofpiss(Piss) print "Piss taken"
lotsoftakingpiss(lesspiss)
07-24-2020 , 12:05 AM
Quote:
Originally Posted by chezlaw
Lotsoftakingpiss(Piss)
if not outofpiss(Piss) print "Piss taken"
lotsoftakingpiss(lesspiss)
You jest, but I got this question in an interview, and I got it wrong.
07-24-2020 , 12:07 AM
Quote:
Originally Posted by d2_e4
The simple proof of what you are asking is even simpler than yours. I can take a transcedental to a transcedental power and show that it is not only rational, but a natural.

Check it out, e^ln(2) = 2

I think you meant to put some conditions on your question that at least one of the numbers needs to be algebraic. I'll let you ponder that, from whichever day of adult maths class that was.
No mistake but I'll remove the otherwise for you.

Have another go if you're interested
07-24-2020 , 12:11 AM
Quote:
Originally Posted by d2_e4
You jest, but I got this question in an interview, and I got it wrong.
I used to give people a buggy program and get them to fix it. That sorted out a lot.

Once I interviewed for trainees who had to have at least 2:1 in stem. Among other things I asked them all was the Monty Hall problem (answer and reasoning). Pre-internet days and most didn't already know it. The answers and reasoning were so scary.
07-24-2020 , 12:14 AM
Quote:
Originally Posted by chezlaw
I already edited.

Yes it would have taken me a while to realise you wanted me to go back to o level maths - Why you want it remains beyond me.

Here's a more fun one for you from day 1 of adult maths. By considering root(2)^(root2)^root(2) or otherwise, prove there exists irrational p,q such that p^q is rational
I'll put you out of your misery, since you obviously misremember the first day of adult maths. What you are referring to is a non-constructive proof that an irrational number can be raised to an algebraic power and produce a rational number.

The proof goes as follows: we stipulate rt(2) as irrational and algebraic. we raise rt(2) to rt(2). the result is either rational, in which case we are done, or it is irrational, in which case we raise it to rt(2) again, in which case we get 2, and we are done.

This proof is non-constructive as we don't know whether rt(2)^(rt(2) is rational. However, some time in the late 18th century, this number was proved to be transcendental (and therefore irrational) by the Lindemann–Weierstrass theorem.
07-24-2020 , 12:18 AM
Quote:
Originally Posted by chezlaw
I used to give people a buggy program and get them to fix it. That sorted out a lot.

Once I interviewed for trainees who had to have at least 2:1 in stem. Among other things I asked them all was the Monty Hall problem (answer and reasoning). Pre-internet days and most didn't already know it. The answers and reasoning were so scary.
Lol, giving programming interviewees the monty hall problem. You must have come in your pants when they didn't get it, huh? You seem like that sort of guy.

Do you want me to set you any challenges? I've answered all of yours (quite easily), you've answered none of mine. Do you want me to give you a pirates sharing cake or a coin-weighing one? Or maybe a number theory one, you seem to like those? Or a riverboat crossing with the farmer and the wolf and the sheep? You name it chez, I got one for you.
07-24-2020 , 12:20 AM
Or, you could try the average thing. Seems more relevant to a programming job than Monty Hall.
07-24-2020 , 12:31 AM
Quote:
Originally Posted by d2_e4
I'll put you out of your misery, since you obviously misremember the first day of adult maths. What you are referring to is a non-constructive proof that an irrational number can be raised to an algebraic power and produce a rational number.

The proof goes as follows: we stipulate rt(2) as irrational and algebraic. we raise rt(2) to rt(2). the result is either rational, in which case we are done, or it is irrational, in which case we raise it to rt(2) again, in which case we get 2, and we are done.

This proof is non-constructive as we don't know whether rt(2)^(rt(2) is rational. However, some time in the late 18th century, this number was proved to be transcendental (and therefore irrational) by the Lindemann–Weierstrass theorem.
I remember it well thanks. that's why you got the 'otherwise'

Yes you're correct. It's a fun proof for day 1 at adult maths because we're not very used to proofs that don't find the p and q. Most did not get it. Some even when it was explained.
07-24-2020 , 12:32 AM
Quote:
Originally Posted by d2_e4
Or, you could try the average thing. Seems more relevant to a programming job than Monty Hall.
I wanted people who could think. Programming is trivial.
07-24-2020 , 12:34 AM
Quote:
Originally Posted by d2_e4
Ok, I mean, we can do an object oriented one if you like. I was trying to be kind because I thought that was an easy one.

Explain the concept of boxing. For bonus points, explain the concept of string interning.
--For super bonus points, how do you safely override the equality operator for a user class?

If that's too easy, explain the difference between covariance and contravariance.
Quote:
Originally Posted by chezlaw
Never heard of them in an O-O context. You've gone past my education or experience
Quote:
Originally Posted by chezlaw
I wanted people who could think. Programming is trivial.
Okey-dokey.

You sound like a thinker, do the average thingy.
07-24-2020 , 12:35 AM
Quote:
Originally Posted by d2_e4
Lol, giving programming interviewees the monty hall problem. You must have come in your pants when they didn't get it, huh? You seem like that sort of guy.

Do you want me to set you any challenges? I've answered all of yours (quite easily), you've answered none of mine. Do you want me to give you a pirates sharing cake or a coin-weighing one? Or maybe a number theory one, you seem to like those? Or a riverboat crossing with the farmer and the wolf and the sheep? You name it chez, I got one for you.
I always like the dragons on an island who all have bue eyes but don't know the colour of their own eyes. Then someone tells them that at least one has blue eyes.

Too hard for a trainee though.
07-24-2020 , 12:36 AM
Quote:
Originally Posted by d2_e4
Lol, giving programming interviewees the monty hall problem. You must have come in your pants when they didn't get it, huh? You seem like that sort of guy.
Thanks.

I also used to ask them to tell me about the bit of the degree they found most interesting. That's a real penis raiser.
07-24-2020 , 12:39 AM
Quote:
Originally Posted by chezlaw
I remember it well thanks. that's why you got the 'otherwise'

Yes you're correct. It's a fun proof for day 1 at adult maths because we're not very used to proofs that don't find the p and q. Most did not get it. Some even when it was explained.
Minor correction - where I said "algebraic power" I meant "irrational algebraic power". Otherwise we just have rt(2)^2 which is a bit trivial. All integers are algebraic.
07-24-2020 , 12:42 AM
Quote:
Originally Posted by chezlaw
Thanks.

I also used to ask them to tell me about the bit of the degree they found most interesting. That's a real penis raiser.
I'd answer "90 or 100", the rest is left as an exercise for the interviewer.

You gonna have a go at the average thingy or not? Surely a programmer of your calibre should knock it out in no time.
07-24-2020 , 01:11 AM
Weeee! We're back.

Goofy, you're up!
07-24-2020 , 01:18 AM
bro ur SQL scripts are the sequel to some bad GUI interfaces using Visual Basic to track the killer's IP address

      
m