Monday, March 05, 2012

Pittsburgh Symphony: Thinking of Classics and Enigmas

[Original post is at the Pittsburgh Symphony Blog site] Discussing Enigmas - A post-concert discussion of Elgar Enigma Variations, Pittsburgh Symphony Orchestra Overlook Room

This past Sunday’s concert included a workshop and post-concert discussion led by teaching artist Christina Farrell. For Elgar’s Enigma Variations, the easy choice of topics would be to look at three enigmas directly presented by Elgar. But as we talked, conversation covered another topic, does the direction or intent of the creator of a piece play into the performance of the piece? And from there, what makes a creative work worthy of being one of the classics?

To be sure, the use of hidden themes and puzzles within musical works has been done before and since. Several composers have pieces full of references to friends, acquaintances, and contemporaries. But this is par for the course in the classics. My high school English teacher was fond of saying that the Greek classics include everything. Participants in one web site that focuses on identifying themes in movies and TV shows delight in noting that certain themes have very old origins. But this does not lessen the treatment of these themes or use of these tropes. There must be another criteria.

I am involved in a creative field. And in my field, some works are known and viewed as seminal works, definitive in their topic over anything before or since and viewed as original contributions of high degree and quality. Yet even these explicitly reference the works of others, not all of which are in themselves worthy of the same acclaim. The creators and all those who are qualified to review the work will acknowledge it openly, but something separates these from others of their kind.

Mortimer Alder once wrote an introduction to one collection of Great Books. In it he describes three criteria that he and his fellow collaborators used to choose and cull that collection. One was the work’s contemporary significance (which implied that it was timeless beyond the period of original creation); second was its re-readability, or the fact that the work could be read again and again, with deeper understanding every time; third was its relevance to a number of great ideas that occupied a number of great thinkers before and since, the participation in the work in the great conversation through the author’s reading of related works of before, and the development of ideas that have inspired reaction from those who follow.

And here in music, it is not just the theme or subject of the work that makes it meet similar criteria. The price of admission into a classic worth listening repeatedly is the quality of the music. But if it was only quality we cared about, we may stop listening to new music, because there is more than enough of the traditional classics of quality to keep us wonderfully engaged. But to add to what has come before a work must also have something to say. A response to what has come before, and something that is worth responding to.

Thursday, March 01, 2012

Parenting month 16: Toddler in motion

A journey upwards begins with a single step Oops, missed a month. These past two months have been marked by T moving a lot more. He goes up and down stairs. He stands up and walks around. And he can climb on chairs and couches. And go exploring cabinets and anything else. Definitely have to work to keep track of him now.

I got new shiny clothes Another major milestone is that mommy finally took a trip away without T. So for four nights, mommy got to sleep :-) And when she came back baby, daddy, and house were all intact and reasonably well fed.

That is me playing the piano T is still somewhat lacking in the socialization department. He is the one who is playing alone when everyone else is crowded in one corner at day care. On the other hand, he is ok being in places with lots of other people, he will just ignore them.

On the developmental front, one comment that we have gotten is that he has a reasonably good attention span (for a 16 month old). He will sit through reading books (and we have him trained to take care of turning the pages). And he will play with one thing for a reasonable amount of time.

New things to look forward too. The grandparents are coming, taking shifts over the next 6-8 months. Lots of fun for T. Exercise for grandparents. And mommy and daddy are looking forward to having fun leaving T at home :-)

Monday, February 27, 2012

Book Review: The Art of Black and White Photography by Torsten Hoffmann

The Art of Black and White Photography: Techniques for Creating Superb Images in a Digital WorkflowThe Art of Black and White Photography: Techniques for Creating Superb Images in a Digital Workflow by Torsten Andreas Hoffmann
My rating: 5 of 5 stars

The Art of Black and White Photography is written as a series of chapters that are short lessons on individual topics. While it starts out like many photography tutorial books discussing equipment, once past the initial chapters it changes form. It becomes a set of lessons that are built around the creation of photographs, from the initial scene to adjusting composition and tone to achieve a final result. And in that it is much better then the usual set of tips and tricks. Because to teach an art involves leading someone through the mental steps of discovery, not telling someone how to do it.

That is me playing the pianoArt is traditionally taught by master to student, and the context in conservatories, schools, and classes around the world is the studio. Where aspiring artists can gather and present and critique their work under the guidance of a master. Because this exposure to criticism in an environment intended for the growth of the student is how the student's skill at a craft is honed. But in the modern world where people think that mastery can come quick and easy by learning a few secrets and tricks, this is bypassed. And that is my criticism of most photography instructional materials, they attempt to teach a set of rules for each situation. And while this at least provides examples of good photographs, it does not lead the reader through the craft of looking and evaluating scenes, and then of taking a scene and looking for improvements along the way.

Bench by Benedum Hall after a little rainHoffmann does something different. In each chapter he takes you through a series of scenes. And leads you through the way showing how a change in view, composition, focus can lead to an improved picture. One example is a market in a courtyard. First a picture of a few stalls. Then a discussion of how clutter detracts. Then as the composition gets tighter and tighter it becomes essential elements. Then a picture with essential elements is improved by a dynamic element of a person walking through, with the moment captured at exactly the right time so that the movement is apparent in a still picture.

Columns outside Amos HallHe does this in various forms throughout. Yes, he hits the 'rules' like everyone else (there is a chapter on the Golden ratio that has many pictures with many drawn lines illustrating various applications of the Golden ratio), but what makes this book different are the discussions that lead you through how to view the scene and compose to make a distinctive photograph.

