Muggles Speak English. Pythonistas Speak Python.

Python is one of the fastest growing programming languages, owing to its simplicity of syntax, varied applications ranging from simplistic tasks such as Hello World program to crunching huge amounts of data for multi-million dollar companies or numerous research and academic works. As more and more fields integrate computer science into their regular work flow, the importance and need of programming knowledge is set to grow, especially Python.

In Fall 2016 semester, I had an awesome opportunity to host weekly open labs for sharing my knowledge of Python programming language with everyone from Columbia University, under the Digital Centers Internship Program with Columbia Libraries. This was quite a humbling experience for me as a teaching intern where I enjoyed the freedom and challenge to create my own course content, to closely interact with lots of people and introduce them to the niches of programming through Python.

As a Digital Center Teaching Intern, the most prominent takeaway was my first teaching experience, as I learned along the way how to grasp things myself in a crystal clear way and explain them simplistically to others. Initially I designed the open labs based on the Python course taught by Dr. Charles Severance on Coursera and gradually learned how to create my own new content to explain the concepts in a better way. Throughout the semester long internship I concentrated on introducing the basic concepts of programming and computation challenges through Python, not limiting the scope to just Python.

During this teaching internship in Fall 2016, the biggest challenge was to make teaching inclusive for all the attendees, most of whom had no or very little programming experience. The attendees of Python Open Labs were from various schools within Columbia, including Journalism, CUMC, SIPA and Columbia Law which posed a challenge to keep the content simple and basic yet informative enough to enable to take on any kind of programming task that might come along their way. Hence, I concentrated on introducing basics like conditional statements, string processing, file handling, loop statements, breaking solutions into small individual tasks, defining functions and organising code into packages and modules. This is where I enjoyed the most as I got to choose and design my own course as a first time teaching experience, right from scratch while trying to understand the same task or problem from the various different perspectives of attendees in open labs.

Python Open Labs this semester also included an experimental component of introducing a powerful and popular open source library to participants in each session, such as csv library for reading comma separated large sized files for data processing, however given the inexperience with prior programming for most of the audience of open labs, this turned out to be a difficult task, making me more aware of the knowledge gap that exists for people who want to use programming but are unable to do so due to lack of basics which most of the open sourced libraries assume at the user’s end. Therefore, I put this on hold for the rest of the semester and continued with the basics of programming through Python.

As the semester comes to close, so far we have had 10 open lab sessions in this semester wherein I covered programming topics ranging from simple tasks like printing or simple arithmetic to more complex ones like processing large input data from text files. In the next semester I will be continuing with the teaching internship and plan to once again try to introduce the open source libraries for various tasks such as data processing, analysis and a simplistic web development framework etc which truly unleash the power of Python as a modern programming language which is capable of accomplishing maximum work in minimal effort.

Digital Archives and Music Scores: Analysis, Manipulation, and Display

My project concerns the retrieval and display of digitally encoded music scores in existing archives and databases. While there are currently a great number of scores available in digital format, those formats differ, affecting not only their utility and but also their portability.

I recently made an attempt at working around this portability issue while trying to devise a demonstration for an undergraduate music humanities class this past semester. I had wanted to isolate and play back small groupings of instruments playing separate dances in different meters and show how Mozart was able to weave them together for the Act I climax of Don Giovanni. Though I ended up with a successful and visually appealing demonstration, it was a labor intensive process, not feasible to do with other pieces without vast reserves of preparation time. Below is the interface of an audio program, Logic Pro, that allowed me to arrange the different instrumental and vocal parts into separate tracks, and then assign each group to its own fader. I could then isolate and play the individual dance tunes and show how they blend together.

What made the process so time consuming was the lack of a machine readable copy of the score. Creating this example required entering the notes from the score into a music notation program, and then translating that information into a midi file, which could then be read and played back by Logic Pro. Consumer software programs that produce formatted sheet music are readily available and are well suited to their primary task of creating and editing scores. They are not so good at importing scores from an outside source or for playing anything back. One of these notation programs, Sibelius, can import direct scans of sheet music and export them in a variety of formats. For import, it uses an optical music recognition plugin, comparable to the more familiar optical character recognition technology used for text files.

