Sunday, July 01, 2012

Book Review: Clojure Programming by Emerick, Carper, and Grand


Clojure ProgrammingClojure Programming by Chas Emerick
My rating: 4 of 5 stars

When I first started reading Clojure Programming, the first impression I had was that I've never seen a programming language introduction try so hard to tell me that my programming skills are going to grow significantly as a result of learning this programming language. This book is probably not for beginners, but working through this gives insights into why certain programming constructs work the way they do and how functional programming constructs fit with someone who is used to procedural and object oriented programming. While the efforts it makes to declare its superiority towards other languages gets annoying, the practice in using the REPL actually helps me understand how to better use tools I use in other languages.

My background is in scientific computing. And while I have used some standard languages such as Java, C, C++, and even Fortran, my first choice in languages tends to be either R or Python. The R environment is admittedly ugly, but in Python I typically use tools that surround the scientific ecosystem of ipython/Numpy/Scipy/Matplotlib. My programs tend to be structured into a data gathering and manipulation portion (MVC) then an analytics portions dominated by a series list comprehensions and map-apply and finally presentations of results. In this context, I first heard of Clojure because the Incanter: Data Sorcery project, which was an attempt to create a Lisp-based statistical computing and graphics platform. So I approached Clojure Programming with a view of its suitability for technical computing, or a way of learning functional programming techniques in a deeper fashion for use in R or Python data analytics.

It somewhat disappoints in this. When Clojure Programming put effort into demonstrating its unique points, such as the REPL, I kept on thinking "I already have this in Python/ipython" (in particular the ipython shell gives considerably more capability than the standard shell) When reaching the Numerics chapter, it seemed to be a discussion of standard data types (and when trying to discuss Python numerical types, not acknowledging Numpy data types and discussing performance is ignoring the real world.) My main complaint is that the discussions of language and environment features feels like I'm being presented with a long list of details, without having first having a general sense of what programming would be like.  In many ways, it is similar to learning scientific programming in Python.  You generally learn general programming first, and later on you learn the techniques for data analysis, many of which are based on functional programming practices.

What the book does well is explain deeply the principles behind the language and functional programming.  In works through them with cross references in the text wherever they are necessary.  And it explains why these principles are useful.   In particular with the REPL, which if I had not had experience with the ipython shell would have been quite different then other shells.

What this leads me to conclude is that this book would be very good for someone with a solid grasp of Java programming, with its ecosystem and libraries, and wanted to move into functional programming.  Clojure Programming provides a different workflow since it does compile/evaluate as you go, allowing you to see quickly the results of changes without any performance penalty. And having a different programming paradigm than object-oriented adds a set of tools that can be brought to bear under a different situation.

This was not quite what I was hoping for, but that may be because the tools and language features of Python/ipython were already overlapping with Clojure.  It does fulfill the promise of making me a more knowledgable programmer.  And I hope that working through Clojure Programming also makes me a better one.

Disclaimer:  I received a free electronic copy of Clojure Programming as part of the O'Reilly Press Blogger program.

I review for the O'Reilly Blogger Review Program
View all my reviews

Parenting 20 months: Where did mommy and daddy go?

Walking around Toronto Music Garden

This was a month of traveling. First, the whole family went off to Toronto for Auntie J's wedding. Another road trip and use of a passport for our little traveler. First we stopped in Buffalo to visit V and E. And Donut, the resident cat. Although Donut has never seen a toddler before, he clearly understood the dangers of a toddler who was way to happy to see a cat and want to play with. We had plenty of amusement watching Donut scamper away followed by T running after him crying out 'Do! Do!'

Next was Toronto. T was a very good traveller, helped by the wonders of modern technology in the form of an iPad loaded with Ni Ha, Kai-lan and an iPod loaded with the Sound of Music (yes, the Sound of Music is still going strong in this house).

We arrived in Toronto for lunch with M and family, then was the wedding, T's first. He took the opportunity to sign the guest book. Signing the guestbook

