Member

249

290 Neutral

• Rank
Member
1. ## Anyone heard of codility? (Automated Programming Assessment)

Quote:Original post by Sneftel EDIT: I think I actually prefer crusadingknight's approach, since it doesn't involve any special-casing for the last iteration. Actually, after seeing yours it occurred to me that the approaches could be combined to simplify things further: def equi(A): total = sum(A) accum = 0 for idx in range(len(A)): if accum == total - accum - A[idx]: return idx accum += A[idx] return -1
2. ## Anyone heard of codility? (Automated Programming Assessment)

Quote:Original post by AndrewBC HM, now I feel like I'm missing out on something. How were you able to figure it up so quickly? Do you have any hints for ignoramus I? I was just about to PM you, but since you asked: def equi(A): totals = list() accum = 0 for element in A: totals.append(accum) accum += element for idx in range(0, len(A)): if totals[idx] == accum - totals[idx] - A[idx]: return idx return -1 I don't think there's any secret to it, just that it takes lots of practice to develop the ability to rapidly condense a problem down to the simplest solution.
3. ## Negative rating

Quote:Original post by AndyEsser I personally think that people shouldn't be able to be rated up/down in the lounge. This is a place for personal opinion. Your rating is here to serve as an indication as to how helpful/knowledgeable someone is. There personal opinion on sports, politics, homosexuality, or red hair shouldn't negate the fact they might be the best programmer on the planet. It's not so much about the type of personal opinions espoused as it is about using poor (third-hand or worse) sources and abandoning logic for rhetoric in discussions of preference - this just happens to be a tendency I've often seen carry over to non-lounge forums as well. It doesn't matter how good of a programmer one is if one prefers to make things up and refer people to poor sources rather than point them to accurate information and base one's posts on a suitable background of knowledge; misleading data is misleading data no matter who posts it. [Edited by - crusadingknight on September 13, 2009 1:31:09 PM]

14. ## What does it mean to be a nerd?

Perhaps honesty isn't always the best policy, I would have thought the 4.33 (maximum) GPA, present task of obtaining a B. Eng. in SE, experience with *nix, and knowledge of chemistry would have factored into that a bit more. Oddly enough, despite answering the same way I did the last time I took the test, my score is significantly lower, which seems to indicate that either a) lots of people with high scores commonly re-do the test, b) it's become more popular on specialist forums than it was before, or c) the internet (or even the entire developed world) is becoming nerdier. In any case, there are so many negative connotations for nerds presented in that wikipedia article that I would have to say that I don't know any people who fit the entirety of the bill presented there, and have met few that even fit half of those stereotypes. In fact, the word nerd has always seemed to me as something other people labelled you with, or you label yourself with. It's about a easy to define as 'hoser': you can collect a bunch of characteristics that such a person my have, but most people you attempt to apply it to may have only a large enough subset that you can label them as such without ever being able to empirically 'prove' that the term properly describes them. [Edited by - crusadingknight on January 23, 2009 2:20:21 PM]
15. ## D [programming language]!?

Quote:Original post by ToohrVyk The language has been around for a long time and despite its advantages has failed to become popular. It won't die unless all its fans get bored or run over by a bus, but if it had what it takes to become a mainstream language—a mix of elegance, brutality, power and luck—then it would have taken off by now, and I don't really see what could happen that could change anything now. I'd have to beg to differ. The D language (with the Tango runtime) shows promise and may have what it takes to become popular, but the lack of implementation is a killer: few platforms are supported by the reference implementation, and no implementation AFAIK has ever passed the full suite of regression tests. I doubt this will change any time soon, as even the reimplementation projects inherit many of the quirks of DMD by reusing the frontend in their own projects. All told, I check out the language every year or so to see if progress has been made, but the language I'd like to use is still beset with the implementation quirks I'd rather avoid. [Edited by - crusadingknight on January 10, 2009 11:14:13 AM]