That any program can even approximate the job of converting lines, dots, symbols and text of an engraved music score into a digitally editable format is a minor miracle. But more often than not, the results using the Sibelius plug-in are just too flawed to use, making the time consuming task of manual entry the only reasonable way to access Sibelius’s processing and document translation features.

Hundreds of hours of work could be saved if previously encoded music scores could be used for such demonstration purposes. It would also be useful if there were a program that could play back those scores so that a separate audio file of a performance of the piece would not be needed. (Sibelius does have a playback feature; however, the program itself can be slow and somewhat unwieldy, using such a large portion of the computer’s resources that its performance is too sluggish to make it a useful tool for dynamic classroom demonstrations.)

The availability, then, of a repository of public domain scores in digital format would be a highly prized resource—not only for instructors, but researchers as well. To be able to quickly locate individual instances of musical structures in a given corpus, identify their context, and tabulate their frequency, would grant a degree of rigor and generalizability to analytic observations that can be difficult to achieve in music theory.

Such archives of digital scores do exist, but accessing those scores and being able to use them are two different tasks. In addition, different modes of digitization allow for varying degrees of analytic access. Some archives, like the International Music Score Library Project (IMSLP), store image files of score pages. These image files are not analyzable by machine unless further coded into some hierarchical data structure. As such, they present the same import difficulties noted above: they need to be scanned, and the optical technology does not yet exist to do that efficiently. Collections of midi files also exist, which contain the information necessary for producing an audio simulation of the notated music, but do not necessarily contain all the information indicated by a score (for example, expressive markings, articulation symbols, and other instructions to the performer).

MEI—the Music Encoding Initiative—is emerging as a standard format that will allow analytic processing. Any discussion of computer-assisted musicology needs to take this project into account. However, as this is a newer format, readily available instructional materials are few. Training is accomplished primarily through professional workshops; user-friendly editing and display software is proprietary. I decided, therefore, to begin by looking at another widely used format, MusicXML, and the set of programming tools designed by and for academic researchers to work with that format, Music21.

MusicXML is a file format that allows for a representation of the elements in a score to be shared among various programs and platforms. And conveniently, Music21 comes packaged with a sizable corpus of over 500 scores to begin working with. Though designed to be easy to use, Music21 assumes a fairly sophisticated computing background on the part of the user, as difficulties in installation, utilization, and troubleshooting often arise. So while the package is well supported with online documentation, learning to use its contents is not the same as starting out with a consumer software product, safe in the knowledge that a little thoughtful clicking around, along with some methodical exploration of drop down menus, will eventually yield the desired results. Music21 is for coders. And the main drawback with Music21 is that the package requires a more than passing familiarity with its coding language: Python.

Python is a programming language that is relatively quick to learn. Nevertheless, it does require a certain amount of time and practice to get up to speed. Fortunately, the Digital Social Science Center offers a programming workshops designed specifically to help scholars analyze big data. The weekly sessions led by a computer science graduate student allow participants to get their feet wet and encourage outside practice. Its programs are designed specifically for scholars in my position: researchers needing to develop project-specific tools that will enable them to take advantage of the ever growing body of digital data that is made available to the public.

Below is an example of my latest programming efforts.

Two things are notable about this.

  1. Often, learning is best accomplished through actual hands on work. While I consider this program a success in many ways—most significantly, in that it didn’t just return an error message—it surprisingly did not return any notes with accidentals. That is because of the coding strategy used by MusicXML: a note’s identity as sharp or flat is stored separately from its letter name. This is crucial information to know; in fact, a note’s pitch in MusicXML is represented by a letter name, plus an octave designation, plus an optional “alteration” attribute of +1 or -1 (sharp and flat, respectively). Although explained in the documentation on the website for MusicXML, it’s programming experiences like these that really allow the data structure to be internalized.
  1. Note how easy it would be to fall into the trap of devising research questions based on the capabilities for information retrieval. Though perhaps a bit obvious, this provides a very clear example of how the organization of the data and the design of the programming language facilitate the accumulation of numeric facts which can end up directing further inquiry: “Bach’s Brandenburg Concerto No. 5 has 10,539 notes! I wonder if No. 6 has even more?” In order to take advantage of the depth of detail that is represented in the MusicxMXL format, it is important to guard against this tendency and instead continue to develop more refined programming skills.

