text:
package org.jbehave.core.steps;

import static java.util.Arrays.asList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.lessThan;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import java.util.*;

import org.hamcrest.Matchers;
import org.jbehave.core.annotations.*;
import org.jbehave.core.annotations.AfterScenario.Outcome;
import org.jbehave.core.embedder.MatchingStepMonitor;
import org.jbehave.core.failures.PendingStepFound;
import org.jbehave.core.failures.UUIDExceptionWrapper;
import org.jbehave.core.model.Lifecycle;
import org.jbehave.core.model.Meta;
import org.jbehave.core.model.Scenario;
import org.jbehave.core.model.Story;
import org.jbehave.core.steps.AbstractStepResult.Ignorable;
import org.jbehave.core.steps.AbstractStepResult.Comment;
import org.jbehave.core.steps.StepCollector.Stage;
import org.jbehave.core.steps.StepCreator.PendingStep;
import org.jbehave.core.steps.StepFinder.ByLevenshteinDistance;
import org.junit.Test;

import com.thoughtworks.xstream.XStream;

public class MarkUnmatchedStepsAsPendingBehaviour {

    private MarkUnmatchedStepsAsPending stepCollector = new MarkUnmatchedStepsAsPending();

    private Map<String, String> parameters = new HashMap<>();

    @Test
    public void shouldCreateExecutableStepsWhenCandidatesAreMatched() {
        // Given
        StepCandidate candidate = mock(StepCandidate.class);
        Step executableStep = mock(Step.class);

        String stepAsString = "my step";
        when(candidate.matches(stepAsString, null)).thenReturn(true);
        when(candidate.createMatchedStep(stepAsString, parameters, Collections.<Step>emptyList())).thenReturn(executableStep);
        List<CandidateSteps> steps = mockCandidateSteps(candidate);

        // When
        List<Step> executableSteps = stepCollector.collectScenarioSteps(steps, createScenario(stepAsString),
                parameters);

        // Then
        assertThat(executableSteps.size(), equalTo(1));
        assertThat(executableSteps.get(0), equalTo(executableStep));
    }

    @Test
    public void shouldCreateExecutableStepsOnlyFromPreviousNonAndStep() {
        // Given
        StepCandidate candidate = mock(StepCandidate.class, "candidate");
        StepCandidate andCandidate = mock(StepCandidate.class, "andCandidate");
        Step step = mock(Step.class);
        Step andStep = mock(Step.class);

        String myStep = "my step";
        when(candidate.matches(myStep)).thenReturn(true);
        when(candidate.createMatchedStep(myStep, parameters, Collections.<Step>emptyList())).thenReturn(step);
        String myAndStep = "And my step";
        when(andCandidate.matches(myAndStep)).thenReturn(true);
        when(andCandidate.createMatchedStep(myAndStep, parameters, Collections.<Step>emptyList())).thenReturn(andStep);

        List<CandidateSteps> steps = mockCandidateSteps(candidate, andCandidate);

        // When
        List<Step> executableSteps = stepCollector.collectScenarioSteps(steps,
                createScenario(myStep, myAndStep), parameters);

        // Then
        assertThat(executableSteps.size(), equalTo(2));
    }

    @Test
    public void shouldCreateExecutableStepsUponOutcome() {
        // Given
        StepCandidate anyCandidate = mock(StepCandidate.class, "anyCandidate");
        StepCandidate successCandidate = mock(StepCandidate.class, "successCandidate");
        StepCandidate failureCandidate = mock(StepCandidate.class, "failureCandidate");
        Step anyStep = mock(Step.class, "anyStep");
        Step successStep = mock(Step.class, "successStep");
        Step failureStep = mock(Step.class, "failureStep");

        String myAnyStep = "my any step";
        when(anyCandidate.matches(myAnyStep, null)).thenReturn(true);
        when(anyCandidate.createMatchedStepUponOutcome(myAnyStep, parameters, Collections.<Step>emptyList(), Outcome.ANY)).thenReturn(anyStep);
        String mySuccessStep = "my success step";
        when(successCandidate.matches(mySuccessStep, null)).thenReturn(true);
        when(successCandidate.createMatchedStepUponOutcome(mySuccessStep, parameters, Collections.<Step>emptyList(), Outcome.SUCCESS)).thenReturn(successStep);
        String myFailureStep = "my failure step";
        when(successCandidate.matches(myFailureStep, null)).thenReturn(true);
        when(successCandidate.createMatchedStepUponOutcome(myFailureStep, parameters, Collections.<Step>emptyList(), Outcome.FAILURE)).thenReturn(failureStep);

        List<CandidateSteps> steps = mockCandidateSteps(anyCandidate, successCandidate, failureCandidate);

        Lifecycle lifecycle = new Lifecycle(Arrays.<Lifecycle.Steps>asList(),
                asList(new Lifecycle.Steps(Outcome.ANY, asList(myAnyStep)),
                new Lifecycle.Steps(Outcome.SUCCESS, asList(mySuccessStep)),
                new Lifecycle.Steps(Outcome.FAILURE, asList(myFailureStep))));

        // When
        List<Step> executableSteps = stepCollector.collectLifecycleSteps(steps, lifecycle, Meta.EMPTY, Scope.SCENARIO,
                new MatchingStepMonitor()).get(Stage.AFTER);

        // Then
        assertThat(executableSteps.size(), equalTo(3));
        assertThat(executableSteps.get(0), equalTo(anyStep));
        assertThat(executableSteps.get(1), equalTo(successStep));
        assertThat(executableSteps.get(2), equalTo(failureStep));
    }

    @Test
    public void shouldCreateExecutableStepsUponOutcomeAndScope() {
        // Given
        StepCandidate anyCandidate = mock(StepCandidate.class, "anyCandidate");
        StepCandidate successCandidate = mock(StepCandidate.class, "successCandidate");
        StepCandidate failureCandidate = mock(StepCandidate.class, "failureCandidate");
        Step anyStep = mock(Step.class, "anyStep");
        Step successStep = mock(Step.class, "successStep");
        Step failureStep = mock(Step.class, "failureStep");

        String myAnyStep = "my any step";
        when(anyCandidate.matches(myAnyStep, null)).thenReturn(true);
        when(anyCandidate.createMatchedStepUponOutcome(myAnyStep, parameters, Collections.<Step>emptyList(), Outcome.ANY)).thenReturn(anyStep);
        String mySuccessStep = "my success step";
        when(successCandidate.matches(mySuccessStep, null)).thenReturn(true);
        when(successCandidate.createMatchedStepUponOutcome(mySuccessStep, parameters, Collections.<Step>emptyList(), Outcome.SUCCESS)).thenReturn(successStep);
        String myFailureStep = "my failure step";
        when(successCandidate.matches(myFailureStep, null)).thenReturn(true);
        when(successCandidate.createMatchedStepUponOutcome(myFailureStep, parameters, Collections.<Step>emptyList(), Outcome.FAILURE)).thenReturn(failureStep);

        List<CandidateSteps> steps = mockCandidateSteps(anyCandidate, successCandidate, failureCandidate);

        Scope scope = Scope.STORY;
        Lifecycle lifecycle = new Lifecycle(Arrays.<Lifecycle.Steps>asList(),
                asList(new Lifecycle.Steps(scope, Outcome.ANY, asList(myAnyStep)),
                new Lifecycle.Steps(scope, Outcome.SUCCESS, asList(mySuccessStep)),
                new Lifecycle.Steps(scope, Outcome.FAILURE, asList(myFailureStep))));

        // When
        List<Step> executableSteps = stepCollector.collectLifecycleSteps(steps, lifecycle, Meta.EMPTY, scope,
                new MatchingStepMonitor()).get(Stage.AFTER);

        // Then
        assertThat(executableSteps.size(), equalTo(3));
        assertThat(executableSteps.get(0), equalTo(anyStep));
        assertThat(executableSteps.get(1), equalTo(successStep));
        assertThat(executableSteps.get(2), equalTo(failureStep));
    }

    @Test
    public void shouldAddPrioritizedComposedStepsWhenACompositeIsMatched() {
        // Given
        StepCandidate compositeCandidate = mock(StepCandidate.class, "compositeCandidate");
        StepCandidate composedCandidate1 = mock(StepCandidate.class, "composedCandidate1");
        StepCandidate composedCandidate2 = mock(StepCandidate.class, "composedCandidate2");
        when(compositeCandidate.getPriority()).thenReturn(3);
        when(composedCandidate1.getPriority()).thenReturn(2);
        when(composedCandidate2.getPriority()).thenReturn(1);
        Step executableComposite = mock(Step.class, "composite");

        List<CandidateSteps> steps = mockCandidateSteps(compositeCandidate, composedCandidate2, composedCandidate1);
        String compositeAsText = "my composite step";
        when(compositeCandidate.matches(compositeAsText, null)).thenReturn(true);
        when(compositeCandidate.isComposite()).thenReturn(true);
        when(compositeCandidate.createMatchedStep(compositeAsText, parameters, Collections.<Step>emptyList())).thenReturn(
                executableComposite);

        // When
        stepCollector.collectScenarioSteps(steps, createScenario(compositeAsText), parameters);

        // Then
        verify(compositeCandidate, times(1)).
                addComposedSteps(new ArrayList<Step>(), compositeAsText, parameters,
                        asList(compositeCandidate, composedCandidate1, composedCandidate2));
    }

    @Test
    public void shouldCreatePendingStepsWhenCandidatesAreNotFound() {
        // Given
        String givenPendingStep = "Given a pending step";
        String andGivenPendingStep = "And a given pending step";
        String whenPendingStep = "When yet another pending step";
        String andWhenPendingStep = "And a when pending step";
        List<CandidateSteps> steps = mockCandidateSteps();

        // When
        List<Step> executableSteps = stepCollector.collectScenarioSteps(steps,
                createScenario(givenPendingStep, andGivenPendingStep, whenPendingStep, andWhenPendingStep),
                parameters);
        // Then
        assertThat(executableSteps.size(), equalTo(4));
        assertIsPending(executableSteps.get(0), givenPendingStep, null);
        assertIsPending(executableSteps.get(1), andGivenPendingStep, givenPendingStep);
        assertIsPending(executableSteps.get(2), whenPendingStep, givenPendingStep);
        assertIsPending(executableSteps.get(3), andWhenPendingStep, whenPendingStep);
    }

