Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Comment Re:Oh god so what? (Score 1) 193

Sure, in simple code. But when you have crap like a list of labmdas that take a map and return a vector, or somesuch, because what you're doing is just like that, full type descriptions really help.

But that's rare, and I'd agree with you most of the time.

Comment Re:Oh god so what? (Score 1) 193

Processes are only as good as the people who implement them

Naturally. Your code is as good as the code review process, which is to say, as good as your people and how much they care.

Comment Re:Ready in 30 years (Score 5, Interesting) 305

You're arguing against Tokamak fusion. But what about, say, HiPER? Looks to me to be a much more comercializeable approach, yet it's still "mainstream" fusion, just a slight variant on inertial confinement ala NIF to make it much smaller / cheaper / easier to have a high repeat rate (smaller compression pulse + heating pulse rather than a NIF-style super-massive compression pulse). The only really unstudied physics aspect is how the heating pulse will interact with the highly compressed matter; NIF and pals have pretty much worked out the details of how laser compression works out. Beyond this, pretty much everything else is just engineering challenges for commercialization, such as high repeat rate lasers, high-rate hohlraum injection and targeting, etc.

I've often thought (different topic) about how one can get half or more of fusion's advantages via fission if you change the game around a bit. Fusion is promoted on being passively safe (it's very hard to keep the reaction *going*, it really wants to stop at all times), it leads to abundant fuel supplies, and there's little radioactive waste (no long-term waste). But what about subcritical fission reactors? Aka, a natural uranium or thorium fuel target being bombarded with a spallation neutron source. Without the spallation neutrons, there's just not enough neutrons for the reaction, so the second the beam gets shut off, the reactor shuts down, regardless of what else is going on. It'd be a fast reactor, aka a breeder, aka, your available fuel supplies increase by orders of magnitude. And your long-term waste would be much, much less in a well-designed reactor. Spallation neutron sources have long been proposed as a way to eliminate long-lived nuclear waste by transmuting it into shorter-lived elements.

Comment Re:Oh god so what? (Score 1) 193

You can definitely over-do auto typing to the point where a human can't figure out the types involved, but that's just a team coding standards thing. For sure, auto is better than any type spec that doesn't fit on a single line in the editor. Obviously class v struct is a historical relic, but I like it. I use class and struct for different things - all members private in the former, vs all public in the latter. I also like the convention that struct is the right keyword to declare an interface, since C++ has no 'interface' keyword.

Comment Re:Left or Right? (Score 1) 475

Why not just bump the signage by that much, and make the signs themselves the hard limit?

To avoid arguments. If the cops say 11 km/h over an artificially 10 km/h low limit then you weren't speeding just a little, if they said 1 km/h over the limit people go all "waaaaaaa it was only 1 km/h" and "waaaaaaaa your equipment must be off I went 1km/h under". "I wasn't speeding that much" holds a lot less sway than "I wasn't speeding".

Comment Re:Oh god so what? (Score 1) 193

If you don't use obscure features of C++ just for fun, you won't have that problem. Most of the obscure features in C++ exist to solve a very specific sort of problem. If your job is to solve that problem, you already understand what the relevant C++ feature does - to you it's not obscure, it's quite handy and much cleaner to have in the language than to write an test yourself.

No one needs to master all the obscure crap, because there's no single software product than needs it all - but all of it is needed by someone, somewhere.

And if you're being deliberately obscure, well, others have mentioned the C obfuscation contest. No language is maintainable without at least some basic effort to reject needlessly obfuscated code through code reviews.

Comment Re:Oh god so what? (Score 1) 193

Well, you'd just need a chuckugly type declaration for it. The new ability to use auto in declaring the parameters to the lambda expression itself - that's one I don't see how you'd do without auto, as it's effectively templating in a place where you can't syntactically declare the template.

Comment Re:Oh god so what? (Score 3, Informative) 193

So in the real world, you have to understand nearly all of it in order to be able to maintain other people's code or to work as a team.

If you don't have coding standards and a firm code review process to enforce them, you have already lost.

C++ has a lot of cruft to allow you to cleanly solve problems that 99% of coders will never encounter. I'd say that these days, if your not in some dark corner where you need at least 1 bizarre C++ feature, you should probably use a higher level language.

As an example of what I mean - C++ lets you overload the 'new' operator. Why would you ever want to do that? There no reason to learn how that feature works until and unless you need it. But if you need to do "slab allocation" or otherwise change the memory allocation pattern away from "just malloc", suddenly overloading 'new' is an amazingly useful and clean way to do this. In C you have to replace malloc with some other call (or #define malloc notmalloc) and police it everywhere in your codebase, which gets ugly when you have 20 different objects each allocated from its own slab, and gets horrifically ugly when you discover that you need to do this a couple years into a project. In C++ you just overload 'new' on a class-by-class basis.

C++ has many features like that - stuff that you'd almost never have any use for, but is wonderful when you find yourself in that dark corner. You just need to guard against that guy who just wants to play with some C++ cruft when it's not needed, just because it looks neat.

Comment Re:Still... (Score 4, Interesting) 193

Have you ever written C code which uses a switch statement based on what type a struct/union is and calling the relevant code for it?

No. When I use structures as objects (which is often), they almost always contain a pointer to a block of general methods appropriate to that structure, as well as containing any methods unique to the object, all of which are called through the object/structure, so it would be unusual, at least, to be testing the object type in order to choose an object-specific procedure to call. However, I do mark each object type with a specific ID and serial as they are created, along with a tag indicating what procedure created them, as these things facilitate some very useful memory management and diagnostic mechanisms.

Have you ever used qsort?

I am aware of qsort. But I have my own multi-method sort library that I use. Most of them locate the comparison mechanisms they are to use through the procedures specified by the objects they are asked to sort. Likewise list management, memory management, certain types of drawing primitives and image processing primitives, image handling mechanisms, associative storage, basically anything I have run into that I thought likely I would need more than once. I am positively locked into the idea that if I write it, I can fix it, and the number of bugs and problems that fall into the "maybe they'll fix the library someday" class are greatly reduced. I'm a little less picky if I have the source code to a capability I didn't actually write and can supply my own version if and as needed. A good example of something like that is SQLite. Actually having the source code and compiling it in reduces my inherent paranoia to a somewhat duller roar.

Comment Been there, had that done to us (Score 3, Insightful) 748

People owning and running businesses should be allowed to choose whith whom they associate and do business and then the ones which discriminate against otherwise good, paying customers can rightfully go under instead of being propped up by the policies of the state.

That's precisely the kind of thinking that led to child labor in factories and mines; it is also why we have to subsidize low paying jobs through our taxes so people can survive at a (somewhat) more reasonable level. It is what led to "whites only" and "separate bathrooms"; It is why the male/female employment ratios are so skewed; it is why older engineers are replaced by younger ones who know far less and don't have families to support; it is why the EPA, or something like it, really needs to exist. And so on.

Business, large and small, incorporated or not, as entities, resemble people only to the degree that most of them, left unregulated, exhibit sociopathy and/or psychopathy. History has shown this explicitly, time and time again. No one is guessing about this: the facts have been in for a long time, and new facts consistent with the old continue to arrive with distressing regularity.

The idea that business, left to its own discretions, will do the right thing is nothing more than a fantasy. Unregulated business is a very bad idea, and further, the premise that bad businesses will automatically fail because customers will do the right thing is equally bankrupt, and for many of the same reasons. Large numbers of people are both selfish and disinterested in the welfare of others.

Comment No wonder you're anonymous (Score 2) 748

Yes but that doesn't make the intestines a sexual organ.

Any body part with nerve endings and/or usable contact surfaces can be brought into play in sexual relations under the right circumstances. This has nothing do do with the gender of the party or parties involved. The fact that you don't know these things speaks very poorly about your competence and experience in the sexual arena.

Slashdot Top Deals

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...