The learning curve for Python, as is true for any language, is long and shallow—the programming results presented above may look rather paltry when compared to those attainable by experts in computer-assisted musicology. But as a scholar working independently to acquire new skills and gain access to recently developed research tools, they represent a lot of digging, exploring, and evaluating the programs, standards, and methods involved in storing music as a text file—in addition to the basics of learning a programming language. The analogy of language learning here is especially apt. Deciding to work with a corpus of computer encoded music scores for a research project is like deciding to work with a community of musicians in another region of the world. A new set of communication skills needs to be acquired, often from scratch, and a significant amount of time must be set aside for getting up to speed in the language.

While I continue to use this project as an opportunity to develop my own coding skills so I can make use of existing digitized corpora, I also intend to lay out exactly:

  1.  what resources need to be made available to other graduate student researchers,
  2.  what skills they will need to acquire in order to make use of those resources, and
  3.  how much time they should plan on devoting to acquiring those skills.


Map Club: Reflections on Teaching Self-Teaching in Digital Scholarship

This academic year, through my internship with the Center for Spatial Research and the Digital Social Science Center, I aspired to demystify digital mapping. I formed a series of fast-paced hack sessions focused on play, exploration, and the rapid acquisition of skills. To evoke exploration and inclusivity, I named the series Map Club.

Map Club represents an approach to learning. It seeks to hone the capacity to adapt to change, to encourage fearlessness in the face of new technology, and to nourish the value of experimentation without a specific goal. I color this description with a rhetorical intrepidity because I believe humility, determination, and bravery are the best traits to muster when digging into unfamiliar modes of making. Through Map Club, I wanted to leverage individual autonomy and creativity to teach attendees how to be self-taught. I hoped to achieve this by creating a space for collective, unstructured exploration, within which attendees could teach themselves.

Since its inception this summer, Map Club has met for 14 sessions and has explored 10 different mapping and visualization tools. Attendees have written code in JavaScript, Python, CartoCSS, and a bit of GLSL. We have fostered a space of creativity, collaboration, and digital empowerment, while continuing to grapple with the roadblocks that surface in new, less structured endeavors.

At the same time, this model has been neither unanimously fulfilling nor consistently easy. Map Club has suffered low attendance, mixed feedback, and inconsistent interest. Here, I would like to examine some of the reasons behind its irregular reception, as well as suggest some ideas for mitigating it.


In an effort to combat disorientation, each Map Club session this semester was loosely divided into three sections:

  • (20 minutes) Setup. Downloading a text editor, setting up a local server, and ensuring that example files display properly in the browser.
  • (60 minutes) Self-paced making. Unstructured time for attendees to experiment with the tool or library of the day.
  • (10 minutes) Sharing. Go-around to exhibit screenshots, cool glitches, and creative compositions.

While this schedule does help to divide up session time, it does not supplant the comforting sense of structure provided by a knowledgeable workshop leader. Though some students regularly stayed for entire sessions, others left early and never returned.


Based on attendee feedback, as well as my own observation, I believe the inefficacy of the initial Map Club model has three consistent causes.

  1. Attendees new to code have a harder time adopting it as a medium. Everybody learns differently. In the absence of prior experience, jumping into a new programming language without a guided tutorial can be confusing and disorganized.
  2. Unstructured time is not necessarily productive. Sometimes, the biggest challenge is figuring out what to do. Even for attendees who do have experience with code, determining how to spend the hour can become its own obstacle.
  3. An undefined goal is not the best stimulus. In choosing to attend a scheduled meeting, many attendees hope to avoid the obstacles and glitches that come from figuring out new platforms or libraries on their own. An un-guided workshop seems pointless.

📍Looking forward

