Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Note: You can take 10% off all Slashdot Deals with coupon code "slashdot10off." ×

Comment Re:No generics (Score 1) 221

C++ is only a large language if you are looking to implement something very generic, like the STL. If you're just using a library like the STL, it is not large. In fact it is quite a small library, in terms of surface area, and all of the "advanced" language stuff is there for the library implementers to squeeze the last bits of performance out of a generic library.

The C++ devs you've worked with you claim are "the best" probably are the ones trying to use C++ as C with classes or learned C++ from university that teaches even pre-1998 C++. In modern C++, the "strict subset" is about letting the compiler do the work (through RAII, algorithms and type deduction), rather than the C subset of C++. That is what it means to "know" C++.

Comment Re:JAVA FTW (Score 1) 457

Yes, runtime errors that are environmental cannot be caught at compile time. But many other runtime errors are the result of design errors - designs that lead to more possible mistakes. When given a bit of thought, you can make those errors get flagged at compile time.

For example, the classic criticism of C++'s resource management. C++ doesn't have those problems if people used the RAII that's provided by default. You don't need to analyze for leaks or null pointers if those cost-free features (which are also semantic signals) are used. And by leaks, even stuff like managing database resources can be taken care of by RAII, leading to reduced environmental errors that may lead to things like duplicate primary keys being created.

Static analysis tools are okay if it comes to snippets of code changes, but can't tell you much about design flaws. I too often see people making local changes to "fix" the error when they should have given more thought about reorganizing even just the code of that function a bit. The other thing that is popular these days in C++ are generic algorithms. The properties of generic algorithms are known, including the elimination of most range errors. Static analysis doesn't tell you that you should replace your hand-crafted for loop (or thread synchronization) to use a more suitable higher level construct. In Java, that may as well be a good thing, since high level implies efficiency cost in a way C++ generic high level constructs don't.

Comment Re:JAVA FTW (Score 1) 457

I'm currently writing something using Javascript and WebGL. I spent a lot of time actually writing code. But "actually writing code" doesn't make me more productive. I think there's a tendency to conflate productivity with writing code. Certainly, the relationship between writing code and testing/debugging code is also forgotten. I find using templates (and their errors) eliminates the need for a lot of tests, especially those surrounding polymorphic aspects of design. I don't have to run the program in debug and step through if I can get the compiler to do that for me.

Comment Re:Poppycock! (Score 3, Interesting) 77

Where do you get the idea that Sunzi was fixated on the idea of armies controlled by a single entity? He explicitly states, in one instance, that the generals on the field can disobey a prince. Sunzi's idea of war was about coordination of multiple entities each doing their own thing to win a war.

And I contest that contexts are dramatically different. The contexts for tactics may be different, but overall strategies are still the same. Identify weak spots while hide or disguise your own. Borrow your enemies resources to attack them. Usage of spies. etc etc. The main reason why Sunzi was opposed to protracted warfare was the cost to the citizens. If what you say is true, that costs in cyberwarfare are negligible, then that concern of Sunzi doesn't apply. However, given how much money has to be spent on something like the NSA and still be completely ineffective, then your critique is wrong and the concern of protracted warfare does apply and the strategies to suit.

Comment Re:Know thyself... (Score 3, Interesting) 77

The "knowing yourself" part is to know your own security vulnerabilities, capabilities etc. Knowing your enemy's dirty laundry is fine only if they don't know yours. The essence of that Sunzi quote is about winning decisively at little to no cost to yourself. Winning a hundred battles is hard if you have nothing to fight with after the first battle, and knowing where you stand (and that you can stand) after any number of battles is key.

Comment Re:Frozen (Score 1) 79

"Is it round" is even worse because it doesn't explain anything. And no, that wasn't their goal. The goal was to actually define what a planet means, because there wasn't one, and the discovery of more Kuiper belt objects meant the word was becoming meaningless.

And no, it doesn't ignore extrasolar planets or wandering planets. They'll get a category of their own when we find them. Like how adding the word "dwarf" to Pluto-class objects. There is absolutely NO trouble to add the word "extrasolar", for example, to denote the new category. It is simply not a problem. Adding an extra word as a qualifier has never been a problem. The world isn't going to end.

"We learn from history that we learn nothing from history." -- George Bernard Shaw