Slashdot Mirror


User: joggle

joggle's activity in the archive.

Stories
0
Comments
1,206
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1,206

  1. Re:OK, going to attack the source on Gulf Gusher Worst Case Scenario · · Score: 4, Insightful

    I don't blame you, especially with quotes like this from TFA:

    The biggest cost of the spill cleanup is being borne by the US Armed Forces such as the National Guard etc. None of these costs will ever be paid by BP. These costs will appear in taxes not in the price of oil. Alternative Oil is vastly cheaper and safer than this.

    How the heck would he know how much the Coast Guard is spending on this? How does he know BP will never reimburse the federal government?

    Also, what's up with his use of capitalization? Since when is natural gas a proper noun? Or alternative oil?

  2. Re:Maybe I'm missing something on Exam Board Deletes C and PHP From CompSci A-Levels · · Score: 1

    You can still stumble onto much of this information without learning it in a class. If you have an application that is making many mallocs the performance hit can show up on a log generated by valgrind (for example).

    The article makes several good points. In addition, in C++ you can use placement operator new to make fewer uses of malloc. Of course, you would only use it if you really needed to.

    In Linux you can also use your own malloc rather than the standard one (using a command like: LD_PRELOAD=mymalloc.so myapp). For one of the high-performance apps I've written I use jemalloc (the same malloc used by Firefox).

  3. Re:Maybe I'm missing something on Exam Board Deletes C and PHP From CompSci A-Levels · · Score: 1

    I wouldn't use multi-threading without a specific reason to do so. It is extremely useful in many situations, but it also adds a whole new universe of potential bugs to your program that you don't need to worry about in a single-threaded application (such as race conditions and deadlocks).

  4. Re:A word to the wise: on Ultrasound As a Male Contraceptive · · Score: 1

    He could be or perhaps not--if you go long enough without sex and have any sort of sex drive at all you aren't going to generally have a positive attitude towards your partner.

    Women divorce men due to lack of sex as well.

    Who in the world wants to get married and then never have sex again?

    However, if he loves her at all I'd recommend trying marriage counseling first. There's various treatable psychological disorders that cause low libido and similar behavior.

  5. Re:About time on Defense Chief Urges Big Cuts In Military Spending · · Score: 1

    The things I listed can't be built overnight by anyone in the world. The things they are designed to be used against also cannot be built overnight. We aren't going to suddenly need 11 aircraft carriers.

    It takes about 10 years to build an aircraft carrier, assuming you have the resources to do so in the first place. Out of the entire world there are probably only 6-8 countries that can build one and none, other than the US, could support 11. Soon China may be able to start, but they still have a long way to go considering they've never had a substantial navy.

    We do need linguists and I believe we should fund that. If we simply cut a single aircraft carrier from the fleet we'd have enough money to pay for plenty of linguists in various languages for years.

  6. Re:About time on Defense Chief Urges Big Cuts In Military Spending · · Score: 1

    One thing the government does share with businesses is the need to prioritize projects. Money can be used to train translators, educate the military in foreign languages, recruit spies, etc. It also can be spent on spy drones, satellites and other similar military assets.

    There are many brilliant people working for the NSA. However, they now have so much information that it is difficult to filter out the important information from the information that isn't important. Algorithms can only get you so far after all.

    What we really need is more human intelligence in the field and that isn't going to happen without a concerted, well-funded effort on our part.

  7. Re:About time on Defense Chief Urges Big Cuts In Military Spending · · Score: 1

    And what future enemy would require 11 (or more) carriers, stealth bombers, etc.? These ships and other military resources have limited shelf lives--if they aren't needed within the next 10-20 years they simply shouldn't be built.

    Russia is still having enormous financial and corruption problems. China has a massive standing army but no navy and couldn't really do anything more than what Russia did during the Cold War (since an outright attack would debilitate their economy).

    North Korea? They too have a large standing army--one that barely has enough food to function. They have no air defense or advanced offensive weapons that could threaten our jets. They have some missiles, but ours are much more advanced and they have absolutely no missile defense.

    Iran? Even though they should theoretically have plenty of money from oil their theocracy has pretty much driven their country into the ground over the past 30 years. They can't even refine their own oil to produce gasoline. Sure, they may be able to build a nuke soon but what can they do with it? They sure as heck don't have any ICBMs that could carry it to the US and Israel's army is more than capable of dealing with Iran.

  8. Re:Anything but Vim, please on Hacking Vim 7.2 · · Score: 1

    Thanks! I will use that feature a lot I'm sure.

  9. Re:Anything but Vim, please on Hacking Vim 7.2 · · Score: 1

    It's primarily best as a code editor. It has syntax highlighting support for many different language, probably more than any other text editor other than Emacs.

    It is extremely fast at doing search and replaces, both of which can be quite complicated (although using a bastardized version of RegEx that requires a lot of backslashes to do anything complicated). It also provides a ridiculous amount of control over cursor position via keyboard commands which can certainly increase your efficiency at editing code (since you rarely need to take your hands off the keyboard to move the mouse).

    One ideal use of vi is to quickly write some similar code (such as copy constructors). Simply write the initialization of variables once, copy this from the default constructor to the copy constructor and equal operator, do a couple of search and replaces then you're done. I can't imagine doing it quicker in any other editor.

    The only feature it lacks that an editor like Visual Studio provides is refactoring. You can effectively do it for a single file, but across multiple files it wouldn't be as easy as it would be using Visual Studio. It also doesn't provide good support for auto-completion (yes, there are plugins but I've never seen one that works as well as the one in Visual Studio).

  10. Re:About time on Defense Chief Urges Big Cuts In Military Spending · · Score: 1

    And we have an enormous supply of conventional arms that do not rely on multi-billion dollar jets or aircraft carriers.

    It's basically inconceivable that a country that could threaten our defense with their own military might would attack us directly due to mutually assured destruction (most likely physical as well as economic destruction).

    We could be involved in countless skirmishes with various countries which have minimal governments, but for that we simply do not need dozens of stealth bombers/jets and a dozen aircraft carriers.

  11. Re:About time on Defense Chief Urges Big Cuts In Military Spending · · Score: 1

    I would think our enormous arsenal of nuclear and conventional weapons (some of which are as powerful as small nuclear bombs) would be a sufficient deterrent for any country that has an air force.

  12. Re:About time on Defense Chief Urges Big Cuts In Military Spending · · Score: 4, Insightful

    Sure defense is a priority. But why do we need to spend so many billions on stealth jets when our number one enemy is planting IODs and have absolutely no air defense? Why do we need to have more aircraft carriers than the rest of the world combined when nobody offers anything close to a serious threat to our naval forces? Why do we need so many bases around the world when we effectively have mobile bases (carriers) that we can send virtually anywhere?

    We can do a hell of a lot more with a billion dollars spent on intelligence than a billion dollars spent on a jet. But a billion dollars spent on intelligence won't provide nice, high-paying jobs in dozens of congressional districts. Building a jet will so it will always get the higher priority.

    Note: The US currently has 11 carriers and is building more. Russia has one functional carrier. China bought an antiquated one from Russia and turned it into a casino but may be building two of its own. France has one as does Spain. The next largest fleet of carriers in the world after the US? The UK with 3 old carriers.

  13. Re:Maintenance on Underwater Ocean Kites To Harvest Tidal Energy · · Score: 1

    Yes, but a much smaller problem. The very great majority of life in the sea (by biomass) is within a hundred feet or so of the surface.

    You still need an energy source for life--so long as they install this deep enough so that there is no visible light and no thermal vents are nearby maintenance due to life growing on it shouldn't be too bad. However, there are other factors, such as the acidity of the water and sediment accumulation that will have to be dealt with.

  14. Re:Don't worry BP ... on How Bad Is the Gulf Coast Oil Spill? · · Score: 1

    Well, in the case of Katrina there was a short-term shortage of fuel due to active offshore oil rigs being shutdown and evacuated before the storm and damage that occurred to some refineries after the storm which also caused a drop in supply.

  15. Re:Don't worry BP ... on How Bad Is the Gulf Coast Oil Spill? · · Score: 1

    The oil from this rig wasn't being sold yet so this has no effect on the current oil supply. It is causing a delay in additional US offshore production, but that's a very long-term issue, not an immediate one.

  16. Re:Gotta love... on Extremists Warn South Park Creators Over Muhammad In a Bear Suit · · Score: 1

    Many of the countries in the Middle East are controlled by dictators or the equivalent of dictators. Doesn't seem to work so 'well' for them.

  17. Re:Gotta love... on Extremists Warn South Park Creators Over Muhammad In a Bear Suit · · Score: 4, Insightful

    So? China had to make the same rapid transition and yet there's nary a Chinese terrorist to be found. Their most polluted city today didn't even have a single coal factory plant 30 years ago.

  18. Re:-1 False Assumption on Red-Light Camera Ticket Revenue and Short Yellows · · Score: 1

    I once was nearly in an accident in the same situation. I had been waiting for an opening to turn left but my view was blocked by cars turning left from oncoming traffic. Once the light turned yellow a car in the right lane slowed to a stop, so I turned left. However, just as I was turning left I could see a car in the left lane that floored it to make the light (the car had been blocked from my view until I turned). Fortunately I was able to speed up enough to not get hit, but it was very close.

    A cop witnessed this and pulled me over, giving me a warning. According to him I should have waited until I could see that all cars had stopped in the oncoming traffic, even if cars were running red lights. He said it was perfectly legal to remain in the intersection after the light turned red until it is finally safe to turn.

  19. Re:Depends on the location on Red-Light Camera Ticket Revenue and Short Yellows · · Score: 2, Insightful

    Where in the world is it illegal to enter an intersection with a yellow light? What if you're going the speed limit (40mph) and just before you enter the intersection the light turns yellow? It would be impossible to stop and if you slammed on your breaks the guy behind you would probably run right into you.

  20. Re:I see lousy coders.... everywhere on How To Find Bad Programmers · · Score: 1

    Err, scoped locks that is (something like Qt's QMutexLocker: http://doc.trolltech.com/4.6/qmutexlocker.html).

  21. Re:I see lousy coders.... everywhere on How To Find Bad Programmers · · Score: 1

    This is also great for avoiding deadlocks in multi-threaded code. I love using scoped mutexes since they are guaranteed to become unlocked even if an exception is thrown (thanks to the nifty destructor).

  22. Re:I see lousy coders.... everywhere on How To Find Bad Programmers · · Score: 1

    I'm going off of the C++ Programming Language, third edition by Bjarne Stroustrup (page 234):

    By definition, a struct is a class in which members are by default public; that is,

    struct s { ...

    is simply shorthand for

    class s { public: ...

    It's been this way for a very long time, at least since I started programming in C++ in the late 90s (the book I cited was published in '97).

  23. Re:I see lousy coders.... everywhere on How To Find Bad Programmers · · Score: 1

    OK, then explaining the difference between a C and C++ struct would do that. In the process I could also point out something that some very good C++ programmers I've known weren't aware of--the difference between a C++ struct and a C++ class (a C++ struct simply is a class with members default to public--that's the only difference).

  24. Re:I see lousy coders.... everywhere on How To Find Bad Programmers · · Score: 1

    That's one of those questions where I may get lost in the details. I've written a lot of 'pure' C code and plenty of C++ code over the years and am very familiar with the differences between C and C++. I could go into style differences (such as setting null pointers in C to 'NULL' rather than setting them to '0' in C++), or trivial, antiquated differences (such as C-style comments vs. C++ comments), syntax differences (such as the difference between a C-style struct and a C++-style struct), or the enormous number of additions to the C language by C++ (such as the various C++ cast operators, classes, templates, polymorphism, being able to declare variables at locations other than the beginning of a block, etc) which would nearly turn into a ad-hoc lecture of the C++ language (considering how C is such a small part of the C++ language spec). Or I could go into even more arcane differences such as the difference between C-style linking and C++-style linking and explain why 'extern "C" {}' must be used when including C headers (unless those headers already have it of course), or try to recall the differences between malloc() and new().

    To keep it from spiraling into a ridiculously long answer, what would be the most appropriate response? Focus on details that may show that you are fully aware of the differences between C and C++ (like the difference between C and C++ structs)? Or try to give a high-level overview listing some of the major additions by C++ to C (such as classes and more type safety)? Or maybe explain why you would use C rather than C++ (or visa-versa)?

  25. Re:Largest Nuclear Disaster? on What Chernobyl Looks Like In 2010 · · Score: 1

    The war wasn't going to end until the Japanese surrendered. The Japanese government was actively preparing the population for an invasion and were still pumping them with propaganda leading them to believe that they could still win the war.

    There were secret negotiations going on for weeks prior to the bombing but the Japanese would not agree to an unconditional surrender. Even after the first nuclear bomb they would not agree to an unconditional surrender.

    The Japanese government at the time couldn't have cared less about their civilian population--they were hoping the US would invade so that they could cause enormous casualties for their enemy (regardless of how many civilians died as a result). They were basically nuts and nothing less than a full invasion or two nuclear bombs could convince them to finally give up.

    I know many Japanese people, having worked with some for 10 years. None of them begrudge us for nuking them or firebombing their capital city, rather they remember how we helped them tremendously after the war to rebuild their country. We also didn't inflame the situation by trying their emperor as a war criminal, which would have surely caused much public anger.

    I have yet to hear a credible strategy that would have resulted in fewer casualties on both sides. There's ample evidence that the Japanese civilians would have rather killed themselves than surrender to the US forces (based on what occurred on several islands occupied by the Japanese). Can you imagine how many would have died had we invaded (on both sides)?