He was not so impressed with the ceremony, but he did get to enjoy the dance floor. Watching the guests dance

And he even got to play with auntie J after taking a tour of downtown Toronto before heading back home. Playing with auntie, mommy, and Elmo

But the most momentous event of the month was a different trip. And this was without him. While both of us have travelled without him this was the first trip where both of us left at the same time, leaving him with grandma and grandpa. Because as much as we love him and as good as he is in traveling and going out and about. It is nice to have some time without him.
From Baby Blog
In other news, he is talking alot more now. He likes to say 'Hi' (although he is picky on who he says it too). He has stopped gaining weight, but he still has his appetite. Basically he is leaning out instead of gaining weight. I like to think it is because he is getting more exercise. And with all his new experiences, he has lots to say. A baby with something to say sitting in a chair with a croissant and a puzzle

Sunday, June 17, 2012

A legacy in music: PSO Blogs

[Original at the Pittsburgh Symphony Blogs]

A harpist in Heinz Hall Grand Lobby

This weekend marked the end of another season for the Pittsburgh Symphony Orchestra. But it marked the end of something more. Three esteemed musicians were retiring from the PSO, Charlotta Klein Ross (cello), Ronald Cantelm (Bass), and James Gorton (Oboe). My wife has a particular connection with one, having performed alongside one. And the program reflected one type of legacy, with Gorton; his wife, Gretchen Van Hoesen; and daughter, Heidi Van Hoesen Gorton, being the soloists for Goossens' Concert Piece for Oboe/English Horn, Two Harps and Orchestra as the close for a career and a season.

Certainly one way to have a legacy is through your sons and daughters. Another is through enabling a future through gifts that allow others to flourish. But what are the things that one does to create a legacy? One is through the development of raw talent, the sort of thing that we explicitly recognize when we attend a PSO concert. But while it is memorable, it is fleeting. What does it take to create something that endures?

I can think of two ways. First is to create something based on an idea, then invite others to build upon it. It is creative not only in the creation itself, but the idea and concept that can be built on. One recent set of projects surrounds the MusOpen project, which raises funds for the development of public domain scores (including computer source that makes the score) and recordings. The first is having its first fruits, with the Open Goldberg Variations and recordings of the Prague Symphony Orchestra in support of that project. The second is to teach and train the next generation.

Always there are risks. For the first, the question that always gets stated is why do things in a different way. There are certainly scanned copies of Bach's Goldberg variations and other scores, and many editions that have been put together by dedicated scholars. But now the promise is that the music (both the description as well as the performance) can be used as a starting point in other creative works, which requires both the right to do so as well as source material that can be modified. And for the second, the question is if it makes a difference, especially when the deepest knowledge can only be passed in one-on-one interaction.

My wife and I are both at stages in our careers where we make commitments to the future. And part of that is the fact that much of what we leave behind is not going to be what we ourselves create, but in ideas and organizations passed on to students and colleagues whom we have the pleasure of working, contending, and building with, and new ideas that are developed and grown into institutional capabilities and memories.

I was listening to the stories of the musicians retiring with this season, and I was thinking about the legacies they leave behind, which was more than tales of inspired musicianship, although that was there. It was in the creation of memories, and investment in others to guide them to their futures, musical or otherwise. And in that is something worthy of the name legacy.

Saturday, June 02, 2012

A free, public domain recording of the Goldberg Variations performed by Kimiko Ishizaka

The Open Goldberg Variations

Last Monday was marked on my calendar as the release of The Open Goldberg Variations performed by Kimiko Ishizaka.  Why was that special?  It was the release of a crowd-funded professionally performed, recorded, and produced recording and score of Bach's Goldberg Variations into the public domain.  It is a throwback to the old system of patronage for individuals supporting artists and their works.