Future Map Club sessions can improve by providing certain types of guidance for attendees, without encroaching upon the self-paced nature of learning-by-hacking.

  1. Provide a starter kit for new Map Club members. A bundled tutorial for introducing new attendees to basic digital mapping concepts provides material to help them better spend the session in a valuable way.
  2. Provide basic templates for download (when applicable). Even experienced attendees benefit from the time saved.
  3. Provide a list of tool-specific challenges. To make the session as productive as possible, put together a list of potential ideas, or challenges, for members to independently explore.
  4. Be available for questions. Even though these sessions are self-driven, nobody should be left in the dark. Leverage other attendees’ knowledge, too.
  5. Emphasize the value of mistakes. Some of the coolest visual output this semester came from members who took novel approaches to producing digital maps — Ruoran’s GeoJSON/Cartogram mashup, for instance, or Rachael’s vibrant approach to tiling. Encourage attendees to relish the proverbial journey and focus on editing, manipulating, and experimenting. De-emphasizing an end goal helps to alleviate the impetus to finish something.
  6. Include some guided workshops. To combat fatigue induced by Map Club’s ambiguous structure, I inserted several guided workshops into the series throughout the semester. Aside from keeping the momentum going, certain tools or frameworks (such as D3.js or QGIS) benefit from a step-by-step introduction.

📍Final thoughts

As an alternate workshop model, I believe that Map Club has the capacity to position technology as an ephemeral means to an end rather than a capability to master. By emphasizing what is plaint, inessential, and surprising about digital platforms, instead of what is inaccessible and opaque, my hope is that this series can foreground the process of learning as an end in itself.

To view the full repository of Map Club materials, sessions, and tutorials, click here. For recaps of each session, visit the “map club” tag on the Digital Social Science Center blog.

A Medium-Scale Approach to the History of Literary Criticism: Machine-Reading the Review Column, 1866-1900

Book reviews in nineteenth-century periodicals seem like the perfect data for doing computer-assisted disciplinary history. The body of the review gives information about the words used by early generations of literary critics while the paratext provides semi-structured information about how these early literary critics read, evaluated, classified: they include section headings labeling the topic or genre of books under review alongside bibliographic information. Such material, when studied in aggregate, could provide valuable insight into the long history of literary criticism. Yet there’s a significant obstacle to this work: important metadata created by nineteenth authors and editors is captured erratically (if at all) within full-text databases and the periodical indexes that reference them.

My project aims to tackle this dilemma and develop a method for doing this kind of disciplinary history. To do so, I’m constructing a medium-sized collection of metadata that draws on both unsupervised and supervised models of reading. Working with a corpus of three key nineteenth century British periodicals over a 35 year period (1866–1900), this project collects metadata on the reviews works––capturing the review metadata as it exists in existing database and indexes, and using more granular data extraction to capture sections headings like “new books,” “new novels,” or “critical notices”). I then pair this metadata with computer-assisted readings of the full texts, generating “topic models” of frequently co-occurring word clusters using MALLET, a toolkit for probabilistic modeling. While the topic models offer the possibility of reading over a larger number of unlabeled texts, the metadata provides a way of slicing up these topic models based on the way these reviews were originally labeled and organized. The end goal here is to create a set of metadata that might be navigated in an interface or downloaded (as flat CSV files).

Though the case study will be of practical use for Victorianists, the project aims to address questions of interest to literary historians more generally. What patterns emerge when we look at an early literary review’s subject headings over time? What can we learn from using machine-learning to sift through a loose, baggy category like “contemporary literature” as it was used by reviewers during the four decades of specialization and discipline formation at the end of the century? Critical categories and vocabularies about them presents a particularly thorny problem for literary interpretation and classification of “topics” (see work by Andrew Goldstone and Ted Underwood or John Laudun and Jonathan Goodman). I hope to assuage some of these anxieties by leveraging the information already provided by nineteenth century review section headings, which themselves index, organize and classify their contents.

Much of the first phase of this project is already underway: I’ve collected nearly 418 review sections in three prominent Victorian periodicals The Fortnightly Review, The Contemporary Review and The Westminster Review, with a total of nearly 1,230 individual reviews. I’ve extracted and stored the bibliographic metadata in Zotero, and I’m in the process of batch-cleaning the texts of the reviews so as to prepare the texts for topic modeling and for further extraction of bibliographic citations. I’ve also begun topic modeling a subsection of the “fiction” section of the Contemporary Review. Some of the preliminary results are exciting––for instance, the relatively late emergence of “fiction” as its own separate category within the broader category of “literature” reviews in The Contemporary Review.