Disclaimer: I received a free electronic copy of this book for review through the O'Reilly Press Blogger Review program.

More information on this book can be found at the O'Reilly website.
I review for the O'Reilly Blogger Review Program


View all my reviews

Saturday, February 18, 2012

Three months with the Lumix GF2

Panasonic GF-2 with Voigtlander LTM lensesMy wife and I both have the same start in photography. The manual focus, manual exposure SLR manufactured by Cosina as an OEM. In my case it was the Ricoh KR-5 Super II (Pentax K mount) and her's was the Nikon FM10. And we've made the switch to digital, with my buying a digital SLR when my favorite film was no longer available at the local photography store. In addition, we've stopped using digital compacts when we both switched to using iPhone, since the camera included in that was close enough in quality to make a digital compact superfluous. To this I've added one of the new class of cameras, a mirrorless interchangable lens camera (MILC). Specifically, the Panasonic Lumix GF-2, which is a Micro Four Thirds (M4/3) camera.

Rows of bread in My OfferingThe GF-2 is positioned within Panasonic Lumix Micro 4/3 line as the consumer (vice enthusiast) MILC without a built in electronic viewfinder (i.e. composition etc. has to be done through a back panel LCD) (Note: it has been superseded by the even smaller GF-3. When buying consumer electronics, I tend to buy one generation behind the current. It is alot cheaper.) (The enthusiast counterparts are the GF-1/GX-1) What makes this feasible is the fact that the back panel LCD screens have reached a level of quality that makes them competitive with traditional SLR viewfinders for composition, focusing, and judging exposure. However, it is not quite as good. And the fact that the viewfinder is not integrated means that you are composing and shooting with the camera held in front of you rather than in contact with your body, which reduces the potential stability. But not having the reflex mirror based viewfinder means that there is no need to accomodate the mirror, so the camera can be very small (front to back).

The lights in the Mattress Factory CafeThe other major compromise is the use of the M4/3 sensor, which has 1/4 the area of a traditional 35mm film (compared to most digital SLRs, which use an APS-C sensor with 1/2 the area of a traditional 35mm film). While this is many times greater than digital compacts, so comparing with digital SLRs makes more sense than comparing it to compacts, the difference is noticeable in low light. The advantage of this is, again, the camera could be made smaller.

There are plenty of places for technical reviews and reviews from the point of view of a range of photography styles. But what follows is where the Micro four-thirds Lumix GF-2 fits into my photography.

Playing a melodic section1. It is small and still takes reasonable quality pictures. I can tell the difference on sight between my Digital SLR pictures and compact or iPhone pictures. The micro four-thirds not as much. The GF-2 in particular is so small, I can put it in a jacket pocket when I use my Panasonic Lumix G 14mm F/2.5 lens. Doing this, with a second lens in the other pocket used to be the ideal style for going on a photoshoot with rangefinders, but 35mm film based rangefinders required a very big pocket. I've even put the GF-2 in my front pants pocket (but it is rather snug in there).

Water vases in Westin, Charlotte2. There is a saying, the best camera is the one you take with you. I can take the GF-2 with me when I am carrying a bag that has other things, like my diaper bag when I'm with my son. My digital SLR basically demands its own bag because of its size (and I have a Pentax K-x, one of the smallest digital SLRs on the market). I bring it with me on work trips, because it does not take a lot of room. Similarly, we keep this camera out on a shelf so that it is readily accessible. It also means my wife will use it, since she never considers it worth the effort to bring the digital SLR.

Rehearsing One Hand, One Voice3. Composition, focusing, and shooting can be done from the LCD screen. This picture of the dancers was taken while holding my 1 year old son in my lap. When using M4/3 lenses with auto focus and auto exposure, you can touch the point on the screen that should be where focus and exposure should be evaluated. And this is important if I happen to be holding something else. Like a baby. So putting a camera to my eye is not practical.

Vince playing the fiddle4. Use of other system lenses. One of the side effects of being able to make the camera small and the lack of the mirror means that the register (distance from the mount to the sensor) can be very small. And since the sensor is also small, this is even smaller than my old rangefinder lenses (which also had this quality compared to SLRs). So, with an adapter (which increases the distance from the mount) I can use any of my old lenses. In particular, this lets me use my rangefinder lenses that have been sitting in a closet for the past two years. Now, this means that these lenses are effectively manual focus, and only aperture priority exposure (no shutter priority since the camera cannot control the lens), but since I generally like shooting that way anyway, that is fine.

Closeup of the Thumb Drum5. Familiar operating system. For my manual aperture lenses, the operation is very familiar. Aperture ring for aperture, a thumbwheel for shutter speed or exposure compensation. And by pushing down on the thumbwheel, you get a zoom in effect to assist in manual focusing if you want it. The major missing piece is the lack of a wheel to change the exposure mode (e.g. program, aperture priority, shutter priority, etc.), instead you have to work through the touchscreen. But since I usually looked at that dial when changing the exposure mode it was not much more of a hassle.

And on the other side, some shortfalls, mostly compared to my digital SLR

1. The lenses I have are in the f/2.5 range, while for my SLR I was using lenses that were f/1.4 or f/1.7. The loss of a stop is noticeable in working. Although if I was truly trying to shoot in a low-light situation, I would bring my SLR since the larger sensor also makes a difference in image quality in this situation.

2. Low light (high ISO) is worse. Probably because of the smaller sensor. But it is much better than with digital compacts or smartphone cameras.