Arguably, the enduring contribution of this is the release into the public domain of both the score as well as the MuseScore source file.  As programmers know, the release of the source file in an open format with an open source implementation means that this will be available for re-formatting, re-publication, and combining with other similarly licensed works forever.  It also means that the score has been examined, not only by those who were directly funded by the project, but by anyone who had the inclination and interest to participate in the project over the past year.  The process was open for examination not only for correctness, but also feedback and ideas.  No small matter in piece that was meant for a double manual (keyboards) of a harpsichord instead of the single keyboard of a piano.  While the notes may be by J. S. Bach, how it is presented and arranged so a pianist can play it when the physical layout of the instrument is different then intended matters.  The challenges of this have lead to improvements on the open source MuseScore composition and notation program (and I for one am waiting for the release that includes these improvements to come out). Aaron Copland (and others) have stated that music is a collaboration between composer, performer and audience.  In many cases, the third is often diminished, reduced to paying for tickets, recordings, and donations.  But here, the fact that the audience could contribute was taken seriously.

I'm already familiar with the piece from the 1955 Glenn Gould recording.  And since the release of The Open Goldberg Variations I have had this playing in the background continuously while working.  Which, come to think of it, is not much different than the original purpose of the piece, to provide something to be played by Johann Goldberg to play for the Russian Count Kaiserling to cheer him up during his insomnia. And last night when everyone else in the household went to bed, I stayed up to listen to this with a copy of the public domain score (from MuseScore.com) in front of me.

Looking at the score, one obvious note is the utter absence of dynamics and tempo markings.  Which leaves considerable room for interpretation.  The range of the 30 variations (plus the base Aria and final Area da Capoe รจ Fine) allows the pianist to show her range, and Ishizaka provides something to hear.  As expected, she does not make the same choices as Gould.   And she does not seem to be in as much of a hurry as Gould was. And the recording became a delight as she worked her way through the variation, each with its own feel, even with each repeat.

Here in Pittsburgh, I've had the please of being a part of an experiment by the Pittsburgh Symphony to involve a part of the audience as part of its blog.  Because for the audience to take its place in the three aspects of composer/performer/audience there should be more response than only our monetary support of institutions, but to contribute to criticism and direction of the art.  And this project pushed that in a way not common today.

Is this model sustainable?  Since it was funded through Kickstarter, the professionals involved did indeed get paid.  Looking at Kimiko Ishizaka's website, she seems to have a nice international concert schedule with many recent and future bookings that are easily attributable to her participation in this project and the Well Tempered Clavier (which is a potential following project).  Similar to programmers making a name and reputation for themselves by contributing to open source projects, Ishizaka seems to be taking advantage of the additional exposure coming from her participation.  And similarly to open source, the observation is that professional quality work on well run and managed projects leads to high quality products and opens leads on future work.

If you have any interest in listening to classical music, I highly recommend downloading the recording (MP3 and FLAC available at Soundcloud below).  If you want to follow along with the score, or if you are thinking of actually playing this yourself, get the score from MuseScore.com.


Thursday, May 31, 2012

19 months: When you read you begin with ABC, when you sing you begin with Do-Re-Mi

Happy baby squatting This month was a learning month.  Learning A B C, 1 2 3, and Do-Re-Mi.  T can actually identify all the letters, although there are a few he mixes up.  The ones with four lines converging (K, X) and the ones with an embedded V (U, V, Y) cause trouble.  And I suspect that 1-2-3 are not really numbers at this point, but an ordered set (1 comes before 2, and then comes 3)

Baby and mommy are in the midst of a "Sound of Music" phase right now.  So the Netflix DVD of Sound of Music lives in the DVD player.  Videos are in the Favorites list on YouTube (and T can get to them himself on both iPhones).  And he can sing and dance to most of the songs.  I'm probably going to have most of the soundtrack memorized by the end of the month at the rate things are going.

There are two Takraw to play with May was also a month of Asian festivals.  S and L went to the Silk Screen Gala.  And since we dressed up, so did T. And we also took T with us to Thai Night, where he was the baby of the evening and provided some entertainment.

Task for the coming month:  The boy across the street informed T that he could only play with them if he could do math and read . . .

