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

 



Forgot your password?
typodupeerror

Comment Current Records (Score 5, Informative) 307

According to Wikipedia:
http://en.wikipedia.org/wiki/Words_per_minute

The fastest typing speed ever, 216 words in one minute, was achieved by Stella Pajunas in 1946 on an IBM electric.[6][7][8][9] As of 2005, writer Barbara Blackburn was the fastest English language typist in the world, according to The Guinness Book of World Records. Using the Dvorak Simplified Keyboard, she has maintained 150 wpm for 50 minutes, and 170 wpm for shorter periods. She has been clocked at a peak speed of 212 wpm.

One of the most notable online records considered genuine is 256 wpm (a record caught on video) on TypeRacer by American Sean Wrona, the inaugural Ultimate Typing Championship winner, which is considered the highest legitimate score ever set on the site.

Comment Enterprise Java Version (Score 5, Funny) 438

package enterprise;

import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.Collections;
import java.util.Map.Entry;
import java.util.Random;
import java.util.SortedMap;
import java.util.TreeMap;

public class Maze {
    private final WallFactory<Double> wallFactory;
    private final EntropyGenerator entropyGenerator;

    public Maze( WallFactory<Double> wallFactory, EntropyGenerator entropyGenerator ) {
        this.wallFactory = wallFactory;
        this.entropyGenerator = entropyGenerator;
    }

    public void visit( MazeVisitor visitor ) throws MazeException {
        while( true ) {
            MazeWall wall = wallFactory.createMazeWall( entropyGenerator.getNewEntropyValue() );
            wall.visit( visitor );
        }
    }

    public interface MazeWall {
        /**
         * @param visitor
         * @throws IOException
         */
        void visit( MazeVisitor visitor ) throws MazeException;
    }

    public static class LeftDiagonalWall implements MazeWall {
        @Override
        public void visit( MazeVisitor visitor ) throws MazeException {
            visitor.visit( this );
        }
    }

    public static class RightDiagonalWall implements MazeWall {
        @Override
        public void visit( MazeVisitor visitor ) throws MazeException {
            visitor.visit( this );
        }
    }

    public interface MazeVisitor {
        void visit( LeftDiagonalWall leftDiagonalWall ) throws MazeException;

        void visit( RightDiagonalWall rightDiagonalWall ) throws MazeException;
    }

    public interface WallFactory<T> {
        /**
         * @param value
         * @return the MazeWall
         * @throws MazeException
         */
        MazeWall createMazeWall( T value ) throws MazeException;
    }

    public static class StrategyWallFactory<T> implements WallFactory<T> {
        private WallRepartitionStrategy<T> wallRepartitionStrategy;

        public StrategyWallFactory( WallRepartitionStrategy<T> wallRepartitionStrategy ) {
            this.wallRepartitionStrategy = wallRepartitionStrategy;
        }

        @Override
        public MazeWall createMazeWall( T value ) throws MazeException {
            Class<? extends MazeWall> wallClassForValue = wallRepartitionStrategy.getWallClassForValue( value );
            try {
                return wallClassForValue.newInstance();
            } catch( InstantiationException | IllegalAccessException e ) {
                throw new MazeException( "Cannot create MazeWall instance", e );
            }
        }
    }

    public interface WallRepartitionStrategy<T> {
        /**
         * @param value
         * @return the wall class for value
         * @throws MazeException
         */
        Class<? extends MazeWall> getWallClassForValue( T value ) throws MazeException;
    }

    public static class ProbabilityThresholdWallRepartitionStrategy implements WallRepartitionStrategy<Double> {
        private SortedMap<Double, Class<? extends MazeWall>> thresholds = new TreeMap<Double, Class<? extends MazeWall>>( Collections.reverseOrder() );

        public void declareWallThreshold( Double probability, Class<? extends MazeWall> wallClass ) throws MazeException {
            if( probability < 0 || probability > 1 ) {
                throw new MazeException( "Invalid probability " + probability );
            }
            thresholds.put( probability, wallClass );
        }

        @Override
        public Class<? extends MazeWall> getWallClassForValue( Double value ) throws MazeException {
            for( Entry<Double, Class<? extends MazeWall>> entry : thresholds.entrySet() ) {
                if( entry.getKey() < value ) {
                    return entry.getValue();
                }
            }
            throw new MazeException( "No MazeWall class found for probabitity threshold " + value );
        }
    }

    public static class MazePrintVisitor implements MazeVisitor {
        private static final String LEFT_WALL_REPRESENTATION = "&#9585;";
        private static final String RIGHT_WALL_REPRESENTATION = "&#9586;";

        private final Writer writer;
        private final int lineWidth;
        private int count;

        public MazePrintVisitor( Writer writer, int lineWidth ) {
            this.writer = writer;
            this.lineWidth = lineWidth;
        }

        @Override
        public void visit( LeftDiagonalWall leftDiagonalWall ) throws MazeException {
            print( LEFT_WALL_REPRESENTATION );
        }

        @Override
        public void visit( RightDiagonalWall rightDiagonalWall ) throws MazeException {
            print( RIGHT_WALL_REPRESENTATION );
        }

        private void print( String str ) throws MazeException {
            try {
                if( count >= lineWidth ) {
                    count = 0;
                    writer.write( System.lineSeparator() );
                }
                writer.write( str );
                count += str.codePointCount( 0, str.length() );
            } catch( IOException e ) {
                throw new MazeException( "Error printing maze", e );
            }
        }
    }

    public interface EntropyGenerator {
        double getNewEntropyValue();
    }

    public static class JavaRandomEntropyGenerator implements EntropyGenerator {
        private Random random = new Random();

