 |
|
 |
Edbert P wrote: It's ironic that people are attracted to Christian teachings but mostly repelled by the Christians. Ironic insofar as it's sad. It's also completely natural given how most Christians act towards most non-Christians. For people whose religion is based on forgiveness and love, the majority of us can be the most judgemental, hateful, biggotted people I've ever seen.
Once you wanted revolution Now you're the institution How's it feel to be the man?
|
|
|
|
 |
|
 |
Edbert P wrote: It's ironic that people are attracted to Christian teachings but mostly repelled by the Christians.
That's probably because Christian teachings often have more value to non-Christians than the very often hypocritical so-called Christians that choose to ignore them.
|
|
|
|
 |
|
 |
Edbert P wrote: Following God does NOT guarantee a blissful life.
Another way of saying that is, God promised us a safe landing, not a smooth ride.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
 |
|
 |
Edbert P wrote: And does God back out when people don't want Him? I don't think so, He'd chase them even more
(2 Chronicles 7:14) If my people, which are called, by my name, shall humble themselves, and pray, and seek my face, and turn from their wicked ways;, then will I hear from heaven, and will forgive their sin, and will heal their land.
Edbert P wrote: Remember the parables of the lost coin and the lost sheep and how happy the person who found them back?
Yes, and remember too of all the book of Jonah? In the end the Nineveh was not destroyed...
Edbert P wrote: God is here for the beggars, murderers, rapists, homos, cheaters, and all sorts of people you don't want to be in most churches, even atheists. He'd be much more ecstatic seeing one of them get saved than you and me who are Christians already.
Hey, do you readed all Luke 15 cap? The younger boy is one son, like me and you
Jesus is Love! Tell to someone! 
|
|
|
|
 |
|
 |
GOD is like Santa Claus[^]... he doesn't exist.
 Alvaro
If [God] knows what we are going to do then we have no free will and are just characters in a play written by him. Without free will, morality for humans makes no sense. Without free will and morality, any sort of punishment or reward system loses any justification. Heaven and hell would be places where [God] could watch the souls he created, predestined just for eternal happiness or agony. - Mark Thomas
|
|
|
|
 |
|
 |
God is like drugs... everyone else's doing them, so why don't you?
|
|
|
|
 |
|
 |
Had an interview over the phone today. Totally bunged the question. They asked for a test to check if a number is a power of 2 and I answered it as a test to see if it was divisible by 2! Should have been (x && !(x & (x - 1))). What a dolt I be! I was so nervous I messed up other simple ones too.
Needless to say I didn't get the job failing the technical questions.
Anyone have other mixed up interview questions?
Jeremy Pemberton-Pigott A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation Quote by: Jeremy Pemberton-PigottNew Dawn Engineering
|
|
|
|
 |
|
 |
Fuzzychaos wrote: Should have been (x && !(x & (x - 1))).
x % 2 == 0 is probably what they were expecting.
Good luck! Alvaro
If [God] knows what we are going to do then we have no free will and are just characters in a play written by him. Without free will, morality for humans makes no sense. Without free will and morality, any sort of punishment or reward system loses any justification. Heaven and hell would be places where [God] could watch the souls he created, predestined just for eternal happiness or agony. - Mark Thomas
|
|
|
|
 |
|
 |
Alvaro Mendez wrote: x % 2 == 0 is probably what they were expecting.

How will that help determine if a number is a power of 2? Powers of 2 are 1,2,4,8,16,32...
|
|
|
|
 |
|
 |
Nishant Sivakumar wrote: How will that help determine if a number is a power of 2? Powers of 2 are 1,2,4,8,16,32...
Oops, perhaps he meant multiple of 2. At least, that's what I understood.
Alvaro
If [God] knows what we are going to do then we have no free will and are just characters in a play written by him. Without free will, morality for humans makes no sense. Without free will and morality, any sort of punishment or reward system loses any justification. Heaven and hell would be places where [God] could watch the souls he created, predestined just for eternal happiness or agony. - Mark Thomas
|
|
|
|
 |
