Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
sarehu
Apr 20, 2007

(call/cc call/cc)

quote:

Is from academia that wants to leave for industry.
Comments on the contents of our trash bin and proceeds to sort through it and remove items he considers recyclable.
(Is from Berkeley.)

quote:

Is interviewing for position as documentation writer.
Brings in his own keyboard, has trouble writing documentation because the key for some letter like 'C' was missing.
I'd previously seen this man's penis on the internet.

Adbot
ADBOT LOVES YOU

sarehu
Apr 20, 2007

(call/cc call/cc)
You're wrongly assuming the ropes burn at the same rate in each direction. :colbert:

sarehu
Apr 20, 2007

(call/cc call/cc)
You can measure fifteen minutes by lighting a rope at both ends and the middle, and then each time one side burns out light the middle of the other side. You only need to do this countably many times before the rope is extinguished.

sarehu
Apr 20, 2007

(call/cc call/cc)
That's already a very good answer.

Anyway, another story. I went interviewing and they asked me to write up my solution to finding the biggest palindromic substring on a computer, one with (lol) a CRT display. Okay, it was 2008. Anyway, I mention it shouldn't be a problem, as long as I can change the keyboard layout to Dvorak. Then while doing the task, a few cubicles over I hear the interviewer whispering, making fun of me to a coworker for using Dvorak.

I mean, if Dvorak were missing a 'C' key, I'd understand!

I then got a job at a place that didn't have all its systems written in Perl.

sarehu
Apr 20, 2007

(call/cc call/cc)

CPColin posted:

2) interviewing people is a good skill to put on resumes,

You know what, I never thought of that.

sarehu
Apr 20, 2007

(call/cc call/cc)

baquerd posted:

All things considered equal, I would expect women to perform as well as men, with some generalizations towards gender-specific strengths (such as communication skills) and weaknesses (such as assertiveness).

And math ability.

sarehu
Apr 20, 2007

(call/cc call/cc)

leper khan posted:

I hate to dredge it up, but there's a closed form expression for the nth Fibonacci number so recursion or iteration are clearly the wrong thing to use.

How do you compute the closed form expression without recursion or iteration?

And without a gigantic logarithms table.

sarehu
Apr 20, 2007

(call/cc call/cc)
You can just note that the sum of the first n odd numbers is n^2 and say "print two hundred fifty thousand."

sarehu
Apr 20, 2007

(call/cc call/cc)

PT6A posted:

I'd penalize any solution that didn't use the fact that the sum of the first n odd numbers is n^2. You can easily pick up on the pattern by summing the first four odd numbers, so it's not like it's some obscure fact you need to memorize, and any developer should check for such obvious patterns before doing things in the most obvious possible way.

I, like, have a history of being unnecessarily aware of stupid math tricks, and even I never noticed this rule until I was explicitly told about it, in or after college. I mean seriously if you know your arithmetic sequences you'll get the closed form solution and simplify it to n^2 anyway, but... it's not something where an educated person would even bother looking for a pattern! You already know the pattern will be quadratic growth, and it coming out to n^2 exactly is unfathomable luck. So the thought process is more like, okay, to sum the series I need to multiply how many elements there are times their average value, and... that's (n/2)(n/2), thus 1M/4, thus 250K. Or it's like, I know sum{k=1 to n}(k) = n(n+1)/2, therefore, I've got sum{k=1 to n}(a + bk) = an + sum{k=1 to n}(bk) = an + b*sum{k=1 to n}(k) = an + b*(n(n+1)/2). Which thereby simplifies to n^2 (when a=-1, b=2).

sarehu
Apr 20, 2007

(call/cc call/cc)
Here's a hint: you can make an implementation for 64-bit numbers that uses the plus sign 6 times. And you can make one for 32-bit numbers that uses the plus sign 5 times.

sarehu
Apr 20, 2007

(call/cc call/cc)

magnetic posted:

me: No I really don't see myself as a manager at Oracle.

A well-timed neg, bro, you signaled you aren't a cuck. (Am I doing this right?)

sarehu
Apr 20, 2007

(call/cc call/cc)
Or (I don't know Django) the filter is O(log n) or O(1) but you're still doing 10 million roundtrips?

sarehu fucked around with this message at 05:49 on Jul 15, 2016

sarehu
Apr 20, 2007

(call/cc call/cc)
If somebody has a 2.0 GPA you can guarantee they're retarded, the curve representing the probability you'd hire somebody given GPA starts out flat at 4.0 but it does tail downward at some point.

sarehu
Apr 20, 2007

(call/cc call/cc)
"Indices." :colbert:

And the right answer to the question is to say that you've heard it before, if you have. And then if they want you to solve it anyway, just give them the best answer. Get it over with so you have more time with the next question.

And if you fake reasoning through it I'll think you're a phony.

sarehu
Apr 20, 2007

(call/cc call/cc)
I'd think an imperative solution would be acceptable.

sarehu
Apr 20, 2007

(call/cc call/cc)
I interviewed somebody senior once and, being new, decided to overlook the use of a hashtable<int,T> where the ints were clearly contiguous in [0,n) and an array would be perfectly good. Now I know: It's not okay for code to have that old person smell. If you can't remember basic coding stuff then you don't have the memory capacity to take advantage of the experience that you have.

sarehu
Apr 20, 2007

(call/cc call/cc)
Notably the standard also implies when describing exception unwinding that the object isn't "initialized" until after the constructor body has finished. I didn't find a place that explicitly said that, but I didn't look exhaustively.

Imagine what happens if you call delete this in a constructor and then throw an exception after that.

Adbot
ADBOT LOVES YOU

sarehu
Apr 20, 2007

(call/cc call/cc)

ToxicSlurpee posted:

The thing of it is, though, how much actual programming relies on people knowing bizarre trivia like that?

Like, I definitely needed to have been able to know to question whether calling "delete this" from a constructor might be a terrible idea, because that's a plausible thing that makes sense to do, if not for exceptions and the possibility that you aren't the bottommost subclass. I've done it from a member function of course, and reasoning through whether it works from a const member function is just trivia about whether you deleting a pointer to const object in general will compile.

Of course there's other gotchyas like virtual destructors, the rule of three, explicit constructors, exception safety, and C gotchyas, that are more mundane stuff that you have to know.

  • Locked thread