You are exploring: VU > Library > Blogs > Falvey Memorial Library Blog

Interviews with Alain Badiou on France Culture


Psychoanalysis and Politics


About Psychoanalysis and Politics

PSYCHOANALYSIS AND POLITICS aims to address how crucial contemporary political issues may be fruitfully analyzed and addressed through psychoanalytic theory. It is an interdisciplinary conference series – we invite theoretical contributions and historical, literary or clinical case studies on these and related themes from philosophers, sociologists, psychoanalysts, group analysts, psychotherapists, literary theorists, historians and others. Perspectives from different psychoanalytic schools are most welcome.

The symposia differ from most conferences in that they are democratic; they make room for presenters at different stages in their careers, and from outside as well as inside academia. They present a space for discussion, with an emphasis on engagement and active participation from everyone who is present. The debates continue during joint meals at the symposia.
E-mail: psychoanalysis.politics@gmail.com

Psychoanalysis and Politics is funded by, and forms a part of, NSU, an initiative of The Nordic Ministerial Council, which aims to promote original and interdisciplinary research collaboration between Norway, Sweden, Finland, Denmark, Iceland, Estonia, Latvia and Lithuania, and between these countries and the rest of the world. See the page ‘about NSU’ and:  www.nsuweb.net

LENE AUESTAD, Research Fellow, Philosophy, University of Oslo/ Centre for Studies of the Holocaust and Religious Minorities/ currently London
JONATHAN DAVIDOFF, Psychologist, Postgraduate Student in Psychoanalytic Psychotherapy, Tavistock Centre, London


Breaking News! Falvey Receives 2013 Excellence in Academic Libraries Award

We are proud to repost from ACRL Insider:

“The Association of College and Research Libraries (ACRL) is pleased to announce the recipients of the 2013 Excellence in Academic Libraries Award – Walla Walla Community College Library, Walla Walla, Wash.; Rollins College Olin Library, Winter Park, Fla. and Villanova University Falvey Memorial Library, Villanova, Pa. Sponsored by ACRL and YBP Library Services, the award recognizes the staff of a college, university and community college library for programs that deliver exemplary services and resources to further the educational mission of the institution.

…Falvey Memorial Library at Villanova University, winner in the university category, was selected for its continuous innovation in serving the university’s mission through an organizational structure built around teams and work groups and collaborative philosophy.

‘Through true collaboration across all levels of the organization, Falvey Memorial Library has leveraged expertise and enthusiasm to engage itself in serving all aspects of Villanova University’s mission,’ said Lisa Hinchliffe. ‘The Learning Commons furthers this philosophy by integrating library services and resources with other campus educational centers in support of student learning and the additional event spaces create a true public forum for the intellectual life. The library’s work in digital initiatives, particularly the partnerships with other Catholic universities and the creation of VuFind, demonstrates the commitment to working collaboratively with the broader library profession. VuFind is a quintessential example of local work having global impact.’

‘We are thrilled to receive this recognition for the achievements of Falvey Memorial Library,’ said Joseph Lucia, university librarian at Villanova University. ‘The ACRL Excellence Award represents for us the highest level of peer endorsement of our efforts to create an innovative ‘commons-centered’ model for academic library service and success in the digital era. There are many extraordinary academic libraries doing many creative things at this time so it is difficult to stand out from the pack.  We are truly honored to have been selected.’

Each winning library will receive $3,000 and a plaque, to be presented at an award ceremony held on each recipient’s campus.

Additional information on the award, along with a list of past winners, is available on the ACRL website.”

Lisa Hinchliffe is chair of the 2013 Excellence in Academic Libraries Committee and professor at the University of Illinois at Urbana-Champaign.


A More Complex VuFind 2 Unit Test

Okay, much sooner than expected, I found a good candidate for some more complex unit testing: the VuFindCart object that we mocked in the previous post.

Preparing for Testing

As I mentioned in the previous post, sometimes a bit of work needs to be done before classes can be easily tested.

In the case of VuFindCart, the class reads and writes cookie values (since this is how VuFind tracks book bag contents).  This is problematic for testing — the class is dependent on web-specific elements in the environment.  The solution is easy enough, though: add some extra abstraction.

First, we add the ability to override $_COOKIE through an extra constructor parameter: diff.