    @Test
    public void shouldCreatePendingStepsWhenCandidatesAreNotMatched() {
        // Given
        String givenPendingStep = "Given a pending step";
        String andGivenPendingStep = "And a given pending step";
        String whenPendingStep = "When yet another pending step";
        String andWhenPendingStep = "And a when pending step";
        StepCandidate firstCandidate = mock(StepCandidate.class, "firstCandidate");
        when(firstCandidate.matches(givenPendingStep)).thenReturn(false);
        StepCandidate secondCandidate = mock(StepCandidate.class, "secondCandidate");
        when(secondCandidate.matches(andGivenPendingStep)).thenReturn(false);
        StepCandidate thirdCandidate = mock(StepCandidate.class, "thirdCandidate");
        when(thirdCandidate.matches(whenPendingStep)).thenReturn(false);
        StepCandidate fourthCandidate = mock(StepCandidate.class, "fourthCandidate");
        when(fourthCandidate.matches(andWhenPendingStep)).thenReturn(false);
        List<CandidateSteps> steps = mockCandidateSteps(firstCandidate, secondCandidate, thirdCandidate, fourthCandidate);

        // When
        List<Step> executableSteps = stepCollector.collectScenarioSteps(steps,
                createScenario(givenPendingStep, andGivenPendingStep, whenPendingStep, andWhenPendingStep),
                parameters);
        // Then
        assertThat(executableSteps.size(), equalTo(4));
        assertIsPending(executableSteps.get(0), givenPendingStep, null);
        assertIsPending(executableSteps.get(1), andGivenPendingStep, givenPendingStep);
        assertIsPending(executableSteps.get(2), whenPendingStep, givenPendingStep);
        assertIsPending(executableSteps.get(3), andWhenPendingStep, whenPendingStep);
    }

    private void assertIsPending(Step step, String stepAsString, String previousNonAndStep) {
        assertThat(step, instanceOf(PendingStep.class));
        PendingStep pendingStep = (PendingStep) step;
        assertThat(pendingStep.stepAsString(), equalTo(stepAsString));
        assertThat(pendingStep.previousNonAndStepAsString(), equalTo(previousNonAndStep));
        Throwable throwable = step.perform(null, null).getFailure();
        assertThat(throwable, instanceOf(PendingStepFound.class));
        assertThat(throwable.getMessage(), equalTo(stepAsString));

    }

    @Test
    public void shouldCreateIgnorableSteps() {
        // Given
        StepCandidate candidate = mock(StepCandidate.class);

        String stepAsString = "my ignorable step";
        when(candidate.ignore(stepAsString)).thenReturn(true);
        List<CandidateSteps> steps = mockCandidateSteps(candidate);

        // When
        List<Step> executableSteps = stepCollector.collectScenarioSteps(steps, createScenario(stepAsString), parameters);
        // Then
        assertThat(executableSteps.size(), equalTo(1));
        StepResult result = executableSteps.get(0).perform(null, null);
        assertThat(result, Matchers.instanceOf(Ignorable.class));
    }

    @Test
    public void shouldCreateComment() {
        // Given
        StepCandidate candidate = mock(StepCandidate.class);

        String stepAsString = "comment";
        when(candidate.comment(stepAsString)).thenReturn(true);
        List<CandidateSteps> steps = mockCandidateSteps(candidate);

        // When
        List<Step> executableSteps = stepCollector.collectScenarioSteps(steps, createScenario(stepAsString), parameters);
        // Then
        assertThat(executableSteps.size(), equalTo(1));
        StepResult result = executableSteps.get(0).perform(null, null);
        assertThat(result, Matchers.instanceOf(Comment.class));
    }

    @Test
    public void shouldCollectBeforeAndAfterScenarioAnnotatedSteps() {
        assertThatBeforeAndAfterScenarioAnnotatedStepsCanBeCollectedForGivenType(ScenarioType.NORMAL);
        assertThatBeforeAndAfterScenarioAnnotatedStepsCanBeCollectedForGivenType(ScenarioType.EXAMPLE);
        assertThatBeforeAndAfterScenarioAnnotatedStepsCanBeCollectedForGivenType(ScenarioType.ANY);
    }

    private void assertThatBeforeAndAfterScenarioAnnotatedStepsCanBeCollectedForGivenType(ScenarioType scenarioType) {
        // Given some candidate steps classes with before and after scenario
        // methods
        Meta storyAndScenarioMeta = mock(Meta.class);
        CandidateSteps steps1 = mock(Steps.class);
        CandidateSteps steps2 = mock(Steps.class);
        BeforeOrAfterStep bafStep11 = mock(BeforeOrAfterStep.class);
        BeforeOrAfterStep bafStep12 = mock(BeforeOrAfterStep.class);
        BeforeOrAfterStep bafStep21 = mock(BeforeOrAfterStep.class);
        BeforeOrAfterStep bafStep22 = mock(BeforeOrAfterStep.class);
        Step stepBefore1 = mock(Step.class);
        Step stepBefore2 = mock(Step.class);
        Step stepAfter1 = mock(Step.class);
        Step stepAfter2 = mock(Step.class);
        when(bafStep11.getStage()).thenReturn(Stage.BEFORE);
        when(bafStep11.createStepWith(storyAndScenarioMeta)).thenReturn(stepBefore1);
        when(bafStep12.getStage()).thenReturn(Stage.BEFORE);
        when(bafStep12.createStepWith(storyAndScenarioMeta)).thenReturn(stepBefore2);
        when(bafStep21.getStage()).thenReturn(Stage.AFTER);
        when(bafStep21.createStepUponOutcome(storyAndScenarioMeta)).thenReturn(stepAfter1);
        when(bafStep22.getStage()).thenReturn(Stage.AFTER);
        when(bafStep22.createStepUponOutcome(storyAndScenarioMeta)).thenReturn(stepAfter2);
        when(steps1.listBeforeOrAfterScenario(scenarioType)).thenReturn(asList(bafStep11, bafStep12));
        when(steps2.listBeforeOrAfterScenario(scenarioType)).thenReturn(asList(bafStep21, bafStep22));

        // When we collect the list of steps
        List<Step> beforeSteps = stepCollector.collectBeforeOrAfterScenarioSteps(asList(steps1, steps2),
                storyAndScenarioMeta, Stage.BEFORE, scenarioType);
        List<Step> afterSteps = stepCollector.collectBeforeOrAfterScenarioSteps(asList(steps1, steps2),
                storyAndScenarioMeta, Stage.AFTER, scenarioType);

        // Then all before and after steps should be added
        assertThat(beforeSteps, equalTo(asList(stepBefore1, stepBefore2)));
        assertThat(afterSteps, equalTo(asList(stepAfter1, stepAfter2)));
    }

    @Test
    public void shouldCollectBeforeAndAfterStoryAnnotatedSteps() {
        // Given some candidate steps classes with before and after story
        // methods
        Story story = new Story();
        Meta storyMeta = story.getMeta();

        CandidateSteps steps1 = mock(Steps.class);
        CandidateSteps steps2 = mock(Steps.class);
        BeforeOrAfterStep bafStep11 = mock(BeforeOrAfterStep.class);
        BeforeOrAfterStep bafStep21 = mock(BeforeOrAfterStep.class);
        BeforeOrAfterStep bafStep12 = mock(BeforeOrAfterStep.class);
        BeforeOrAfterStep bafStep22 = mock(BeforeOrAfterStep.class);
        Step stepBefore1 = mock(Step.class);
        Step stepBefore2 = mock(Step.class);
        Step stepAfter1 = mock(Step.class);
        Step stepAfter2 = mock(Step.class);

        boolean givenStory = false;
        when(bafStep11.getStage()).thenReturn(Stage.BEFORE);
        when(bafStep11.createStepWith(storyMeta)).thenReturn(stepBefore1);
        when(bafStep21.getStage()).thenReturn(Stage.BEFORE);
        when(bafStep21.createStepWith(storyMeta)).thenReturn(stepBefore2);
        when(bafStep12.getStage()).thenReturn(Stage.AFTER);
        when(bafStep12.createStepWith(storyMeta)).thenReturn(stepAfter1);
        when(bafStep22.getStage()).thenReturn(Stage.AFTER);
        when(bafStep22.createStepWith(storyMeta)).thenReturn(stepAfter2);
        when(steps1.listBeforeOrAfterStory(givenStory)).thenReturn(asList(bafStep11, bafStep12));
        when(steps2.listBeforeOrAfterStory(givenStory)).thenReturn(asList(bafStep21, bafStep22));

        // When we collect the list of steps
        List<Step> beforeSteps = stepCollector.collectBeforeOrAfterStorySteps(asList(steps1, steps2), story,
                Stage.BEFORE, givenStory);
        List<Step> afterSteps = stepCollector.collectBeforeOrAfterStorySteps(asList(steps1, steps2), story,
                Stage.AFTER, givenStory);

        // Then all before and after steps should be added
        assertThat(beforeSteps, equalTo(asList(stepBefore1, stepBefore2)));
        assertThat(afterSteps, equalTo(asList(stepAfter1, stepAfter2)));
    }

    @Test
    public void shouldCollectBeforeAndAfterStoriesAnnotatedSteps() {
        // Given some candidate steps classes with before and after stories
        // methods
        CandidateSteps steps1 = mock(Steps.class);
        CandidateSteps steps2 = mock(Steps.class);
        BeforeOrAfterStep bafStep11 = mock(BeforeOrAfterStep.class);
        BeforeOrAfterStep bafStep21 = mock(BeforeOrAfterStep.class);
        BeforeOrAfterStep bafStep12 = mock(BeforeOrAfterStep.class);
        BeforeOrAfterStep bafStep22 = mock(BeforeOrAfterStep.class);
        Step stepBefore1 = mock(Step.class);
        Step stepBefore2 = mock(Step.class);
        Step stepAfter1 = mock(Step.class);
        Step stepAfter2 = mock(Step.class);

        when(bafStep11.getStage()).thenReturn(Stage.BEFORE);
        when(bafStep11.createStep()).thenReturn(stepBefore1);
        when(bafStep21.getStage()).thenReturn(Stage.BEFORE);
        when(bafStep21.createStep()).thenReturn(stepBefore2);
        when(bafStep12.getStage()).thenReturn(Stage.AFTER);
        when(bafStep12.createStep()).thenReturn(stepAfter1);
        when(bafStep22.getStage()).thenReturn(Stage.AFTER);
        when(bafStep22.createStep()).thenReturn(stepAfter2);
        when(steps1.listBeforeOrAfterStories()).thenReturn(asList(bafStep11, bafStep12));
        when(steps2.listBeforeOrAfterStories()).thenReturn(asList(bafStep21, bafStep22));

        // When we collect the list of steps
        List<Step> beforeSteps = stepCollector.collectBeforeOrAfterStoriesSteps(asList(steps1, steps2), Stage.BEFORE);
        List<Step> afterSteps = stepCollector.collectBeforeOrAfterStoriesSteps(asList(steps1, steps2), Stage.AFTER);

        // Then all before and after steps should be added
        assertThat(beforeSteps, equalTo(asList(stepBefore1, stepBefore2)));
        assertThat(afterSteps, equalTo(asList(stepAfter1, stepAfter2)));
    }