The next phases will require further data wrangling as I prepare the corpus of metadata and the full-texts for modeling. In the immediate future, I plan to improve my script for extracting the section headers and the titles of reviewed works. Once this is done, I’ll generate a set of topic models for the entire corpus, then use the enriched metadata to sort and analyze into sub-sets (by journal, review section or genre title, and date). Most of the work of the project comes in pre-processing the data for the topic models; running topic models themselves will be a relatively quick process. This will give me time to refining the topic models––disambiguating “topics,” refining the stopwords list––and to work on the best method for collating the topic results with the existing metadata. Finally, I plan to spending the last stages of the project experimenting with the best ways to visualize this topic model and metadata collection. Goldstone and Goodman have created for visualizing topic models of academic that I’ll be building off of in displaying my data from the Victorian reviews.

While relatively in scale (3 periodicals, a 35-year period), this narrower scope, I hope, will make this an achievable project and a test case for how topic modeling could be used more strategically when paired with curated metadata. For my own research, this work is essential. My goal with the project, however, is not just to provide a way to read and study the review section over time, but to provide a portable methodology useful for intellectual historians, genre, and narrative theorists and literary sociologists. By structuring the project around metadata and methodology, I hope to also make a small bid for treating the accessibility and re-usability of data as just as important as the models made from it.

A Reflection on My Internship with DCIP

This fall semester I joined the Digital Center Intern Program(DCIP) as an instructor intern. My internship is primarily focused on developing lesson plans for and hosting weekly R Open Labs. This internship allowed me to try different teaching approaches and explore different topics about R. It was an intellectually challenging and rewarding experience. The highlights of my experience were discussing with people from diverse academic backgrounds about how to use R to help their research. I learned a lot about applications of statistical analysis from these discussions and it felt wonderful to help people.

At the beginning of the semester, I started R Open Lab as a very structured instructional session and covered the basic usage of R. Later on, after talking with other librarians, I decided to make the open lab more free-flowing and put more emphasis on discussion instead of instruction. I found that, by getting participants more engaged in conversation, I was able to better understand their needs and help them with their research.

The internship offered a great opportunity for me to see for myself how R and statistics could be used as a tool for research. For example, one of the open lab’s regular participants used R to conduct sentiment analysis to gain insights about stress measurement and management in medical research. Another participant used R to extract information from Russian literature and conducted text analysis to understand the political situation at different times. It never occurred to me that statistics are so broadly used in different fields until I talked with these people.

Considering the participants’ interest and needs, I am planning to talk more about plotting, data cleaning and data scraping in the next semester. Since people coming to the open lab often have completely different levels of understanding of R, I am hoping to encourage more peer learning at the open lab next semester.

This internship motivated me to gain a deeper understanding of R and enhanced my teaching skills. It is an amazing program and I had an incredibly fulfilling experience. I really look forward to the future work in the program and I hope to do better next semester.

Introduction to Semi-Automated Literary Mapping

Literary mapping presents exciting possibilities for criticism and the digital humanities, but it is hampered by a seemingly intractable technical problem. A critic interested in mapping must rely on either full hand-coding, which takes too much time and labor to be useful at scale, or full automation, which is frequently too imprecise to be of any use at all. As a result, mapping projects are usually either narrow but reliable or broad but dubious.

I am therefore developing an interface that will combine the best aspects of both approaches in a process of semi-automated literary mapping. This interface will combine automatic pre-processing of text data, to identify locations and suggest geotags, with a backend framework designed to speed up the process of cleaning the resulting data by hand. The end product will work something like this: the interface prompts its user for a plain text file, then presents the user sequentially with each of the identified “locations”; for each of these locations, the user confirms whether it is indeed a location, and chooses among the top map hits from Geonames or a similar API; from here, other options are available, such as “Tag all similar locations” or “Categorize location” to add flexibility for individual projects. When the text has been fully processed, the results are presented as a web map and are exportable for use in GIS mapping software like QGIS or ArcGIS. The entire process is simple, but the gains in the speed and ease of mapping literary locations could be considerable.

While much work remains to be done, some of the fundamental backend components have already been built. I already have a working Python prototype of the automation process using the Stanford NLP Group’s Named Entity Recognizer and the Geonames API, which I presented in a workshop as part of Columbia’s Art of Data Visualization series in spring of 2016. I further developed and employed this prototype in a collaborative project studying the medieval Indian text Babur-nama. Using automatic location extraction and geolocation, ArcGIS, and some minor hand-cleaning of geodata by myself and my partners, my team detected clusters in point data from the text, deriving from these clusters a rough sense of the regions implicit in Babur’s spatial imagination (which contrast suggestively with the national borders in maps by colonial maps of the period).