        @Override
        public double getNewEntropyValue() {
            return random.nextDouble();
        }
    }

    public static class MazeException extends Exception {
        public MazeException( String message ) {
            super( message );
        }

        public MazeException( String message, Throwable cause ) {
            super( message, cause );
        }
    }

    public static void main( String[] args ) throws Exception {
        ProbabilityThresholdWallRepartitionStrategy repartitionStrategy = new ProbabilityThresholdWallRepartitionStrategy();
        repartitionStrategy.declareWallThreshold( 0.0, LeftDiagonalWall.class );
        repartitionStrategy.declareWallThreshold( 0.5, RightDiagonalWall.class );
        WallFactory<Double> wallFactory = new StrategyWallFactory<Double>( repartitionStrategy );

        EntropyGenerator entropyGenerator = new JavaRandomEntropyGenerator();

        Maze maze = new Maze( wallFactory, entropyGenerator );

        MazePrintVisitor printVisitor = new MazePrintVisitor( new OutputStreamWriter( System.out ), 40 );
        maze.visit( printVisitor );
    }

}

Comment Real Skepticism (Score 1) 1142

Being skeptical is part of being a scientist and questioning new discoveries, since that is how you can sort out wrong claims from not-wrong claims. However, at some point, a discovery is no longer questioned and is accepted as 'true'. No one now seems to question that earth orbits the sun, or that the shape of the earth resembles a sphere due to overwhelming evidence, but when those claims were originally announced, they were greeted with much skepticism. Being skeptical of these claims now would make one look very silly.

Many people who do not accept evolution simply think they are being 'skeptical' of the claim, which is an admirable scientific trait. However, at this point, evolution is accepted as happening due to overwhelming evidence, so they simply look silly.

This leads up to my question of how do we tell someone that there is no reason to be so skeptical of evolution anymore since it's regarded as 'true' and they should just learn more about it instead of dismissing it immediately, while still professing that people should be skeptical of new claims and discoveries?

Comment Why so much to run a tld? (Score 1) 94

Why does it cost hundreds of thousands to run a tld? Is most of that just labor/marketing costs? I would assume it would just be a matter of setting up a few replicating bind servers and a basic api for buying/adding domains that could be distributed to domain brokers (GoDaddy, Moniker, etc).

Maybe there is more involved that I think there should be?

I'm just curious where hundreds of thousands go to launch and run a tld.

Comment Re:Unit of time (Score 3, Informative) 85

It's wall-clock time. Even if your virtual instance is in the 'running' state but idle and doing nothing, you're still getting billed for it.

You're billed from when you do 'start-instance' to when you do 'terminate-instance'.

Regarding the partial hours, they are based on wall-clock hours as well. If you start your instance at 1:58 and stop it at 2:01, you will be billed for two hours: One hour for the 1:00-1:59 hour, and one hour for the 2:00-2:59 hour. I have a cron job that runs at :55 and checks for any instances I've started up, but I'm not using anymore and shuts them down (there is no point in shutting them down before then since I might end up needing them at some point during that hour).

Comment Re:Why no LEO? (Score 1) 245

My guess would be better coverage of the intended area with fewer satellites. A geo-stationary orbit would yield constant coverage with a single satellite. Whereas in LEO, the satellite orbits every 90 minutes so it would be out of contact every 45 minutes (probably more) while it's on the other side of the earth, requiring more (expensive) satellites to be launched.

As for ping times:
LEO: ~350km (approx height of ISS) = 350km/c = 1.16ms * 2 = 2.32ms
Geo-Stationary: ~35,000km = 35,000km/c = 0.116s * 2 = 0.232s = 232ms

References:
http://imagine.gsfc.nasa.gov/docs/ask_astro/answers/970408d.html
http://en.wikipedia.org/wiki/Low_Earth_orbit

Comment Agreed, stop the hate, because this is a good move (Score 4, Interesting) 356

After all, don't people realize the horrible things that can happen when someone gets offended?

I found this documentary about the terrible consequences of being offended. It recounts the gruesome details of people who have been offended, went to sleep, and woke up the next morning with leprosy.

It's good that Pakistan is stopping these atrocities before they get out of hand.

Comment Answers Explained (Score 5, Informative) 543

256MB (or less): My main computer is an iPad 1, iPhone 3GS, or low-end android phone

256+ to 512MB: My main computer is an iPad 2, iPhone 4/4S, or a mid-range android phone

512+ MB to 1GB: My main computer is a high-end android tablet

1GB+ to 2GB: My main computer is about 5 years old

2GB+ to 4GB: My main computer is about 3 years old

4GB+ to 8GB: My main computer is about 1-2 years old

8GB+ to 16GB: My main computer is a high-end workstation

More than 16GB: My main computer is a server

Cloud

Submission + - Is Amazon the cheapest cloud provider? Myth Busted (cloudorado.com) 1

oker writes: Amazon has become the cloud computing company and is commonly perceived as the cheapest, if not the only, IaaS provider. But is this really so? (...) Even with requirements perfectly matching Standard instance types, Amazon was the cheapest only once! It was once almost the cheapest and once 24% more expensive than the cheapest provider. With the persistent storage option (EBS), Amazon was never the cheapest, costing on average 55% more than the winner. It gets even worse if you get away from Amazon's instance types, where we showed an example of Amazon being twice as expensive, but it can be much worse. So always be sure to compare cloud computing prices for your specific needs.

Slashdot Top Deals

The aim of science is to seek the simplest explanations of complex facts. Seek simplicity and distrust it. -- Whitehead.

Working...