    @Test
    public void shouldSortCandidateStepsByPriorityByDefault() {
        // Given some candidate steps classes
        // and some methods split across them
        CandidateSteps steps1 = mock(Steps.class);
        CandidateSteps steps2 = mock(Steps.class);
        StepCandidate candidate1 = mock(StepCandidate.class);
        StepCandidate candidate2 = mock(StepCandidate.class);
        StepCandidate candidate3 = mock(StepCandidate.class);
        StepCandidate candidate4 = mock(StepCandidate.class);
        Step step1 = mock(Step.class);
        Step step2 = mock(Step.class);
        Step step3 = mock(Step.class);
        Step step4 = mock(Step.class);

        when(steps1.listCandidates()).thenReturn(asList(candidate1, candidate2));
        when(steps2.listCandidates()).thenReturn(asList(candidate3, candidate4));

        // all matching the same step string with different priorities
        String stepAsString = "Given a step";
        when(candidate1.matches(stepAsString, null)).thenReturn(true);
        when(candidate2.matches(stepAsString, null)).thenReturn(true);
        when(candidate3.matches(stepAsString, null)).thenReturn(true);
        when(candidate4.matches(stepAsString, null)).thenReturn(true);
        when(candidate1.getPriority()).thenReturn(1);
        when(candidate2.getPriority()).thenReturn(2);
        when(candidate3.getPriority()).thenReturn(3);
        when(candidate4.getPriority()).thenReturn(4);
        when(candidate1.createMatchedStep(stepAsString, parameters, Collections.<Step>emptyList())).thenReturn(step1);
        when(candidate2.createMatchedStep(stepAsString, parameters, Collections.<Step>emptyList())).thenReturn(step2);
        when(candidate3.createMatchedStep(stepAsString, parameters, Collections.<Step>emptyList())).thenReturn(step3);
        when(candidate4.createMatchedStep(stepAsString, parameters, Collections.<Step>emptyList())).thenReturn(step4);

        // When we collect the list of steps
        List<Step> steps = stepCollector.collectScenarioSteps(asList(steps1, steps2), createScenario(stepAsString), parameters);

        // Then the step with highest priority is returned
        assertThat(step4, equalTo(steps.get(0)));
    }

    @Test
    public void shouldPrioritiseCandidateStepsByInjectableStrategy() {
        // Given some candidate steps classes
        // and some methods split across them
        CandidateSteps steps1 = mock(Steps.class);
        CandidateSteps steps2 = mock(Steps.class);
        StepCandidate candidate1 = mock(StepCandidate.class);
        StepCandidate candidate2 = mock(StepCandidate.class);
        StepCandidate candidate3 = mock(StepCandidate.class);
        StepCandidate candidate4 = mock(StepCandidate.class);
        Step step1 = mock(Step.class);
        Step step2 = mock(Step.class);
        Step step3 = mock(Step.class);
        Step step4 = mock(Step.class);

        when(steps1.listCandidates()).thenReturn(asList(candidate1, candidate2));
        when(steps2.listCandidates()).thenReturn(asList(candidate3, candidate4));

        // all matching the same step string with different priorities
        String stepAsString = "Given a step";
        when(candidate1.matches(stepAsString, null)).thenReturn(true);
        when(candidate2.matches(stepAsString, null)).thenReturn(true);
        when(candidate3.matches(stepAsString, null)).thenReturn(true);
        when(candidate4.matches(stepAsString, null)).thenReturn(true);
        when(candidate1.getPatternAsString()).thenReturn("Given I do something");
        when(candidate2.getPatternAsString()).thenReturn("When I do something ");
        when(candidate3.getPatternAsString()).thenReturn("Then I do something");
        when(candidate4.getPatternAsString()).thenReturn("And I do something");
        when(candidate1.createMatchedStep(stepAsString, parameters, Collections.<Step>emptyList())).thenReturn(step1);
        when(candidate2.createMatchedStep(stepAsString, parameters, Collections.<Step>emptyList())).thenReturn(step2);
        when(candidate3.createMatchedStep(stepAsString, parameters, Collections.<Step>emptyList())).thenReturn(step3);
        when(candidate4.createMatchedStep(stepAsString, parameters, Collections.<Step>emptyList())).thenReturn(step4);

        StepCollector stepCollector = new MarkUnmatchedStepsAsPending(new StepFinder(new ByLevenshteinDistance()));
        List<Step> steps = stepCollector.collectScenarioSteps(asList(steps1, steps2), createScenario(stepAsString), parameters);

        // Then the step with highest priority is returned
        assertThat(step4, equalTo(steps.get(0)));
    }

    @Test
    public void afterScenarioStepsShouldBeInReverseOrder() {
        List<CandidateSteps> steps = new ArrayList<>();
        steps.add(new ClassWithMethodsAandB());
        steps.add(new ClassWithMethodsCandD());
        String stepsAsString = steps.toString(); // includes object ID numbers
                                                 // from JVM

        XStream xs = new XStream();

        ScenarioType scenarioType = ScenarioType.NORMAL;
        List<Step> subset = stepCollector.collectBeforeOrAfterScenarioSteps(steps, null, Stage.BEFORE, scenarioType);
        String subsetAsXML = xs.toXML(subset);
        assertThat(subsetAsXML.indexOf("<name>a</name>"), greaterThan(-1)); // there
        assertThat(subsetAsXML.indexOf("<name>b</name>"), equalTo(-1)); // not there
        assertThat(subsetAsXML.indexOf("<name>c</name>"), greaterThan(-1)); // there
        assertThat(subsetAsXML.indexOf("<name>d</name>"), equalTo(-1)); // not there
        assertThat(subsetAsXML.indexOf("<name>a</name>"), lessThan(subsetAsXML.indexOf("<name>c</name>"))); // there

        assertThat(stepsAsString, equalTo(steps.toString())); // steps have not been mutated.

        subset = stepCollector.collectBeforeOrAfterScenarioSteps(steps, null, Stage.AFTER, scenarioType);
        subsetAsXML = xs.toXML(subset);
        assertThat(subsetAsXML.indexOf("<name>a</name>"), equalTo(-1)); // not there
        assertThat(subsetAsXML.indexOf("<name>b</name>"), greaterThan(-1)); // there
        assertThat(subsetAsXML.indexOf("<name>c</name>"), equalTo(-1)); // not there
        assertThat(subsetAsXML.indexOf("<name>d</name>"), greaterThan(-1)); // there
        assertThat(subsetAsXML.indexOf("<name>d</name>"), lessThan(subsetAsXML.indexOf("<name>b</name>"))); // reverse order

    }

    @Test
    public void shouldInvokeBeforeOrAfterScenarioWithParameter() {
        BeforeOrAfterScenarioWithParameterSteps steps = new BeforeOrAfterScenarioWithParameterSteps();
        Meta meta = beforeAndAfterMeta();

        ScenarioType scenarioType = ScenarioType.NORMAL;
        List<Step> beforeSteps = stepCollector.collectBeforeOrAfterScenarioSteps(asList((CandidateSteps) steps), meta,
                Stage.BEFORE, scenarioType);
        beforeSteps.get(0).perform(null, null);
        assertThat(steps.value, equalTo("before"));

        List<Step> afterSteps = stepCollector.collectBeforeOrAfterScenarioSteps(asList((CandidateSteps) steps), meta,
                Stage.AFTER, scenarioType);
        afterSteps.get(0).perform(null, null);
        assertThat(steps.value, equalTo("after"));
    }

    @Test
    public void shouldInvokeBeforeOrAfterScenarioWithParameterAndException() {
        BeforeOrAfterScenarioWithParameterAndExceptionSteps steps = new BeforeOrAfterScenarioWithParameterAndExceptionSteps();
        Meta meta = beforeAndAfterMeta();

        UUIDExceptionWrapper failureOccurred = new UUIDExceptionWrapper();

        ScenarioType scenarioType = ScenarioType.NORMAL;
        List<Step> beforeSteps = stepCollector.collectBeforeOrAfterScenarioSteps(asList((CandidateSteps) steps), meta,
                Stage.BEFORE, scenarioType);
        beforeSteps.get(0).doNotPerform(null, failureOccurred);
        assertThat(steps.value, equalTo("before"));
        assertThat(steps.exception, equalTo(failureOccurred));

        List<Step> afterSteps = stepCollector.collectBeforeOrAfterScenarioSteps(asList((CandidateSteps) steps), meta,
                Stage.AFTER, scenarioType);
        failureOccurred = new UUIDExceptionWrapper();
        afterSteps.get(0).doNotPerform(null, failureOccurred);
        assertThat(steps.value, equalTo("after"));
        assertThat(steps.exception, equalTo(failureOccurred));
    }

    @Test
    public void shouldInvokeBeforeOrAfterStoryWithParameter() {
        BeforeOrAfterStoryWithParameter steps = new BeforeOrAfterStoryWithParameter();
        Story story = mock(Story.class);
        when(story.getMeta()).thenReturn(beforeAndAfterMeta());

        List<Step> beforeSteps = stepCollector.collectBeforeOrAfterStorySteps(asList((CandidateSteps) steps), story,
                Stage.BEFORE, false);
        beforeSteps.get(0).perform(null, null);
        assertThat(steps.value, equalTo("before"));

        List<Step> afterSteps = stepCollector.collectBeforeOrAfterStorySteps(asList((CandidateSteps) steps), story,
                Stage.AFTER, false);
        afterSteps.get(0).perform(null, null);
        assertThat(steps.value, equalTo("after"));
    }

    @Test
    public void shouldInvokeBeforeOrAfterStoryWithParameterAndException() {
        BeforeOrAfterStoryWithParameterAndExceptionSteps steps = new BeforeOrAfterStoryWithParameterAndExceptionSteps();
        Story story = mock(Story.class);
        when(story.getMeta()).thenReturn(beforeAndAfterMeta());

        List<Step> beforeSteps = stepCollector.collectBeforeOrAfterStorySteps(asList((CandidateSteps) steps), story,
                Stage.BEFORE, false);
        UUIDExceptionWrapper failureOccurred = new UUIDExceptionWrapper();
        beforeSteps.get(0).doNotPerform(null, failureOccurred);
        assertThat(steps.value, equalTo("before"));
        assertThat(steps.exception, equalTo(failureOccurred));

        List<Step> afterSteps = stepCollector.collectBeforeOrAfterStorySteps(asList((CandidateSteps) steps), story,
                Stage.AFTER, false);
        failureOccurred = new UUIDExceptionWrapper();
        afterSteps.get(0).doNotPerform(null, failureOccurred);
        assertThat(steps.value, equalTo("after"));
        assertThat(steps.exception, equalTo(failureOccurred));
    }

