Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. ×

Comment Re:What the article says (Score 1) 600

As for multiple inheritance being bonkers. My car is a Honda and a vehicle registered in NJ. That's two hierarchies.

Viewing inheritance via the 'is-a' model this does not work as strictly a car is not necessarily a Honda nor registered (although if your domain is a database of registered Hondas, rather than of generic cars, perhaps it is fine).

In terms of class structure, having a base class of "thing made by Honda" isn't very useful. You're better off interpreting it as "has a manufacturer property whose value is Honda". The registration base class would fare a little better, assuming the system is a registration database, then you could inherit Car from RegisteredVehicle. Even so, such a database would be more concerned with RegisteredVehicle as the top-level object, not Car, and would probably want a VehicleType property rather than storing Car/Truck/Lorry objects that all inherit from RegisteredVehicle.

This is why inhertiance has fallen out of favour to composition - composition is more flexible (if more verbose) as it effectively allows you inherit from an interface and change at runtime.

That said, I do occasionally come across a situation where multiple inheritance makes sense, just can't remember at the moment :)

Comment Re:Let me guess... (Score 1) 212

You've still misused the word. You mean "true". A tautology is a statement that is technically true but carries no information (usually because it is logically self-referential) - this is not what you're criticising Jefferson quoters of believing.

Your main point is well-taken. Why should we assume classic quotes are necessarily true? Why would it be impossible to achieve liberty without bloodshed?

Comment Re:that it has worked with Facebook (Score 1) 124

Facebook has absolutely no right to know what I'm doing on sites

I'm sure you know this, but what's happening is that these sites you visit have an agreement with Facebook, and write/use code to share this information. They certainly have a right to do this (not that I like it, and in fact use an Adblock filter to strip Facebook from all non-Facebook sites).

Comment Re:Work and cars (Score 1) 147

Yes, if you make cycling into a hobby then the costs can skyrocket as you chase better and 'better' gear. That said I'm surprised one set of tyres could last so long. Riding ~40km per weekday I'll need to change tyres every 6 months, plus patch or replace tubes occasionally, brake pads, handlebar windings and every year or two put in a new chain and back sprocket.

Still cheaper than driving when you factor servicing in.

Comment Ramifactions for the Future of Gaming (Score 4, Insightful) 170

It will be interesting to see how future games develop to keep them fun for humans in an AI-filled world.

Imagine your AI setup gets to the point where it truly has the same input, not needing to be directly fed the screenbuffer but can use a camera pointed at your monitor. Suddenly current anti-cheating technologies mean nothing, and enough people using these would quick ruin a game.

Comment Re: The man is a traitor and should be shot (Score 1) 343

Deaths due to second hand smoke this week: 9,100 or 1,300 deaths every day (source)

That's the deaths from all smoking. According to your link the annual U.S. deaths from second-hand smoke totals 42,000, which is 115 per day.

More interesting is the comparison, that for every 10 deaths of smokers there is 1 death by second-hand smoke. That's higher than I would have thought.

Comment Re:Shying away from OOP(s) (Score 1) 674

Its an absolutely terrible idea that tries to make software work the way we think it should, not the way we think.

In some ways it is the opposite - OOP principles are designed to make software more closely resemble the user or business model, on the assumption that future changes will be easier and more natural.

I do get what you mean about the way we think. OOP can invert our procedural tendencies. Event-driven programming can similarly be a nightmare to debug or piece together as a whole.

Comment Re:Not my experience (Score 1) 219

I guess it takes brain muscle to learn something new

The purpose of learning is to be able to do. This is why children are amazing learners and adults become more set in their ways. If you feel like you are forever learning without being able to put into practice the previous learning, you become frustrated.

Comment Re:Oh my god (Score 1) 436

You've got +4 Funny, but I think you're serious and I agree with you, so maybe I'm a clown..

Analogies tend to make more sense to the person who actually understands the system in the first place. Rather than explaining the unknown system, an analogy creates a pattern link between two systems the alleged explainer already understands. Sometimes the best way to understand is to get in there. Showing them basic APIs is the way forward, then they can form their own analogies based on other systems they personally understand. Most of the presented analogies have an in-built bias anyway.

Slashdot Top Deals

No one gets sick on Wednesdays.

Working...