Next, we create a wrapper function around setcookie(): diff.

Now we can test everything easily even if we don’t have real cookies.  This abstraction may also come in handy in the future if Zend Framework offers its own cookie handling utilities, since we have reduced the number of times that VuFind directly utilizes low-level PHP functionality.

Writing the Test

As of this writing, we don’t have 100% test coverage for VuFindCart, but the work-in-progress test demonstrates a few useful techniques.  You might want to open the full code in another tab so you can look at it as you read the notes below.

First of all, as discussed in the previous post, VuFindCart depends on VuFindRecordLoader.  I use a mock object to satisfy that dependency.  The mock object is created as a property of the test class — this way, if tests need to make assertions about how VuFindCart interacts with VuFindRecordLoader, these can easily be set up.  (I haven’t done this yet, but it will be necessary to get 100% coverage).

I have created a getCart() convenience method which returns a VuFindCart mock object.  This routine uses the second parameter of getMock(), which can be used to specify which methods are to be mocked out.  In this case, we are only mocking out the setCookie() wrapper function, since we don’t want our test to actually call PHP’s setcookie() function.  Everything else will be executing real code from the VuFindCart class.

Most of the actual test cases are simple low-hanging fruit — setting values in the constructor and making sure that the corresponding get methods return them correctly, etc.  It should be fairly self explanatory.

The testFullCart() method might be of some interest — this demonstrates using a series of assertions to confirm that an expected sequence of events happens in the appropriate order (in this case, we are making sure that the cart registers as being full at the right point in time).

The testCookieWrite() method further demonstrates the power of mock objects.  We want to test that adding an item to the cart writes the correct values to the cookie.  Since we have mocked out the setCookie() method, we can set up expectations that it will be called at particular times with particular values — this allows us to test that a call to $cart->addItem() results in the expected calls to $cart->setCookie(), without actually writing any real cookies.  The PHPUnit syntax can seem a bit weird at first, but it’s not really too bad.  In this example, $this->at(0) and $this->at(1) are being used to set up rules relating to the first and second calls to $cart->setCookie; the ->with() portion sets up expectations for particular parameters at each call.


I hope this further demonstrates how testing can be achieved.  As before, please feel free to ask questions!


A Simple VuFind 2 Unit Test

I have said on several occasions that test-writing might eventually become a good way for new developers to contribute to the VuFind project. By increasing our test coverage (and thus future code stability), new tests are a valuable contribution to the software… and the act of studying all the code paths in order to write a test is a good way to learn how things work.

Of course, the reality of the situation is not so straightforward. There is still a lot of code in VuFind that is inherently hard to test, usually due to complex dependencies. At this point in time, the process of writing tests is often also the process of refactoring code to reduce coupling, which in turn makes it more testable — and this often requires a deeper understanding of the system than a newcomer is likely to have. (See my previous blog post for an example of the sort of refactoring I mean).

So testing isn’t always easy…  but still, it can sometimes be straightforward.  Here’s a relatively simple example to demonstrate some of the principles.

Getting Set Up

This post assumes you have a clean copy of VuFind 2 checked out somewhere separate from your production instance, and that you have the necessary tools (PHPUnit, Phing, etc.) installed.  More background on the setup can be found in the VuFind wiki.

What We Are Testing

For this example, we are testing VuFind’s Cart view helper (VuFindViewHelperRootCart).  This is a very trivial piece of glue code whose purpose is to make VuFind’s cart object (which keeps track of user selections in the optional “book bag” feature) available for use in view scripts.  You don’t really gain much by writing a test for this class — it is unlikely to change much and it contains no complex logic — but since it is so simple, it’s a good candidate for this tutorial.  We can get to 100% coverage very quickly.

You can view the full code of the view helper in our Git repository.

There are only two methods: the constructor (which takes a VuFindCart object as a mandatory parameter) and __invoke (a PHP magic method which returns the Cart object when the helper is invoked as if it were a function).

Getting Started

By convention, unit tests (i.e. all tests that exercise VuFind functionality without relying on an active test instance) reside in module/VuFind/tests/unit-tests/src.  Within this directory, test classes are arranged and namespaced to correspond with the code that they test.

This means that we’re going to create a module/VuFind/tests/unit-tests/src/View/Helper/Root/CartTest.php, living in the VuFindTestViewHelperRoot namespace.