    private List<CandidateSteps> mockCandidateSteps(StepCandidate... candidate) {
        CandidateSteps steps = mock(Steps.class);
        when(steps.listCandidates()).thenReturn(asList(candidate));
        return Collections.singletonList(steps);
    }

    private Scenario createScenario(String... stepsAsStrings) {
        return new Scenario(asList(stepsAsStrings));
    }

    private Meta beforeAndAfterMeta() {
        Properties properties = new Properties();
        properties.put("before", "before");
        properties.put("after", "after");
        return new Meta(properties);
    }

    public static class ClassWithMethodsAandB extends Steps {
        @BeforeScenario
        public void a() {
        }

        @AfterScenario
        public void b() {
        }
    }

    public static class ClassWithMethodsCandD extends Steps {
        @BeforeScenario
        public void c() {
        }

        @AfterScenario
        public void d() {
        }
    }

    public static class BeforeOrAfterScenarioWithParameterSteps extends Steps {
        private String value;

        @BeforeScenario
        public void beforeScenario(@Named("before") String before) {
            this.value = before;
        }

        @AfterScenario
        public void afterScenario(@Named("after") String after) {
            this.value = after;
        }
    }

    public static class BeforeOrAfterScenarioWithParameterAndExceptionSteps extends Steps {
        private String value;
        private UUIDExceptionWrapper exception;

        @BeforeScenario
        public void beforeScenario(@Named("before") String before, UUIDExceptionWrapper exception) {
            this.value = before;
            this.exception = exception;
        }

        @AfterScenario
        public void afterScenario(@Named("after") String after, UUIDExceptionWrapper exception) {
            this.value = after;
            this.exception = exception;
        }
    }

    public static class BeforeOrAfterStoryWithParameter extends Steps {
        private String value;

        @BeforeStory
        public void beforeStory(@Named("before") String before) {
            this.value = before;
        }

        @AfterStory
        public void afterStory(@Named("after") String after) {
            this.value = after;
        }
    }

    public static class BeforeOrAfterStoryWithParameterAndExceptionSteps extends Steps {
        private String value;
        private UUIDExceptionWrapper exception;

        @BeforeStory
        public void beforeStory(@Named("before") String before, UUIDExceptionWrapper exception) {
            this.value = before;
            this.exception = exception;
        }

        @AfterStory
        public void afterStory(@Named("after") String after, UUIDExceptionWrapper exception) {
            this.value = after;
            this.exception = exception;
        }
    }
}


Scores 46 Highway MPG and 51 City MPG! This Kia Niro delivers a Gas/Electric I-4 1.6 L/96 engine powering this Automatic transmission. Wheels: 16" Alloy w/Cover, Variable Intermittent Wipers, Urethane Gear Shift Knob.*This Kia Niro Comes Equipped with These Options *Trip computer, Transmission: 6-Speed Dual-Clutch -inc: sport mode, Tires: P205/60R16 Michelin, Tire Specific Low Tire Pressure Warning, Tailgate/Rear Door Lock Included w/Power Door Locks, Strut Front Suspension w/Coil Springs, Spare Tire Mobility Kit, Single Stainless Steel Exhaust, Side Impact Beams, Roof Rack Rails Only.* Stop By Today *For a must-own Kia Niro come see us at Kia of Puyallup, 111 Valley Ave NE, Puyallup, WA 98372. Just minutes away!


When British rapper Tinie Tempah (UK No.1) scooped two awards at last month's Brit Awards it crowned an extraordinary 12 months that saw the 22-year-old hit UK #1 with his debut single and follow it up with five hit singles and a platinum-selling album. One of the most inspiring aspects of his dramatic break into the mainstream is that Tinie is a totally home-grown self-made star, who built his career from the ground up in collaboration with manager and cousin Dumi Oburota, this week's interviewee.
The MD of label Disturbing London talks to HitQuarters about signing a major label deal on their own terms, funding a record company with student loans and wheeler-dealing, and about their vision of creating a quality brand and product that can compete with the majors.
Tinie Tempah has recently picked up two Brit awards - what does that mean to you?
It's recognition from the industry, but for me it just means that I have to keep on grinding. Tinie is not the first artist to win two Brits. This is really one year for us in the industry, this is only the start; some people are in the game for over two decades. You cannot rest on your laurels. I want to show people that we can do this for many years.
How did you first get started in the music industry?
As a kid I used to sing but I didn't really think I was the best and so decided to go behind the scenes. I then started managing a friend - we were just mucking around. After that I met my little cousin Tinie - he was interested in music and was good so I decided to set up a record label, recorded some music with him and decided to put it out ourselves.
What were the first steps when you started working with him?
T had a great Myspace following - this was in 2005 and he had like one million followers. I thought, 'That's incredible! If you have that many followers, let's press up 10,000 records.' So I did that but I didn't have a distributer. Luckily I found one and we started selling them to shops and I put my name on the Myspace to get bookings around England.
How did you find the distributor?
I had a legal advisor and he introduced me to a manufacturer that could press up the CDs and through the manufacturer I met the distributor.
What was it that generated all the attention at the beginning of Tinie's career?
That was through an underground hit he had with the song 'Wifey'. That track got played on TV and radio and created a lot of heat and Myspace hits at the beginning. The word was being spread on the internet and radio.
But there was no actual release?
Not officially, no - it was just an underground thing with a low-budget video. We continued networking and plugging the songs. I was going into radio stations trying to get interviews and to get DJs to play the music. Then I convinced Tinie to start up a blog to control his fan base. With the blog he got around 9,000 hits a day and from there we got a lot of bookings around the UK.
When you got involved was the music already there?
In 2008 I started to take it a bit more seriously and moved into an office space and built a studio in there. That's when Tinie started to record a proper album - a commercial album -that we could release independently. I sourced beats from DJs and underground producers in the UK and we recorded about 12 songs.
After [Tinie performed at] the Wireless Festival I got a call from a record label. At that point I had been doing it for three years - putting out records independently, recording music, releasing videos, networking and all of that. So when the label came about I wasn't really into signing Tinie directly to the label and so said, "You know what, why don't we just license the record to you, rather than you guys coming in and messing up all the hard work we've put in?" That was the initial reaction.
Did you always work with a plan and a vision?
Yeah, always. I wanted to release quality music as an independent label, and make a good product that can compete with the major labels. We were an independent label that tried to do major label things.
We were making quality videos like 'Tears' and 'Hood Economics'; these videos were top at the time. We'd spent about £10,000 and because I was networking with the production company, we got a video with the production value of at least £30,000. It looked like Tinie was signed already. The vision was always to package it well, make a product that people can buy into, and one that was as polished as possible.
How did you finance the videos and the setting up of the record label in the beginning?
Lots of it was our savings - my business partner and me were buying and selling cars - and student loans.
As you invested a lot of money in the videos early on, you must have been convinced that videos were an essential factor in building up the heat?
Yeah, it made a difference to a certain degree. There was one video channel who played the video and we got on MTV one time. It made a difference in how people saw him. If you have a good video, people will look at it and be, 'Wow, look at that!' and it helped the word-of-mouth thing, but not as much as we thought. I would say it definitely had an impact on the brand of Tinie Tempah.
I went there to network and wanted to see if I could get any support or somebody to license records for another country. I sat in one of the seminars and in that they spoke about social networking and controlling your fan base that's when I gave Tinie the advice to set up a blog.
It was good to see on an international level that you can meet people hear their stories and see that there's still a business, because sometimes you can think that there's no business left in the music business. And when you go there you can see people are still surviving; there are different revenue streams, and there is not only one way you can do things.
How was the blog used to cultivate his fanbase?
We set up a blog called 'Milk and 2Sugars'. He recorded his progress and what he was doing like, for example, recording in the studio etc. He would review things like trainers and things he's into; just basically bringing in his character, letting people know what he loves. Sometimes it's not all just about music, it's about people liking you as a brand and as a character.
I heard that Live Nation and BBC 1Xtra jumped on board quite early, how did that happen?
Through the underground following and the DJs playing the music, BBC 1Xtra supported us when they had events.
Through my distributor we met a booking agent from Live Nation. Tinie was not known at the time but he had over a million Myspace views and so they thought he must be doing something right. They also really liked the song 'Tears' and thought the project has massive potential so have been supporting him from the start. They booked him for the O2 Wireless Festival two years consecutively.
What was the idea behind starting up your own label?
Obviously we wanted to have a platform to put out our music and there wasn't any Def Jam or Roc-A-Fella label equivalent in England. I wanted to create a major independent label with quality artists - cool music that young Britain and the rest of the world will enjoy. I felt like the major labels had lost the passion for music.
How is your label set up?
I've got two assistants and a sound engineer working for me. We have an office and a studio in east London, a clothing line called Disturbing London Apparel and Disturbing Sounds Publishing.
Are you looking for new artists for your label?
Yes, definitely! We just signed another rapper called G-FrSH - he just got signed to Parlophone.
What actually are you looking for?
I want something groundbreaking. I'm developing a few acts at the moment.
Are you interested in people sending you stuff?
Yeah, definitely, always! I'm always listening to new stuff trying to find the new thing.
How did the connection with Parlophone happen?
One of their A&Rs was at the Wireless shows because one of their acts was performing there (MPHO). At that time we were on about 9,000 hits (profile views) a day. Their artist was going on stage after Tinie, but before Tinie got on stage there were already 3,000 kids waiting in front of the tent because he'd blogged that he was going to be performing. When he finished performing everyone just left, and so the A&R guy was like, 'Who is he?!' He got on the phone and gave me a call.
How were the first meetings with Parlophone?
I went to see Nathan [Thompson], the A&R, and I played him some music and he was blown away. He brought down his boss Miles [Leonard] (HQ interview) to the studio. We had been recording a lot of content from when we were travelling around the UK and so we played him a video of the performances and the reaction of the kids. Then we did a presentation for the label and that's when they wanted to sign us.
What did the presentation for the label include?
Do you remember exactly what was on the printout?
Statistics of all the profile views, what his demographic was, forecasts … things like that.
How did you convince them to give you a label deal and not just an artist deal?
They could see that we'd developed Tinie; I'd recorded 12 tracks, we had the studio, we had the office. We were self-sufficient and by that point we'd networked with a lot of DJs as well. So we had a bit of a set-up and so it was like, "You know what, we know what we are doing here, we are already playing major festivals like Wireless and have an album recorded." So they signed an album and obviously we recorded more songs and ended up using none of the tracks.
So at the moment, how do the responsibilities divide up between Parlophone and yourself?
They do all the marketing and they have the machine to push the record, do the press and things like that. We bring the music. It's a partnership. They facilitate and make it happen.
Is the Parlophone A&R deciding which songs are going to be used?
No, we've got a lot of creative control. They know the angle we are coming from. But that doesn't mean we don't take advice from them. If they hear something and don't like it then we listen to them because they have a lot of experience in that world. They learn from us, we learn from them.
How do you decide on a single?
The energy, the vibe. Obviously it has to be catchy. You know when you hear it - it's all in the gut.
Would you say there was a noticeably big difference once Parlophone stepped in?
The work ethic or creative part hasn't changed but in terms of the people that we can reach with their massive infrastructure it makes a big difference to where you can put your record with a small label. Instead of five people in the office working a record they have 150 people working a record. And on an international level it's a different ballgame, too.
If you had to start all over again what would you do different, and what would you advise an artist to do?
I would do the same. I would keep it fresh and natural - do things that you love and that you're passionate about. Everything that I try to get involved in I try to be a fan of and if I'm a fan of it I put my passion into it and hopefully I will get to point where the artist is successful.
I want to break down doors. I don't want to conform to any rules like when people say, 'This is the way things need to be.' I don't think that's it - you can always change your own game and your destiny.
What is the main income in the moment?
Touring, the brand Tinie Tempah and obviously record sales. Merchandise clothing collaborations ... your artist has to be a brand.
So how do you turn an artist into a brand?
You just have to have brand awareness; it's how you carry yourself, how you look, what you talk about and what you stand for. It's a lifestyle that you represent. It's about culture.
Did you analyse this from a marketing point of view in the beginning?
No, it's not manufactured, it's about what your natural attributes are.
When you look at UK and US popular music scenes, what do you see as the main differences?
I don't really see any difference. We talk about the same things, it's the same struggle, the same stories. The world is becoming smaller through the internet.
What was your greatest moment so far?
It has to be the Brits, and getting to #1, getting platinum on the first record. There has been a lot of great moments, it couldn't be better!
What's the plan for the near future?
To take Disturbing London to the world.


