Sunday, September 26, 2010

PSO: Showing off talent

Yuja Wang Sonatas & Etudes

[This post was originally posted at Pittsburgh Symphony Blogs]

Before last week's opening Gala, Ann Pratchett and Renee Fleming hosted a interactive talk about their books. One question came up about the internet and Ann Pratchett criticized how commentators on websites have a tendency to give their reviews 'gladiator style', meaning thumbs up or thumbs down. What results are reviews that either excoriate the work reviewed as a pile of worthless garbage or the most incredible experience this side of heaven. But generally with no explanation or justification. And the result is only the form of interacting with the author and the creation without substance. It is a criticism that can be leveled at American society in general, valuing quick, snappy decisions based on instant impressions as sincere and authentic while being suspicious of anything that results from deep thought and study.

But these impressions turn out to be merely shallow and incomplete. I was talking over lunch this past week with a regional manager of a major shipping company who was lamenting the difficulty in identifying job applications with a particular ability. Things like grades are too one-dimensional, and the interview does not allow for depth. The only way she can evaluate the applicant, was to have them work for a year.

And so it is with the creative arts. It is a mistake to evaluate a work on one aspect, or an artist for a single work, or even work in a single environment. An evaluation needs to be across a range. And that is what made last weekend's concert rather enjoyable, it showcased a range across style in a single concert.

Michael Gandolfi's Garden of Cosmic Speculation opened up the concert. Prior to the piece, the composer spoke about it. The complete piece is actually 11 movements. But for performances the composer expects only a selection of the movements to be played, and any subset is appropriate. It becomes very much like going to a large garden or an art museum, there is no time to see the whole thing if you do it right, to experience it deeply you must go and select what parts of the museum to see, and leave the rest for another day. Musically, the four movements feel very different, almost like each was a separate work. And this provides an example of showing his range as a composer in a single work.

Having Yuja Wang play Rhapsody on a Theme of Paganini was a great choice. It is very easy to have Ms. Wang play pieces to show off technical brilliance. Certainly most publicity for her revolves around her ability to perform fast, technically demanding pieces. And many soloists use such pieces to showcase their skills. But Ms. Wang is capable of more. And in Rhapsody she was able to show this. There are the expected fast, loud and technical sections that demonstrates her command of the keyboard. But there are also flowing melodies, intricate delicate sections and textured nuance that show off not just mastery of a piece, but an understanding it to let it shine. And by not trying to dominate the piece, I am more impressed by this interpretation of it, and by Ms. Wang's artistry in addition to talent and skill.

Friday, September 24, 2010

Installing pyspatialite

Goal: To use spatial databases to perform operations such as centroid, nearest point, and distances to generate a table of distances along a road network from area to area, using the nearest node to the centroid of an area to represent the area.

Backup plan: Create a list of nearest node to centroid of areas. Use some code I have previously written in R to implement Dijkstra's algorithm.

Preferred method: Programmatically access Spatialite and perform all functions in spatialite.

Barrier: Most distributions of SQLite (including the sqlite3 library included in Python) do not enable loading of extentions.

Solution: Install Python module pyspatialite.

Installing pyspatialite is done through easy_install: sudo python install

The documentation mentions that you need geos and proj libraries installed. What it does not tell you is that you need the development versions (which include header files) of these libraries, as well as the Python headers. After installing the developmental files, then you can install pyspatialite.

Installing JAGS/rjags/R2jags

I got a new computer via a project. It is a Windows machine which is heavily administered, but they let me put Virtualbox on it, and naturally I have Ubuntu running on it so I can actually build the tools that let me do work. Times like this I am very glad I've been putting my installation notes for various packages on the blog since it saves me time searching all over the place (e.g. some gotchas on Eclipse and StatET (R-project))

For JAGS (Just Another Gibbs Sampler), there is an Ubuntu package of 1.0.2, but JAGS is at 2.0+. And the CRAN packages of rjags and R2jags are similarly behind. So I downloaded the source and installed them.

JAGS was simple. The usual combination of:



sudo make install

make installcheck

works as expected.

For rjags and R2jags I had to try a number of different configurations. I ended up with

sudo R --with-jags-modules=/usr/local/lib/JAGS/modules-2.1.0 CMD INSTALL rjags_2.1.0-10.tar.gz

sudo R --with-jags-modules=/usr/local/lib/JAGS/modules-2.1.0 CMD INSTALL R2jags_0.02-09.tar.gz

