Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Re:Make the salts non-trivial (Score 1) 223

I'm not sure you really understand how salting a password works.
There's never any point in "trivial" salt.
Salt is a public random value (randomly generated for each password), the same size as the hash. It's stored in plaintext alongside the hash.
To check the password, you hash <salt><password>. It's effectively impossible for <salt><password> to be in a table no matter what <password> is. It doesn't prevent brute-forcing the password in other ways of course.
I'm not sure what your deep-deep-dark secret password would enable.

Comment Re:HIgher defect density indicates BETTER code (Score 1) 209

while (source[i] != '\0')
        dest[i] = source[i];

So one error in that code would be 1 defect per five lines or so.

Here's all the code you need, what a better programmer would write:
while (*dest++ = *src++);

Your "better code" is actually not equivalent (the first loop doesn't copy the nul terminator). Even if it was equivalent, I don't think I would necessarily call it "better". This particular piece happens to be fairly idiomatic and many would understand it, but cramming as much semantics in one line as possible is usually not a good idea. I agree that in general less code is better for equivalent behavior, but usually that means better factoring, not putting more code in one line.

Comment Re:Boggle (Score 1) 909

> something that predated the definition of units in the metric
> system in physical units by almost 200 years.
That definition depends on gravity at the point of measure (I think. I'm not sure what's "a pendulum at 38 degrees"). How is it more a "defined in physical units" than 1/10,000,000 the distance from the equator to the North pole (original definition of the meter), of the mass of a given volume of water (original definition of the kilogram)?

Slashdot Top Deals

Like punning, programming is a play on words.