Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

290 Neutral

About crusadingknight

  • Rank
  1. crusadingknight

    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. crusadingknight

    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. crusadingknight

    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]
  4. crusadingknight

    Mac OS X: Way better than I expected

    Quote:Original post by pointer Quote:Original post by Lode However that failed in all ways. There was no binary build of Wine available for Mac. There is; I think it's called CrossOver Office. I've used it to play Steam games. CrossOver Mac is a proprietary software suite built off of wine (which runs about $40, although there is a trial version available), so it isn't quite the same thing. On the other hand, MacPorts / fink often has a recent version of (dar)wine available, so it should be possible to just install either and grab a binary that way.
  5. crusadingknight

    What do you think about PERFORCE (something like SVN)?

    Quote:Original post by quasar3d Yep, distributed systems are really great, but they are pretty much useless on reprositories that also contain the art, as it always copies the full history locally, and art resources generally can't be diffed very well, so your full history will be *huge* I'm not really here to advocate for or against perforce, but I'd like to point out that the current generation of DVCS (git, mercurial, etc.) can handle binary deltas just fine, unless the format you're using retains little common data after incremental updates due to whole-file compression or some such feature. [Edited by - crusadingknight on April 2, 2009 8:25:23 AM]
  6. crusadingknight

    linux thread.... (inspired by gimp thread)

    Quote:Original post by phantom You know what, the fact that linux doesn't have hibernate support never even occured to me; it's been a feature on windows for so long I kinda assumed they had it as well. I assume Linux supports 'low power sleep'? (My machine can come back from that state to login in around 3 or 4 seconds). You'd have thought in this Green age having support for such things would be important to goverments; I mean you don't want to leave your machines running all night, and sure you could shut down but why when hiberate is faster to recover from and keeps your session in one piece? Linux has (and has had for a long time) both hibernate and suspend-to-ram support for most hardware (for as long as I've been using it, which is a while), though there is the occasional driver that doesn't properly support the kernel freezer. The best use case I can think of for session management is on thin clients, for which hibernating is less of an option. Quote:A lot of the purchase price for Windows is support. And thus, MS is quick about fixing security holes with the OS before most of the general public even knows about it. What happens if some gapping hole in the Linux kernel is found? Are goverments supposed to just sit there with their ass blowing in the wind until somebody decides to fix it out of good will? And do you really want all your personal info held on a computer that has an open source OS? Security is the silliest thing to fault Linux or any notable modern operating system on. It's got fairly major support backing from Red Hat, Novell and IBM, not to mention most kernel developers wouldn't be content to sit around with an unpatched hole in the kernel anyway. If it's good enough for Google and the NSA, the security is probably acceptable, especially with a MAC solution like SELinux. Quote:if you have millions of peoples info on Linux computers you are basically giving the hacker a key to get in. We call them servers. [wink] A sizeable portion of them already run on linux. @Promit: Yeah, that's got to be pretty embarrassing for the GNOME team, and it's a pretty inexplicable decision to make. Worse is the example of Evolution (a GNOME application, for crying out loud) not even supporting it - one has to wonder whether the session management team made the decision to drop the XSMP without telling anyone. The distributors seem to be working around it for the most part by trying to ship session components from gnome-2.22 though.
  7. crusadingknight

    Operating system feature request: hibernate a process

    Quote:Original post by Iftah Anyway, what do you think? can it be done? Yes (CryoPID), definitely (a list of checkpointing software, though not necessarily all implemented independently of the application, or limited to a single process). Note that the CryoPID software itself is a user-level process (on Linux), and not an OS-level construct; while some OS support is necessary for this type of feature, it doesn't necessarily need to be specialized to the level of specifically being designed for saving a process to disk. Note: For CryoPID, the actual maintained implementation is available at http://sourceforge.net/projects/cryopid2, though most of the information is at the link I posted. It makes a decent example, though you also may have difficulties should you try building it on a recent kernel/distro as some of the exported facilities it used have gone AWOL. [Edited by - crusadingknight on March 1, 2009 10:20:08 AM]
  8. crusadingknight

    U.N. banning religious criticism

    Quote:Original post by LessBread Perhaps the vote on the 24th was for a draft version and the vote on the 18th was for a final version. I haven't been able to find a record of that specific vote, but I have found confirmation that the General Assembly met on the 18th of December 2008. Well, I managed to find it. It looks like the draft resolution was adopted as-is, except that somewhere between proposing the resolution and adopting it a comma appears to have ended up inside of the adjective clause, rendering it "resulting from defamation of religions, and incitement to religious hatred in general" which obfuscates the meaning. Of course, even if (?) this renders it "Urges all States to provide, within their respective legal and constitutional systems, adequate protection against ... incitement to religious hatred in general", this still makes it subject to the existing legal / constitutional system, a state's discretion of how much protection is "adequate", and what constitutes "incitement to religious hatred in general". Quote:As for what you've uncovered about the specifics of the resolution, I'm not surprised that it's much more reasonable than how those seeking to stir up fear and hatred would portray it. It requires political correctness and extreme amounts of weasel words to pass anything through the UN General Assembly; the text of this resolution itself which was amended to mention "irregular" instead of "illegal" immigrants. "Reasonable" is only the first requirement to have a chance to pass the General Assembly.
  9. crusadingknight

    U.N. banning religious criticism

    Quote:Original post by LessBread Soeren Kern doesn't even mention the United Nations in that op-ed. Here's commentary specific to the resolution. The cost of criticizing jihadists: UN resolution is part of Islamic muzzle (February 9, 2009) According to the Hentoff commentary that I linked to above, the resolution is non-binding: "The resolution urges U.N. members to take state action against (punish) "defamation of religion" and "incitement to religious hatred" caused by defamation." That's a far cry from the "new U.N. laws" found in the question in the OP, and that gap illustrates the dangers of relying on fear mongers for information. I'm not sure what's going on, but that resolution ("Combating defamation of religions" A/C.3/63/L.22/Rev.1) is listed in the UN records as being passed November 24th, while the article lists the date of passing as December 18th. Further, while the article discusses state action against the "defamation of religion" in general, the actual resolution only Quote:Urges all States to provide, within their respective legal and constitutional systems, adequate protection against acts of hatred, discrimination, intimidation and coercion resulting from defamation of religions and incitement to religious hatred in general, to take all possible measures to promote tolerance and respect for all religions and beliefs and the understanding of their value systems and to complement legal systems with intellectual and moral strategies to combat religious hatred and intolerance; The only term in which could be interpreted as a muzzle which is "protection against acts of hatred", which in most countries is limited to harassment or violence. All told, the urged action is already completely covered by the legal systems of most first and second world countries anyway, though I can understand how a quick read-through could fail to note the italicized section as being the adjective clause. However, the resolution does include a section Quote:Stressing that defamation of religions is a serious affront to human dignity leading to the illicit restriction of the freedom of religion of their adherents and incitement to religious hatred and violence, Stressing also the need to effectively combat defamation of all religions, and incitement to religious hatred in general, which isn't even as "binding" as a section urging action, but rather reflects the opinion of those members involved in drafting the resolution. Likely, the OIC realized that including these items as more than an opinion would have led the resolution to fail.
  10. crusadingknight

    U.N. banning religious criticism

    Quote:Original post by BeanDog Quote: But Holland is not the only European country at war with the exercise of free speech. In Austria, for example, Member of Parliament Susanne Winter was convicted for the “crime” of saying that “in today’s system” the Prophet Muhammad would be considered a “child molester,” referring to his marriage to a six-year-old child. She was also convicted for “incitement” for warning that Austria faces an “Islamic immigration tsunami.” This is an example of what I mentioned earlier. Saying that "in today's system Muhammad would be considered a child molester" is perhaps inappropriate for a member of Parliament, but not hate speech against Muslims. But warning that an "Islamic immigration tsunami" is coming and should be avoided is clearly a racist statement (attacking the people, not their creed). There's more reason for the incitement charge than just those two comments. From http://www.spiegel.de/international/europe/0,1518,528549,00.html : Quote:Susanne Winter, a right-wing politician with the FPÖ party running for a city council seat in the city of Graz, blasted Muslims on Sunday, saying that "in today's system" the Prophet Muhammad would be considered a "child molester," apparently referring to his marriage to a six-year-old child. She also said that it is time for Islam to be "thrown back where it came from, behind the Mediterranean." Not yet finished, she also claimed that Muhammad wrote the Koran in "epileptic fits." In an interview with the daily Österreich published on Monday, Winter continued the onslaught saying that child abuse is "widespread" among Muslim men and that Graz is facing a "tsunami of Muslim immigration." In 20 or 30 years, she warned, half of Austria's population would be Muslim.
  11. crusadingknight

    why is python good again?

    Quote:Original post by Washu You need to take a class in requirements writing. You specify that we are to output true or false dependant upon some "expected result" however you have not specified what the comparison criteria is that will result in a true or a false. Your "expected results" file merely consists of the names of the columns (tests) in each file. I believe it's an extension of Zahlman's specification with the input format altered, so that the expected results are a list of students sorted from highest average mark to lowest, and the actual program result is a whether the computed results are in the same order as the expected results.
  12. crusadingknight

    why is python good again?

    Quote:Original post by grekster Of course that is the wrong way to use map, making your example kinda pointless. Agreed on the map. In the case of the javascript implementation, I think I would have used a fold idiom: function totalCostOfManagers(emps) { return fold(emps, 0, function(employee, total) { return total + ((employee.isManager) ? employee.salary : 0); }) } Don't quote me on the exact syntax though, since my javascript is a bit rusty, though I do know for a fact fold has been implemented by JS programmers before. PS: I may have to edit this, as the addition sign is missing from the preview for reasons unknown.
  13. crusadingknight

    Software Usability

    Quote:Original post by ukdeveloper When it comes to usability on the whole, open source really needs to get its house in order. The amount of open source programs that I've used which look like something the cat sicked up and have more complicated controls than helicopters is really quite astounding. Well, Gnome has the opposite problem. "Oh, you want to use OpenDNS over your wireless network because the local ISP's DNS server has been up and down a lot lately? Too bad, I won't provide an interface, and will _block you from using resolv.conf to work around this manually_." It's bad enough when a GUI lacks a common enough feature that I have to fall back to editing configuration files, but it's even worse when it assumes control of the only alternative interface without even a documented workaround to be found. Quote:Original post by ukdeveloper Blender anyone? I personally think (don't flame me for this) is that the open source community is made up primarily of geeks and nerds who go for flashy technical points, fancy algorithms and advanced features as opposed to actually imagining the software from the user's point of view. Actually, Blender's interface dates to its days as commercial software, when it was even then horrifically complicated for 2002. Blender became open source when the company which sold it went under (surprise, surprise), a fact which leads me to my next point: what really differentiates commercial software and software with available source is that commercial software tends to be abandoned or die due to market forces should the interface suck, while open source projects only tend to die when contributing becomes sufficiently hard or there is no perceived value in the product. Unfortunately, as we all know, there is no real correlation between ease of contribution and ease of use, so quite a few quirks can be ignored in favour of feature X while it remains difficult to get a series of patches to overhaul the interface accepted. Of course, for a personal counter-example, contrast just about any existing spreadsheet (open source, freeware, or commercial) with the monstrosity of AgExpert Analyst, the specialist application for managing farm finances. This 'time-saving solution' was capable of turning a 2h / week job into one requiring a full-time person to do data entry for all of the irrelevant and redundant information. Not to mention that even to set up an account in AEA requires you to watch an hours-long DVD about the program's workflow. After about $400 for the application and several dozen hours into attempting to migrate, we've gone back to using Excel spreadsheets and formulas (though the featureset used is extremely basic, so it's interchangeable with OOo and even Lotus Smartsuite _'97_.) Anyway, AEA ranting aside, here's a brief postscript regarding the GIMP issue: Out of cursiosity I attempted to perform the task described by BeanDog in the GIMP, despite the fact that I have absolutely no knowledge of, love for, or connection to the program. I was able to make a rectangle with a gradient in about three minutes by creating an image of the dimensions I wanted the rectangle to be in and selecting the whole image, clicking the 'fill with gradient' tool, choosing the colours I wanted the gradient to consist of, and clicking and dragging on the image to select the direction to graduate from / to. In fact, most of my time was spent struggling to make the colour picker work, as the RGB values didn't seem to update along with the hue values in the GTK color selector which seemed more counterintuitive to me. Unfortunately IANAA, so for all I know this could be the standard behaviour for colour tools. [Edited by - crusadingknight on January 25, 2009 3:19:19 PM]
  14. crusadingknight

    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. crusadingknight

    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]
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!