426 reputation
26
bio website
location
age
visits member for 3 years, 10 months
seen Jul 3 at 1:33

Mar
20
awarded  Yearling
Feb
26
awarded  Caucus
Oct
9
awarded  Nice Answer
Aug
7
comment Monkey Hunter algorithm - Interview question
@Rig - I agree with you, but the question as posed is essentially unanswerable. My guess is that the interviewer simply wanted to see if Estefany could do a simple inductive proof -- take it from a base case of one tree, one shot and work up from there. The question, as far as I can tell, requires a one-dimensional line of trees if you want to guarantee the monkey's death.
Aug
6
comment Monkey Hunter algorithm - Interview question
@MartinStettner - That's true. You'd actually need to adapt the number of shots at a given tree to the number of trees left to shoot. If you're on the third-to-last tree, three shots will ensure the monkey is either dead or cycling between the two safe trees. Two shots into the second-to-last tree will ensure the monkey's death.
Aug
6
comment Monkey Hunter algorithm - Interview question
You could eliminate this possibility by shooting each tree twice as you sweep left, giving you a worst case of O(2n). EDIT: <ahem> ...that is, a worst case of O(2n-1). You don't need to shoot the last tree twice.
Aug
6
comment Monkey Hunter algorithm - Interview question
Not really. If you shoot at tree k, and the monkey is sitting in k+1, then the monkey could jump into three k when you fire at k+1. There's no guarantee of hitting the monkey this way.
Jun
12
comment I'm doing 90% maintenance and 10% development, is this normal?
@ScottWhitlock - It happened to me once. I was asked to make changes to a fairly complex codebase. Halfway through my task I realized that the code was at a level of clean I'd rarely seen. Responsibilities were clearly defined, the logic was easy to navigate. The coder who wrote it had gone the extra mile to make her system maintainable. As a result, my fix took about half the time I was expecting. I promptly went to management and sang that coder's praises, told them she was a better programmer than she had been given credit for, etc.
May
21
awarded  Editor
May
21
revised Why did the Haskell committee choose monads to represent I/O?
deleted 3 characters in body
May
21
answered Why did the Haskell committee choose monads to represent I/O?
Apr
23
awarded  Yearling
Mar
29
comment How to deal with tautology in comments?
@RexKerr - Personally, I feel the way to deal with tautology is self-explanatory, pretty much by definition. Besides, the first rule of tautology club is the first rule of tautology club.
Feb
13
comment Can I advance my career in the USA if I lack local networking?
@PeterK. - NAFTA only applies if the OP came to the US from Canada or Mexico. Otherwise, he's under the much more restrictive H1B program, which requires a company to sponsor his stay in the US.
Jan
31
comment Are there any downsides or problems with Haskell?
@AndresF. - I wouldn't go so far as to say "less useful," but here are some areas where Haskell is definitely still showing its infancy: 1) heavy DP -- I coded up a simple knapsack algorithm, and was literally shocked at how slow it was. That was using boxed arrays, so I expected some overhead, but it was a lot worse than I anticipated. 2) large non-trivial games -- AFRP is in its infancy, so there are no particularly good frameworks, and performance is still too difficult to predict. It will be a long time before we see the Haskell version of Doom. (frag doesn't count -- it has no AI.)
Jan
13
comment Is Javascript a Functional Programming Language
Even more interesting than monads, you can implement arrows is JS (cs.umd.edu/projects/PL/arrowlets). Now, as to why anyone would want arrows in JavaScript, that's an open question. But it can be done.
Nov
9
answered what is the purpose of arrows?
Jul
8
comment Is outsourcing (offshoring) disloyal?
@Richard DesLonde - There's a factor in your ethical calculus that really needs to be made explicit. Are you offshoring locally-available skillsets simply to drive down costs, or because you genuinely can't find the skills you need? If it's the latter, then loyalty is no longer an issue. Also, remember to factor in cultural issues like PDI: lessonsoffailure.com/developers/real-reason-outsourcing-fails
Jul
8
comment Is outsourcing (offshoring) disloyal?
Considering that tuition at my undergraduate institution currently runs about $38,000 US, Canadian University tuition certainly seems free by comparison, even at approx. $5,000 CAN per year. statcan.gc.ca/daily-quotidien/100916/dq100916a-eng.htm
Jul
8
awarded  Teacher