|
 |
The interviewer meant POWER of 2 ie..1,2,4,8,16,32
and i believe, (((x&(x-1))+1)==2*x) is the right answer.... coz any power of 2 will be of the form 00001000.... and x-1 will of form 00000111.... Now when we do x&(x-1)...ie. bitwise and we get 00001000... 00000111... ------------ 00001111...
whichh is 1 less than 0001000 ...(x*2)
|
|
|
|
 |
|
|
 |
|
 |
I think you meant (x-1)...
But there is another way:
x&(~(x-1))==x
00001000... = x 00000111... = x-1 11111000... = ~(x-1) 00001000... = x&(~(x-1))
This should work even if x = 2 (...0000001) or x = (1000000...)
Mikon Dosogne
|
|
|
|
 |
|
 |
How about this:
x&(x-1)==0
|
|
|
|
 |
|
 |
Even better!
But did you google the answer?
|
|
|
|
 |
|
|
 |
|
 |
Actually that was my answer, which was of course wrong
Jeremy Pemberton-Pigott A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation Quote by: Jeremy Pemberton-PigottNew Dawn Engineering
|
|
|
|
 |
|
 |
Fuzzychaos wrote: Should have been (x && !(x & (x - 1))).
I wouldn't have gotten that either. I'll have to remember it.
|
|
|
|
 |
|
 |
If that is of some comfort to you: I screwed up a simple binary search in an interview once.
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
|
|
|
|
 |
|
 |
Most people do. I saw something recently about how most binary search implementations don't work if the start and end pointers are above 2GB in memory. Normally the algorithm finds the mid-point by adding start and end together, then dividing by 2 - if the start and end pointers are above 2GB, you get an integer overflow and the 'mid point' ends up right down near address 0. This doesn't work very well.
Most of us will still be fine on Win32 because it's hard to get a user-mode pointer above 2GB. You can only do it by booting with the /3GB switch (on OSs which support it) and linking the executable with /LARGEADDRESSAWARE.
|
|
|
|
 |
|
 |
Fuzzychaos wrote: They asked for a test to check if a number is a power of 2
My answer would have been, why are you testing to see if a number is a power of 2?
Fuzzychaos wrote: Anyone have other mixed up interview questions?
I think, anyone that asks me to interview, I would say, "um, thanks, but I'd rather interview YOU and YOUR programmers" which I've done, not explicitly, but most people don't know how to interview, and it is SO easy to get them to talk about themselves. And programmers of course love to complain, so the "what do you like about this job, and what do you hate about it" is an awesome interviewee question. 
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
 |
|
 |
So true!
Jeremy Pemberton-Pigott A programmer with a dream can accomplish anything. So, start by implementing your castle in the clouds and then working on its interface to a foundation Quote by: Jeremy Pemberton-PigottNew Dawn Engineering
|
|
|
|
 |
|
 |
Marc Clifton wrote: My answer would have been, why are you testing to see if a number is a power of 2? Easy, for mathematical factorization like Mersenne primes. You change your algorithm if it is a power of two +/-1.
"I know which side I want to win regardless of how many wrongs they have to commit to achieve it." - Stan Shannon
Web - Blog - RSS - Math - LinkedIn
|
|
|
|
 |
|
 |
Strangely, I'm not in the habit of doing that every day as a programmer.
(If you happen to be programming strong cryptographic key generation and wish to check that the key you generated is strong enough to withstand easy factorization, then go ahead. I'll use CryptoAPI where someone else has already written it.)
|
|
|
|
 |
|
 |
I agree... Ive been writing both production and shrink wrap code for over 11 years and I have always looked up anything that I didnt know. Why memorize something that you may never use?
I'd rather have a developer on my team that has a good attitude, understands the business problems that they are trying to solve and knows where to look when they dont know the answer to a quetsion...
Jake-
|
|
|
|
 |