3. Black and white. The monochrome setting is Program exposure. And you cannot even set over- under- exposure (which I do all the time). I've set the custom programs to be black and white with over and under exposure as a workaround, but that is not the same thing. (and I like using black and white)

Really that is it.

The biggest effect this has on my photography is that I can bring it with me when I'm carrying a baby along with all the other attendent supplies. The quality over a smart phone is beyond question, and I would not carry an SLR and a diaper bag at the same time.

If I was starting in photography and not doing gigs, I would recommend the mirrorless interchangable lens cameras such as the micro four thirds lines over a digital SLR. When there is not anything serious riding on preformance, the quality of the pictures from these is close enough to SLR quality, but with a much lower cost in terms of bulk, which makes it much more likely that you would actually have the camera with you when opportunity arises.

For more picture samples, go to my pictures at Flickr taken with the Lumix GF-2

Saturday, February 04, 2012

Book Review: SQL and Relational Theory: How to Write Accurate SQL Code by C. J. Date

SQL and Relational Theory: How to Write Accurate SQL CodeSQL and Relational Theory: How to Write Accurate SQL Code by C. J. Date
My rating: 4 of 5 stars

Date's book is almost two books in one. First is a book on relational theory. As such, it is meant for deep reading. The second is SQL, the Good Parts. And as such it can get pendantic. But for someone who already knows something about working with data, it can be a good discussion on what you can and cannot get away with.

The first part of the book is an introduction to relational theory, mixed with the author's discussion of what is wrong with the SQL specification and the various implementations in database management systems that are currently available. While I appreciate the discussions from the point of view of making definitions clear, the numerous digressions into the failings of SQL become distraction after a point.

The second part is dominated by how to think in relational terms, and often the implementation within SQL. This is probably the valuable part of the book. Actually, because this is approached as much from a relational theory point of view as an SQL one, it becomes quite applicable to non-SQL forms of manipulating data (I usually manipulate data through programming languages such as R or Python). What this book becomes is a illustration of how to think when digging into data, and what transformations are reasonable and which gets you into trouble.

This is not light reading, or a reference to use when learning how to use SQL, or data manipulation tools in general. If you get around the discussion of the faults of implementations, it is a book on how to think when manipulating data as the first steps in data analysis.

Note: I received a free electronic copy of this book through the O'Reilly Blogger program

View all my reviews

Sunday, January 01, 2012

Parenting Month 14: Evaluations and goals

Some lighthearted observations. Then a serious one.

1. T is learning how to go down things. We've been trying to get him to get off of a mattress backwards (feet first). Not only has he started to do this consistently (instead of charging headfirst off them), he also figured out that this is how to go down stairs. The books state that this marks the end of the 'stairs are dangerous' period, and some of the more natural parenting types consider this as the goal instead of using baby gates. Mind you, we are keeping the baby gates, but we don't have them everywhere. And maybe we won't need to.

2. Loves bananas. He amuses everyone at grocery stores when we go pick up bananas and he is so happy to have them. Even better when he cries out 'nana, nana' for all to hear once we get within sight of the bananas.

3. He likes to feed mommy and daddy. Taking a spoon of yogurt and putting in our mouths. Cheese, crackers, bread, even a banana. We like to think that this is his way of showing love (after all, feeding him is what we do)

4. He is generally a very happy child. Except when it comes to sleeping. Then he is a very unhappy child. *sigh* *yawn*

5. He has continued to like it when we read to him. Our babysitter comments that she is surprised that he has the patience to make it through books. Of course, he has been doing this for months.

6. At day care they had evaluations. One funny one was 'does not show affection to stuffed animals.' He actually does not have stuffed animals at home, so the idea of forming attachments to things, not people, is probably not something that has occurred to him.

7. A more serious note, the evaluators also mention that he is slow on all marks regarding socialization and language. Of course, most of the behaviors they mark as deficient, he does show at home. The problem, of course, is that we are raising T bilingual. And our understanding is that children raised bilingual will be evaluated as slow until they are around 5-6. I have colleagues who are in the same situation.

We have promised ourselves that we would ignore things like milestones for the first few years. But this is where it is important to check that we do believe in this. Because we believe that the goal of raising children is not for good grades or evaluations, but to prepare them for the world. And while evaluations are important, if they do not further that goal, they are to be ignored. Learning to put aside these evaluations now, after considering what they mean, hopefully makes us better able to work with evaluations in the future. And take us further in our goal of raising a child.

Getting SageTeX to work on Ubuntu

Since I'm using Sage more, I'm trying to get SageTeX working, so I can embed Sage into LaTeX documents (i.e. have a report on the methods integrated with the code that implements the methods and generates the results. Search for 'Literate Programming' or 'Sweave' for many references on this)

On Ubuntu, after I copied SageTeX files to my local LaTeX configuration directory (as per instructions in the Sage Installation Guide, I still got errors when trying to build the example documents

Traceback (most recent call last):
File "st_example.py", line 7, in
_st_.inline(_sage_const_0 , number_of_partitions(_sage_const_5 ))
File "/home/lluang/Apps/sage-4.7.2/local/lib/python2.6/site-packages/sagetex.py", line 86, in inline
'}{{%\n' + s.rstrip() + '}{}{}{}{}}\n')
File "element.pyx", line 331, in sage.structure.element.Element.__getattr__ (sage/structure/element.c:2868)
File "parent.pyx", line 327, in sage.structure.parent.getattr_from_other_class (sage/structure/parent.c:3193)
AttributeError: 'sage.rings.integer.Integer' object has no attribute 'rstrip'

