Follow Slashdot stories on Twitter


Forgot your password?

Comment: Re:Answer (Score 1) 260

by Jeremi (#49788345) Attached to: How Much C++ Should You Know For an Entry-Level C++ Job?

I have yet to encounter a non-contrived example where multiple interitance is a plausible solution to a problem.

Okay, I'll give it a shot, then... here's where I find multiple inheritance not just plausible, but preferable.

I have a publish/subscribe model including an abstract-base-class/interface (call it IDataSubscriber) that can be subclassed by any object that wishes to be notified about e.g. data updates coming in from the network.

There are a number of common-case standard responses (implemented as concrete IDataSubscriber methods) to those data updates that are useful for many situations, and I don't want to have to have to rewrite them separately for every subclass, so I make a concrete or almost-concrete subclass (e.g. StandardDataSubscriber) that contains this common logic.

Finally, in my client code (based on Qt) I have a number of GUI widgets based on QWidget or QPushButton or whatever. I want these widgets to react to published data in the standard way, so I often end up with this:

class MyButton : public QPushButton, public StandardDataSubscriber {...}

... and it handles my needs nicely. It's also possible to do the same thing with "just" single inheritance and interfaces as well, or with Qt's signals-and-slots, but AFAICT do to it that way you end up having to do lots of manual method-call-forwarding through proxy objects (or, alternatively, lots of manual signal/slot connecting), which is less efficient, harder to read/understand, and more error-prone.

Comment: Re:Dry Heat (Score 1) 138

by LunaticTippy (#49785761) Attached to: Heat Wave Kills More Than 1,100 In India
In Phoenix when it is hot the RH is rarely much above 20%, at which levels the impact on human body is neutral. 110F @ 30% RH means it "feels" like 122, and I have heard of India having much higher RH than even that. 35% feels like 129F and it gets seriously crazy above that.

You don't know what the big deal is because you've probably never experienced humid heat. 90F is extremely dangerous at 100%RH and people die from it all the time.

Comment: Re:Showing once again how worthless insurance is (Score 1) 112

A) Insurance NEVER pays to replace a car, even if it is totaled. They give you 80% of the current value.

B) I have 40K to replace MY car which the other guy totaled but which HIS insurance won't pay anything near what it costs me. I could sue him in court for damages to recover the rest of the money but insurance companies have seen to it that you really can't sue in court any more because they would have to do what people are paying them to do.

C) Your donation of a kidney is your choice. That is completely different than someone plowing into me which has happened with every car I have every owned. Mainly as I'm the last guy in line.

Comment: Showing once again how worthless insurance is (Score 0, Troll) 112

Insurance is the biggest scam ever perpetrated in the history of mankind. You pay and pay and pay some more, then, when you need to use it you're given every excuse possible why the coverage you've been paying for doesn't apply.

When one takes into consideration the thousands of dollars each year the average person pours down the drain for insurance, it's no wonder people are going broke. That money could be used for more productive endeavors such as food, housing, education or transportation.

Instead, the money is lost in the ether, used only to enrich a few while the many bleed from a thousand cuts.

Comment: Re:Like the companion app (Score 1) 65

by TheRaven64 (#49781067) Attached to: Microsoft Bringing Cortana To iOS, Android
Apple used to ship iSync with OS X, which could sync calendars and contacts with a wide variety of phones via bluetooth or a cable. It also had a nice plug-in architecture for adding new sync clients (and new kinds of data to sync). They also had some Bluetooth integration with the address book app, so when someone called your phone you'd get a pop-up on the screen of who it was and could send SMS directly from the address book. All of these features disappeared with the first OS X release after the iPhone and were replaced with cloud-base syncing that only worked with the iPhone.

Comment: Re:30 years ago.... (Score 1) 279

by Jeremi (#49778387) Attached to: Amtrak Installing Cameras To Watch Train Engineers

So yeah, it's not as easy as just throwing a GPS on your locomotive and calling it good.

Still, even a partial solution (e.g. one that matches the train's GPS location, if known, against a table of specified maximum-safe-under-any-circumstances speed limits for that location) would prevent a train wreck in certain cases (such as the recent one that prompted this article). I'm all for full PTC, but I don't think the perfect needs to be made the enemy of the good here.

Comment: Re:Time to find better engineers (Score 2) 279

by Jeremi (#49778353) Attached to: Amtrak Installing Cameras To Watch Train Engineers

If the engineers' concentration is so fragile that they are going to be distracted by a camera, they are obviously not the right people to be operating complex machinery.

They suffer from a condition called "being human". It causes occasional failures in an otherwise operational controller-human, some very small percentage of the time. Even the highest-quality controller-humans have a non-zero failure rate.

Maybe we should just replace them with automation and run the trains remotely. They could keep one engineer per train to engage the manual override in the event that someone hacks the control infrastructure and tries to do Bad Things(tm) to the trains.

That is actually a pretty good idea, and it's more or less what PTC is intended to do, at least as far as the "avoid accidents" part of the job is concerned. Automating things further than that is also possible, although probably not really necessary.

Comment: Re:Just stick to the mantra (Score 1) 106

by TheRaven64 (#49773763) Attached to: No, Your SSD Won't Quickly Lose Data While Powered Down
Online copies are just RAID done at the file level instead of the block level. The reason that RAID is not considered a substitute for a backup is that user error or a compromise can damage all online storage. If your backups are online, they are not backups, they're just redundancy.

"Your attitude determines your attitude." -- Zig Ziglar, self-improvement doofus