Friday, May 04, 2012

Book Review: Dinocalpyse Now by Chuck Wendig

Dinocalypse Now (Dinocalypse Trilogy #1)Dinocalypse Now by Chuck Wendig
My rating: 4 of 5 stars

Dinocalypse Now is a pulp book set in the world of a role playing game, Spirit of the Century. So you know what you are getting into, which is just a lot of fun. It moves quickly, with one cliffhanger and plot twist after another and leaves you with a smile with every chapter.

It suffers from having too many characters to follow. There are about three main story lines with the heros, and two more following the villians. While it is one way of introducing characters and giving you some reason to remember each, it means that the main one (and I am pretty sure that there is a main one, since it includes the obligatory romance) is short changed and the love triangle feels stilted.

It is a fun book to read, set in a setting that is fun (and not infrequently silly) to play. I like its setting of the scene and I'm looking forward to the remainder of the series to start showing up, which I'm hoping do a better job of developing individual characters.

View all my reviews

Wednesday, May 02, 2012

Parenting Month 18: Road trip!

This is the letter 'D' Khun Yaa
This month was a month of learning. Learning the alphabet. Learning how to walk better. What animals sound like. And what to call everyone in the house.

And T enjoyed having grandma here (Khun Yaa). It meant not having to go to day care and getting to play at home every day. Of course, good things have to come to an end so in the middle of the month we had a grandparent shift change. One day he wakes up with one grandma in the house. The next he wakes up and there is a different grandma (and grandpa) in the house.

That is a lot of splashing going onThe other significant event was a road trip. We went off to Cincinnati to see S's professor celebrate impending retirement. We enjoyed the trip (with an iPad to entertain T dring the drive there) and T got to interact with more people (who probably have been seeing his pictures on Facebook for the past year). And he was the baby of the gathering, a role he filled nicely.

P1020359
What is coming up? More time with grandparents. Which means lots of play, but also many lesson plans. Music, alphabet, numbers, exercise, . . .

Friday, April 27, 2012

Book review: Think Complexity by Allen Downey

Think Complexity: Complexity Science and Computational ModelingThink Complexity: Complexity Science and Computational Modeling by Allen B. Downey
My rating: 4 of 5 stars

In operations research, among modelers it is a truism that models are for insights, not numbers. And the ability to provide insight is even more important than the ability to provide proofs that the model is correct or that the methodology is efficient or accurate. Think Complexity is an introduction to computational modeling for the purposes of finding this insight in areas that defy proof techniques.

Complexity science is an area that is easy to hype. I admit to being highly skeptical when a student and co-advisor wished to introduce these concepts into a thesis. What Downey does in Think Complexity is to introduce the concepts and give computational examples. And instead of being a promoter he provides the tools for someone to explore and ask the questions of the models and consider if the insights presented by the models are believable.

The beginning of the book is an overview of philosophy of science, to set the stage for thinking about this type of model. Next is an overview of Python data structures and analysis of algorithms. Once past this, then you get more in depth coverage of implementation of different types of models used to explore complex systems. And here the emphasis is teaching enough to follow the example, with links to Wikipedia given for more formal introductions to the topic (and the Wikipedia articles seem chosen for quality of the article and the references for the dedicated.)

To properly do the exercises, one would have to be a good Python programmer, and these would be serious exercises in the application of data structures. But even if the focus was on an introduction to complexity science, being able to run and modify the examples made this a more useful introduction to the field of complex systems and models for emergent behavior than other works that I have seen. Running and playing with the examples makes a greater impact than the text explanation, and in this Think Complexity is a success.

Disclaimer: I received a free copy of an electronic version of this book through the O'Reilly Blogger Program.

More information about this book can be found at the O'Reilly website for Think Complexity
I review for the O'Reilly Blogger Review Program

View all my reviews at Goodreads

Sunday, April 08, 2012

Book review: Code Simplicity by Max Kanat-Alexander

Code Simplicity: The Science of Software DesignCode Simplicity: The Science of Software Design by Max Kanat-Alexander
My rating: 3 of 5 stars

There are a number of books out there that address the problem that programmers need to be software engineers at some level. But this may be one of the shortest. And I think that make it approachable to a programmer who does not quite get it that this is something she needs to learn. The only question is if that is possible, or if by the time a programmer realizes she needs to learn these skills, she is ready for something more meaty.

Working with students, post-docs, and remembering my own early career days, one problem in the teaching of programming is that early programming classes tend to be about teaching a programming language, not on how to program to get anything done. I ask students now if they know programming, and I am quick to ask if they used it beyond the programming class, which I have found is almost no value by itself. While part of it is that they do not learn how to use software libraries or other such things that make useful programming possible, the other issue is the need for design, testing, documentation, maintenance, and other areas of software engineering. All of this is pushed aside in the quest to get the machine problem working and turned in. And this shows in their early career, that comments and suggestions about design and software engineering are brushed aside, in the quest to make something that works.

Code Simplicity tries to address it. The tone is conversational, and from the point of view of an experienced developer who has already learned the lessons the hard way so you do not have to. And so you have concepts, examples (some of which are real and detailed), and the take away lessons on matters of software design. Design lessons include recognizing some goals of design, planning on maintenance, planning for changes, deciding what to put in or leave out of a program, simplicity and complexity, and remembering always that the purpose of software is to help people (as opposed to only performing a task).

As a quick introduction, it is what it is, and hard to come up with what can make it better. The only question is if this is a lesson that can be imparted.

Disclaimer: I received a free electronic copy of this book as part of the OReilly Blogger Program
I review for the O'Reilly Blogger Review Program

View all my reviews at Goodreads.com

Tuesday, April 03, 2012

Parenting Month 17: We have a talker in the house

I want 'ananas! This month Tai has been a big babbler. Lots of things to talk about. His favorite thing to talk about: food. He likes to eat 'ananas (and lets everyone in the grocery know it). 'pples and 'yoyo are also reliable favorites. We have no problem with this boy not eating. He will always eat bananas and cherios on any given day while everything else rotates in and out of his diet without notice. Peppers, sweat peas, asparagus, chicken, eggs, soup, noodles, melons, oranges, zha jiang mien and other things have had their day on the menu.

He knows other words as well. The prize for words-that-gets-repeated is 'ah-ohh'. In the beginning of the month this was two distinct syllables, now it is clearly a single word. Used whenever something falls on the floor.

He knows the word 'no' (of course, he is a toddler), but he also knows the word 'yeah'. Actually 'yeah' is his goto word when it is clearly the time for him to respond to something, but he really does not know what we just said. Other words that he has learned from reading include 'yum', guo-guo (dog), gone (used after draining sinks or finishing everything in his bowl/bottle/cup), there (as in, I want to go there), down, bao-bao (pick me up), dee-dee (the sound a car makes)

Coming in from the deep black void He likes to read. There is the book 'Little Pea' and we have him trace the parts where little pea is moving around. He likes to stop on the page that describes seven types of candy. And there is a page where Little Pea is eating spinach and says 'Yum!' that T likes to read out. And then there is 'Moo, baa, lalala' and when we read it we say the name of the animal and T says the sound. The funniest one is about three singing pigs. After T says 'lalala', he immediately says 'nonono', because that is what is on the next page. A new book is about counting. T holds the book when we read, and he can tell when a book is upside down, so he'll turn it the right way before we start. One of the pages in the counting book is of possums, hanging from a tree. Very confusing as he turns the book around and around to try to get it right-side-up.

I want to play piano with mommy Various toys are in use. Lego (Duplo) and wooden blocks are stand-byes. We have wooden cars and an airplane (although he does not play this as much now that he can walk, it was a lot of fun when he was crawling). He has finally mastered the stacking toys. We try to maintain a daily piano session.

All in all this was a fun month. My mom has been here these past few weeks so she gets to enjoy it too.

Saturday, March 24, 2012

Book Review: Machine Learning for Hackers by Conway and White

Machine Learning for HackersMachine Learning for Hackers by Drew Conway
My rating: 5 of 5 stars

Machine Learning for Hackers is not a reference book or a standard programming tutorial on machine learning. For references, you go to Hastie, Tibshirani,and Friedman's 'The Elements of Statistical Learning.' For tutorials, there are a fair number of sources that could walk you through the use of regression, data exploration, classifiers, principle component analysis, etc functions in R. But what MLfH gives you are Drew Conway and John Myles White. And they don't teach skills, they are passing on wisdom of how to work with data, how data needs to be explored, understood, manipulated, and finally, using machine learning methods to gain understanding.

In computer modeling in general and data analysis in particular, one thing that is often hard to convey is that the purpose of computing is not numbers, but insight. The effects of this problem is seen in graduate from even the best schools knowing how to drive a computer program, but not knowing how to interpret results or how to ask a question, then taking the results from that and asking the next question. The course we teach and the texts that we use do not help. Our courses are each siloed to present a distinct portion of the total body of knowledge. Textbooks are often either theoretical or intended to provide a glimpse of application, but always in bounded chunks. Computer application books are often built around the capabilities of program in question, but often stop at the edge of the capabilities of the application or environment in question. What is needed is not to tech methods or tools, but to teach wisdom. The ideal is to be able to sit side by side with an expert who can walk through a data set and ask questions, get answers, and to think about what to do next, whether the answer is what was expected or not.

This is what Conway and White do. For each topic, they open up with a discussion of the problem type and the tools, and sometimes with a toy example. But then they go through a substantive example. And the narrative text is where they shine. They take a messy dataset (often the publicly available/accessible form) and work through what needs to be massaged to get it into useable form. Next is processing the data into the R data type needed for the analysis. Then initial exploratory steps where you gain understanding of problem, and how to analyze it, finally analysis and presentation.

I've been taught that in learning a programming language, it is often beneficial to have two books for reference (other than tutorials), one that is a proper reference (i.e. how to do something), and one a morality reference, how you should approach doing something. In data analysis, you should know the theory/methodology and how to use the tools at hand to apply the methodology, but also how to think about problems. And short of an apprenticeship with a master, MLfH does very well in this.

Disclaimer: I received a free electronic copy of this book from the OReilly Blogger Program. More information on this book can be found at the book web site.
I review for the O'Reilly Blogger Review Program

Monday, March 12, 2012

Pittsburgh Symphony: The rhythm of modern life

Pre-concert program at Heinz Hall Grand Lobby [Original at the Pittsburgh Symphony Blogs]
This weekend Maestro Previn returned again to conduct the Pittsburgh Symphony Orchestra, and this time to conduct the premier of his own work. As a taste, we were treated to the Brass Quartet from Carnegie Mellon University performing some of Previn's other work.
Listening to the opening of Previn's Triple Concerto for Horn, Trumpet, Tuba and Orchestra immediately following Haydn's Symphony No. 102, I was struck by a contract in feel. Haydn's Symphony sounded smooth, peaceful, and gentle; almost bucolic. And compared to that the Triple Concerto was full of rythmic brasses calling for attention along with a series of fanfares.
In many ways much like the many things that call for our attention in our modern, urban life. It had the same effect of the opening of American in Paris. I had in my mind the thought of a young person starting out in the world, with many things to call for his attention, time, and energy. The ups and downs of young adult life. And this was brought to a close with a rapid movement through the end, and then the piece was done. But it seemed to be a story in progress, because whatever was ahead for our friend, it is never the end of the story, only one more milestone of this thing called life, however momentous it may seem at the moment. And while the piece had an end, real life always has a continuation.
There are many commentators on how life has changed within memory. The speed of change, the need to adapt on an ongoing basis, and for the young, the tendency to treat immediate events out of proportion to their place in an ever-changing and on-going world.

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