Wednesday, August 27, 2014

For some reason, the Play Framework docs give you an overly verbose syntax for setting up a fake application on each test:

    @Test
    public void findById() {
        running(fakeApplication(inMemoryDatabase("test")), new Runnable() {
            public void run() {
                Computer macintosh = Computer.findById(21l);
                assertThat(macintosh.name).isEqualTo("Macintosh");
                assertThat(formatted(macintosh.introduced)).isEqualTo("1984-01-24");
            }
        });
    }
It's much cleaner to do that with with the Helpers class and JUnit setup and teardowns (i.e., @Before and @After)

public class ApplicationTest {
    private FakeApplication fa;

    private FakeApplication provideFakeApplication()
    {
        return Helpers.fakeApplication(Helpers.inMemoryDatabase());
    }

    @Before
    public void startapp()
    {
        fa = provideFakeApplication();
        Helpers.start(fa);
    }

    @After
    public void stopapp()
    {
        Helpers.stop(fa);
    }

    @Test
    public void checkSums() {
        /* Runs in a FakeApplication context */
        Result result = Helpers.routeAndCall(Helpers.fakeRequest(Helpers.GET, "/sums"));
        System.out.println("sums result "+ Helpers.contentAsString(result));
    }
...
}
Using the wrapper can't even be justified for one-off tests except for the fact that you might forget to call Helpers.stop.

~~~~

Monday, August 25, 2014

Despite all of my posts discounting my TagFS (there are so many). I've started dog-fooding it, using a mounted TagFS for articles and things I've downloaded while doing research. It may be that standard Unix commands and file browsers are sufficient interfaces for the common case of tagging files. I will post back eventually if I make changes based on this usage.

~~~~

Saturday, July 19, 2014

What joy when the insouciant
armadillo glances at us and doesn't
quicken his trotting
across the track into the palm brush.
What is this joy? That no animal
falters, but knows what it must do
--Denise Levertov

~~~~

Tuesday, July 15, 2014

Such acts targeting places of worship are unacceptable. They are extremely grave et will always find a determined response from the authorities,” he said in a statement. He said France ''will never tolerate the import of the Israeli-Palestinian conflict on French soil.'

~~~~

Thursday, July 10, 2014

It's hard to explain the phrase, "There's no such thing as consciousness". I used to say it, but I don't know if it's as productive as I used to think it is. When I say that, my intention is to divorce the idea of consciousness from its myriad associations--the irremovable notions that are associated with the word "consciousness". I think we can get to the place where the phenomenon itself is usable--where it becomes a like a pencil, perhaps. That is to say, where something like a human can affect the world through an exercise like writing to re-inscribe on some little part of the world (like a piece of paper) some little part of its little world (its mind).

These analogies and analogies...

~~~~

Tuesday, July 1, 2014

What is the BRAIN initiative? The Obama administration's moon shot?

~~~~

Sunday, June 29, 2014

Abraham and Christianity

At this point, I understand that Abraham, the 'father of the Jews' was used by early Christian writers to craft the nascent Christian community. Paul referenced God acknowledging Abraham's faithfulness prior to his circumcision both in 15:6 when "Abram believed the LORD, and [God] credited it to him as righteousness" and earlier in Genesis 12:2-3 when God makes his first promise, and Paul, because these acknowledgements were made before Abraham is commanded to circumcise himself, claims that the promises of the covenant are open to people on the basis of faith. Barnabas uses typological arguments, drawing connections between stories in the old testament (some of which are related to Abraham) and Christ. These arguments supposedly show that the old testament, the 'type', is fulfilled and superseded by the 'anti-type' in Christ's life.

The main issue I have is that I can't understand why these writers would want to exclude the Jews (of whom many of them were a part) from the covenantal promises -- in some cases excluding them from the possibility of inclusion entirely.

~~~~