**** Running Sage on st_example.sage failed! Fix st_example.tex and try again.


So what happened? Apparently, one of the Ubuntu texlive packages (specifically texlive-latex-extra) includes an outdated version of the sagetex.sty file while what is needed is one tailored to the current version of Sage (and included in the Sage distribution). While I have the correct version in a local directory, there is a precedence issue when multiple LaTeX style files are present. Since I don't have the inclination to figure out the issue, I found the location of the wrong sagetex.sty file, and deleted the entire directory (/usr/share/texmf-texlive/tex/latex/sagetex). Now, SageTeX works, and I can start writing papers using Sage/Python, just like I do using Sweave for R.

Thursday, December 29, 2011

Ghost Story by Jim Butcher - What is the goal of training the young?

Ghost Story (The Dresden Files,  #13)Ghost Story by Jim Butcher

My rating: 4 of 5 stars


So, Harry is dead. But apparently not quite. He is now a ghost. And he knows nothing about how to survive as a ghost. Fortunately, he soon meets some guides to mentor him along the way.



Along with the rest of the story, Ghost Story is the story of the training of the young. While Dresden has been spending years training an apprentice. But throughout the series Dresden has had a problem with trusting others. He has made a practice of hiding the truth of dangers and the realities that he faces from those around him. Even after it repeatedly gets him and those around him in trouble. And now that he is dead, he is not able to help his friends when they inevitably get caught up in things bigger than they are So throughout the book he learns of what his friends have been doing to compensate for his absense.



The question at hand, was his way right? In his absense his apprentice has gone off on her own, and one of his old acquaintances has teken up the task of continuing her training. And his friend comments that she was training his former apprentice to survive in combat, in a world that was harsh and unforgiving. While he has been derelict in his duties in coddling his apprentice.



Was she right? I have a young son, who we are hoping to raise so that he will be able to handle the world. And I have been entrusted with the training and mentoring of graduate students to prepare them to face the world and to survive and thrive in it. My wife and I have promised that we would not coddle our son, that as he grows we will prepare him for the world that he will be a part of. That may not be forgiving. We do not promise success. But we promise that he will not into it blind. And we will have prepared him so that it is possible for him to thrive. But in the end, he will be the one who has to learn the lessons, develop the skills, and go into the world.





View all my reviews

Monday, December 26, 2011

Teaching Notes: Simulation Fall 2011 and using Simpy and Sage

This was my first semester teaching a graduate level (research focus) simulation course. The department has not had this course in quite some time. There is a master's level graduate course taught by an adjunct professor that focuses on simulation modeling (i.e. building the models, with an explicit de-emphasis on analysis). This course, in stark contrast was to focus on the analytical side of simulation with a de-emphasis on model building (i.e. the models used would be considerably simpler then would be expected in the other course, including the project).

The other goal was to learn a new simulation library. I wanted to learn to use Simpy simulation library as it is used by researchers associated with a computational research center at my school. I was using this within Sage, a mathematical programming environment. Sage in its notebook mode was how I was going to present the material, as it allows for mixing formated text as well as showing the results of calculations, graphing of results, etc. I wanted to test live generating of graphs and output of random simulations, to demonstrate the effects of randomness throughout. I let each student choose a simulation platform. The standard here was Arena. The other options were simulation libraries targeted at various simulation languages such as Simpy (Python), SSJ (Java), Simlib (with the Law and Kelton books for C/Fortran) or Omnet++ (C++).

The students were a mix of engineering PhD/MS students and students in the MBA/MS-Industrial Engineering (IE) program. Note that there is some selection here, as everyone is fully aware that the other graduate simulation course would be offered in the spring. Actually, one of the MSIE students had previously taken that course. Most students used Arena. One used Simpy and one used Matlab (i.e. roll his own)

Some notes
  1. Teaching MBA/MSIE students was fun. If this is what teaching MBA students is like, I'm all for it. These students were attentive, frequently asked very insightful questions, eager to learn the material and implement it, and were quite appreciative of the analytical focus of this course. A few of them mentioned that since they were interviewing for jobs, topics covered came up in their interviews (clearly, these were quantitatively oriented MBAs). One issue was during projects, as one of the PhD student projects was based on what he was exploring as a PhD thesis, I had to explicitly state that there were different standards for projects.
  2. An analytically focused simulation course was the right idea. The MBA/MSIE students liked it and appreciated the difference, including the one who took the other simulation course previously. Focusing on the use of simulation instead of the building of simulation models put the emphasis on the use of simulations for decision making (which allowed the MBA students to bring in what they knew from other courses with them). And for the PhD students, implementing analytical methods gave them an understanding of the field. And a decent part of one PhD dissertation is going to come out of the course.
  3. Simpy - I liked using Simpy. I found it fairly easy to pick up once I started putting some time into it. One issue was the general flexibility of programming language simulation libraries compared to commercial packages. My general pattern for solving a homework problem was to (i) take code from a similar problem, (ii) (re)write a class to incorporate the differences, (iii) write data collection code (iv) analyze results. But what happened to those who used Arena was they could not get modules to do what they wanted, and developing data recording procedures for an arbitrary performance measure and getting the per-replication output in Arena could be a daunting task. So what took me 20-30 minutes sometimes took the students hours.
  4. Sage - The Sage notebook view was very useful since it allowed the mix of formatted text (like a Powerpoint slide would have), along with live calculations. I used this along with simulations to demonstrate the effects of random variables and to show how various formulas and algorithms are actually implemented. (the descriptions in books and articles skip implementation details) Having the description alongside implementation made sense. When asked, the students preferred this version over the alternative of me drawing on the board (which I also did on occasion) and definitely better then Slides (with the benefit that slides give of having distributable lecture notes). One other benefit was I had to make sure I understood everything, because I would implement every procedure discussed in code including charting before giving the lecture, since the implementation was part of the lecture. There was a similar downside of the students not being able to efficiently replicate the analysis, as they were mostly using Excel spreadsheets for analysis and it was sometimes time-consuming to do tasks that programming made quick.
  5. Sage data analysis. Sage uses the Matplotlib library for data display and graphics. It is reasonable capable, and I have more flexibility than say R. But the tighter integration with the data analysis techniques already built into R make R a better platform when it comes down to it. Sage/Matplotlib has the advantage that modeling can be done in Sage/Python, allowing for all in one tool. (R can be accessible from within Sage, but it is not straightforward once you get past the R core functions)

Conclusions

  1. An analytically focused course works, even with non-PhD students (who were admittedly self-selected)
  2. The Sage notebook view is useful for teaching purposes. Formatted text, LaTeX for equations. Sage's ability for typesetting symbolic math and putting descriptions as well as implementation side by side was useful. Especially in stochastic settings where people do not have well developed intuition on the effects of stochasticity. I like this as a teaching environment. Unfortunately, this seems to be difficulty to teach people how to install it so I'm on my own here :-(
  3. One issue is having people in the same class using commercial simulation packages and programming languages. It is very easy to create a problem that is unexpectedly difficult in a commercial simulation package (and I have no reason to believe that it is a particular failing of Arena). The lack of flexibility in modeling, data collection and analysis makes it easy to get a student in trouble. And I am convinced that this occurs in practice once you leave the core domain the packages were designed for. (I get direct personal contact with representatives from the companies behind a couple of the packages so I get to have this discussion directly with them.)

Sunday, December 25, 2011

Book Review: Cool Tools in the Kitchen by Kevin Kelly

Cool Tools in the KitchenCool Tools in the Kitchen by Kevin Kelly

My rating: 4 of 5 stars


Cool Tools is a listing of kitchen gadgets that have received rave reviews on the Cool Tools website. While none of these are necessities (actually, for those who think that all you need is a chef's knife and paring knife, one of the reviews is for just that). But beyond gadget porn, it is good for all the explanations of how people use these Cool Tools, in many cases beyond its originally marketed purpose.

Cool Tools is NOT a listing of what are necessities for your kitchen and why. For that, I would go to Bittman's "How to Cook Everything." What it is are 81 gadgets that have been reviewed highly on the website "Cool Tools." Each has one or two reviews of just how the reviewer has used that gadget over time and why it has become a key addition to their kitchen. And they discuss practical aspects such as price and cost effectiveness.

Now, it is what it is. A fun little catalog of kitchen gadgets. But within the provided reviews, I actually learned a few things. And that was an unexpected bonus.

Disclosure: I received a free electronic copy of this book from O'Reilly Press as part of their O'Reilly Bloggers program. For more information, this book is available at the O'Reilly Press website



View all my reviews

Monday, December 19, 2011

The Art of Readable Code by Dustin Boswell

The Art of Readable CodeThe Art of Readable Code by Dustin Boswell

My rating: 4 of 5 stars


In engineering, it is often easy to forget that as much as we deal with things that are determined and immutable laws of nature, while the subject we study may be science, our practice of it is an art. And to be good at an art, one needs to master the use of the tools, not only in the sense of understanding its instructions, but as a craftman. When I was just learning computer programming while in high school, I used to openly wonder about my teacher’s concern about aesthetics. But now, with a few more years, I recognize that viewing programming as an art and learning it as a craftsman, leads to better outcomes in programming of our models and algorithms. And The Art of Readable Code is about what it means to look at the writing of code as a craft, one to be mastered and where the doing is as important as the final product.



The first part of the book are the details that go into every line of code. Naming variables and functions, aesthetics (using whitespace and line lengths to make the code easier to understand), using comments frugally, simplifying the logic. I had one person working with me that refused my comments in this area. I somewhat think that part of the reason his time there was unproductive was that he would not take suggestions along these lines, and his implementation of algorithms was both hard to follow and I think contained errors.



The second part was on reorganizing the code. This is something that has relevance as part of what I do is develop new methodologies. But this development very frequently is in many stages. The section on one task at a time was particularly enlightening. I have long known of the idea that it is beneficial to make every function return one output only. But I have felt that only applied when I reached a point where the current progress in the method had a single output. The chapter here discusses organizing steps within the function so each section of the function did one thing only. And reading it, I can think of how that would have made the last paper I submitted to a journal much less painful to develop and maintain.



It is easy to pass over books that look at the art and craft of programming in favor of those that teach new skills or pass on new language or library features or techniques. But a book like The Art of Readable Code is one that will help through over the course of the career, part by part as you mature as a programmer and coder.



I received a free electronic copy of this book as part of the O'Reilly press Blogger program. More information on The Art of Readable Code can be found at the O'Reilly website.



View all my reviews

Friday, December 02, 2011

Parenting 13 months: Holidays

Red in Tamatebako by LugerLA
Red in Tamatebako, a photo by LugerLA on Flickr.

Our holiday activity this year was having little auntie visit us from Chicago for Thanksgiving. And she performed the duty of all little aunties and uncles everywhere. She taught T tricks. In this case how to stick his tongue out at people (ps he still did this for days after little auntie left).

S and I have never been much for holidays. S jokes that for her and her friends, the most notable thing about holidays was that it was much easier to get practice room time. And paid gigs. For me, it was mostly a slight pause that let me catch up on things and visits home to see friends.

We're told that as T grows up, this will change as he gets excited about holidays. We'll see.

Sunday, November 20, 2011

A conference in Charlotte

Another fall, and I again went to my professional society conference. As usual, the meeting of old friends, and making some new ones in the same circles. I'm slowly becoming more comfortable in the idea of academia, so my circle is growing beyond connections from graduate school. Although it is including my friends students over time.

1. The big news I could tell everyone was that my first PhD student is defending this month. My advisors are very happy with news of their impending grandchild. (and yes, they do refer to him in all seriousness as a 'grandchild'. Any professor who mentors PhD students understands the sentiment.)

2. Despite my being a very junior faculty person, I've been informed that I have been around enough so that I cannot avoid various community service opportunities by hiding in the corner much longer.

3. I had a number of 'what am I going to do when I grow up' conversations. Although, it is nice when some of those conversations include comments like 'you check a lot of boxes.'

4. I've continued my tradition of eating Saturday dinner with someone random I meet at registration. Although I really should start trying harder to actually schedule something.

5. I've also continued the practice giving a friend's PhD student feedback. Although this time I was not really expecting to do so since her advisor was at her talk. I figure it is good training for when I have my own students giving talks.

6. It is a good feeling to say 'My talk is for fun. My (student/post-docs) are giving the serious talks.'

Wednesday, November 09, 2011

Ten Photo Assignments (Rocky Nook) by Amanda Quintenz-Fiedler

Ten Photo Assignments (Rocky Nook)Ten Photo Assignments by Amanda Quintenz-Fiedler

My rating: 3 of 5 stars


Before you attain mastery of a craft, you must first learn the fundamental skills. I know a world class violinist whose teacher spent months having him practice picking up and properly holding his violin. Pianists spending hours on hours starting with scales and octaves. Chefs in their first jobs develop knife skills by cutting food. This book is trying to be the tutor for knife skills for digital photography. It may start out slow, but the goal is to master the tools of the photographer's craft, then you can create what you see in your mind.



For all the sophistication of some modern cameras, there are only a limited number of things that can be adjusted on a camera. Traditionally, it was shutter speed and aperture, and film speed (sensor) to a limited extent. And in digital SLR you also include white balance (instead of using filters). All the fancy features in cameras exist to do this, or help the photographer decide how to make these settings. But for the photographer to make these decisions instead of letting the camera do so, the photographer needs to know the consequences of these decisions. And the way to do that is to experience the difference. And this exercise comprises the majority of the assignments in this book.



The assignments here are very different then most lists of photographic assignments. Usually, when I think of photographic assignments it deals with shooting a specific subject under certain conditions. Here it is the learning of how to use a particular aspect of the camera. So one assignment is a test of how your camera light meter measures exposure, so you can see what your camera considers to be proper exposure, over exposed and underexposed. And when you come across a scene, you can determine what you should set the exposure as (i.e. above or below what the camera reads). The second assignment deals with lenses, so you spend time shooting with each lens you own, so you learn its characteristics at different apertures and have a visceral sense of what each focal length looks like. And so on with the many white balance modes, and different combinations of shutter speed and aperture with equivalent exposures. Not until you get to assignment seven do you start two assignments on composition and two assignments on lighting.



Key to appreciating this book is recognizing it for what it is. The first six assignments of the ten are learning the tools of the photographer's craft. It makes you learn what your instrument can do and how it responds to your changes in controlled conditions, and asks questions so that you can reflect on the outcomes so that you develop an intuition on how the camera works, and you can make decisions when you get to the field. I don't think there is a readily available resource outside of a teacher that would lead you on this path. The last four are more pedestrian and generic. For learning composition and lighting there are many sources of exercises and photo assignments that can teach you more with more scenarios and challenges.



At its base level, photography is a craft and skill. And to learn it well you need to practice it deliberately until the fundamentals are sound and intuitive. This book will take you there. But its title is somewhat deceptive (and maybe there is no title that would work in a book like that) because it is not a standard set of assignments (and I dock a star just for that). Perhaps this book is the Études of digital photography, focusing on getting the technical aspects of photography right. But the artistry is something to be developed elsewhere.



View all my reviews

Note: I received a free electronic copy of this book as part of the O'Reilly Media Blogger program. More information on this book can be found at the 10 Photo Assignments web page

Thursday, November 03, 2011

Parenting: One year

Oh, that looks like something fun

Oh wow, how did we manage to pull that off? Before T was born, someone was commenting on the fact that parents to be never felt ready, so he was wondering how we felt. My response back then was I was pretty sure after we have had a child, we still won't say we are ready. But some thoughts on the first year.

1. Parenting is an experiment of one. We used to say we would ignore all developmental milestones before T turned 4, in recognition that babies are highly variable. I can't say we have achieved that, but I think that the more we strayed from that ideal, the more the stress, and I don't think there was any benefit.

2. Attachment Parenting. To the extent we followed any philosophy (other than Chinese mother/auntie advice), we ended up closer to the attachment parenting school. He is what the AP folks call a 'high-need' baby, so he wants contact. But when he get it, T thrives. He is highly responsive to contact whether being carried around, having someone in the room in sight when he sleeps. The result has been what was promised, a baby who is very responsive to people (well, at least people he knows). For all he likes various toys, we like to think that we are his favorite toys.

3. Sleeping. All the books and magazines talk about babies sleeping through the night and when that happens. T is in that set of babies that does not sleep through the night. And apparently he has considerable amounts of company. This counts as another source of stress that did not seem to do any good. But his sleep (or non-sleep) schedule now drives the rhythm of our lives.

4. Learning. We are somewhat surprised that we actually do care about how well he learns, even now. Although we are not so sure about his peers who are doing flash cards and such. It is not facts or things we want him to learn (although we expect him to learn numbers and letters in due time), we want him to learn how not to give up, that things that are hard are worth trying to do, and when you can accomplish them, they are fun. He actually is just getting some of the things we have been playing with him, and it is a lot of fun watching him pai-pai shou (clap hands) when he accomplishes something

5. Alert. Ever since he made it past his colic period, this is one of the most frequent comments we get. That he is alert and intently examining his surroundings (this is another one of the rewards advertised of attachement parenting). He wants to look at everything, we joke he inspects everything he can reach and tastes his food before he decides it is acceptable.

6. Sick. Standard baby is sick with the condition of the month. Always changing.

7. Priorities. Probably the most frustrating part of parenting is that you are always have two or three top priorities at any point in time.

8. Toys. Well, besides us, we have him enjoying reading (at least he turns the page when he is ready to go to the next page, which is usually when we finish reading). Then there are the screens. We are raising a child who thinks it is perfectly normal to have a video call on something that is portable. As well as watch a video or play a keyboard or draw. We're not too sure about that, although I am hoping we can steer him to things that involve him making something.







.

Sunday, October 09, 2011

Ethics and role playing games

Fudge Dice (Moo ratio)

One of the few hobbies that I've kept is playing role-playing games. Alas, it has been a while since I've played with real people, so I tend to play over the internet, with people I don't actually know in real life. For those who only know of games such as Dungeons & Dragons by reputation or only know of electronic versions such as video games, the important thing about role-playing games done right is that they are shared storytelling. The story can be dark, flashy, primarily physical, primarily social, gritty, hopeful, serious, silly or anything else that the participants require. While the organizer sets the environment and milieu, it is the job of the other players to decide how the story goes within the setting.

There are plenty of motivations for doing this. People just enjoying each other's company, wit and humor; those who want to try out what the world looks like from another point of view; writers who want some practice (or who are still working on getting their 1 million words of bad prose out of the way). But one thing I get is the opportunity to think through how to deal with moral issues that do occur in real life.

My wife jokes that I have a habit of playing characters that are like myself. Or more precisely, I take one aspect of me, and make a character that is built on that. Like what beginning writers are told to do, write about something you know. It could be thought of as exploring what ifs. Of course, currently, I am trying to break this by playing a modern day Buddhist monk, Jesuit priest, and paramedic along with a technician in an early industrial setting. (well, I think my wife will call me out on one of these, but I was not trying too hard building that character). But the games I get into tend to be on the grittier side. And one of the effects is that they go into moral issues. Over the past couple years the games I have been in have dealt with racism, class divisions, prejudice, counter-insurgency, and the application of torture. To play well, it means you have to think about the motivations of your character, and the consequences of traits and decisions made along the way.

The groups respond in various ways. For some, it becomes repulsive and they want no part in it. Which is frankly how a large part of the real world is like, where moral guardians declare their righteousness and destroy the possibility of intelligent discussion. Others play things out, and let their characters respond to see how things lead (of course, there are often characters who are moral guardians in play, but this still means that things play out).

And that is probably one thing that I get in gaming that I don't get in real life anymore. I am no longer active in communities that have learned that a lack of transparency, honesty, and openness leads to failure and death. It has been a few years since the last time I was part of a conversation that included a discussion on how a decision would be made to accept the death of some of those present. In its place is a world where moral outrage is a practiced art form, and moral guardians reserve for themselves the right to have these discussions, and shout down others who may want a say.

Not knowing most of my playing companions in person, I have no way of knowing if these are questions they think deeply about, or if these are things that only come up in their lives in the context of games. But I do know that when we are talking about life and death, generally I find that the time to think about it is before you are faced with it for real. Then things tend to work out better. And this is one place to do it.

Wednesday, October 05, 2011

PSO Blog: Mommy and daddy need to go to a PSO concert

[Originally posted at the Pittsburgh Symphony Orchestra blogs] Daddy, you should go to the Pittsburgh symphony concert We achieved one of those major milestones in parenting this weekend. Leaving baby with a caregiver not related to us. ( Yes, we did check in during the course of the afternoon). The occasion, a PSO concert of pieces by Beethoven featuring the Eroica Trio playing the Triple concerto, as we were reminded by a mailer a couple weeks before.
I have a recording of the Triple Concerto at home. And I've been asked why I would go to a concert when I have a recording of some of the greats. And there is something to be said about the fact that every performance is unique. But there is also the fact that there is more to a piece than the notes written by the composer. There is the interpretation of the work. And when you have a group like the Eroica Trio who have been playing together for decade you get the collective interpretation of the work.
With in the first minute of the first movement I was hearing aspects of the piece I have never heard before. A good part of this can be attributed to Honeck balancing out the orchestra so that the right part has focus at any point in time. But another part of it is probably due to the fact that the Eroica Trio has played together for so long. The recording I have is by three acclaimed musicians with another world class orchestra. But the three soloists are known as soloists, not as an ensemble. And there is a difference between musicians playing together and musicians who know each other playing a single piece. It shows in the way the Eroica Trio could play off each other, more a conversation of old friends rather then a few technicians working together. And it felt more that we were privileged to bear witness to it more than just being in an audience.
When I was in graduate school I had remarked to a pianist friend that I thought a duet she was performing probably could only be mastered by pianists who were family members, because there was so much potential in how the parts worked with each other that could not be expressed by performers who knew each other in passing. This weekend's performance is the reward of having artists playing together who not only know their craft, but each other.

Sunday, October 02, 2011

Parenting Month 11: Let's play a game - feed mommy and daddy

This past week we have been having lots of fun playing feed mommy and daddy. Because T knows that he likes being fed and he wants to do the same for us (we think). We also play give mommy/daddy ___ alot now.

On the not so nice front, we are declaring defeat on the ear infection that has been with us since early August. So this month tubes will go in. It seems to be widespread in this region, and by all accounts the tubes seem to work (a four year old gave us a full description of what it was like to get them, but it seems he was sleeping for most of it. Obviously it was not too traumatic.), but he does seem young for this sort of thing. But he has been bothered by it, especially at night since he wants to relieve the discomfort, but he cannot reach inside his head to get at it. On the other hand, for a sick child, he is remarkably good natured and happy when awake. It fools all the doctors who think it cannot be too bad, But we're hoping it gets even better once the fluid drains from his ears.

And now for a gratuitous cute picture. I really like playing piano

Thursday, September 29, 2011

Book Review: The Perfect Photo by Rantakrans and Hagberg

The Perfect Photo: 71 Tips from the Top (Rocky Nook)The Perfect Photo: 71 Tips from the Top by Elin Rantakrans
My rating: 2 of 5 stars

Obviously, The Perfect Photo is mis-named. At a mere 128 pages, this is a pocket book and it is not attempting to be the modern day counterpart of Ansel Adams series on photography or Photography by London and Upton. But what is it? It purports to be a set of simple tips for any photographer, regardless of equipment. However, while the tips are indeed the classic ones that every photographer needs to learn, this book is harder to use for the beginner than it needed to be. It tries to be all things to all people, but it is not enough for a knowledgable photographer, and it skips information that a novice would need to be able to use the good advice effectively. So it fails to deliver to anyone.

The format of The Perfect Photo is similar to what other photographers who are also columnist have used, a set of short articles each on a single subject organized topically. The problem is that while the book is probably best for novices who have not learned these methods, the articles are aimed at photographers with a particular type of equipment, Full Framed system cameras, which are the high end of photography equipment. For example, many of the chapters discuss the use of features that would not exist on point and shoots or compact cameras such as white balancing or the manual controls for aperature and shutter speed. And it does not discuss the work arounds that those who have gotten good at working with these types of cameras have developed to compensate.

More egregarious are the issues with sensor size. While everything they discuss is in terms of Full Frame sensors (24 x 35 mm), they acknowledge something called a half-frame camera. But there is nothing marketed as 'half-frame camera'. There are the digital cameras with APS-C sensors (ranging from 13.8 x 20.7 mm to 19.1 x 28.8 mm depending on manufacturer), there is the four-thirds system, (17.3 x 13 mm) and a few other proprietary formats that are used by a single manufacturer. But none of those is 17.5 x 24 mm , which is presumably what half-frame would be. And while it does mention a few equivalent focal lengths (e.g. that a 50 mm lens will cover the same area on a 'half-frame sensor' as a 75 mm lens on a full-frame camera), they don't go the obvious next step of saying that you can multiply by a factor of approximately 1.5. Even this discussion is not until Tip 22. So in multiple discussions of lens focal length, the novice would not have noticed that there was an issue and they needed to mentally adjust the discussions of what wide-angle, normal or tele-photo are.

And this is my complaint about this. Each tip is oriented towards the novice photographer who is just getting serious and needs to start somewhere. But the individual essays almost require a base of knowledge of photography and the workings of the equipment to understand it fill in the missing details. And worse, the novice would not have realized there was a problem until she tried to use the tip.

Rocky Nook (publisher) offerings seem to be finding replacements for the teaching of photography technique that are useful for the digital age. And this book seems like it was to meant to be the slim fieldbook for the novice who is just starting the road to being serious. But while each tip is good in itself, it needed an editor's hand to pick its audience and focus on it to properly fill this niche.

Disclaimer: I received a free electronic copy of The Perfect Photo as part of the O'Reilly Bloggers program.

View all my reviews

Tuesday, September 20, 2011

Book Review: Think Stats by Allen Downey

Think StatsThink Stats by Allen B. Downey
My rating: 4 of 5 stars

Statistics gets a little respect in Operations research, in part because it gets taught as a bunch of formulas and computer procedures. And the problem with the way that it is taught is that the formulas don't mean anything, and the student may know her way around menus, but that does not mean that she knows under what circumstances to use what method. And everything is learned in isolation, often without practice in getting her hands dirty. Think Stats gives students the chance to get their hands dirty.

Because it uses a programming language (Python) it covers data analysis from beginning to end: viewing data, calculating descriptive statistics, identifying outliers, describing data using the distributions (and explaining what the distributions really mean!). Going through this small book, the goal is understanding and using statistics, not just learning statistics. I have a number of college undergraduate students working on projects. I have started giving them this to work on when they first start with me, both for the programming in Python and to learn statistics and data analysis so they can be useful.

I received a free electronic copy of Think Stats from the O'Reilly Blogger review program.

View all my reviews