While I'm not entirely sure that sudo was necessary, prior to this I was getting in trouble with

Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared library '/home/louis/R/i486-pc-linux-gnu-library/2.10/rjags/libs/': cannot open shared object file: No such file or directory

So this did work. Source is Installing jags on 64-bit Debian by Roger Levy

Wednesday, September 22, 2010

Why I am a Red Cross Volunteer

At my University there has been a Red Cross Club for a few years. And our local American Red Cross chapter finally discovered them. So I was there today at their second meeting of the year to talk about the Red Cross and the VA and volunteering off campus. I spoke about the things we do as emergency services volunteers, responding to fires, floods, hurricanes, storms, and so forth. Of Health & Safety, teaching classes. Of Service to the Armed Forces, of having others in my unit who were deployed who got the calls that they should come home while there was time. I suppose that this audience probably were more interested in this talk then my students in class are.

I started volunteering for the Red Cross when I was in college. I was a volunteer EMT, and since I was learning CPR, I also became an instructor. Our EMS organization taught classes on campus to university staff and to students (it was how the organization raised funds). And I taught classes in the community as an instructor for the Red Cross chapter.

I left that behind when I graduated and started work. Work and grad school just squeezed that out of my life for a while. Then when I went back to grad school for a PhD I started volunteering again, this time in emergency services. My degree was in modeling operations. The Red Cross gave me the opportunity to take part in operations.

It is not just that the Red Cross conducts operations. It conducts them under some of the most difficult constraints for operations. In disaster response, we do not choose the time, place or scale, and we do not get to choose who responds. Those who plan and run the operation work with the resources and personnel available at the time and place. The current classical situation is a hurricane. And to work in that setting competently, with the chaos of an unknown and uncertain situation where the pressure of people whose lives are at stake is a stress and challenge only matched by combat against a willful and capable opponent.

What to tell these college undergraduates that perhaps volunteering with the Red Cross or with Veterans Affairs is worthy of their time? I had three areas for them.

1. This was good and meaningful tasks. Granted, there were other opportunities for good and meaningful things that they will be provided on a college campus. With the Red Cross and VA staff and volunteers where people who have done things. At both, everyone there has had the experience of being in high stress situations and having to act and make decisions. Whether it is a Red Cross volunteer who is the team lead at a house fire where the family has no where to go, no food and only the clothes on their back, or the nurse who has had a patient crash, they would be with people who have experienced life and can get things done.

2. The Red Cross and the VA trains their volunteers. For those who volunteer over years, they will be trained to do their tasks, but also about dealing with people and dealing with life in all its aspects, both the good and bad. To recognize what is important and what is not.

3. I also told them that I was a professor. And that this semester, there is a group in my department whose senior design project is with the local Red Cross Chapter. Because the Red Cross and the VA are not just another charity or hospital, but they are organizations that reach out into their communities and interact with them in complex ways. And because of this someone with a little curiosity will quickly see there are many questions to be asked, ways of handling difficult issues to develop, and resource limitations that need to be dealt with. So I told them that I would like to see members of this club who volunteer with the Red Cross and the VA over the course of their college years to be doing senior projects, senior thesis and class papers based what they observed and did with the Red Cross and VA. So they can take what they are learning and put it in context with real problems effecting real people.

This fall, the first Pitt students have started volunteering at the VA under the Red Cross Veterans Affairs Voluntary Services partnership, after going through orientations in spring. This year, they are being introduced to the Red Cross and VA at the beginning of the year before they have settled into their routines. And these students will see a part of life greater then what they would get if they did not leave their campus.

Monday, September 20, 2010

Renee Fleming: The Inner Voice

This post was originally posted at the Pittsburgh Symphony Orchestra Blogs

The day before the opening Gala, Renee Fleming and Ann Pratchett had a book discussion at the O’Reilly Theater. It was an enjoyable conversation with two artists. They spoke of limits, of family, of talent. But what stood out, was they spoke that creating art is work.

Fleming commented that one thing that she dislikes is the belief that music is a gift, that one day someone opens her mouth and sings, then she is discovered, and then she goes to the Met. (Metropolitan Opera). Ann also has instances where people ask if she works. Because they are faced with the belief that talent is innate, it only needs to be found. But for both of them, this is not true. And it is not true in general.

