| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Next » |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:20
•
by
C-Octothorpe
|
No, I was taking a jab at you because, like most everyone else here, you're an ass. It just seems silly to call someone an ass when you're clearly one yourself (pot, kettle, black, etc.). boog is an ass, but at least he's funny, you just throw a tantrum... |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:21
•
by
you know who
(unregistered)
|
|
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:22
•
by
kilroo
|
...This wasn't by any chance a situation where there were a whole lot of different views for converting different combinations of attributes into columns, and there was code for redefining the views programmatically if something changed, and each view actually existed three times...once joined with test data and twice for two different kinds of production data? |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:24
•
by
Fat
(unregistered)
|
|
http://ideone.com/tLLki
The game is called "find the difference". Perhaps, you will help me? Or, maybe, someone else? Anyone? |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:32
•
by
you know who
(unregistered)
|
Here. I'm done. http://www.dreamincode.net/code/snippet6172.htm |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:36
•
by
boog
|
You have to admit I have a pretty unique way of misunderstanding things, in that my earlier comment completely misunderstood your consequent reply to it. Hint: Time travel is necessary. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:39
•
by
Fat
(unregistered)
|
|
What does this have to do with your code? This is valid and working code, as far as I see. Yours is not.
If you don't see the difference between this code and yours, then I hope you're trolling. I'd lose faith in humanity if I found out that someone can be as retarded as you appear to be. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:40
•
by
you know who
(unregistered)
|
True, we are asses. Apparently we're also both hypocritical about throwing tantrums. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:41
•
by
you know who
(unregistered)
|
IHBT apparently. That's were I got the idea. I tried to edit it for some reason. Then were was alot of talking to you that I regret. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:43
•
by
C-Octothorpe
|
Again, you're wrong... I'm far too immature to throw a tantrum. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:49
•
by
boog
|
Indeed, I've said nothing to demonstrate an understanding of computational complexity. How you'd therefore assume I have no such understanding seems to indicate a poor understanding of logic on your part. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:51
•
by
boog
|
You must be new to this site. Look through the archives; there are 7 years worth of examples of people as retarded as he appears to be. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 14:59
•
by
boog
|
I'd like to think that I only ever act like an ass to people who deserve it. Yes, I'm quite sure I'd like to think that. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 15:00
•
by
Fat
(unregistered)
|
|
I always thought there wes a big deal of exaggeration in these stories.
I guess, being in academia for a long time really changed my opinion about people. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 15:17
•
by
you know who
(unregistered)
|
Now that's painful. I'd never heard of a constant-time way to compute a Fibonacci number before and when I saw you say something about finding one in logarithmic time, I thought, "I'll do you one better - look at this". Just posting the link might have worked better. I'll remember that for next time. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 15:30
•
by
C-Octothorpe
|
My bad; I didn't read before I posted. Allow me to rephrase: boog *can* be an ass... :) |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 15:38
•
by
boog
|
No, you were right the first time. I just didn't properly emphasize in my reply: FTFM |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 16:11
•
by
xoonyzyz
(unregistered)
|
Ahem. He's a MULE. Not a donkey. The donkey is a miscarriaged freeze-dried FEMALE fetus with eye sockets emptied and enlarged. Thank you very much. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 16:13
•
by
xoonyzyz
(unregistered)
|
|
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 16:36
•
by
the zune system
(unregistered)
|
How can you guys stand to take[color=white] it in the ass yourselves so seriously? |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-22 21:18
•
by
The Web is the Root of All Info
(unregistered)
|
There's two parts to the answer: 1. Since this is Java, the solution should use the 'StringBuilder' class as 'String's are immutable when created. So _each_ time the given solution recurses, at least _another_ copy of the supplied String is created. This makes the supplied solution O(n^2) in memory. 2. Using StringBuilder allows the adjustment of individual characters in-place, so you could create a for loop that travels along 1/2 of the string, swapping the character at the current position with the character at [total string length minus the current position] |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-23 05:18
•
by
Mr Java
(unregistered)
|
Of course, one could always be boring and just use StringBuilder.reverse(). |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-23 09:08
•
by
hikari
|
Yeah, but you can at least just write an extension method in C# |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-23 16:14
•
by
Don L
(unregistered)
|
|
I once assisted our Manager of the Support Division in evaluating candidates' technical skills. While the manager was present at the interviews, I'd ask all sorts of questions.
Quite often, the manager ignored my recommendations, even though I could pinpoint all the candidate's errors. Equally often, he sacked the hired candidate after 3 months for not being good enough. Sigh. Once, they hired a guy without the necessary skills just because he'd been a sharpshooter in the Army. The HR manager was an ex army guy, too. |
WTFs in start-ups and meta-database again
2011-07-23 20:34
•
by
someone
(unregistered)
|
|
I remember being a part of a German start-up because it was the only company with an English environment which was still hiring. The English was with such a strong German accent, that I could barely understand. What's worse, all tasks were specified in Mantis using grammatically illogical and incomplete sentences. The boss hated explaining anything that was clear to him, and the rest of the stuff was my job to find out. You cannot imagine how bad their codebase was. I refused to work with their code and offered working on new modules and new CMS only. That way I got immediately 20% lower salary for refusing to work with their code. Never minds, it was still 100% more than the average salary in my country. One of the pearls they were so proud about was exactly the same stupid thing as described in this article; database tables stored as ordinary data inside a MyISAM DB. Their code was so bad that with every request for new functionality, the company would rewrite the whole CMS module. The code was simply write-only. No matter how many times they rewrote it, it never came to their mind this is now how you develop software. I've seen so many bad start-ups, and only one which was a good one.
|
Re: WTFs in start-ups and meta-database again
2011-07-23 20:36
•
by
someone
(unregistered)
|
|
s/this is now how you develop software/this is *NOT* how you develop software
|
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-24 04:51
•
by
Matt Westwood
|
I once failed to bag a sweet internal promotion because I'm not a soccer fan. After everything went tits-up in that department I discussed this with the guy whose responsibility it had been to make that decision. He had to agree with me that it had been the worst mistake of his career. Sometimes management skills are things you have to learn through trial and error. Wisdom comes with age. And it takes a particularly cool head to deliberately *not* select a person to whom you've (unwisely, perhaps even drunkenly) promised a position when encountering him in a social situation. Apparently most positions are filled via the "network" rather than the formal interview process. Whether this is on the whole a good or a bad thing is debatable, but it may be more worthwhile cultivating social contacts than relying on job adverts and agencies. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-24 07:34
•
by
Anonymous
(unregistered)
|
I know I'm days late on this thread, but this thread is full of posts talking about the memory usage here incorrectly... substring in Java shares the char[] buffer from the parent string, so there's no copying involved. In fact, that's one of the reasons that the strings are immutable. Yes, this solution uses a bunch of memory, but it uses it coming up out of the recursion, not going down it. The + operator is the issue, not the substring call.
|
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-25 03:53
•
by
Jesper
(unregistered)
|
|
The real WTF: Calling that Java method a function on a senior Java developer test.
|
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-25 05:34
•
by
The Poop... of DOOM
(unregistered)
|
Back in the two-weeks student job I did software testing for hospital software, I had a similar thing. I followed the test scenario and created a bug report for every bug found. Same with inconsistencies in the GUI (which was specified to check for in the intro text of the test scenario). One day, the main developer came in to tell me to stop filing so many bugs, cause he had to close them all. Not fix them all, just close them all. Must be some pretty dangerous hospitals, running on such a buggy OR scheduling software... |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-25 06:37
•
by
QJo
(unregistered)
|
<irony> We had a QA person like that. I propped her up in front of my lovely application that I knew was completely bug-free (I wrote it, it must have been) and she came back to me with page after page of all sorts of things wrong: stackdumps, incorrect messages, pages being misdirected, 404s so help me. It turned out she had been pressing buttons and entering stuff I hadn't specifically told her to, just *randomly* pretending to be an awkward customer! </irony> |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-25 07:08
•
by
c
(unregistered)
|
|
Hm, so how come after Tim had been rejected that guy got to have 2 more free lunches? It was clear the other two would be hired no matter what.
|
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-25 13:36
•
by
blarg
(unregistered)
|
and it sounds like were using the "I'm-not-going-to-ask-which-number,-maybe-it-is-47" approach |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-25 15:37
•
by
drummerp
(unregistered)
|
See, I usually had recursion explained through the use of factorials. That's a pretty simple example of recursion. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-27 08:55
•
by
Mikkel
(unregistered)
|
Thanks for pointing that out, I missed it as well and came to the comments for an explanation because I only saw it as an endless loop :-) |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-27 17:16
•
by
Satanicpuppy
|
I always find it amusing that people test on recursion, when recursion has very little place in the real world. I worked a lot in SCHEME when I was younger, and SCHEME is very friendly to recursion. And recursion is so fricking *pretty*. It's very elegant. But usually you have to document it so thoroughly that it's not worth not doing it iteratively. It also hogs memory dramatically compared to iteration, and even seasoned coders have to stop and scratch their heads for a minute. The last time I seriously used recursion was in school. I wrote a program on an exam. The paper provided was almost two pages, and my recursion worked in 3 *lines*. I was so proud of myself when I turned it in. I got full credit, but the prof took the opportunity provided to write a massive diatribe about it in the remaining space. Told me that if he'd seen it in the real world, he'd have fired me, and that if he saw it on another exam, I'd only get half credit. It's a lesson I took to heart, and to this day, I can count the number of legitimate uses of recursion I've seen in other peoples code on one hand. On the other hand, I can't count the number of times I've seen it used for obfuscation. That being the case, I'd recommend you make harder, less recursive tests. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-07-31 07:47
•
by
Anonymous Coder
(unregistered)
|
Sorry, the divide by 2 at the end also needs to be power of n:
Alternatively, it can be merged into termOne and termTwo:
I don't understand why others choose to endlessly bicker rather than pointing out this simple fact. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-08-01 08:39
•
by
roman_mir@hotmail.com
(unregistered)
|
|
Retail software package I am building uses plenty of recursion to optimize tree like data structures in memory, before they are cached and reused.
|
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-08-02 22:09
•
by
christianshoes
(unregistered)
|
|
Woman High Heels are one of the most adored form of footwear ever, whether you love them of hate them, because of their such extreme variety and diversity by shpae, colour and look, they are always popular by so many women and girls.
|
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-08-11 10:38
•
by
Bryan
(unregistered)
|
|
They may HAVE implemented the solution from "Wrong Answer." I was at a Code Camp recently where a speaker gave a presentation about doing EXACTLY this. He'd apparently built a library to do it.
|
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-08-16 20:26
•
by
Zenlogix
(unregistered)
|
|
To the interview question: Would have said that it's cool, a recursive function. basically, it takes a string as parameter and return it unchanged if null or less then 2 characters or shuffles thing around and well could create an infinite loop. Im a PHB
|
Replying to old thread in the absence of a new WTF
2011-09-29 16:52
•
by
PedanticCurmudgeon
|
NOTE: untested as I don't have Haskell on my work machine. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-10-04 23:45
•
by
The Lord of Cheese
(unregistered)
|
|
they had fired the QA group for repeatedly rejecting Charles' and Terry's high quality work. Talk about firing the messenger!
Hey! I had that happen! I was the entire QA group for UPMC ISG. Norman Kulinski (sp? I don't remember) is a moron project manager. |
Re: Three for Three, Recursion Threads, and Wrong Answer
2011-10-28 12:33
•
by
François DELBOUVE
(unregistered)
|
|
The CMS eZpublish uses this kind of antipattern :
http://doc.ez.no/schemadoc-450/tables/ezcontentclass_attribute.html Easier to upgrade (structure never change) ? but a nightmare for DBA and programmers... |
Re: Three for Three, Recursion Threads, and Wrong Answer
2012-09-07 13:20
•
by
Lymia
(unregistered)
|
recursion n. If you don't get it already, see recursion. |
| « Prev | Page 1 | Page 2 | Page 3 | Page 4 | Page 5 | Next » |