This project demonstrates the viability of the method while also underscoring the importance of preprocessing the data and expediting the hand-cleaning with geotag recommendations.

The next phases of the project will focus on building the framework and improving the location extraction and geotag recommendation algorithms. I will begin developing the interface itself, using either Flask or a combination of Django and GeoDjango for the interface’s skeleton. I will then incorporate the two elements of the automatic pre-processing that I have already developed: location recognition and Geonames-based geotagging. From here, I will turn to the “output” stage, allowing the data to be exported for use in GIS software and, hopefully, displayed in the framework itself. Finally, I will use the prototype in a test case from my own field of literary study, twentieth-century American fiction. If time remains in the year, I will devote it to developing methods to use previously input data to recommend a geotag, thereby making the pre-processing “smarter” the longer it is used.

For me, this is a project born of necessity: I need it for my own work, but it does not yet exist. I would be very surprised if I am alone in this. I am excited by this project, therefore, because I see it as achievable and as having the potential for significant impact in the field of literary mapping: if everyone else doing this kind of work is facing the same problems, an interface that helps them circumvent those problems could be a first step for many humanists working in this field.

I am a fourth-year PhD Student in the Department of English and Comparative Literature studying 20th-century American fiction, ecocriticism, and DH. I started working on location extraction and literary spatial data about a year ago; before that I was working on RogetTools, a Python framework for word categorization and semantic analysis based on Roget’s hierarchy of semantic categories. More at my website.

Perceptual Bases for Virtual Reality: Part 2, Video

This is Part 2 of a post about the perceptual bases for virtual reality. Part 1 deals with the perceptual cues related to the spatial perception of audio.

The chief goal of the most recent virtual reality hardware is to simulate depth perception in the viewer. Depth perception in humans arises when the brain reconciles the images from each eye, which differ slightly as a result of separation of the eyes in space. VR headsets position either a real or virtual (a single LCD panel showing a split screen) display on front of each eye. Software sends to the headset a pair of views onto the same 3D scene that are rendered from the perspective of two cameras in the virtual spaces, separated by distance between the user’s eyes. Accurate measurement and propagation of this inter-pupilliary distance (IPD) is important for effective immersion. The optics inside the Oculus Rift, for instance, are designed to tolerate software changes to the effective IPD within an certain operational range without requiring physical calibration. All these factors taken into consideration, when the user allows themselves to focus on a point beyond the surface of the headset display, they will hopefully experience a perceptually fused view of the scene with the appropriate sense of depth that arises from stereopsis.

However, stereoscopic cues are not the only perceptual cues that contribute to a sense of depth perception. For example, the widely-understood motion parallax effect is a purely monocular cue for depth perception: as we move our head, we expect objects closer to us to seem to move faster than those that are further away. Many of these cues are experiential truisms: objects farther away seem smaller, opaque objects occlude, and so on. Father Ted explains it best to his perenially hapless colleague Father Dougal in this short clip.

Others are less obvious, though well-known to 2D artists, like the effect that texture and shading has on depth perception. Nevertheless, each one of these cues needs to be activated by a convincing VR rendering, and implemented in either the client application code or the helper libraries provided by the device vendor (for instance, the Oculus Rift SDK). Here, I discuss three additional contingencies that impact the sense of VR immersion that go beyond typical depth-perception cues, to show the importance of carefully understanding human perception in order to produce convincing virtual worlds.

Barrel distortion

As this photograph, taken from the perspective of the user of an Oculus Rift, shows, the image rendered to each eye is radially distorted.
Image from inside Oculus Rift
This kind of bulging distortion is known as barrel distortion. It is intentionally applied (using a special shader) by either client software or the vendor SDK to increase the effective field-of-view (FOV) of the user.  The lenses used in the Oculus Rift correct for this distortion. The net result is an effective FOV of about 110 degrees in the case of the Oculus Rift DK1. This approaches the effective stereoscopic FOV for humans, which is between 114 and 130 degrees. Providing visual stimuli in our remaining visual field (our peripheral vision) is important for the perception of immersion, so other VR vendors are working on solutions that increase the effective FOV. One solution is to provide high-resolution display panels which are either curved or tilted in such a way as to encompass more of the real FOV of the user (e.g. StarVR). Another solution is to exploit Fresnel lenses (e.g. Weareality Sky), which can provide an effective FOV larger than regular lenses in a more compact package that is suitable for use in conjunction with a smartphone. Both of these methods have drawbacks: the additional cost of larger panels increases the total cost of the ‘wrap-around method’, while Fresnel lenses produce ‘milky’ images and their optical effects are more difficult to model in software than those of regular lenses.


