Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

386 Neutral

About Hnefi

  • Rank
  1. Hnefi

    Droid X, 2, or HTC Incredible?

    The thing I love most about my Droid is the keyboard. Apparently, the Droid X has no keyboard while the Droid 2 does. So, if it were me, I'd go for the Droid 2.
  2. Hnefi

    High-level sloth

    I'm going to describe an undesired phenomenon I recently discovered in myself, and am interested to hear whether others have found the same thing. I'm a C++ programmer. I've used for hobby programming for a number of years, and I use it daily at work. I like the language, but that's not what I'm writing about. What I am writing about is the realization that when I encounter some difficult problem in C++, my immediate reaction is "I can implement this!". No matter how large the task, I can envision a solution and it is usually quite exciting to try to implement it. Case in point: I once wanted to make a space game, so I started fiddling with that. Once I needed proper collision detection, I realized I didn't want to program hitboxes for every mesh, so I figured I needed to generate hitboxes from the meshes automatically. Reaction: "I can implement this!". Result: a voxelization engine which created octree's from .obj files, using them for collision detection. It worked; somewhere on my harddrive is a voxelization implementation 90% complete (there are some bugs) in a game that's about 1% complete, because after I got the voxel stuff working I got bored with the idea for the game. But I did do something cool that I learned a lot from. In contrast: Fast forward to today. I've gotten interested in Android, and am (re)learning Java while making a strategy wargame (which is proceeding quite nicely). But a few days ago I started thinking about loading levels. So I figured the built-in Android XML stuff should handle all that for me. Tried a bit. Nope. Then I realized that you can't spell Java without XML... well, sorta. So I looked at the Java XML API's. Groooaaan, booring. Switch to playing games. After a day or so, I look for some cut'n'paste code. Found nothing useful. Finally, today, I've started to look at the API's and am starting to make progress, but not until I had groaned about it to myself for a good while. The observation and point: When I work in low-level languages, I tend to take unimplemented features as a challenge and start working on them. It might not help me finish the project as a whole, but I do some cool stuff from time to time. But when I work in a high-level language and encounter the same situation, I expect the language and environment to solve it for me. When the language cannot immediately solve it in an obvious way, I get bored and start procrastinating. Is this something others are familiar with? High-level sloth?
  3. Hnefi

    Programming related books and their bad advice.....

    A good idea. Anyway, I'm dusting off the old book now, and checking through it here are the two main things I dislike - keep in mind that this means there's a whole lot of book which I don't dislike. *The chapter "Assertive Programming", specifically the part about leaving assertions on. Assertions should never, ever be left in production code - and that has nothing to do with performance, which they discuss in the book. The real reason is that when a client does something that triggers an assertion (and I've been there - I've done trips to foreign countries because of it), it may take a long time to find out what the heck that assertion actually means. Assertions are primitive and simple. They serve a useful function, but they are not a good way to terminate a program that is considered ready for commercial launch, because they demand too little information from the programmer. Unless working in a very tight embedded system (in which case assertions should be disabled in production builds anyway), use more verbose mechanics for terminal errors. And the worst chapter of them all, the one that really got me to doubt the entire book for a while: Chapter 30: Blackboards In this chapter the authors recommend using blackboards. I'll assume everyone knows what this pattern is - and it's a horrible antipattern in any non-exotic large system. I should know; I've been subjected to it professionally. The problem with the blackboard is that it is indeed very black; anyone can put anything at any time on the blackboard, and you can never really be sure who, if anyone, will be interested in that information and when. Most patterns allow you to easily follow the flow of information; not so with the blackboard. In a large system, which is where I've seen this pattern used, the blackboard can and will become a giant barrier that, once you run into it, forces you to start doing detective work to find out where the information is going. It's like the IPC barrier, but worse, because there is no real need for it. It's a horrible thing that should not be used unless there are very specific reasons for it or the project is very small. That the book argues in favour of blackboards so enthusiastically is its greatest failing, IMHO. Anyway, beside that, I dislike that they haven't updated the version control discussion to include at least SVN in the latest edition, and I also disagree with their position on simple text editors plus fifteen other small tools being superior to IDE's, but that's mostly subjective. Other than that, the book is full with good advice; it's mainly just the blackboard discussion I consider to be really bad, but it's bad enough to sink the entire book in my eyes. But to each his own, of course.
  4. Hnefi

    What books should every programmer be reading?

    Am I the only one who dislikes "Pragmatic programmer", finding it out of date and also containing some very bad advice (though also, admittedly, some very good advice)? Anyway, it might not be technically language-independent, but let me recommend Deep C Secrets by van der Linden anyway. It's entertaining and educational.
  5. Hnefi

    Monitors and HDMI. Why can't they just work?

    A few tips from someone who has had to deal with HDMI on a driver implementation level, and has cursed at length about issues related to that wonderful standard: Your monitor may be set to some weird HDMI mode that scales the picture. It's a common problem. Try setting it to "just scan" or something similar to deal with the incorrect scaling. Picture being blurred sounds very much like the PC is sending a picture at one resolution but the monitor is set to another, forcing the monitor to scale the image which they often do horribly. Another possibility is that you're watching an interlaced picture (1080i, for example). Your monitor may be able to handle 1080p25Hz, but perhaps not 50Hz or 60Hz. Try setting the refresh rate lower. You may be using a long HDMI cable. HDMI is only certified to work with cables shorter than 1.5m. Make sure your cable is HDMI certified. Sound may not work because your computer or your monitor is set to DVI mode. How to change such a setting depends on your software and/or your monitor, but DVI is essentially HDMI without sound.
  6. Hnefi

    The new "XCom" game

    Just saw the trailer (). And my first thought is, why do studios release sequels which have absolutely nothing whatsoever to do with the previous games at all? I mean, fine, it's often OK to make a game mode switch (in this case, TBS to FPS), but when they also remove the setting, the story, the enemies - heck, even the time - then why even call it a sequel? The game looks like it might be a decent shooter if they do it right, but to call it XCom was a big mistake.
  7. Hnefi

    How much life is left in C++ ?

    Quote:Original post by ValdermanHow do you propose I do the following with templates? I don't think we mean the same thing when we're talking about pattern matching. find k' (Tree k v l r) | k > k' = find k' r | k < k' = find k' l | otherwise = Just v find _ Nil = Nothing addOneIfItsThereOtherwiseZero k t = case find k t of Just x -> x + 1 _ -> 0 Ah, no, that particular syntax can't quite be expressed with templates. You can make the template automatically match any type with, say, k, v, l, r members, but you can't catch the base case; giving it a type without any of those members will result in a compile time error. Quote:Tail calls aren't an optimization but a language feature, and are therefore useless unless the language guarantees that they will compile into loops. Tail calls are a pure optimization. It makes no difference to the programmer if his final recursive call is converted to a loop or not except efficiency and stack space. A recursion that is optimized to a loop in Scheme will still produce the same output in Common Lisp, only slower. Quote:So basically, every Turing complete language has every feature because you can implement it yourself? Not at all. If you have to invoke an additional layer of indirection to produce the feature I'd say it's not supported by the language. The reason I say that is because at that point you could design a new language and build an interpreter for that language in the original language and achieve pretty much whatever features you want. But that's not the case with garbage collection in C++. C++ offers everything you need to implement garbing directly in your programs, without any additional abstractions. All you need to do, very simply speaking, is specify a heap via placement new and provide an algorithm for when and how things should be freed and allocated on that heap. C++ doesn't come with a finished garber, but it also doesn't come with an A* algorithm; it doesn't mean such things are not supported. Contrast garbing with something like reflection. Garbing in C++ requires no jumping through hoops; just placement new and specifying a behaviour for allocations and deallocations on your own heap. But I know of no way to get reflection in C++ without building an entire type system on top of what already exists in the language and then using that instead of C++'s native system. This makes me consider C++ a language which does not support reflection. Quote:That's nice, I didn't know about that. Is said type inference guaranteed to always infer the most general type? I don't know; I haven't dug deeply into C++0x yet. Quote:You're completely missing the point though; languages are different, that's just the way it is. If a language had every single feature there is, it'd be a useless hodgepodge where you couldn't even use the entire language if you wanted to write code that anyone could read and understand. I wasn't actually responding to or making any particular point. I just wanted to correct what I saw as a few misunderstandings of C++.
  8. Hnefi

    How much life is left in C++ ?

    Quote:Original post by ValdermanWhy can't I have pattern matching You can, with templates. Quote:tail recursion You can, if your compiler supports it. Nothing in the language prevents it, AFAIK. Quote:garbage collection You can; although it's not a core part of the language, it gives you everything you need to implement it. The same can't be said about languages missing operator overloading or pointer arithmetic. Quote:or type inference You can, but not until C++0x is released.
  9. Quote:Original post by owlI just want to clarify that I'm anti-Hamas. As long as Hamas controls palestine, I'm afraid I'm going to have to be pro-Israel. You know, it's perfectly possible to be both anti Hamas and anti the Israel government at the same time. Heck, if it weren't for all the civilian casualties, I wouldn't mind them going at each other for all they're worth.
  10. Quote:Original post by way2lazy2care Quote:Original post by Hnefi Yes you did, when you labelled part of the cargo as "contraband" - because the part of the cargo labelled "contraband" by Israel is indeed cement. I used contraband as it is defined in the Helsinki Princibles of the law in neutrality. Nowhere in the Helsinki principles does it say anything about cement. Cement is considered contraband according to you only because Israel has decided to call it that. By the same line of argument as you're presenting, the ridiculous scenario with the Swedish navy vs German cement vessel I posted earlier becomes valid. That's the sort of logic you're using. Quote:they certainly did! see my posts that quote the Helsinki principles and the San Remo Manual on International Law Applicable to Armed Conflicts at Sea. All your arguments about the Helsinki principles show is that you haven't understood those principles properly. As I demonstrated, Israel is not a belligerent nation by the definition given by those principles, so those articles do not apply. Other articles only mention waters of neutral nations; on international waters, non-belligerent nations are not allowed, according to the Helsinki principles, to board neutral vessels. All legal experts that I've seen speaking on the matter agree with this. Quote:They had every right to at least search the ships, which had every intention of going through the blockade. Not as long as it was on international waters. Quote:"118. In exercising their legal rights in an international armed conflict at sea, belligerent warships and military aircraft have a right to visit and search merchant vessels outside neutral waters where there are reasonable grounds for suspecting that they are subject to capture." But Israel is not formally at war with any other nation, so they are not a belligerent state, which means that article does not apply. Quote:grants them the right to search in international waters as the vessel had made their intentions clear. Learn to read. But by now, I realize you're just trolling, so I'll probably stop responding to you - at least until you've actually produced something of substance.
  11. Quote:Original post by owl Quote:Original post by Hnefi Quote:I have also shown that they were transporting a lot more than cement. No, you haven't. You've shown videos with smoke and violence. Nowhere have you shown that any weapons used, besides blunt objects, were not brought and used by the Israeli commandos. I'm afraid he did. I even quoted a video he posted in wich you can clearly see they were in fact transporting weapons, lots of weapons. All right, so I was wrong about that; so they had knives, blunt objects and fireworks. Bottles of lighting fluid as well, but then, every gasoline-powered vehicle carries those implicitly. But none of those objects are contraband.
  12. Quote:Original post by way2lazy2carehow does my argument correlate to that? If you watch the videos, they are all using paintball guns. If they were being attacked with deadly force and had handguns, don't you think they would have used them? They did use them, according to some reports; but information regarding what happened the first few minutes when they boarded is sketchy and unreliable, at best. Either way, you're still talking in circles; if the soldiers were unarmed, why send them instead of negotiators instead? And if one was armed, why not all of them? And either way, what does it matter? Quote:Watch the videos please. Oh, I have. And yes, the civilians sure use force. But hitting someone who's clad in helmet and body armor with a stick is not at all likely to kill them, and indeed, nobody did die except at the hands of the Israelites. Given these two facts, the civilians didn't use lethal force by any reasonable definition of the word. Quote:I never argued the legality of transporting cement. Yes you did, when you labelled part of the cargo as "contraband" - because the part of the cargo labelled "contraband" by Israel is indeed cement. Quote:I have also shown that they were transporting a lot more than cement. No, you haven't. You've shown videos with smoke and violence. Nowhere have you shown that any weapons used, besides blunt objects, were not brought and used by the Israeli commandos. But all this is getting tiresome. All you do is drop arguments about the real issue which you've been unable to refute: that Israel had no authority whatsoever to board these ships on international water in the first place. What happened after that is secondary, because the whole situation is to be blamed on Israel due to them boarding these ships in the location and manner that they did. That's the problem, and that's why so many governments are blaming Israel for this.
  13. Quote:Original post by way2lazy2care Quote:Original post by Hnefi So why were they carrying one handgun? Why didn't either all of them or none of them carry these weapons? And again, it doesn't matter anyway; it's the surrounding circumstances that are the main problem here. why do police officers carry handguns in the united states? They rarely use them, but they still carry them in case shit hits the fan. So? By your argument, all of the soldiers should have been carrying handguns, which was most likely the case. Your argument that only one soldier had a handgun is a laughable example of buying Israeli propaganda hook, line and sinker. Quote:your point hinged on them using non-lethal force, which is clearly false.Oh? Who did the civilians kill? Nobody? So how was the force they used lethal? Quote:how so? I don't think Israel broke the law at all. I've stated why in this thread. Arguing that transporting cement on international waters is illegal while boarding a cement-carrying vessel and killing part of its crew is legal is a huge and obvious example of a double standard. By your argument, it would be perfectly legal for, say, the Swedish navy to board and commandeer a German ship carrying cement anywhere on the worlds ocean, provided that Sweden first declared cement to be contraband and the ocean to be a "Swedish security zone". It's ridiculous, and it's what you're arguing for.
  14. Quote:Original post by way2lazy2care Hamas isn't a terrorist organization. It's the majority leader in the Palestinian parliament. Now you're going straight against what Israel says. Hamas is branded as a terrorist organization by, among others, the EU, the USA and Israel. Furthermore, this "parliament" you are referring to is not part of an actual state. There is no nation of Palestine, so there's no nation lead by Hamas for Israel to be at war with. Thus, my point stands - Israel is not formally at war, therefore not a "belligerent nation" as defined by the Helsinki principles, and therefore the regulations pertaining to belligerent nations do not currently apply to Israel. If you're so well-versed in international law, you would have known this from the start. Quote:yes... because it's true. They were a non-lethal boarding force. So why were they carrying one handgun? Why didn't either all of them or none of them carry these weapons? And again, it doesn't matter anyway; it's the surrounding circumstances that are the main problem here. Quote:Quote:Why does it matter anyway? In the end, the Israelis killed about a dozen civilians who did nothing other than defend their ship with nonlethal force, which Israeli soldiers boarded on international waters. you didn't watch any of the videos did you? Watch them and get back to me. You get even one person swinging a metal pole at you like a baseball bat and that's definitely lethal. let alone his two friends coming at you with knives. Which does absolutely nothing to detract from the point I made. Quote:Hey man. Contraband is contraband. A "well they only broke the law a little bit" defense should never hold up. Really? Then why do you use that very defense in favour of Israel? A rather obvious double standard, don't you think? Quote:Let it be known, I am not taking sides in the blockade or the overall Israeli/Palestinian/Gaza conflict. Given the facts of the conflict, Israel was well within their rights to board the boats in the flotilla. Funny that not a single (non-Israeli) diplomat, government or recognized expert in international law seems to agree with you on that.
  15. Quote:Original post by way2lazy2care Quote:Original post by Hnefi Ah yes - except that Israel declares itself to be at peace, not war, which disqualifies it as a belligerent state, thus making the above rule inapplicable. Try again. no it doesn't. Israel is at war with Hamas. Hamas is not the government of a nation. You can't be legally at war with a terrorist organization - hence all that mumble about "enemy combatants", remember? No, Israel is formally at peace, even if it doesn't do much to act that way. Or perhaps you can name the nation with which Israel is at war? Quote:not hand guns. A single hand gun. I don't know how much ammo your hand gun carries, but I doubt it's 50 bullets. And I seriously doubt that matters when you are being beaten and stabbed. Oh come on, that's such BS. 10 soldiers shared a single handgun? You really believe that? Why does it matter anyway? In the end, the Israelis killed about a dozen civilians who did nothing other than defend their ship with nonlethal force, which Israeli soldiers boarded on international waters. Quote:oh yea... that's a great idea. Then instead of trained soldiers they'll have an untrained more valuable hostage. According to you, the soldiers were unarmed and outmatched anyway, so what difference would it have made in that regard? Furthermore, you're not really so naive as to believe a negotiator would have been taken hostage, are you? This boat was not actually filled with terrorists; just civilians, among them former members of various parliaments, nobel laureates and physicians. Even if - and that's a flippin' enormous if - some of the crew members would have wanted to hold such a negotiator hostage, it would not have gone over well with the majority of the crew on these boats. And finally, if such a thing, despite its ridiculousness, would have happened, it would have been a major PR victory for Israel. Quote:1. Building materials are considered contraband by Israel after Hamas repeatedly used them to build fortified bunkers rather than build houses for their people. Are you for real? You support Israels declaration of cement as contraband? Quote:2. hundreds of slingshots, hundreds of knives, and firebombs. According to what source? And seriously, what kind of contraband is that? SLINGSHOTS? Oh yeah, Hamas are going to raze the wall with slingshots, knives and bottles of lighting fluid. Listen to your own arguments, man. Just read them out loud to yourself, and think them over.
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!