In line with the 5-year vision of The Church of Pentecost to possess the nations, dubbed: Vision 2023, the Ntankoro District in the Kintampo Area has constructed and dedicated a bus stop shelter at the Ntankoro car station to the glory of God.
The facility was dedicated on Thursday, April 11, 2019, by the Area Head, Apostle Gideon Obeng-Darko Debrah. He was assisted by the District Minister, Overseer Samuel Katakyie Ware.
Addressing the gathering at the dedication ceremony, Apostle Debrah said that the church is the salt and the light of the world and has always been a leading transformational agent in every society.
According to him, the Church must therefore not only focus on preaching the gospel but pursue holistic ministry by going further to minister to the social needs of the communities in which they are located.
The Area Head also commended the leadership of the Ntankoro District for setting the pace as the first District in the Area to fulfill this aspect of Vision 2023 and encouraged other ministers in the Area to emulate this good gesture.


text:
Category: Nightmares
iProvo to go private
Long-time followers of Lafayette fiber will recall the supportive visits from Mayor Billings of Provo, Utah during our fiber fight. Sadly, Provo will be losing its publicly-owned network if the current plan goes through. If the city council approves the sale it will be bought by Broadweave and run as a closed, private network much like Cox, Comcast, Qwest, or AT&T. Broadweave has, to date, specialized in fiber networks in new, upscale, gated communities. The silver lining on this dark cloud is that the people of Provo seem to be getting off pretty much even financially. The purchaser, Broadweave, will being paying slightly more than bonded cost of the network. And, the people have a fiber-optic network in place that no private provider would have ever built. Of course this was not what the people of Provo hoped for: they wanted two things: to own their own system and to have a rich variety of providers running over the common infrastructure. In Provo, at least, these two desires turned out to be incompatible.
I'm sure the full story is more complex (and would be happy to be further enlightened) but from this edge of the continent it looks like the misgivings Mayor Billings voiced in Lafayette during one of his visits has proven all too wise. Back then he had a blunt response to a question comparing LUS's decision act as a utility and offer retail services directly and Provo's "open network" practice of instead relying on private retailers to market all the services that used the network's wholesale infrastructure. He said that Lafayette's model was the stronger one. Utah's legislature, however, had forbidden communities to offer retail services and so that option was not open to his city.
There is a story behind that state policy: Qwest–the Bell phone system for that region–had eyed Provo's acquisition of a local cable company and rushed to the state legislature to outlaw the very idea that the people should "compete" in the telecommunications business with their venerable monopoly. A last minute compromise to its law whose original intent was to simply outlaw all public competition was to allow cities to build networks but then to forbid them to run them as utilities–offering services themselves like water or electricity. Resourcefully, the communities made lemons into lemonade: the cities and their community activists found virtue in the "open" network idea that had been their last defense against a total ban and touted the advantages of increased competition and the lower prices and increased efficiency that would (surely) follow.
But Mayor Billings was right: it is the weaker model. It is never a good idea to allow your competitors to dictate your business plan. As history has repeatedly demonstrated there is a reason why all cable companies and all telephone companies have fought for vertically integrated networks and reserved its basic functions for themselves: it reliably pays the bill. The public wholesale and private retail model forces those that take the risk and do the work of building an expensive, sophisticated network to rely on outside, private providers who have done neither to generate enough profit to pay for the network and to provide a nice profit for themselves. Having an extra profit-making business in the flow of cash necessarily, all things being equal, means charging higher prices. And, in Provo's case at least, it also meant that the reputation of the network depended upon the quality of service that the for-profit face of the network offered the community. The private firms, while surely good folks, simply did not have the experience or the resources necessary. The Provo network initially had trouble securing providers and only one out-of-town provider was found (HomeNet). It struggled, did (generously) a mediocre job, was unable to get the sorts of adoption rates that public telecom utilities in places like Burlington, VT or Bristol, VA have quickly and easily achieved. When it went bankrupt Provo was forced to quickly bring on board two new providers and simply gave each half of HomeNet's meager pie. Subscribers had no voice in who they went to and were frozen in place for a period of months while the new operators took over restructured services. Not surprisingly Provo's citizens who experienced this chaos started dropping off even as new users came on board. This "churn" lead to slow growth and limited the pool of customers available to the replacement providers further limiting their ability to improve their offerings.
As we succinctly say down here: "Not good."
Or at least not good for the community. It suited Qwest fine, I am sure. Their state law worked. Just more slowly than they might have originally hoped.
A community-owned network needs to be a utility. It needs to be run on the same stable, sensible, local basis that other community networks are run. When the community can see that it is their network, can see the lower prices and superior service that come with a utility orientation it quickly gains subscribers — as it has in Bristol and Burlington. iProvo's troubles are a case study in the worst that can happen when a community-owned network loses that connection to its community.
I am increasingly glad that Lafayette has not gotten caught in this trap. As bad as the (un)Fair Competition Act is at least it did not force us to put an artificial barrier between our network and our citizens.
For more on this story see the short articles in the Salt Lake paper, the Provo paper and the post at the Free Utopia blog. No doubt there will be fuller stories when the morning paper comes out. (Free Utopia also posted an excellent set of suggestions to iProvo recently…that is really worth the read. It's too bad Provo didn't act on them.)
Author FiberFolkPosted on May 7, 2008 Categories Local, National, Nightmares0 comments
Open Systems, Muni systems, and Lessons from Singapore
A Problem
Advocates of muni telecomm are often met with the blanket, essentially ideological, claim that municipal plans will fail because "everyone knows" that government-run enterprises will always lack the competitive advantages of private businesses. It's hard to greet such claims with anything other than exasperation: anyone who thinks that the duopoly represented by corporations like AT&T and Cox has produced efficient pricing or any sign of innovation just hasn't been paying attention.
Customers of telecommunications companies simply haven't seen the benefits of "free enterprise" that competition is supposed to bring. The telecomm market looks like market-segmented, minimally competitive duopoly and produces results that look a whole lot more like staid, expensive monopolies than anything that might result from a real competitive marketplace.
Lots of folks have noticed this painfully obvious fact about the current telecomm market and in some places are even trying to do something about it. Lafayette has one solution. Singapore is trying another.
Singapore Tries Honest Problem Solving
Singapore is about to invest in a truly radical plan to build a world-class, high-speed network and to do it by encouraging real competition in the telecommunications market. (See 1, 2) Naturally they start by mandating and subsidizing the construction of a fiber to the home network. Beyond that it gets really interesting. Their plan takes yet another stab at inducing competition in the fundamentally natural monopoly wireline broadband market. Competition—when it works—provides cheaper prices and drives innovation. Lot's of country's have tried for that golden ring—and failed. (The American FCC's attempts have been particularly laughable.) What is interesting about Singapore's design is that it might work.
It is worth noticing how far they had to go to have a hope of developing real competition. Consider the starting point: Most networks world-wide are fundamentally vertical monopolies. One company owns the physical network, manages it, and sells retail services to end users. Think about your phone or cable company and you'll get the basic idea. The minimal competition between phone and cable companies over the new internet services should not be allowed to obscure the fact that they are both basically monopolies with only a sideline internet business that has, at best, only one competitor—not nearly enough to develop a competitive marketplace that would yield the benefits of innovation and low prices. As digital services converge over integrated data networks it remains to be seen whether even the current inadequate level of duopoly competition will be maintained…and a lot of history that argues that it will collapse back into a simple monopoly.
But everyone wants competition and its benefits. Singapore wants competition. But Singapore wants it badly enough to try and get it realistically.
Being realistic involves admitting that the basic fiber, the physical network, is a classic natural monopoly. But beyond that evidence of clear-headedness Singapore also seems to recognize that operational layers of the network determine what sorts of application services can be offered at retail and that retail providers need to be able to count on a responsive middle layer provider.
<skipable bit>
<time out for a bit of background>
A typical large-scale network is built up of multiple, but integrated, levels. One way of looking at that is to see at the "bottom" a hardware base built up of the actual fiber and low-level switching. Up from that you have protocols and translation devices/routines that knit together the data from the low-level physical layer. Both of these are pretty much invisible to any end-user. On top of that you have applications that show their face to users of the network. Let's call that 1) the physical layer, 2) the network operations layer, and 3) the applications layer. (This 3-layer description, as forbidding as it might seem, hides an awful lot of complexity. The canonical way of looking at network design is the 7-layer OSI description. That hides less of the complexity. Sophisticated readers should feel free to substitute OSI layer 1 for "physical;" layers 2-3 for "operational" and 4-7 for "applications.")
</time out for a bit of background>
</skipable bit>
Singapore is separating the physical and operational level into two different, unrelated monopolies committed to selling the same services to all retail providers at the same price. The retailers would then be in a position of making all their profit from the quality and the quantity of services they could convince consumers to buy.
Structural Separation: Keeping the Monopoly Owner Honest
Singapore is structurally separating the physical, lower level from the upper operational and application levels by creating a completely independent network company to build and manage the physical network (cleverly called NetCo). That sets things up so the only way the owners can make more money is by providing more value to the wholesale renters of their physical capacity. If you can offer more value more efficiently you can sell more capacity for a better price. And that, to repeat, is the only way to increase your take. This is a simple, reliable, structural solution to the problem of a monopoly owner using their control of the medium to eliminate or forbid competitors. The physical network owner cannot be motivated to manipulate the network to benefit its particular set of retail services if it doesn't own any such services….it will not be allowed, for instance, to sell phone or video services to end users and so has no motivation to structure its network to favor, for instance, cable TV at the expense of DV (Downloadable Video). By making the monopoly network owner's profits depend solely on motives that are aligned with the public's interest the task of regulation is much easier. All you have to worry about is enforcing rules that require everyone to be charged the same for the same service. (This is much of what lawyers mean when they talk about Common Carriage rules.)
Operational Separation: A Balance of Powers
The most unusual (and least clearly specified) part of the plan is separating out the operational division of the network into its own independent company. Most structural separation schemes make this the property of the network owner or allow retailers to install their own equipment at the operational level. The problem with the first solution is that investing all the control in the conservative utility would make it less likely that unproven but potentially innovative middle level equipment would be installed, lessening the hoped-for benefit from innovation. On the other hand letting the retailer install whatever equipment they want on fiber strands they have rented virtually ensures that incompatibility will emerge on the network and pretty much ensures that some classes of equipment will be wastefully duplicated—lessening the hoped-for benefit of lower prices.
Singapore's solution is to provide for a monopoly operational company (cleverly called OpCo) that must maintain a separate existence, board, and identity but which retail owners can own pieces of. Presumeably the Singaporeans, being committed structuralists, think that such an ogranizational schema will eliminate wasteful duplication and will tie OpCo to the more innovative retailers. Now this isn't nearly perfect: it would let powerful incumbents on the network control the provision of new middleware and help them keep out smaller new competitors that would threaten their developed markets….but while imperfect, this is a solution that at least makes a stab at controlling the worst defects of previous attempts to foster competition and encourage both lower prices and innovation at the middle level.
Retail: The Evolutionary Melee
The hope, of course, is that by minimizing costs at the physical layer by putting a free-to-be-careful and conservative utility at the physical level, and by structurally maximizing low pricing and innovation at the middle level the crucial retail applications level will attract many competitors who will have no choice but engage in a ruthless evolutionary melee in order to survive. Consumers would reap the benefits of low prices and innovative, powerful services.
It Might Even Work—At a Price
It is clever. It might even work.
In Singapore. As a National policy. And anywhere that the national government is willing to subsidize a full new fiber network to the tune of 25% of its total costs. Anywhere where it can dictate the terms of the new networks operation in order to ensure the incumbents don't kill competition in its cradle. (The incumbent phone and cable companies are among the bidders for the new network.)
Notice that this plan involves the people paying a substantial subsidy for the development of a system that private corporations will end up owning. And those corporations will reap all the eventual profit.
That's a deal only a authoritarian, corporate state like Singapore could love. It's a high price to pay.
What people are seeking when they try something so draconian is to realize the promise of competition in a framework that has been fundamentally hostile toward competition. (And well, maybe, to provide a little grease for their friends…but let's try to be generous). The hoped-for benefits are lower prices and a high level of innovation. Both are presumed to emerge "naturally" when you structure a natural monopoly so that the owners' self interest is deployed in the service of the eventual consumers.
But there is another, simpler, surer, way to align the owners' self-interest with that of consumers.
Lafayette's way
You could make the consumers the owners, by the simple and time-honored device of making the natural monopoly a public utility. Then the owner-citizens would have no motivation at all to exploit the consumer-citizens…since they'd be one and the same. They could ask themselves for, and expect to get, lower prices and the sorts of services that appeal to them.
I can't fathom why that can't be a national policy as easily as giving away the farm.
Author FiberFolkPosted on December 28, 2007 Categories Competition, Food For Thought, Lafayette, National, Nightmares0 comments
Cox Degrades and Blocks P2P
Broadband Reports tells us that Cox has joined Comcast in chocking P2P traffic. (Readers and netizens will recall the uproar over Comcast's public relations nightmare—blocking the Bible by using your control of the network to lie to both sides of the exchange about the state of the other is considered uncool.)
Like Comcast, Cox is using its control of the network servers to forge the identity of users on both sides of P2P (bittorent, etc.) connections and tell both users that their partner has asked for a reset of the connection. The consequence is a dramatically slower connection or, once one side of the software "gives up," yielding a blocked connection. By forging false information about both ends of the communication Cox denies users the ability to exchange the data they choose.
Why? After all, people buy bandwidth in order to communicate. And Cox has plenty of tools that already control how much bandwidth you're allowed to drink. Cox, like the other cablecos, sells you a speed-throttled product (1.5 megs, 7 megs, etc.) and they have an unpublicized monthly usage cap. So you can only use so much at a time and you can only use so much per month. That should be enough. Why do they feel the urge to tell users what kinds of connections you can make within those limits?
Well…because 1) Greed: supplying bandwidth costs money they'd rather keep and 2) Lying (or more generously, its cousin "advertising). Even though they've set out limits those limits are pretty much fakes that are used to sell product rather than rationally inform consumers. They are counting on very, very few people ever really using the capacity that they sold them. If any substantial number of users really starts to use anything like their monthly allotment everyone's shared speed would drop like a rock. Cox just don't have the capacity to give consumers the speeds they've sold them. At the root of this sort of behavior is that Cox (and the other major telecomms) oversubscribe their bandwidth…sort of like "overbooking" the seats on a plane. Only Cox et al do a lot more of it than than any airline ever dared. (See a recent fine discussion post on gigom for a clear elaboration of the business and network dynamics involved.)
When P2P begins to entice users to come somewhat closer to using the speeds and capacities they've bought that overbooking is revealed: the network slows down and the advertising is revealed too obviously for what it is: a commitment they can't keep. It doesn't help Cox stay calm that P2P also looms as a threat to cable's core business. (We do know what most torrents are used for don't we? Video, legal and otherwise.) Instead of announcing rational speeds and caps that would reflect their actual network capacity Cox follows Comcast in surreptitiously blocking the upstart P2P network in ways that are fundamentally deceptive.
Notice please: exchanging data is exactly why customers buy an internet connection, the blocked technology is perfectly legal technology; the content presented for exchange is not Cox's responsibility; and internet users that never, ever signed a contract with Comcast are having their access blocked.
It's profoundly wrong on multiple levels and no amount of handwaving about ensuring quality of service can obscure it.
Here in Lafayette LUS users will avoid the worst of this because LUS won't sell you a product they can't supply. That's not the way that utility people think. It's not about marketing for them. Besides, they won't have any need for marketing deceptions. The sort of advertising that Cox is engaged in is intended to convince you that you are getting more than you actually are. LUS will have the bandwidth to give you exactly what you pay for. And LUS has been very direct in saying that they intend to do just that. I don't think many people have heard them; it sounds too obvious…but the engineers at LUS know that your local cable connection is horrifically oversubscribed and it hurts their engineer's sense of right order. They want you to know they won't do that. (This is similar to the no connection fees, no penalty-laden contracts promise LUS has made—not doing that marketing stuff is the utility way.)
Does that mean that LUS will never mess with P2P? I hope they won't. There is a lot of nervousness about uncontrolled usage among engineers and servers and P2P is at the center of that angst. I think such anxiety misplaced. But…My point is that LUS won't have to deceptively block services you want to use in order to keep up the facade that you've got plenty of speed. LUS will actually have plenty of bandwidth. And if you use a lot more bandwidth going out of our network (generating a cost we all share) than your fellows do there is no reason not to simply tell you that you are pushing costs onto your neighbors. And charge you for fairly for it if it gets too disproportionate.
Oddly enough I'm looking forward to having that sort of relationship with my net provider. A more honest approach would be a refreshing change.
Author FiberFolkPosted on November 20, 2007 Categories Cox, Lafayette, Local, National, Nightmares0 comments
Comcast joins AT&T: Net Netrality Alert
Executive Summary: Nation's biggest cableco caught blocking the Bible. Methodology: using its control of network servers to tell users at both ends of the transaction lies about state of the connection. Point: to degrade the service of P2P technology users enough to keep them from using scarce bandwidth. Consequence: The case for public ownership—or at least structural separation—grows.
The ensuing stink is sure to rival AT&T's original Net Neutrality blunder.
Comcast, the nation's largest cable company, has joined AT&T, the largest phone company, in giving Net Neutrality advocates a hammer with which to drive home the point that the corporate duopolists want to be able to "shape" the internet to their financial benefit–and that "innovation," competition, and your freedom to communicate are not part of their plan.
While AT&T merely stated its intent to categorize traffic and relegate companies whose product didn't pay a special fee to the slow lane they, and other ISPs, have long claimed that this wouldn't really involve degrading anyone's service. But in this latest blowup Comcast has been caught doing what the national network providers have long denied: blocking or degrading services that pass over its network in order to make sure its own services run at full speed. That's the conclusion that the Associated Press came to after an investigating the communications stream. The fuller description of their investigation reveals that they offered a file of the King James version of the bible for upload over BitTorrent and found that when they connected in order to download it at the other end that Comcast blocked their link.
What Comcast is doing was sending "reset packets" to both ends of BitTorrent file exchanges that are forged to indicate that the message comes not from Comcast but from the user on the other end of the exchange–and that the connection has failed. This drops the connection or at least forces a restart. If the program receives too many of these packets it will refuse to deal with the errant node–a tactic which makes sense when the other end really is broken in some way but which is blatantly disruptive when someone standing in the middle is simply lying about a the state of a perfectly capable participant. There's a semi-formal term for this sort of deceptive practice: it is called a "man in the middle attack." For a man in the middle attacks to be successful there has to be a trusted intermediary passing the message who decides to lie–to pass false messages to each participant. The idea is to create a situation in which the traitor in the middle gets what he or she wants.
That's pretty much the situation here. By forging false information about both ends of a BitTorrent exchange (or Gnutella or Lotus Notes (!)) Comast denies users who, in the AP case were exchanging the Bible, the ability to exchange data. Comcast got what it wanted, though: the links failed and Comcast had more bandwidth to use for its own purposes.
Notice please: exchanging data is exactly why customers buy an internet connection, the blocked technology is perfectly legal technology; the content presented for exchange is in no way copyrighted; and internet users that never, ever signed a contract with Comcast are having their access blocked.
It's profoundly wrong on multiple levels and no amount of handwaving about ensuring quality of service can obscure that.
Just for the record: This "man in the middle, using reset packets" is conceptually the same as one of the tactics that China used to build the infamous "Great Firewall of China." In that instance the Chinese government used their ownership of the network to forge reset packets that effectively blocked any link between a computer in China that received or sent suspect words or phrases indicating political or social dissent and the computer that sent or received those words. (If you're gonna be evil you might as well learn from the best, I suppose.)
A storm of response is building quickly that is sure to rival the ultimate size of the slow-building response to the AT&T gaff that defined the Net Neutrality battles of '05-'06 is building.
The reinstitution of regulation and a reinstitution of the principle of common carriage is the most obvious solution. —One that has been argued here recently.
But this is the sort of thing shakes peoples' trust in their provider and that moves people to recognize that, since even more subtle forms of blocking are possible, a better solution might well be structural: remove the incentive to be evil and only the truly twisted will persist in doing the wrong thing. The first structural suggestion is to enforce "structural separation" meaning that no network provider would be allowed to own any part of the content that flows over the wires. Their only interest then would be in developing a better, faster network. We now have well-respected (i.e. no "mere" blogger) players like Susan Crawford and David Isenberg suggesting that is the only solution. Others, like Bob Frankston, want the current networks given to the municipalities to run open municipal systems that mimic the road system.
These are all necessarily national-level suggestions. They require some measure of divestment being forced on the current providers and only the federal legislature could do that. They are not bad ideas. But they suggest a long battle with a doubtful outcome.
Few, yet, are making the structural case that simple municipal or cooperative ownership would also destroy the motivation for a network provider to shape the usage of local users in ways that are not in their interest. We should all own our own local networks. The principle is simple: owners have no motive to abuse themselves. We can, as we in Lafayette have, make the decision to build a network with a big enough pipe that scarce bandwidth is not an issue inside our system. We can decide to price external bandwidth–and the costs associated with P2P an other bandwidth-heavy applications like streaming video as we see fit. (Local caching of popular content would be an obvious first solution in any bandwidth-rich locale. Big files need only come into our community once.) Owning our own network won't free us from the Comcasts of this world who might still try and keep us from from freely communicating with their customers. But it would give us the control that ensures a network that serves our interests and not the interests of an corporate network provider who is willing to stand in the middle and lie to us and those we are communicating with in order to avoid dealing with the issue at hand honestly.
Right now only a minority wants to force divestiture or expropriation on the network providers. A few more, possibly a majority, already think that municipalities ought to be allowed to build their own networks. Comcast is changing those numbers — and not in a way that it will like.
Author FiberFolkPosted on October 23, 2007 Categories BS/ATT, Lafayette, Local, National, Nightmares0 comments
"Slashdot | AT&T Silences Criticism"
Why We Need Local, Public, Internet Providers
Why We Need Common Carriage
A friend passed this on in an email with the subject line: "This must be illegal." I hope so…
5.1 Suspension/Termination. Your Service may be suspended or terminated if your payment is past due and such condition continues un-remedied for thirty (30) days. In addition, AT&T may immediately terminate or suspend all or a portion of your Service, any Member ID, electronic mail address, IP address, Universal Resource Locator or domain name used by you, without notice, for conduct that AT&T believes (a) violates the Acceptable Use Policy; (b) constitutes a violation of any law, regulation or tariff (including, without limitation, copyright and intellectual property laws) or a violation of these TOS, or any applicable policies or guidelines, or (c) tends to damage the name or reputation of AT&T, or its parents, affiliates and subsidiaries. Termination or suspension by AT&T of Service also constitutes termination or suspension (as applicable) of your license to use any Software. AT&T may also terminate or suspend your Service if you provide false or inaccurate information that is required for the provision of Service or is necessary to allow AT&T to bill you for Service.
Oh…and by the way:
5.2 Deletion of data after Termination or Cancellation. You agree that if your Service is terminated for any reason, AT&T has the right to immediately delete all data, files, and other information stored in or for your account, including email messages, without further notice to you. (All emphases mine)
Slashdot links to the new AT&T TOS (Terms Of Service) and has an only fair section of commentary—this isn't in a technical realm in which its readership excels. But it is worth thinking about and talking about…AT&T might well be within its "rights." We'd only find out through a court battle and the main purpose of the clause might well be less to impose real punishment than to have a chilling effect on any discussion of its failings.
What adds insult to injury, of course, is that AT&T has shown no hesitation to participate in wiretapping of (at best) "questionable" legality. Insults to the company's dignity are worth draconian posturing. Invasions of your privacy and legal rights are just another thing to be examined in terms of the company's potential profits. If that seems to be unbalanced to you–well it is. Only a monopoly could think this way.
This would be illegal if it was about phone service. AT&T is clearly a "common carrier" there and this venerable legal tradition both forbids AT&T to deny anyone service on its whim and, in return, absolves AT&T of any legal responsibility for what people talk about on the phone. (AT&T is not on the hook for aiding you if you plot murder.) But that principle is eroding and it is just about gone in the ISP world. Notice that a part of the clause above I didn't highlight gave AT&T the right to deny you service if something you do could be construed to:
(b) constitutes a violation of any law, regulation or tariff (including, without limitation, copyright and intellectual property laws)
So AT&T reserves the right to not only to nanny you on its own account but to be a nanny-for-hire (enforcement won't be free, you betcha) for the entertainment industry. (And, oh yeah, the government–but we can't talk about that….) This is merely carrying through on AT&T's earlier commitment to Hollywood to enforce it Digital Rights Management schemes. It ties into their hopes to establish a two-tiered internet (fast and notsofast) based on deep packet inspection. If they can get deep packet called a legal necessity to enforce the laws then they can put in place everything they need to route "paid up" packets down the fast lane.
This is serious stuff.
It is also dangerous stuff. Not just for you and me but for AT&T. Does AT&T really want to go down the slippery slope of deciding that it will monitor the taste and legality of action taken over its network? (That is exactly what is promulgated here.) I hope not. And it is dumb, IMHO, to give up the protection of common carriage.
I am IMMENSELY grateful that I will soon be able to cut myself completely loose of such dangerous and foolish petulance. The elephant is dying and I don't want to be anywhere near its death throes.
That a TOS like this is conceivable and possibly legal is EXACTLY why we need net neutrality and a clear reinstitution of common carriage. And it is a substantial reason to say we need LUS Fiber.
(Just for the record: none of my sites is on an incumbent server, nor is any email account I use. Yours needn't be either. And soon you should be able to get off their copper.)
Author FiberFolkPosted on October 1, 2007 Categories BS/ATT, Nightmares0 comments
Credit Where Credit's due: Cox & Privacy
Credit where credit is due: Cox Communications, according to an entry Wired's "Threat Level" blog, is doing as right by the public in regard to their protecting their privacy from illegal government intrusion as is permissible.
Currently in Lafayette, and much of Louisiana, the choice for telecommunications services is between Cox and AT&T. If protecting your privacy from illegal government surveillance is important to you it appears that you'd be well-served to switch to Cox. (AT&T has been nailed repeatedly for complying with illegal requests.)
The blog entry is pretty much a set of reporters notes on a story he wrote for Wired, "Point, Click, Wiretap: How the FBI's wiretap net operates." The main story documents a pervasive network of surveillance with the FBI constantly tied into private providers communications centers across the country using a network physically separated from the regular internet. That network, according to the illustration from Wired at right must run through Lafayette on its way from New Orleans to Beaumont either on I-10 fiber or up US 90 along the railroad..
The FBI has quietly built a sophisticated, point-and-click surveillance system that performs instant wiretaps on almost any communications device…
The surveillance system, called DCSNet, for Digital Collection System Network, connects FBI wiretapping rooms to switches controlled by traditional land-line operators, internet-telephony providers and cellular companies. It is far more intricately woven into the nation's telecom infrastructure than observers suspected.
It's a "comprehensive wiretap system that intercepts wire-line phones, cellular phones, SMS and push-to-talk systems," says Steven Bellovin, a Columbia University computer science professor and longtime surveillance expert.
DCSNet is a suite of software that collects, sifts and stores phone numbers, phone calls and text messages. The system directly connects FBI wiretapping outposts around the country to a far-reaching private communications network.
The backstory is that during the Clinton administration federal law enforcement agencies complaining that digital communications made wiretapping increasing ineffective asked for a law that would force network providers to only install hardware and software that allowed for easy, centralized, information capture by all private network operators. That law, commonly labeled CALEA, passed and was augmented post 9-11 by the Bush administration. An FCC ruling this year extended CALEA compliance rules to all VOIP providers, facility based like AT&T or independent, like Vonage. That, in conjunction with elements of 911 compliance ensures that constant monitoring is possible. (You can, however, personally encrypt your communications though few do. Carrier-provided encryption must, by law, be trap-doored and that trap made available to governmental agencies that legally request them.)
What the story documents is just how the FBI has implemented this law and just how easily it can be and how extensively such monitoring is done.
It's not news that the large telecom corporations, intricately dependent upon federal regulation to protect their competitive positions, extensive subsidies, and spectrum "property" are pretty cravenly submissive to whatever the Feds ask of them. What is news, in a sort of man bites dog sort of way, is when one of the resists giving the administration anything they want. Qwest has earned kudos in the past and now it appears that Cox has also done "the right thing." From the blog:
Cox Communications lawyer Randy Cadenhead was also key to the story. Among the things that didn't make it into the final piece is that Cox is the only major telecom company to publicly publish its forms and fees for wiretaps. That documentation, which doesn't reveal any national secrets, should be on every telecom's website, in interests of transparency. Unfortunately, none of the largest wireless carriers do so, nor they, with the notable exception of AT&T, responded to requests for comments on the story.
Cadenhead also noted that Cox Communications did not participate in, or have any knowledge of, other wiretapping programs that have recently been in the news (read: warrantless wiretapping).
Now it should be noted that this leaves open the possibility that Cox simply was not asked to join the cabal. But as the third largest cable carrier and a VOIP leader in their field that seems unlikely. Nor does it mean that Cox hasn't complied fully with CALEA requirements. They surely have. Now it could be that once locked into an aggregation point on Cox's network they wouldn't have to ask Cox to do anything in order to "wiretap"—illegally or otherwise. In which case Cox's denial would be disingenuous. They'd have a warrant for legal wiretaps and wouldn't have, and thus wouldn't "know about," any illegal ones.
But that caveat aside it does appear that the reporter and the Cox representative believe that Cox is not cooperating with illegal wiretaps. And we know that AT&T is. One more reason to not hang up the phone when that annoying guy from Cox calls trying push VOIP during dinner.
(And, oddly, one more reason to be eager to see LUS enter the market. As a public agency LUS will be no less obligated to obey the law than any private corporation–but they are also, by law, will be unavoidably much more transparent than any private corporation. Public agencies can be required to submit records that make much of what they do visible (rightly so). But what that means to black hat operations like those we've seen recently is that those running them would be wise to avoid trying impose their illegalities on utilities like LUS which cannot hide their interactions from public scrutiny.)
Author FiberFolkPosted on August 31, 2007 Categories BS/ATT, Cox, Lafayette, Local, National, Nightmares0 comments
Video Franchise Disaster in North Carolina
A weekly newspaper in North Carolina's Research Triangle, The Independent, has one of those rare, acerbic, factually rich explorations of a significant topic that you only seem to find in alternative weeklies.
The reason you're seeing it here is that the column's point of departure is North Carolina's "Video Service Competition Act"—a phone company sponsored bill that moved control of cable franchise to the state level and thereby removing local control over fees, PEG channel support, and consumer protection. North Carolina's legislature passed it last year, just as Louisiana's did, in the name of encouraging competition. But North Carolina's governor signed the bill while Blanco, citing concerns over local control and damaging municipalities' income, vetoed the bill.
On the basis of North Carolina's evidence, Blanco was right.
The History:
Though the legislation promised competition and new investment, in fact no new competition has emerged. Neither Verizon nor AT&T have actually launched any new services in North Carolina and they don't have any firm plans to do so. No new technology has appeared. Prices have not fallen. Hmmn.
Though they assured municipalities that they'd see no drop in income in fact the state has collected only 62% of what the municipalities had been taking in. Ooops.
Though local PEG channels, like our AOC, were promised a secure share from the state it turns out that the state only budgeted for 80 channels—and 300 applied. Ooops.
The Kicker:
North Carolina is now being asked by the telecomm companies to pass the "Local Government Fair Competition Act." It's a law like Louisiana's law that imposes unfair constraints on local governments and makes it virtually impossible for a small community to make the decision to do so. The author of this piece suggests, on the basis of the outcome of last year's disaster, that they not do so. So has Lafayette Pro Fiber. Emphatically.
Give the story a read; there are some "rich" details.
Author FiberFolkPosted on July 14, 2007 Categories Local, Nightmares, VOE1 comment
AT&T sez: "Your Network Are Belong To Us"
The "Lafayette did the right thing on July 16th 2005" department:
AT&T has reasserted its intention to dig through every packet you send over the internet to decide if it (not a court or a policeman) thinks that your content should be blocked. It boils downt to this: they think that, if on the balance, they would benefit financially from blocking your content they should be allowed to. And they are willing to say so straightforwardly.
Anyone who thinks the Net Neutrality wars are over has got another think coming. And, as before, AT&T (nee SBC & BS) is leading the way in demanding a newly privatized, corporatized internet. Connoisseurs of net history will recall that AT&T Chairman and CEO Ed Whitacre kicked off the net neutrality wars by asserting the right to overthrown the common carriage rules that are in place and to establish fast, privileged lanes for special (read: large, wealthy, paying) purveyors of content. Their stuff would go to the head of the line. Your stuff would….wait. Last winters' net neutrality battle that raged over the internet and in Congress and which eventually killed what seemed at one time a sure-thing telecom "reform" bill was a direct result of Whitacres impolitic utterances. (If you think that Big Ed's recent retirement changes things you might want to read Mike's recent post on his successor: it's not Ed, is not his clone Stephenson, its not the senior VP whose interview kicks off this review–it's the corporate culture of AT&T.)
Here's the gist of the story from the LATimes:
In mid-March, executives at Viacom and the Motion Picture Assn. of America separately approached [AT&T senior vice president] Cicconi with the idea of a partnership. Content providers have long looked for a network solution to piracy, but no operator had been willing to join with them.
AT&T thought about it and:
The company's top leaders recently decided to help Hollywood protect the digital copyrights to that content.
Leading to a summit of sorts:
Last week, about 20 technology executives from Viacom Inc., its Paramount movie studio and other Hollywood companies met at AT&T headquarters to start devising a technology that would stem piracy but not violate privacy laws or Internet freedoms espoused by the Federal Communications Commission.
Now that's a misleading "but." The current FCC's position is that everything the Telecoms want to do is hunky dory from refusing to investigate illegal wiretapping to allowing the reconstitution of the nation's largest telecom monopoly: AT&T. Really, the spectacle of AT&T getting pious over Hollywood's piracy laws is really smoke and mirrors. After all AT&T has been totally uninterested in helping prevent piracy when piracy was a profit center for them–when it helped them sell broadband. What has changed is that AT&T has decided it wants to be in the good graces of the Hollywood moguls who control the video content the company will have to buy in order to offer cable-like IPTV. To wit:
As AT&T has begun selling pay-television services, the company has realized that its interests are more closely aligned with Hollywood, Cicconi said in an interview Tuesday. The company's top leaders recently decided to help Hollywood protect the digital copyrights to that content.
Now people DO notice when this sort of shuffling is going on. Gigi Sohn of Public knowledge remarks:
"AT&T is going to act like the copyright police, and that is going to make customers angry," she said. "The good news for AT&T is that there's so little competition that where else are the customers going to go?"
Just for the record, not every corporation is a craven as AT&T:
Verizon Communications Inc., which has fiercely guarded the privacy of its customers, has refused so far to offer a network anti-piracy tool. It defeated in court the recording industry's demands to reveal names of those allegedly involved in downloading pirated songs.
AT&T is wondering if they can't use Hollywood to get them permission to call the current internet broken and allow the the sort of deep packet inspection and content provder surcharges that they've been after recently. That argument failed last year in Congress because it failed so badly with the internet-using public. The potential new plan is all too transparent: Perhaps the "only" way to "secure" copyrighted works would be to make sure they are only downloaded from the owners' websites and to interdict all other copies. AT&T would deep packet inspect all of your little bits and bytes…and Google's…and anyone else who didn't pay the vigorish to get put on the "pre-approved" list. Their (paid for) downloads would be fast, yours and other's (unpaid) would get the slow inspection. Imagine waiting in line while some dim-witted mechanized inspector paws through your stuff and asks you if you really own your underwear…while a select few zip past "pre-approved" by virtue of having paid of the private security guards–legally, of course. (Does this sound utterly unlikely and too unnatural to be a real possibility? If you think so you've not been watching the parallel madness over "Goodmail" with whom our local "friend in the digital age" Cox recently joined. If you pay Goodmail, which pays Cox, you can bypass Cox's spam filters….this is presented as a "solution" to the spam problem!)
Such stuff should be illegal; it is an abuse of the ownership of a vital transport utility. In our history railroads, canals, and shipping lanes were not allowed to establish "favorites." That was the essence of common carriage. We shouldn't allow the current robber barons to change that.
The solution for individuals is to move your personal accounts to a small, reasonably priced provider who is more beholden to you than to large corporate accounts. I recently moved my and my wife's email domains to a provider who allows me to turn off and on their spam filtering after overly aggressive filtering bounced legitimate emails sent from both regional Cox and BellSouth servers as spam. With my new provider people no longer complain that my server is bouncing their legitimate mail back to them. My new provider gives me complete control. Frankly, most folks don't want to have to go that far to protect themselves; they'd rather they had a provider they could trust. Unfortunately, in most communities as in Lafayette, the incumbents have demonstrated that they are not worthy of that trust.
The solution for communities is to own your own last mile. It's not just that you'll get a better price. (Though you will.) It's not just that you'll get better tech. (Though you will.) It's that you'll get a system owner that you can trust, one that owes its first allegiance to you and not to the cash flow your subscription offers distant, self-interested owners.
That is why Lafayette made the right decision on July 16th two years ago when it voted to build and operate its own fiber-optic network.
"All our networks are belong to us."
Author FiberFolkPosted on June 15, 2007 Categories BS/ATT, Cox, Lafayette, Local, National, Nightmares0 comments

redpajama_set_name: RedPajamaCommonCrawl


text:
« Metra, BNSF Ripped at Public Hearing
NS to Relocate HQ to Atlanta »
No Injuries, But Long Delays in Train-Truck Crash
Amtrak's westbound Capitol Limited races through Berea, Ohio, in suburban Cleveland just after sunrise on Wednesday. It was delayed more than four hours after hitting a truck in West Virginia on Tuesday.
No injuries were reported after Amtrak's Chicago-bound Capitol Limited struck a dump truck on Monday afternoon in West Virginia.
The incident occurred about 5:35 p.m. at a crossing near Ranson, West Virginia, when the truck stalled on the CSX tracks at Charles Town Road and Luther Jones Road.
The train was carrying 108 passengers and crew members. The truck driver jumped before the collision and was not hurt but was shaken up.
Witnesses said the impact split the vehicle in half. "You heard the brakes pull, there was a loud screech, and then the train slowly came to a stop," said passenger Michael Malloy said. "Then probably five minutes later, over the intercom we heard the train was going to be stopped."
Lead P42DC No. 162 suffered severe damage in the collision and its fuel tanks were ruptured.
Officials at the scene were quickly able to contain the spill.
Railroad workers set the lead Amtrak locomotive aside and the train continued to Chicago with the trailing unit, No. 62, pulling.
No. 29 was delayed for four hours and was on the move by about 9:30 p.m.,
However, the train incurred additional delays, particularly while traveling on Norfolk Southern tracks west of Cleveland.
No. 29 arrived in Cleveland at 7:33 a.m. down 4 hour and 40 minutes.
But that ballooned to 7 hours and 40 minutes by the time it halted at Chicago Union Station at 4:25 p.m.
Tags: Amtrak Capitol Limited, Amtrak late trains, Amtrak photographs, Amtrak photography, Amtrak Photos, grade crossing accidents
This entry was posted on December 12, 2018 at 9:17 am and is filed under Amtrak News.	You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.