An exceptionally important factor in the perception of immersion in virtual reality is the sense of smoothness of scene updates in response to both user movement in the real world, and avatar movements in the virtual world. Perhaps the most bottleneck in this process to tackle is the rendering pipeline. For this reason, high-end gaming setups are the norm for the recommended system specifications for virtual reality. Builds in excess of 8GB of system RAM, a processor beating at least an Intel Core i5, and mid- to high-range PCIe graphics cards with at least 4GB of VRAM on-board are de rigeur. NVidia have partnered with component and system manufacturers to develop a commerce-led set of informal standards known as ‘VR Ready’.

Even if the rendering pipeline is able to provide frames to the display at a rate and reliability sufficient for the perception of fluid motion, the user motion detection subsystem must also be able to provide feedback to the game at a sufficiently high rate, so that motions in the real world can be translated to motions in the virtual scene in good time. The Oculus Rift has an innovative and very high resolution head-tracking system that fuses accelerometer, gyrometer, and magnetometer data with computer vision data from a head-tracking camera that infers the position of an array of infrared markers in real space. Interestingly, even very smooth motions in the virtual world can induce nausea and break the perception of immersion if those motions cannot be reconciled with normal human behavior. So, for instance, in cutscene animations, care must be taken not to move the virtual viewpoint in ways which do not correspond with the constraints of human body motion. For example, rotating the viewpoint around the axis of the human neck in excess of 360 degrees entails disorientation and confusion.

Contextual depth cues can remedy confounding aspects of common game mechanics

Apart from those aspects of rendering that are application-invariant, VR game programming poses special problems to the maintenance of user immersion and comfort, because of the visual conventions of video game user interface. This excellent talk by video game developer and UI designer Riho Kroll indicates some of the solutions to potentially problematic representations of certain popular game mechanics.

Kroll gives the example of objective markers in the context of a first-person game that are designed to guide the player to a target location on the map corresponding to the current game objective. Normally, objective markers are scale-invariant and unshaded, and therefore lack some of the important cues that allows the player to locate them in the virtual z-plane. Furthermore, objective markers tend to be excluded from occlusion reckonings. The consequence is that if the player’s view of the spatial context of an objective marker is completely occluded by another game object, almost all of the depth-perception cues for the location of the marker are unavailable. Kroll describes an inelegant but well-implemented solution: during similar conditions of extreme occlusion, an orthogonal grid describing the z-plane is blend-superimposed over the viewport. This orthogonal grid recedes in to the distance, behaving as expected according to the conventions of perspective and thereby providing a crucial and sufficient depth-perception cue in otherwise adversarial circumstances.

Automating the Boring Stuff!


I am Harsh Vardhan Tiwari, a first year Master’s student in Financial Engineering student, I am working on web scraping, which is a technique of writing code to extract data from the internet. There are several packages available for this purpose in various programming languages. I am am primarily using the Beautiful Soup 4 package in Python.  There are various resources available online for exploring the functionalities within Beautiful Soup, but the 2 resources I found the most helpful are:

  2. Web Scraping with Python: Collecting Data from the Modern Web by Ryan Mitchell

My project basically involves writing a fully automated program to download and archive data mostly in PDF format from about 80 webpages containing about a 1000 PDF documents in total. Imagine how boring it would be to download them manually and more so if these webpages are updated regularly and you need to perform this task on a monthly basis. It would take us hours and hours of work, visiting each webpage and clicking on all the PDF attachments on each webpage to perform this task. And even worse if you have to repeat this regularly! But do we actually need to do this? The answer is NO!

We have this powerful tool called Beautiful Soup in Python that can help us automate this task with ease. About a 100 lines of code can help us accomplish the task. I will now give you an overall outline of how the code could look like.

Step 1: Import the Modules