Peter Orszag recently wrote two pieces in the New York Times about talent and effort. His observation that is shared by many others who have examined this (Michael Syed “Bounce”, Carol Dwed “mindset”, and others is that innate talent only gets so far, that to reach world class levels in a complex field takes practice. 10,000 hours of practice. It holds in music, mathematics, many sports, and chess. It shows in the dedication of young men and women in their teens who get up with the rising sun to practice, whether it is on the athletic field the weight room or in the studio. The students working their way through problems and proofs. My friends in martial arts working on their kata. Soldiers and FBI agents working through battle drills in the desert.

Fleming said at one point that when learning a part, it is not enough to know the words and the music, then you need to learn the meaning. And then, when you know what it means and you know it well, you are able to do more then follow the score and you are able to interpret or try new techniques to make it your own. The same is in other fields. Through practice the athlete learns the limits of her body and strength. The chess or go player can recognize patterns on the board and see the progression of the game. The soldier knows his role on his team and the overall intent of his commander even when he is unable to communicate with them. The mathematician or scientist or engineer can look at a problem and recognize what the form of the solutions or results will be even before she begins the work. Authors and writers can see how a turn of phrase can change the tone of a work. All this comes not from some gift of birth, but time and effort in practice and study, purposeful and directed effort.

The thing is, somehow one has to be convinced this is worth the effort. If you are good, you will be around people who are even better. And you will be working on things beyond your ability. And here you have a choice. You can decide you are good enough and stop. You can give up because it is too hard. Or you can look ahead and decide that it is worth the effort and pain of work to master your art. And the rewards? While Renee Fleming stated that her goal when growing up was to be good at something and it did not have to be music, I am glad that it was.

Sunday, September 19, 2010

Why I enjoy classical/concert music

Fingers on keys

This is, obviously, a badly titled post. Because 'enjoy' is not the proper word. Not that there is anything wrong with merely enjoying something. I believe that there is a place in life for things that can be enjoyed as they are. But I don't think that 'enjoy' or 'appreciate' conveys how I experience concert music. There is a cliche that those with mathematical backgrounds should enjoy classical music because music, like math, deals with patterns. But that does not get you very far. By the end of chapter 2 of his Critical and Historical Essays (lectures on music at Columbia University), Edward MacDowell shows examples of what happens when you take mathematics as the means of analysis of music, and each historical case of cultures that try it leads to dead ends.

When I was in high school, the smart kids, the ones in the honors program, took Art Appreciation. I was not one of those kids. To this day, I say I know almost nothing about art/music history or theory. My experience with music was playing in the high school marching and symphonic bands. While I was good enough to be first chair my senior year, and being part of the Chicago All-Catholic Band, our ambitions were suitably limited (the bandmaster considered part of his job to be dissuading students from the profession.) The goal there was an appreciation of music, and perhaps a life-long hobby (e.g. community ensembles or playing in private). This is where I was when I lived around Washington DC, where I took advantage of a wealth of performances in public spaces (museums, parks, public buildings, university) and the occasional concert. And I continued my practice from when I was an undergraduate of going to performances of friends who were in music programs at the local universities.

In graduate school this began to transform. I had friends in the music program, but now I was at a school with a decent music program, where students there had aspirations of professional careers in classical music. I was going to recitals, concerts, and programs where my friends were performing on a regular basis. And, since I was taking my time in a Ph.D. program, I could follow them throughout their time in school, and I could watch how they developed both in performances and sitting in on practice time. (I had one friend comment that having me in the room while she was practicing was like a studio session. My wife thanks everyone for the training as she is the current beneficiary of all of those sessions.) Over time I stopped merely hearing the music to listening for the interpretation. Instead of appreciating the music being played, I could observe how an ensemble interact with each other and it became a conversation between people, not only the genius of the composer putting notes on a page.

What do I gain? Like all of the other fine arts, classical music is an abstract way of asking what it means to experience being human. At times composers use it to respond to a historical context. Most composers chose to create a tension by using a format to constrain themselves as they desired to emote or to present a story. (I tend to not get many of the more free form moderns). And I take it as a privilege to observe the result.

I am looking forward to another season of blogging for the Pittsburgh Symphony Orchestra. I have always maintained that my blog is not a concert review. The Post-Gazette has someone who does that as well as people associated with the schools of music and conservatories. Many with backgrounds in the humanities can discuss what a piece means. And I know little about the mechanics or history or philosophy of music. What I can do is pay attention to the concert and react to it. At a book discussion prior to last weeks opening gala, Renee Fleming stated that her performances where a collaboration between the creator (composer) and the performer. But she is missing an actor. Aaron Copeland stated that art is a collaboration between the composer, the interpreter, and the listener. Copeland tells the listener his job is to be aware of the personalities and functions of the composer and interpreter, to distinguish between them. And it is not sufficient (or maybe not even necessary) to be educated and trained, but the listener must love music. And not just particular styles or forms or schools of music, but across a wide range. And then react to it. Otherwise the efforts of composer and interpreter do not have meaning. I do my part.

A cello

Tuesday, September 14, 2010

Creating spatial data files

At my school, there is a class on Geographic Information Systems (GIS). When you complete the class, you now know how to analyze data using ArcGIS. But you do not know how to create the data files you used. And you do not know how to do anything that ESRI did not include in ArcGIS. As a researcher, I find that unacceptable. This year, there is a senior project team including someone who has taken this class doing a project with the local chapter of the Red Cross that will involve using spatial data. But since they cannot create a spatial file, I will create the data sets that they will use to populate their models. If I am going to do something, I may as well learn something along the way. Those somethings are Spatialite and Google Maps API for geocoding.

Step 1. Given a list of addresses, find their latitude and longitude. The official way to do this is to get the TIGER line files of street maps. These encode each block by name and the end points of addresses for each block along with their geospatial coordinates. Then you can interpolate. The more pragmatic way of doing this is to find someone who has already processed the TIGER line files and created an API or other interface to work with them. There are many that will then create Keyhole Markup Language (KML) files as output, and I have used one before.

The way I will do it is to use the Google Maps API. There is a Python package called googlemaps that will find lat/long given a properly formulated address. (note: long is a keyword in Python, so we use lng for longitude)

from googlemaps import GoogleMaps
def getlatlong(gmaps, streetaddress, city, state, zipcode):
address = streetaddress + " "+ city + ", "+ state +" "+ zipcode
lat, lng = gmaps.address_to_latlng(address)
return lat, lng
# get api_key from
api_key = "APIKEY"
gmaps = GoogleMaps(api_key)
. . .
lat, lng = getlatlong(gmaps, streetaddress, city, state, zipcode)

Step 2. Create an Spatialite database. Spatialite is the SQLite database with extensions for Simple Features for SQL, i.e. a relational database that allows for queries on geometric objects. The other options are Oracle Spatial, DB2 Spatial, PostGIS and MS Server with spatial extensions. There are also spatial extensions to MySQL, but they do not meet the SFSQL standard, and they are simplistically implemented (which would lead to many errors if you actually needed correct answers instead of approximations.) Of these, Spatialite does not require an administrator and contains its data in a single file, both of which simplify their use. To use Spatialite, the PROJ and GEOS libraries should already be on your machine. (see Spatialite installation instructions)

To create a database, use spatialite the same way as you would have used sqlite. But after creating the database, load init_spatialite.sql This SQL file loads some required tables. Sometimes, Spatialite will create the tables on its own, but sometimes not (especially if the database was originally an SQLite database).

Next, load the data (using any of a variety of different methods for SQLite databases.) Given address data, determine lat/long and enter each of them into their own fields. (you probably have to create these fields after importing the address data.

Step 3. Create the geometric representation of the data. What makes data spatial is the connection of a geometric representation of the data and the information about the spatial object. Before you do this, it would help to look at other datasets you are using. Spatial data is usually distributed as ESRI Shapefiles. Each Shapefile is actually a collection of files that include the polygons of the geographic objects, the data associated with those polygons, and a projection that describes how to make a representation of a surface of a sphere into the two dimensions of the computer screen (or piece of paper). The projection of a shapefile is usually found in a *.prj file in the same directory as the *.shp file. Most GIS viewers allow you to look at the shapefile properties from within the GIS viewer. The value needed is an SRID, usually a 4-digit number (sometimes 5). From here, a set of spatial queries are run from within Spatialite to add the geometry to the database. See prior post on loading lat/long data in Spatialite. When these spatial functions/queries are run, Spatialite will perform a series of operations that use the information in tables loaded by the init_spatialite.sql to generate the geometry representation or convert representations between projections. At this point, the data is now spatially enabled.

Step 4. View/Export. At this point, only a few GIS viewers can use Spatialite databased directly. One is QGIS. So after performing any wanted spatial queries or other operations you should export the data to another format, such as Shapefiles. The OGR/GDAL tools of the Geospatial Data Abstraction Library are able to do this. Within Spatialite you can use the .dumpshp function to create a shapefile.

The format of .dumpshp is
.dumpshp table Geometry sitelocations CP1252 POINT
table is the TABLE to be exported. I think this could have been a VIEW as well. Geometry is the name of the field within the table that has the geometric representation. Note that Spatialite stores this as a BLOB object. sitelocations is the name of the shapefile to be created. CP1252 is the name of a character set. Presumably there are others, but I have been using CP1252 for now. POINT is the spatial data type. Other types include LINESTRING, POLYGON, and MULTIPOINT.

What would be very useful right now is if I could automate steps 3 and 4 so I could run them from within Python instead of doing them inside Spatialite. However, this only works if SQLite was compiled with the ability to load extensions. Most distributers do not do so. One workaround is to install the pysqlite2 extension and compile it so that it can load extensions (as opposed to using the sqlite3 extension that is included in Python).

Sunday, September 12, 2010

Why I run

(and hike and camp and . . .)

"Short cut this way" - spectator sign at 2004 Chicago Marathon
"No short cuts" - 2004 Chicago Marathoners cry on seeing the sign

There are lots of reasons to promote running. Fitness. Competition. Glory. Euphoria. Myself, after 20 years of running I'm not going to turn heads by my fitness. The only races where I've gotten prizes are races where noone serious shows up (don't laugh, it has happened. The funny thing, I was teasing the eventual winner about it before the race). And I don't get euphoria from just running any more (ok, maybe if there is a real good hill. Note: my idea of a real good hill is one that a car cannot drive up.)

But what I do get is connect to reality. My profession is one of abstraction. How to make an abstraction of our world so we can understand it better. But, as I had to explain to one of my students, when you are faced with an actual instance, there is no need for abstraction. In running, hiking, camping the road, trail, hill, stream, field is present with you, and you have to deal with it as it is. Heat, water, cold, ice, rain, snow, hazards, obstacles, are things you face. The constraints of fuel, food, water and the limits of your body, skill, knowledge and training have to be considered before you start, and their effects have to be dealt with. Preparation matters, and you pay a price if you skimp. There are real hazards. I've written journal entries for the purpose of informing whoever discovered them. I've given reports that a trail was hazardous and should have been closed.

I think we live in a society that likes to ignore reality, preferring to view perception as more important. And they can use power derived from fait, moral righteousness or power to enforce their views. But that does not count when it is you, your fitness, skill, training and nature. And I like having one part of my life where that is unambiguously true.

J, J and I at the finish

Monday, September 06, 2010

Loading Lat/Long data into Spatialite

The task: Load spreadsheets with Longitude and Latitude data into a spatial format. Preferably in a way that can be done by people who are not good programmers but can follow directions to use command line tools.

Initial data: Spreadsheets with addresses and Longitude and Latitude. Note: this can be created using the Google Maps API accessed through various programming interfaces.

Tools: Spatialite and SQLite Manager (Firefox plug-in)

  1. Save spreadsheet as a comma separated format
  2. Import into SQLite using SQLite Manager plug in
  3. Open Spatialite using command line interface.
  4. Add the geometry to the table using: SELECT AddGeometryColumn('addresstable', 'the_geom', 4326, 'POINT', 2);
  5. Note that 'addresstable' is the table within the database that contains the long/lat data. 'the_geom' will be the new field that contains the spatial data. 4326 represents the SRID for the projection to be used (in this case WGS 84). 'POINT' is the spatial data type. 2 indicates this is in a 2-D space.
  6. Calculate and insert the spatial data using: UPDATE 'addresstable' SET the_geom = GeomFromText('POINT('||Longitude||' '||Latitude||')', 4326);
  7. Longitude and Latitude are the field names containing the longitude and latitude data in the table. The names do not matter. But they order does. And they are separated by a single space.
  8. Method is taken from PostGIS in Action by Obe and Hsu. Spatialite function names are similar to PostGIS function names. In many (but not all) cases, the 'ST_' is removed from the beginning of the function name. Note that for the exceptions, the Spatialite documentation references two function names, one without 'ST_' and one with.

Sunday, September 05, 2010

Why I am a photographer

I have had a wide range of hobbies, as does most people over the course of their lives. And like most, many have gone by the wayside. I think one aspect of maturity in a hobby or an activity is that you are no longer merely an actor performing techniques, but you either guide others (through teaching or through organizing a community) or you are pushing yourself in the practice of the art. In photography, this observation comes through in the form of commentary on digital cameras, especially digital SLRs. One big criticism is that the advertising around cameras fosters a view that being a good photographer was only a matter of a big (and expensive) camera and big (and expensive) lenses, completely neglecting the elements of skill and practice and understanding of light.

Art Institute

Cellist at play

I started photography with a manual SLR. Center-weighted meter, manual focus, manual aperture, manual shutter speed. After that was a point and shoot. An Olympus Epic known for its good 35mm f/2.8 lens and being a hockey puck (indestructible). It was a few years before I even bought my first auto focus/auto exposure camera. Continuing my ways, my favorite camera was a manual focus, manual exposure rangefinder (i.e. what cameras were like before SLR was invented). This was characterized by fast (wide aperture) prime (non-zoom) lenses and frequent use of black & white film. Also known as "this is how Cartier-Breeson and Capa did it"

Louisa and Sheena talking by the eternal flame

There's soup in the pot

Part of being good is taking time to learn the fundamentals. Learning the ways of light and shadow. The limits of the sensor (film or digital). How to see relationships in a scene. How to see a relationship unfold so you can be ready at the decisive moment.

Hello great-grandson

Mynas over the Chao Phraya River

My investment in equipment pales in comparison to the investment in study and practice, and I like to think that it shows.

For my involvement in the arts, photography is my only practice of it. So to improve means to find ways of improving your skill. And one of the classical ways of developing creativity is to put in place boundaries that force creativity in other ways. Thus my preference for using prime lenses and black & white. It becomes the frame in which I develop. And the expectation is that when I do use color and zoom lenses, the skills and ability to see that is developed carry over.

Schenley Bridge over Panther Hollow

Three glasses at Cafe Havana

Sunbeams in Todd Nature Reserve

Like many things, I have adapted as the technology behind photography has changed. My rangefinder is now rarely used, since the chromonegative film I had always used is no longer available. I now have a digital SLR and a set of zooms. But the manual focus primes are still what I take most of the time and that goes well with one of the smallest APS digital SLRs on the market. Most of my photography is not intended to push my abilities, but to record the events of life.

Lawrence and S talking music


Thursday, September 02, 2010

Why I read

Ruined by Reading: A Life in BooksRuined by Reading: A Life in Books by Lynne Sharon Schwartz

My rating: 2 of 5 stars

View all my reviews

I recently went to my first meeting of a book club. The last one I was with slowly faded away, as such enterprises do. For the new one, this was its second meeting of its existence. Which is a milestone. If nothing else it means that one group of strangers did not repulse each other away and they thought it was worth meeting again. It does seem odd that less than two months before a baby arrives I am meeting new people. But I was not alone, as one guy there is a new father as well. The book we read this month was fairly unremarkable. But its subject is the place reading has played in the life of the author. Most of the book focuses on the author as a young girl. And for an author to examine the place of reading in her life is a bit of navel gazing.

So, why read? There are many arguments not to. I know many people who state that they do not read fiction, only non-fiction, viewing all fiction as fantasy and a waste of time. Various books get branded as out of bounds or satanic. Of course, many of these same people invest time in video games, shopping, and other arguably non-productive hobbies and pursuits which I do not. I also can say, as my wife would put it, I have actually done a lot of these things in real life, so living vicariously through reading is not strictly necessary.

What reading provides is a way of making my world larger. I joke that the reason I listen to people telling stories and lessons learned is that I want to hear others talk about how things went wrong. Because I am a very creative person and I want to make mistakes that are unique. Mark Twain in "Taming the bicycle" discusses learning through one's experiences only as misleading, since you don't know if what aspect of your experience provided the right lesson.

Fiction does the same. What good fiction should do (and I hold movies to the same standard) is develop a world, and provide situations for its characters to engage in the three major conflicts: man against nature, man against man and man against self. Given the setting (I always give authors and writers great leeway in how they make their setting, since real life is pretty varied as well), do the choices and consequences of the characters make sense. (again, realizing the wide range of responses people in the real world use, there is a certain amount of range available here too.) Every (good) book adds to my world, and provides a base that I take with me in engaging my world, in all of its messiness and occasional perversity. And ways of describing my experiences to others (I write a lot of after action reports and meeting notes)

Is it worth reading and talking about it with other people? Like many things, reading is a skill. There is a benefit to testing your ability to observe and synthesize with other people who also had the same experience (reading the same book). It is a given that everyone will take away different things from a book (which is not to say that the takeaway needs to be anything profound or deep), but you should at least recognize each others observations of action, character, and motivations.

But the main reason I read is that it makes my world larger. And richer. And we look forward to our son doing the same.