All PHPUnit test cases must be subclasses of the PHPUnit_Framework_TestCase class.  VuFind includes some base test classes with additional convenience methods (see the VuFindTest namespace), but this particular test is simple enough that we can simply extend the default base class:

class CartTest extends PHPUnit_Framework_TestCase

Writing the Test

One of the keys to writing an effective test is to avoid doing any work that is not related to the task at hand.  You don’t want your test to fail because of a problem in a different area of the code — this will make bugs harder to locate when something breaks.

We are trying to test something very simple here — essentially we want to be sure that when we put a cart object into the view helper’s constructor, we get the same object out when we invoke the helper.

This is where the “don’t do unrelated work” rule comes in.  We could construct a real VuFindCart object for testing purposes, but then if there was a bug in the VuFindCart constructor, that might cause our test to fail, even though that has nothing at all to do with our view helper.  Fortunately, we don’t have to construct a real VuFindCart object, thanks to PHPUnit’s mock object feature.

With mock objects, we can create objects that serve as placeholders for real classes in our code.  They accept the same method calls and pass the same instanceof tests as real objects, but they don’t actually do anything — unless we configure them to expect particular incoming data or simulate specific responses under specific circumstances.  These are a very valuable testing tool!

In our particular case, we don’t need to do anything fancy with mocks — we just need to call PHPUnit’s built-in $this->getMock() method to construct a fake Cart object.

There’s just one small issue.  If you just call:


You will get an error.  VuFindCart’s constructor expects a VuFindRecordLoader object, and we have to satisfy this dependency even when building a mock.  Fortunately, the third parameter of getMock() accepts constructor parameters for the new mock object, and nothing stops us from creating a mock VuFindRecordLoader to satisfy the dependency.  Thus, we end up with:

$cart = $this->getMock(
‘VuFindCart’, null, array($this->getMock(‘VuFindRecordLoader’))

Now that we have our fake cart, the rest is simple…  Just construct a view helper:

$helper = new VuFindViewHelperRootCart($cart);

…and then test that invoke works by making an assertion that invoking the helper will return the same object that we passed to the constructor:

$this->assertEquals($cart, $helper());

Assertions are the most important part of any test — these are what determine whether each test passes or fails.  Never write a test without any assertions!  PHPUnit includes a wide range of assertion methods, allowing you to express many different conditions.

Running the Test

Now that the code is written (full test class available here), it’s just a matter of using your VuFind test instance to run it, as described in the wiki.

After confirming that a new test passes on my local system, I push it to the Git master and then check the code coverage report in Jenkins after everything rebuilds.  In this case, I’m now seeing 100% coverage for the cart helper.

What Next?

I hope this has served as a helpful introduction to some fundamentals, but I realize that most real-life testing is significantly more complicated.  I may try to write an article describing a more difficult test in the future if time permits.  In the meantime, if you want to try your hand at test-writing, feel free to send me questions — I’ll be happy to recommend some areas that might be worth looking at, and I can help with any refactoring that may be necessary.


'Emancipation Proclamation': Two Events in Falvey Mark the 150th Anniversary

How and When to Commemorate Emancipation”: Special guest speaker William A. Blair, PhD, will address this topic on Thursday, Jan. 31 at 4 p.m. in the Falvey first-floor lounge. Dr. Blair is a liberal arts professor of American history and director of the George and Ann Richards Civil War Era Center at Penn State University. Sponsored by Africana Studies, this event is co-sponsored by the Center for Peace and Justice Education, the Institute for Global Interdisciplinary Studies, the Cultural Studies Program and the Department of History. For additional information, please contact Madeline Cauterucci.

“Memorable Days, the Emilie Davis Diaries, 1863-1865”: You are invited to the reception at noon, on Friday, Feb. 1,  Falvey first-floor lounge, to celebrate the new Memorable Days website. The exciting day-to-day account of emancipation was made possible by a collaboration between faculty and students in the Departments of History and Communication, with support from Falvey Memorial Library, Africana Studies, VITAL and the Historical Society of Pennsylvania. If you have questions, please contact Judith Giesberg, PhD.


Now in proofreading: The Shadow of a Sin

Our latest proofreading project is another dime novel romance: The Shadow of a Sin, by “Bertha M. Clay.”

“Bertha M. Clay” is an interesting figure in the history of 19th century literary piracy. Prior to 1891, there was no American law governing republication of foreign works. As a result, many American publishers reprinted foreign works without obtaining permission or paying authors. While this may have been unethical (and many authors, including famous names like Charles Dickens, objected loudly), it wasn’t technically illegal, and the practice was widespread.

One victim of this piracy was prolific British romance novelist Charlotte M. Brame. Many of her works were reprinted in America by multiple publishers, sometimes under false names. One of the most common Brame aliases was Bertha M. Clay (note the similarity of initials), which was frequently used when Brame novels appeared in dime novel format. In fact, the fictional “Bertha M. Clay” was so successful that, after Brame’s death, American authors began to write additional “Clay” books in imitation of her style.

It probably goes without saying that this situation makes it a bit difficult to figure out the origin of some books from this period. Fortunately, a very detailed Charlotte Brame bibliography is available through Victorian Secrets’ Victorian Fiction Research Guides to help sort out the confusion.

According to the guide, The Shadow of a Sin was first serialized between November, 1874 and January, 1875 in the Family Herald, a British story paper. The edition in our collection is undated, but we know that it was printed in Philadelphia, most likely in the late 19th or early 20th century.

If you would like to help turn this old volume into a modern eBook, you can read about our proofreading project and then visit the project page.


Director Joe Lucia on Conor Grennan's Little Princes

By Corey Arnold

Joe Lucia

This Tuesday, Jan. 29, author Conor Grennan will visit Villanova University’s campus as part of the One Book Villanova celebration. Grennan will be available for a number of events throughout the day, the first of which will be a book signing in the Speakers’ Corner on the library’s first floor at 1:30 p.m.


In preparation for this exciting event, we’ve asked Joe Lucia, director of Falvey Memorial Library and co-founder of the One Book Villanova series, to talk about Grennan’s book Little Princes. He’s also shared with us a few moments from the One Book Villanova past. Read the interview below and, if you haven’t already, be sure to pick up a copy of this lovely and inspirational book before Grennan’s lecture and book signing on Tuesday.

CA: Tell me about this year’s book selection, Conor Grennan’s Little Princes. Is there a common theme that connects Grennan’s book to past One Book selections?

JL: Conor Grennan’s Little Princes tells a remarkable story of self-discovery and self-transformation, starting with a young man’s personal adventures in Nepal and ending with his quest to reconnect young children sold into servitude during civil war with their lost families. The narrative takes us into remote and often dangerous regions in the high reaches of the Himalayas at the same time that it charts an inward journey toward the recognition of compassion and love as motives to action on behalf of the victims of human trafficking. Grennan’s narrative is full of action and intrigue but derives its power from the moments of kindness and affection that drive a twenty-something American on a mission to serve others. We are excited to hear Conor Grennan speak in person about his experiences in Nepal and his ongoing commitment to the betterment of children’s lives there through the work of his foundation, Next Generation Nepal.

A characteristic of most of our One Book Villanova selections has been personal narrative about major transformative events in individual lives—whether those events transpire in fictional or non-fictional works. In many ways, the greatest commonality among the books we’ve chosen thus far has been what you could call a “coming of age” thematic, or perhaps more precisely stories about psychological and moral growth grounded in experiences of personal loss, social disruption, and historical calamity. That puts it in rather dry and schematic terms, given that all of the books we’ve chosen thus far have been distinguished by a rich, particular personalism that conveys the taste and texture of very specific event and circumstances. We’ve also tried hard to keep a multi-cultural focus at the heart of our selections, to open thereby a view to the larger world beyond the comfortable confines of Villanova, especially for our students.

CA:  Do you have a favorite memory from past One Book years—perhaps an encounter with another reader, or a moment during one of the lecture events?

JL: There really are too many wonderful moments from our seven prior years of One Book events to pick just one. A highlight every year is the Community Dinner, at which Dining Services pulls out all the stops and creates a meal that reflects the culture and cuisine in that year’s book. The year we read Mahbod Seraji’s Rooftops of Tehran, the chefs preparing the dinner managed to track down someone in the Philadelphia area who was familiar with the rose-petal flavored ice cream that plays a role in the story. That ice cream was a featured dessert that evening to the astonishment and delight of our author, who even wrote about it after the event on his blog, I believe.  Of course, every year I glory in the hundreds of students streaming in to hear the author talk and to get books signed. Over and over each year I have listened as students have told visiting authors how deeply the books have touched them, how much of a connection they’ve felt with specific characters and situations. In particular, the year we had Immaculee Ilibagiza as our author, a survivor of the Rwandan genocide, we had many people weeping in her presence as she inscribed their books. To witness that abiding emotional power of storytelling and of the written word in time so saturated with trivial digital distractions is a joy indeed.

But there is one moment that stands out as a particular pinnacle. It came in the second year of the program, when we had Timothy Tyson as our author. His book Blood Done Sign My Name, tells the story of a particularly brutal race murder in North Carolina in the 1970s and then connects those events to the unfolding drama of the civil rights era in the preceding and subsequent decades. Professor Tyson brought with him an African American gospel singer—Mary B. Washington—with whom he often presents.  Before his lecture began, the Connelly Center’s Villanova room was darkened and Ms. Washing entered from the room and walked through the audience as the lights came halfway up, singing a series of spirituals from the African American tradition. It was stunning, dramatic, and it evoked tears from many people in that room. When she was done singing, Prof. Tyson opened his talk by addressing the power of that music. It remains one of the high points in my lifelong experience of attending cultural and intellectual programs. I still shake my head in awe thinking back on it. (more…)


CFP: Monetization of User-Generated Content — Marx revisited

CFP: Monetization of User-Generated Content — Marx revisited

Forum Editors:
Jennifer Proffitt, School of Communication, Florida State University
Hamid Ekbia, School of Library and Information Science, Indiana
University, Bloomington
Stephen McDowell, School of Communication, Florida State University

Two TIS articles, Fuchs (2010) and Arvidsson & Colleoni (2012), which
develops a critique of the former, have generated considerable debate,
including a response from Fuchs (2012), regarding fundamental questions
about the core processes of value creation and social and economic
organization in contemporary societies. To further this conversation, we
invite 4000- 5000 word Perspective essays, which are published at the
discretion of the guest editors / editor, and should address one or more
of the following questions the Fuchs and Arvidsson & Colleoni debate
* Is the production of user-generated content a form of labor? Or,
should it be re-thought as an affective investment? Or something else?
* Do the theory and concepts that are part of a labor theory of value
limit our understanding of user-generated content? Should we choose a
different point of departure for our theoretical endeavors?
* Is the Marxist notion of commodity an appropriate analytic for
understanding appropriation of value in the case of user-generated
content? Or, should it be de-centered from such an analysis?
* Is the notion of “labor time” relevant to the production of
user-generated content?
* How can Marxist and historical-critical perspectives engage with the
new organization of information economies and information societies?
* Is it appropriate to extend Dallas Smythe’s notion of “audience work,”
which he developed in 1970s when broadcasting was the dominant mode, to
the Internet world? What are the problematics of extending “old”
theories to “new” technologies?
The Perspective essays should have layers of thought that take the
thinking beyond Fuchs and Arvidsson & Colleoni. Approximately half of
the essay should be devoted to a reflection on / critique of these
writings and the ensuing debate, and the remaining half should extend /
add to the theoretical foundations of the debate.

Interested authors are invited to email an abstract (no longer than 500
words) to Jennifer Proffitt (email: jproffitt@fsu.edu) by March 1, 2013.
Authors of selected abstracts will be invited to submit their
Perspective essays by July 1, 2013.

For pdf copies of Fuchs (2010) and Arvidsson & Colleoni (2012), please
send an email to hsawhney@indiana.edu

Arvidsson, A., and E. Colleoni. 2012. Value in informational capitalism
and on the Internet. The Information Society 28(3): 135-150.
Fuchs, C. 2010. Labor in informational capitalism and on the Internet.
The Information Society 26(3): 179 -196.
Fuchs, C. 2012. With or without Marx? With or without capitalism? A
rejoinder to Adam Arvidsson and Eleanor Colleoni. tripleC 10(2): 633-645.


VuFind, Zend Framework 2, and Flash Messages

One minor weakness of VuFind 1.x is that it doesn’t always provide good feedback for user actions.  One of the advantages to switching to a standard framework is that we can leverage an existing “flash message” mechanism to display messages to users in a consistent way.  Zend Framework 2 includes a simple FlashMessenger helper, but it took a bit of learning to use it as effectively as possible.  I hope that a discussion of my solution to this problem will helpfully demonstrate some aspects of the framework and VuFind 2.x’s architecture.

The Problem

In Zend Framework, flash messages are stored in an object by the controller.  For example:

    ->addMessage('Email sent successfully.');


    ->addMessage('Operation failed.');


The view is then responsible for pulling information out of the object and formatting it for display.

I wanted VuFind to display messages in a consistent way, so it seemed to make the most sense to use a View Helper to render flash messages.  This helper could take care of pulling messages from the namespaces in the object, applying translation, and building <div> tags with appropriate classes. This way, all I would have to do is add this code to a template:



and my flash messages would display.

There’s just one hard part: getting the object containing the messages from the controller to the view with a minimum of fuss.

Solution #1: Brute Force

My first solution was not hard to come up with, but I was never happy with it.

Controllers in Zend Framework 2 pass values to their corresponding views by returning a value (often a ZendViewModelViewModel object).  If we want to ensure that all of these objects contain a particular value, we can establish a convention where VuFind’s controllers never construct a ViewModel directly; instead, they always call a $this->createViewModel() method defined in an abstract base class.  This helper method is responsible for constructing a ViewModel and then attaching the flash messenger object to it.  Once the ViewModel has a flash messenger attached, the View Helper responsible for rendering the messages can simply pull the messenger from a known named property in the model.

Advantage: It works.

Disadvantage: It’s ugly.  It relies on a particular arbitrary value being in a particular arbitrary place.  It takes away some of the flexibility of the framework by forcing the user to always return ViewModels, and to construct them in a particular way.  It makes the user jump through a hoop (calling createViewModel to create a view model) and punishes them in an unintuitive way if they don’t comply (flash messages stop appearing).

Solution #2: Working with the Framework

Fortunately, there is a better way.

One of the nice features of ZF2 is its service manager system (described in more detail in this blog post).  Service managers are responsible for constructing and storing instances of important objects used by the application.  Ugly application-specific details can be pushed into service manager configuration so that the actual components of the application can be simpler and more reusable.

The flash messenger controller helper and our custom view helper are both constructed by service managers.  This means that, through proper service manager configuration, we can ensure that the flash messages view helper always has access to the flash messenger controller helper, with no need for the intervention of a nasty createViewModel() method.

This is achieved with the help of a factory in our view helper service manager configuration:

'flashmessages' => function ($sm) {
    $messenger = $sm->getServiceLocator()
    return new VuFindViewHelperRootFlashmessages(


Here’s how it works: service manager factories are passed an instance of the service manager that is doing the object construction ($sm in the example above — an instance of the service manager devoted to view helpers). $sm->getServiceLocator() retrieves the service manager that constructed $sm — the top-level service manager that manages the whole VuFind application. From here, we can call ->get(‘ControllerPluginManager’) to obtain the service manager for controller plugins. We can then call ->get(‘FlashMessenger’) on the controller plugin service manager to get hold of the flash messenger. This object ($messenger) is then passed to the constructor of the new VuFindViewHelperRootFlashmessages helper. The object now has access to the flash messenger as soon as it is constructed. None of the other code needs to know about the details — it just works like magic.

Yes, this is a bit ugly. But the important thing is that the ugliness is now in the configuration of the application — part of the glue that holds everything together. It’s okay for this part of the code to be a bit convoluted and application-specific, because its whole purpose is to make the various parts of the application fit together. The beautiful thing is that those component parts don’t have to know anything about the details of how the glue works — as a whole, the application has become less coupled and more flexible. Compare this to solution #1, where the ugliness was more deeply embedded in the application’s controllers and in the behavior of the view helper itself.

The Code

If you want to see how VuFind transitioned from Solution #1 to Solution #2, take a look at these diffs.

The Bottom Line

There’s definitely a learning curve involved with ZF2, but I continue to feel that it is worth the effort.  I hope this example has shed a little light on some of the issues… but if anything is unclear (and I’m sure something is), feel free to ask questions.  I’m always happy to help, especially if it means that more people are potentially able to help with the process of improving the code.


Next Page »


Last Modified: January 24, 2013