So this typically parses the webpage and downloads all the pdfs in it. I used BeautifulSoup but you can use mechanize or whatever you want.





Step 2: Input Data

Now you enter your data like your URL(that contains the pdfs) and the download path(where the pdfs will be saved) also I added headers to make it look a bit legit…but you can add yours…it’s not really necessary though. Also the BeautifulSoup is to parse the webpage for links





Step 3: The Main Program

This part of the program is where it actually parses the webpage for links and checks if it has a pdf extension and then downloads it. I also added a counter so you know how many pdfs have been downloaded.




Step 4: Now Just to Take Care of Exceptions

Nothing really to say here..just to make your program pretty..that is crash pretty XD XD



This post covers the case where you have to download all PDFs in a given webpage. You can easily extend it to the case of multiple webpages. In reality different webpages have different formats and it may not be as easy to identify the PDFs and therefore in the next post I will cover the different formats of the webpages that I encountered and what did I need to do to identify all the PDFs in them.

Thanks for reading till the end and hope you found this helpful!

Blog Post 2.0

Well, I am naming this as Blog Post 2.0, as there has been a serious revamping in terms of my project goals. Firstly, the work on 3D-modelling software is done. I will no longer be talking more about that. My whole focus will be on the data collection software, i.e. Suma. Oh wait, that’s off the table as well.

Will (my advisor) and I have come to a conclusion that after numerous failed attempts at implementing Suma, we will work on our own platform for data collection, which will be molded according to the needs of the Science and Engineering Library, and would be scalable enough, so that other libraries can, with some amount of work, implement this platform there as well.

Currently, the work that has been done is that I have created an array of 6 Library computers, and the librarians can just click on each computer to indicate that it is being used, or double click to indicate that the seat is occupied, but the PC is not being used and a personal Laptop is being used instead.

The next things that I am working on is to add the possibility of indicating that a certain PC is non-functional, and storing that information through different sessions of data collection.

The website is up and running (alpha-version) on

Lastly, let me introduce you to an amazing website that I used for the initial development of this website. It’s called, and it allows you to type in code for HTML5, CSS, and JS on the same portal, and it incorporates the code as soon as you complete typing. So, for the sake of testing, it is quite good a platform.

Hoping to complete a lot more by Blog Post 2.1

App4Apis (Update)

Phase: Final stages of completion

As we are going into the spring break, we want to the update the status of the project. Before diving into the details, a quick introduction of the project.

App4Apis: A one stop solution to access APIs that are designed to take the parameters in the query and return a json object. We have two types of configurations. The first is a list of preset APIs (Geocode, Human Resources Archive, Internet Archive) where we are well aware of the structure of the API and provide a form to update the necessary information for querying. The second is more generic where user provides an example url (including the query parameters) from which we identify the API request pattern. This pattern is then used to query the API with a larger dataset in the next step. We let the user download the results or the results can be sent as an email (helpful for particularly large datasets).

Status: In the last blog post, our to-do list was

  1. Finish few pending screens towards our goal.
  2. Integrate Geocode API into preset.
  3. Develop the functionality to support user to upload a file in the ad hoc query case.
  4. Cosmetic changes and make the website visually appealing.
  5. End to end exhaustive testing.
  6. Deploy!

From that list, we are able to finish the layout of pending screens, completed the integration of Geocode into the preset list, and made the website more visually appealing. We are in the process of end-to-end testing of the preset phase before moving onto the ad hoc query case. The redesigned screens of the website are attached at the end of the blog. Any feedback is welcome.

We are able to send the results to the user through email in the chunks of 1000 results per csv file. This will help the users to submit a task to the system and receive the results at a later point of time, enabling the system to handle large inputs and giving an option to user to not wait for the results.

Current tasks at hand are:

  1. Make the email sending process offline: Currently, we can send an email but we are not able to schedule it for a later point of time and allow the user to exit the screen. He can leave the application after submitting the tasks but we are not able to provide it as an option. I am working on taking the input as a task and schedule it for a later point of time.
  2. Complete testing of the preset APIs workflow.
  3. Complete testing of the ad-hoc requests workflow. 
  4. Deploy.

I am expecting to finish the first 3 tasks by this month end so that we can turn our focus on deployment from the start of next month.


Rohit Bharadwaj Gernapudi

The website screens are: