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

 



Forgot your password?
typodupeerror
×

Comment :( Can you help the world? Re:Cumbered (Score 1) 298

Take all work you've written and entrust it with someone who will publish it a few years after you die and after your estate is settled or a few years after the last company that would have any claim to it ceases to exist, or after any copyrights or patents other than yours that apply can reasonably be presumed to have expired (probably 95 years after you wrote the code), whichever comes later.

Comment Editable (Score 1) 298

One of the most important criteria is that good code be easy to modify. Readability, testability, elegance, and simplicity all lead back to that. When you change code, you should be assured that it will do what you expect. Bad code produces surprising side effects when you change it. Good code warns you (possibly through unit tests attached to the code) when you are doing something questionable. If you have to run the code to determine what it does, then that's not good code.

Needs evolve and change over time (or simply become clearer). Good code needs to be able to follow.

Comment Why must it fail? Re: must fail (Score 1) 298

Some code is small enough that it's feasible to prove that the code is correct, assuming that the underlying hardware, libraries, operating system, etc.. don't fail. For example, in most languages you really don't need to put error-checking in code as trivial as this pseudo-code:

boolean isGreater(int a, int b)
{return (a>b);}

Sometimes, particularly when running in "small/tight" or real-time environments or when security is more important than debuggability, you may want a failure to be nothing more than something basic like "return -1" or "turn on aralm and halt the CPU" or even "flush caches, destoy security keys, and power off."

But you are corrent, in most cases good souce code will have good, clear, easy-understand debugging code.

Submission + - Apple would require users to input health data to keep using their iPhone (appleinsider.com)

the_skywise writes: Apple has filed a patent requiring user input of health data. This is a logical step towards making the iPhone a qualified medical device but it also blocks the user from using their phone until the data has been entered. "I'm sorry Dave, I'm afraid I can't let you access facebook until you check your heart rate, take a stresstab and lie down."

Comment Re:Parent Post Semantic Content: Null (Score 2) 269

Actually when I read that comment, I thought: "it IS good to consider that this is not solely a Russian problem". I didn't necessarily see an appeal to the bandwagon approach to "morality". The person could have meant that, too, but since it was not specified, we don't actually know that.

But this is Slashdot, where assuming you know the poster's intent (through some sort of psychic powers, I guess) is somehow not considered arrogant.

Comment Re:Reminds me of one thing (Score 1) 737

Because then everyone dies when the computer fails. Autopilots regularly fail and expect the pilot to take over

I think this depends on your definition of "fail". As far as I know true computer failures where the machine just goes crazy and tries to crash the plane are non-existent. What happens more regularly is the autopilot sees that something weird is happening and chooses to disengage itself - presumably an autopilot program could be written that never disengages and always does the best it can to fly the plane, unless deliberately disengaged.

This is particularly problematic when sensors fail, as they did in AF447, and the computer doesn't know what's going on any more.

No, this is irrelevant. If the planes sensors completely fail then the pilot doesn't know what's going on either, and the plane is probably doomed no matter what. In normal operation these planes are flying in a very small speed corridor between disintegration and stalling. If you don't know how fast your going a stall or overspeed is pretty much inevitable, and if you don't know how high you are even basic visibility problems can cause a crash into the surface. Neither human nor computer can succeed in such a situation.

Comment Re:Congress is a bunch of fucking retards (Score 5, Informative) 133

A really good telescope could as well be turned towards Earth to look at details on the surface.

No. For two reasons:

First, it's an IR telescope. The reason they're putting it in space is to get it away from Earth's atmosphere, which is opaque to the IR wavelengths it's designed to detect. Earth would look like a light bulb for all the IR it gives off and there is zero chance of seeing the surface.

Second, even if it could somehow be used to see through the opaque atmosphere, it couldn't make out anything. The James Webb telescope has a claimed resolution of 0.1 arc-seconds. It's going to be put into the Earth-Sun L2 Lagrangian point, about 1.5 million km from the Earth. At that distance and resolution, each pixel of the image would be ~730 meters square... just under half a mile. Useless for any kind of surveillance.
=Smidge=

Comment Re:Risk Management (Score 1) 737

Airplane depressurization: "Put your own mask on before aiding others", including children.

In putting your own mask on first, you are thinking of the children. It takes more than one minute for permanent brain damage to occur due to hypoxia, but without a mask, you only have about 15-20 seconds of useful consciousness left in a worst case case scenario.

So, put your own mask on first, then you'll have plenty of time to put the masks on everyone around you, including children and people who didn't know the basics of respiratory physiology.

Slashdot Top Deals

Today is a good day for information-gathering. Read someone else's mail file.

Working...