Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:What a bunch of pansies (Score 4, Informative) 409

Ebola is only contagious when the symptoms are present , NOT during the incubation period. The symptoms of Ebola are pretty pronounced, so if you see someone projectile vomiting and bleeding from their eyeballs, steer clear, but otherwise you should be alright. From the WHO Ebola FAQ:

The incubation period, or the time interval from infection to onset of symptoms, is from 2 to 21 days. The patients become contagious once they begin to show symptoms. They are not contagious during the incubation period.

Comment Re:Your Results Will Vary (Score 3, Informative) 241

I think part of the problem is that "programming" is itself so diverse. If you were to be a graphics programmer, you would certainly need your linear algebra, geometry, etc. If you worked with scientific computing, you'd need even more math (e.g. differential equations, statistics, etc). If you worked as a DSP programmer, you'd need to know calculus (and then some). In contrast, web development doesn't really require any of these. However, they all involve "programming", and the people writing the software can all be called "programmers", even if one's writing a website (no math) and another is doing a fluid dynamics simulation (lots of math).

Comment Re:Freedom of Expression... (Score 1) 424

I was in Paris just last week. There were no "locked down" monuments, and there were no armed personnel patrolling the streets. There were some military-types at the Arc De Triomphe, but that's because of Bastille Day celebration preparations -- that is, they were there for a celebration, not for a patrolling. You're spouting nonsense.

Comment Re:C strikes out again (Score 2) 127

Or... if you're using C++, use a Standard Library container? They all keep track of their sizes, and can perform runtime bounds checks (by using say, at() rather than the bracket operator). Or Write your own class with an array member and an accessor that does bounds checking. It's not difficult to do. At all. And templates aren't meant for addressing buffer overflow problems, or as a replacement for raw pointer (use STL containers). Or garbage collection (use RAII). I get the feeling you aren't too familiar with C++?

Comment Re:Something else? (Score 1) 172

Take a look at "The art and science of programming" by Donald Knuth, it's examples are in Pascal but if you inhale the wisdom in the book you will understand when I say that the language it uses is irrelevant.

Just in case this confuses the submitter, the actual title is "The Art of Computer Programming". And IIRC the code examples aren't in Pascal, but rather in "MIX" assembly, which is a hypothetical language for a hypothetical machine. Also, be forewarned that it has a steep learning curve...

Comment Re:Back in the day I did a lot of c++ (Score 1) 435

Not sure if I'm missing the joke here (if so, apologies), but just because the book title is "Exceptional C++" doesn't mean the whole thing is about exceptions.

Exceptions are covered for a few chapters in that book, but some of the recommendations aren't really relevant anymore; C++11 deprecated many of the problematic parts of exceptions (e.g. exception specifications), and much like valarrays, no one really used them anyways

Comment Re: 1M lines? Really? (Score 1) 435

My normal rules of thumb are: - No operator overloading, especially type casts. - Templates are mostly used for container classes, or in rare cases algorithms. - Spare use of method/function overloading. - Try to use template parameters that are themselves of as simple of a type as is practical.

Some operators shouldn't be overloaded (e.g. &, && and ||), but good luck writing any non-trivial container classes without overloading the assignment operator. You may think you're not overloading these, but the compiler is simply auto-generating them for you since you didn't provide one (namely, copy-assignment operator and move-assignment operators). As with any language feature it can be abused, but they can be quite useful when used judiciously. (i.e. if you're writing a Matrix library, you'll probably want to overload the arithmetic operators).

It's true that there are pitfalls to using templates, but I think you're grossly overstating their dangers (while ignoring all their benefits). You can do some pretty amazing things with templates; in the least they reduce code duplication, and at best they allow compile-time polymorphism, better error detection, and a whole different paradigm for using C++ (metaprogramming can pretty closely resemble functional programming).

Slashdot Top Deals

Remember to say hello to your bank teller.

Working...