Friday, March 18, 2011

Book Review: Data Sources Handbook by Pete Warden

My rating: 2 of 5 stars

While this bills itself as covering 'the most useful sources of public data available today" and that "You’ll find useful information on APIs" what this really is a sampling of a small number (57) sources and an example of its use. The information given is terse, and you will find yourself having to Google the documentation to get good use of the source, and probably use Google to find more sources.

I was interested in the Data Source Handbook because many of my models require a range of setting specific data as well as data that is available publicly, if I can get it an put it into a useable form. And looking at it, it provides many examples of available data sources. But these are all fairly specific as presented, so I'd probably end up having to search to find out if what I want is actually available.

The limitations of the presentation are more apparent if I look at one source I have actually used before, the Google Maps API. Warden shows an example of submitting an address and getting a result, and also mentions that you can do reverse geocoding, but he does not describe what information is in the geocoding results (only displays a small portion of them), or the fact that there are many other result sets (such as directions, distances, elevation) that can be returned using the Maps API.

The other way that someone can have a problem with this is that it makes an assumption about the reader without stating it, specifically that the reader is a proficient at programming for the web (i.e. someone whose is primarily a computer programmer as opposed to someone who programs because they need to get something else done.) It comes up because it assumes that you recognize a JSON result set as well as some internet utilities (e.g. curl) which are presented without explanation. It could have been greatly improved by having a one page 'how to use this book' section in the introduction that gives pointers on what is assumed you know before presenting the material.

In the end, if you don't know what you are doing with programming for the web, this book is only useful as a guide so you have an idea of what can be found. Even if you had this book, you probably are going to end up using Google to understand the capabilities of the sites that it does cover, and it cannot be that comprehensive because it is so small.


More information on this book can be found at the book website at Data Source Handbook at Oreilly.com

I received this as a free ebook as part of the Oreilly Press Blogger Review Program

I review for the O'Reilly Blogger Review Program

Saturday, March 12, 2011

Pittsburgh St. Patrick's Day Parade March 12, 2011

Luke on parade

Today was the Pittsburgh 2011 St. Patrick's Day Parade. And I reprised my role as a ham radio shadow for one of the parade marshals, a member of the Ancient Order of Hiberians. We were at the front of the parade and his day job was with the county, so there was much hobnobbing going around among the politicians and also with the various police and fire pipe and drum groups up at the front. But like other ethnic events, this was about the next generation.

Parade marshals conferring


In addition to the various parade business going around, what is notable are the kids. Obvious babies and toddlers get attention. But what I noticed this time (usually I'm way in the back) were a bunch of older boys shadowing their dads as their dads meet and greet as well as work on organizing the parade. Dads introducing sons to friends also working or marching in the parade, exposing them to those who are in the public eye to recognize them as people and generally teaching them how the world works. And this is how it should be.

Happy St. Patrick's Day!


Pittsburgh Emerald Society Piper

Saturday, March 05, 2011

Parenting: Month 4

Working with an abacus by LugerLA
Working with an abacus a photo by LugerLA on Flickr.
This month saw the 100 day milestone come and go. And T is still colicy The Dr. Sears books mention that colic is a description and not a diagnosis, meaning that it is a description of a case where they cry for hours a day, with no consistent explanation of why (if there was an explanation, you would provide that as a diagnosis instead of colic). The current pediatrician statement is he is gassy (as opposed to reflux, and certainly not allergies, as he is continuing to grow) It also means that he still wakes up several times a night, and we look jealously on our friends who boast that their babies sleep through the night.

The other side of it is he is a babbler. I get a couple good conversations a day. We get a few laughing episodes a day. But his fussiness makes us reluctant to bring him anywhere.

Some thoughts:

1. Parenting an infant is a contact sport. A baby can only communicate by crying and touch. So the only way to communicate is listen to the baby's crying, or holding the baby, feeling his movements and noticing variations. My wife, who spends an order of magnitude more time than I doing this, especially at night, is regularly days ahead of me in noticing changes.

2. He definitely likes being held upright. The pediatrician says it is because he is gassy, and this makes it that much easier to get the air out. The problem is that he is a big boy, and we're running out of people in the household who can hold him for any length of time.

3. Waiting for the day when he sleeps through the night. But we hope that it is not much longer.

4. He is colicky. By definition it means that the issue/cause of crying changes frequently, so what worked yesterday may not work today. (ref. 1 the fact that daddy is a few days behind is actually a significant issue) So parenting is not only a contact sport, it is association football where the clock does not stop, not American football where you get timeouts.

5. My wife and I tend to treat parenting as an opposed contest. Us against baby as we figure things out along the way (with the reward at any given point in time being a happy, playful, laughing, thriving baby). (See Ayelet Waldman's Modern Love essay) Also reminds me of T.E. Lawrence 27 Articles (I may write a post based on that someday. Counter-insurgency seems like a very good metaphor for having a newborn in the house.)

Friday, February 25, 2011

Book Review: The Baby Book by William Sears et. al.

My rating: 4 of 5 stars

Like some other first time parents, we got ourselves a small bookshelf of pregnancy and parenting books when we found we were expecting. And these stayed readily available at our bedside, referenced almost every night during pregnancy, and during the middle of the night during the first several months (since we were up anyway). Pregnancy was more straightforward (we joked that our son was taking the checklist approach, pretty much everything that the books said would happen did to some degree). Parenting is harder, because every child is different, and wildly so. What makes the Dr. Sears book the one we (or at least I) still open up and read is that it recognizes that fact with every page.


Every parenting book is reviewed at the extremes. And that is probably just the nature of thought about parenting. There is probably nothing that people take so personally as discussion about their parenting skills. Even if they are like us and state up front that we know nothing and we are learning as we go along. (and my inlaws who are staying with us say the same thing, which makes our dynamic better then what may be feared.) So, any parenting book that has any opinions whatsoever will have lots of reviewers complaining about how it is unyielding. But the book does what I think it should do. It lays out an issue, states an opinion, then works with various levels of departures from their opinion. So the chapter on breastfeeding is followed by a chapter on bottlefeeding and formula. The parts on attachement parenting are alongside chapters on issues faced by working mothers.


But what keeps me coming back to this book is the chapter on fussy baby. We have one. And that means I get to hear many potential solutions. Probably more then there are days where this will last. When the pediatrician declared 'colic' I regarded this as a disaster declaration, with months of exhaustion to look forward to. What this book gives is a framework that puts it in perspective. So based on the classifications and descriptions we don't have a true member of the colic club, we have a high-needs baby. As the well-meaning advice comes in (usually from people who have never experienced a fussy/colicky baby), I can take it in stride, recognizing that we're not missing the non-existant magic bullet, but adding to our battery of tricks, each of which may or may not work on any given day. And that is OK. And while there may not be an end to it (only changes in form), there may be things we can look forward to with our sensitive, interactive, communicative son that we will be glad to see someday.


I'd highly recommend the book. It is not just a set of paragraphs of facts (there are some sections that are, but all parenting books have those), but also good discussions on how to approach this turn-your-life-inside-out thing called parenthood.



Wednesday, February 23, 2011

NYTimes: Parents Seeking Danger by Lisa Belkin

Lisa Belkin, Parents Seeking Danger - The Motherlode, New York Times, February 18, 2011

"""
After the “60 Minutes” correspondent Lara Logan was brutally attacked in Cairo, one Web site asked today whether she was a bad mother for being on the scene in the first place.

Hollywoodlife.com, which more usually spends its bandwidth on stories about whether Jennifer is sneaking around with Brad behind Angelina’s back, yesterday all but said that Ms. Logan was partly to blame: “Her bio says she is the mother of two small children. So, do you think she’s really brave, or completely irresponsible for putting herself in such a dangerous situation when she has two little kids waiting for her to come home?”
"""

In last weeks entry in The Motherlode (the New York Times blog on parenting), Belkin highlights the response to the sexual assault of journalist Lara Logan in Cairo during the uprising in Egypt. (While Belkin highlights Katie Dunn, writing for Hollywoodlife.com, Media Matters has a long list of those who decided to play 'blame the victim') Ms. Dunn's words immediately brought to mind several people I served with in Afghanistan and many firefighters and police I know, all with young children. And I thought "Are these people completely irresponsible for putting themselves in dangerous situations when they have little children waiting for them at home?" And my answer is NO!

But this is an attitude that has been spreading. I remember being told that there is no place for heroes (I had made the mistake of going looking for and finding someone who got lost and was calling for help during a backpacking trip). And many of my activities are dispised by others around me, who think there is no place for people who prepare themselves to go towards scenes of danger. Kipling's Tommy could look around and nod in recognition.

Of course, I am in regular contact with people who deserve the title of hero. And our son will grow up doing so as well. While my wife and I may have some differences in our hopes and what we consider desirable for our son, one thing we agree on is we will not hide him from the realities of the world. As he grows and gets older, he will identify the ugliness of the world. The dangers and hazards. What needs to be done to be safe in dangerous environments (natural and manmade). How to recognize danger or safety (and what is only the appearance of danger or safety) That not everyone is kind and helpful and there are those who will despise him with all the wisdom their God has to give. That things that are worth doing are hard, and the path can very well include failures, with consequences. But even with all that, there are things that are worth it. The confidence of knowing you can survive and thrive in adversity. That in the heat of the moment, you can act and live. Of being called 'brother' by those who would hold that term for those who have earned it. And this is worth the disapprobation of lesser men.

Is this a guarantee? No, he will grow up around those who disagree. But he will know both sides. And we hope he chooses ours.

"""
Feelings of journalists change when they have children. So do feelings of police officers, and soldiers, and firefighters, and coal miners, and airline pilots. And that leaves all of the above with two choices. To limit your personal risk, which is one way to protect your children, and one that I would never criticize. Or to increase your commitment, which is another way to protect your children. And one that I would never dream of questioning.

Come home safe, everyone.
- Lisa Belkin

"""

Thursday, February 10, 2011

PSO: Technique or Freedom

Bellefield Hall [Originally posted at Pittsburgh Symphony Blogs] As part of the Tchaikovsky Festival, some members of the PSO played in a recital on the University of Pittsburgh campus at Bellefield Hall. And, instead of playing pieces by Tchaikovsky, they played pieces by his contemporaries, starting with Anton Arensky. One thing that makes Arencky Piano Trio in D minor special is that there is an 1894 recording of a performance of the trio, with Anton Arensky playing his own piece on the piano. With him are violinist Jan Hřímalý (known by violin students for his Scale Studies) and Anoatoly Branukov.

Copeland in his book "What to Listen for in Music" states that in any piece of art, there are three actors. The composer, the interpreter (performer) and the listener. All three must do their part for a complete expression of a work. But it is fascinating to know that we have an depiction of how the composer interprets his own work. And preserved in a fashion that is not distorted by the twists of time and fashion which always occur over that period of time. At the recital, they played the recording from the Block cylinders (1894) after Ms. Orchard, Mr. Istomin and Mr. Vatchnadze performed the piece, giving us the opportunity to compare them both. And the style of play was notable in how different it was. While Hřímalý is known for his studies used to hone violinists technique, this performance is highly improvisational, taking great liberties with the rhythm, tempo, and even the written score. Almost surprising given how we view these greats.

What is different? The recordings by the original composer and his friends almost sounded like a jazz interpretation of his piece. The parts coming across as freeform expressions of personality instead of technical mastery and artistry. And if some student played like this in a recital or audition, they would surely have been snubbed.

I wonder if over the decades we have fallen completely victim to a tyranny of technique. It is very easy to hear a fast tempo performance and because the performer was even capable of hitting all the notes, in time and express the dynamics of the piece and declare it to be a great performance. And because it is easy to judge it on these quantifiable criteria, we value the mastery of techniques. Comparatively, it is considerably more difficult for us to judge artistry and expression which is not so easily quantifiable, we do not instinctively accept it as readily. And there are other fields where this is also true. The teaching of math has in many ways become the memorization of formulas and theorems. The teaching of history has become a memorization of facts, names and dates. The students subjected to this education rightly declare it useless, and the mathematicians and historians who see these students in college dispair that these students know nothing and are unable to think or reason. Despite being filled with useless facts and good test scores. And I question if this has made us better, whether it is understanding math, history or music.

Saturday, February 05, 2011

Sitting around the radio

[Originally posted at the Pittsburgh Symphony Blogs]
WQED - Pittsburgh Classical music broadcasting the Pittsburgh Symphony live

Our son is three months old now. It is Friday night and he is fussing, tired but not sleeping. We're in the family room, with the radio turned on to WQED, where the Pittsburgh Symphony is being broadcast live in concert. The Tchaikovsky Piano Concerto is one we know. So we hum along starting with the opening horns. And our son joins us in delight. But by the end of the first movement, he is asleep. Good night.

Sunday, January 30, 2011

Parenting: Month 3

高曾祖This month has been a battle with colic in its various forms. And we have been working through reflux, thrush, eczema, allergies, and the myriad other causes and cures that multiple cultures have come up with for colic. And more to come, recognizing every culture on earth probably has more candidate cures then the standard length of colic. So we have about another month of this to go. While my wife and I are both marathoners who have proven endurance and ability to endure pain and suffering, the in-laws who are with us and take care of T when we are working are not. And my wife and I are considerably better at calming T down when he is wailing away then they are. A case where the skills are mismatched to the need.

Mom and Baby practicingThe big controversy in parenting around now is Amy Chua's book "Battle Hymn of the Tiger Mother" that just came out. Chua writes as an advocate for "chinese parenting", meaning being strict with the children, letting them you know you believe they can achieve, and not letting them settle for less then their potential. There is a lot of commentary on the book, from those who are agast at it and those who defend the way described as the way to do it.

My wife and I are listening to the book on CD. And we agree with Chua's daughter's comment in the New York Post. The book is retrospectively funny. There is not a chapter where Amy Chua is in fact taking herself seriously. And everything is laughing at the fact that she was so strident at the time.

Time to go on a fire callThat said, there are things that we want. We want our son to know that we believe him to be capable of being great. We want him to realize that this is not because of giftedness or being a prodigy, but because of hard work and grit. That we expect him to be capable of things that are hard, and thing that are hard are worth the effort needed to accomplish them. And that it is worth respecting and emulating competence and wisdom where it can be found. These are not widespread beliefs. And it is hardly guaranteed that he will

Saturday, January 29, 2011

Book Review: Microsoft Excel 2010: Data Analysis and Business Modeling by Wayne L. Winston

My rating: 4 of 5 stars

When Microsoft Excel ® 2010 came out, I noted that it claimed to finally correct long standing errors in its statistical functions (1). While I wait for McCoullough et al (2) to do their usual reviews, I was encouraged to see that it now passes some basic statistics tests where previous versions consistently failed. For all its faults, spreadsheets are the principle vehicle of communicating quantitative information in business. And to support that, Microsoft Excel has built in many tools for modeling and data analysis. But discussion for many of these techniques in MS Excel books is limited to describing the dialog boxes that are needed to use the functionality. Winston in Microsoft Excel 2010 Data Analysis and Business Modeling provides a needed in depth look at Excel as a data analysis platform in addition to a spreadsheet.

Winston wrote this book as a result of teaching MBA and consulting clients spreadsheet modeling classes. It is broken up into 84 short chapters, each comes with examples (using downloadable spreadsheets and data) and example problems. Each chapter is used to demonstrate a defined concept. For example, financial issues are covered in three chapters, demonstrating net present value, internal rate of return, and the standard bond/loan finance calculations.

The many short chapters allows topics to be covered in some depth. Seven short chapters cover random numbers, followed by five chapters on simulation and some uses of simulation. While the first chapter on a topic may cover the steps to use the tool, the followon chapters all present uses. For example, the Solver is introduced in Chapter 28 with an example that steps through the menu and dialog boxes. Then each of the following seven chapters describe the use of the solver for a standard math programming problem: optimal product mix, scheduling, distribution, capital budgeting, financial planning, facility location, and rating sports teams (ok, this last one is not a standard math programming problem). This focus on providing non-trivial examples for substantial tools is the strength of the book.

Are there things that are missing? Two areas that I find myself teaching students in using spreadsheets is using the tabs to organize data and general spreadsheet management. While there are chapters on pulling in data from text files and the internet as well as a chapter on using auditing tools, there is no chapter on the art of using spreadsheets. The book falls into a common software focused book on working through the functions, even if it does this very well. Therefore, it would not serve as as a book to be used by specialists in data analysis, who need to know the art and purpose of data analysis in addition to applying techniques. But it is good for generalists who have to do analysis as part of their jobs as well as those who need to package analysis to a business audience. And for this purpose, Winston’s book does a good job.

Disclaimer: I received a free electronic copy of Microsoft Excel 2010 Data Analysis and Business Modeling 3rd ed. by Wayne L. Winston through the O’Reilly Press Blogger review program.

I review for the O'Reilly Blogger Review Program



(2) McCoullough and Heiser, 2008, On the accuracy of statistical procedures in Microsoft Excel 2007, Computational Statistics & Data Analysis Vol 52 (10), pp 4570-4578.

Thoughts on 4 Jan 2007: From Father to Son, Last Words to Live By

One of the reasons for keeping a blog is to see what you were thinking years ago, and compare it to now. This piece was written in January 2007. S and I had started dating, but marriage was not even a thought (and needless to say, neither were children). A potential deployment to Afghanistan was a topic of discussion, but far from being actualized.

This was a commentary on a piece in the New York Times. Of the fiance of one of the Times editors, who was a First Sergeant in the Army, and a father. Who wrote about what he wanted his son to learn as he grew up.

==========
Original post on Xanga

New York Times article

Dana Canedy is an editor for the New York Times. Her fiance, Charles Monroe King, was a graduate of the Art Institute of Chicago and a gifted artist. He was also a soldier. As a First Sergeant, he would have been responsible for the training of 18 and 19 year olds for war. And when he went to Iraq he left a yet to be born son behind. During his tour of duty, Charles wrote a journal for his son to read as he was growing up.

Dear son, Charles wrote on the last page of the journal, “I hope this book is somewhat helpful to you. Please forgive me for the poor handwriting and grammar. I tried to finish this book before I was deployed to Iraq. It has to be something special to you. I’ve been writing it in the states, Kuwait and Iraq.

There are many things that we learn from newspapers. There are matters of fact, the 'first draft of history,' scores, events, editorials. But in the better papers, you learn something of what it means to live life. The First Sergeants of the U.S. Army and their counter parts also had the role of teaching their young charges about life as many of them left their familiar homes for a larger world. Of balancing checkbooks, of dealing with the pressures of making their own decisions and of the realities of romance.


Never be ashamed to cry. No man is too good to get on his knee and humble himself to God. Follow your heart and look for the strength of a woman.

One month before his tour of duty would have ended, First Sergeant King died in an IED attack near Baghdad, and this journal became the one means where he could teach his son of what it means to be a man.

Remember who taught you to speak, to walk and to be a gentleman, he wrote to Jordan in his journal. These are your first teachers, my little prince. Protect them, embrace them and always treat them like a queen.

I get the chance to have conversations with people about the training of young men and women, of raising sons and daughters. And the question is what values do I wish to impart should I become a father. And as of right now, what I can work on now is the way I account for the days of my youth.

The 18th was a long, solemn night, he wrote in Jordan’s journal. We had a memorial for two soldiers who were killed by an improvised explosive device. None of my soldiers went to the memorial. Their excuse was that they didn’t want to go because it was depressing. I told them it was selfish of them not to pay their respects to two men who were selfless in giving their lives for their country.

Things may not always be easy or pleasant for you, that’s life, but always pay your respects for the way people lived and what they stood for. It’s the honorable thing to do.

When I was in college, one woman in a bible study declared her goal of being the comfortable suburban mom. And many talk about being comfortable, of the large house, nice car, the trappings of modern american life. But those are not the stories I want to tell. On the top shelf of my bookshelf next to me are the trophies and medals of many races and awards. I've joked with friends that it will be a long time before my kids match that. And it may be something they will respect. But I will also tell the stories of calls in the middle of the night. Of having shots going in my direction. Of going towards and into fires. Of comforting the tired and scared. And I hope that these things are something they will consider valuable. It is not a natural thing. I know many who find it incomprehensible to risk a sacrifice without expected gain. And I have known many who find it outright repulsive. And I do not want to emulate them.

So what of young Jordan, who will grow up without a father? Will he be surrounded by those who tell him that the goal is to be comfortable and that his father was a fool to wear the uniform and lead young men and women that he trained into harms way? Or will he read his father's journal and respond to his father's words by considering his father a man of honor, and believe that being a man of honor is something to aspire to.

God blessed me above all I could imagine, Charles wrote in the journal. I have no regrets, serving your country is great.

Right now, being a father is still an abstract thing. And somehow, after all these years, I have not quite lost the dream of the young, that the world is changed by myself and those I have the privilige of being alongside. Right now, as I read Dana's words, Summon the Hero's by John Williams is playing in the background. Should I have sons and daughters, I hope that they get to hear stories of those who dared to be great, and to see the living embodiment of greatness around them.

Saturday, January 22, 2011

Book review: Winter Fire by William Trotter - Meeting Sibelius in Finland:

Snow and branches


[Originally posted at the Pittsburgh Symphony Orchestra Blog]

Every month in the music department of the main branch of the Carnegie Library in Oakland, a group of music lovers gathers to discuss a book as part of the Pittsburgh Symphony Book Club. And this month, Jim Cunningham (WQED) along with Paul Silver (PSO: viola) led the discussion on Winter Fire by William Trotter.

Winter Fire follows a WWII German officer named Erich Ziegler as he serves the German Army in Norway and the Eastern Front. He is an infantry officer, who in his civilian life is a conductor. In particular, he had written an article on Jean Sibelius, the Finnish composer who was the pride of Finland. And after a period of exemplary service, he was tapped by German Army Intelligence to serve as what in the U.S. Army is known as a Foreign Area Officer, based on his expertise and special knowledge of Finnish culture. His stated mission: To ingratiate himself into Finnish society and take the pulse of Finnish leadership and military on their commitment to being allies of Nazi Germany in WWII.

In the course of his duties he is attached to a Finnish unit near the front. And he finds the wartime refuge of Sibelius. Over the course of the book, he is welcomed into the Sibelius household, falls in love, and develops deep relationships with the Finns he serves with. As the tide of war turns against Germany, he is buffeted by political forces including Nazi party members, officials more interested in promoting their careers and image then in accurate representation of the war to Hitler, and in the end, Sibelius and his Finnish hosts offer Ziegler refuge against the fall as Nazi Germany collapses, despite the Finns pledge to their new Soviet and Western Allies to expel the Germans in the last stages of World War II.

The book is of music and war, two topics that do not seem to go together. What we do see is how in both professions, Erich has to experience it intensely. When he in the combat front, every lapse of concentration has consequence, and in particularly intense areas this intensity can be debilitating. The intensity also opens him to moments where he becomes one with his environment, and his Finn comrades note that he becomes much like the Finns.

Similarly in his artistic experiences are intense. Being a conductor working with a new score, absorbing it and imagining what it can become. And with a new orchestra, turning that image into a reality. And the highs and lows of doing this, and being buffeted by his political environment of a depraved Nazi Germany where, just as has been documented in many other forms, the closer you get to Hitler the more craven officials become.

But a person can only maintain levels of intensity for so long. In this book Erich goes between the intensity of the combat front and instead of the breaks his comrades in arms would get when their units were rotated away from the front, he dives into the intensity of his art and political conflict.

In the end, a dream that Erich has been hoping for over a large part of the book is being denied. But another dream is being offered in its place. The Finns who have been alongside Erich through triumph and disappointment through the course of the war offer Erich refuge and hope for the future. And one after another, they present their dreams of a future for Erich. But it is not Erich's dream, and he has to decide if he can come to terms of a dream denied.


Sunday, January 16, 2011

Book Review: Programming Python 4e by Mark Lutz

Programming PythonProgramming Python by Mark Lutz

My rating: 4 of 5 stars


I've been using Python since I was a graduate student. While I have known of earlier versions of this tome it had never occurred to me to go through this. Because my focus in computer programming is not in the systems administration or IT related skills like most of O'Reilly Press customers seem to be. My interest is in scientific programming and data analysis. Now that I have had some time and occasion to use this, I find that the content is indeed weighted at an audience whose function is computer programming (as opposed to using computers for something else), but what this book really provides is an education on how to accomplish tasks in idiomatic Python, not just a programming how-to book.



Programming Python (PP4E) goal is NOT to teach programming in the Python language (that task was for another book by Lutz, Learning Python). The stated goal was to teach practical use of Python, and that necessarily means using the standard libraries. But even at 1600+ pages you can't do everything. So this book focuses on (IT) systems administration, GUI development and web programming using Python 3.x (not covering Python 2.x). None of these are what I do. But, there are some tasks that are covered that can be very useful, so in reviewing this book I focused on Graphic User Interface (GUI) and text processing.



What I found as I worked through these sections was that PP4E was not a reference as it lacks systematic coverage of topics. And it is not just a tutorial, although it definitely follows a crawl, walk, run sequence as it covers the topics. What it does do well is cover how to think and how to make design decisions. So for the GUI section it focuses on tkinter, and it does cover various widgets, window managers, etc., where it shows its colors is when it discusses how the parts work and how you make choices between alternatives (e.g. window managers). There are some warts with its focus on Python 3. There are several chapters in the GUI section that require the Python Imaging Library (PIL). But based on the PIL web page, PIL is not ported to Python 3.x. So it probably means that Lutz used a pre-release port without telling us.



Similarly, regular expressions is something I've never quite gotten. And I would not be able to master use of the re module here, since it lacks a usual lists of functions with examples that a reference or a tutorial would have. But what it does do is to cover how regular expressions fit along with other string operations, when and why to use match, search, find, findall, compile. When to compile and how to think through building a regular expression sequence. You would not learn how to use regular expressions here (I would never be able to develop the examples from what is in the book), but you will learn how to think through them, and bring that when you go back to a real reference or instructional book.



One aspect that is very annoying is the examples quickly become more complex than the material that leads up to it. So instead of crawl, walk, run; it takes on the feel of crawl - sprint, with a basic introduction then quickly moving into a complex and mature code. Some of this is a result of a goal of trying to be deep in everything. So be warned.



I received a free electronic copy of Programming Python from O'Reilly Press as part of their blogger review program.



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

Saturday, January 15, 2011

Review: Maya Wrap Ring Sling


First outing
Originally uploaded by LugerLA
I got the Maya Wrap soon after my son was born. While we had a Baby Bjorn, I was looking for something not so bulky, and something with some more flexibility in how it is used.

The Maya Wrap is an example of a Ring Sling, which is an example of a fabric carrier. Essentially, it is a long piece of cloth threaded through 2 rings similar to D-rings used with webbing for camping equipment. The baby sits in the pouch, and the cloth is adjusted by sliding it through the D-ring. By adjusting the parts of the cloth (either end or the middle) you can set the tension across the baby's entire body. The Maya Wrap is made up of a breathable cotton and is rated for newborn through 35 lbs. There are ring slings marketed that are made of patterned fabrics, or in silk (for special occasions) In principle, a baby can be held in a cradle hold (pictured) upright tummy-to-tummy, kangaroo hold (facing forward) or hip straddle. Initially I used cradle holds, but I've switched to upright (more on why later).

Given that it is missing the precisely located straps and buckles, one question is how do you know it is being used correctly. There are a few guidelines that are true for all baby carriers (and some carriers fail these)

1. Baby is seated in the carrier. If you think about how you hold a baby for extended periods of time, most carries involve support across the baby's bum and across the back. So a carrier should do the same. The main way many carriers fail is to hold the baby in between the legs at the crotch vice across the entire bum. In particular, the fabric should be supporting part of the thigh and the knees should be higher then the butt.

2. Baby's back is supported. A baby's back is naturally bent into a C, but the carrier should not exaggerate the C. A class of carrier called bag slings were notable for this (think of a pouch, and the baby sitting in the bottom of the pouch). And Bag slings were recently banned by the Consumer Products Safety Commission. The test for this is to look at the baby's chin. The baby's head does not follow the C of the spine, so the chin should not be against the baby's chest. (and if you can't see it, you probably have the baby positioned too low)

Things I like about the Maya wrap.
1. Once we got past the initial learning curve (first three time trying it) it was easy to drop T into the sling.
2. It is very compact. It does not take up much room in a bag.
3. Few moving parts. It was easy to set up and have it ready. Now straps or buckles all over the place.
4. My son has been diagnosed as colicy. And putting him in the sling upright has been a sure way of calming him down. (or even letting him sleep in there.)
5. My two month old son is also easily scared. Between the sling pouch and the tail, we can basically hide him, and cut down on the sensory overload that is the world around him.
6. Wearing the sling, I can eat while holding him. Basically, my hands are relatively free (although I usually have a hand on his back or bottom when I have the sling on)
7. For that matter, I can do some other things wearing the sling that need my hands. Listening to music on my ipod. Reading books or my ereader. Packing/unpacking

Things not so nice.
1. There is a learning curve. My wife and both of our parents don't want to use it because they don't like how it works. And things have to be adjusted reasonably well to sit on your shoulder and have the baby in a comfortable position. Once you get the hang of it, it is not hard, but you need to put some work in to get there.
2. It is a pouch, so there is not much ventilation inside the baby compartment. The cotton fabric is breathable, but the baby will be warm because it is essentially another layer of clothing (in addition to the body heat)

Over all, I love it and I'm glad I got it. T does not like the Bjorn so much and because he is colicy, having the ring sling makes it conceivable to go out even though we have to hold him constantly.

Maya wrap is available direct from Maya Wrap. There are also a number of sellers listed on Amazon.com. Retail availability seems limited, but apparently there are a number of home-based businesses that cater to baby and children needs that also sell babywearing products, including ring slings.

Saturday, January 08, 2011

Why I write reviews

Finding a comfy spot to sleep Near the beginning of the year, the New York Times Sunday Book Review had several literary critics right about the purpose of serious book reviews. And the explicit background is the web, with many blogs where anyone with an interest can write reviews (e.g. yours truly), sites which invite reviews (such as Amazon.com). And in a world where anyone can say anything, what is the value of serious reviews (or what makes a review 'serious')?

What is not available in the crowdsourced review? Renee Fleming when she was in Pittsburgh last fall made the comment that the popular review had one flaw, that it tended to be gladitorial style, thumbs up or thumbs down. And as criticism goes, it was shallow and useless.

And there is the place for good criticism. The purpose of criticism is not to state a like or dislike, it it to describe and evaluate. There are a few things that you should be able to know after a well done review or criticism.

1. Where the work fits in its environment
2. What the work was trying to do
3. How well the work expresses its intent
4. The intended audience of the work
5. Who is not the intended audience of the work

And presumably, the reader of the review can identify if he is in 4 or 5, and if this is something he would want to read/attend/eat.

Why should I do such a thing? One, because this way I remember what I've done before. But also because every one of us is different. And these differences should result in differences in how we view a work. So when I have reviewed books, concerts, camping gear, movies, etc., the reader should be reading them with an eye for what makes us similar or different, and how would those similarities and differences change the way we would view the subject. And how does the object of the review fit into a larger whole (whether it be a set of experiences, gear taken on a backpacking trip, or a as part of a library.)

Do I do this every time? Probably not. Like many things, this is an ideal, to be followed when I am in the mood to do this, and the work is worthy of the attention. But having this ideal is a guard against a shallowness that contributes more noise than substance.

Sunday, January 02, 2011

2010 in review

Someone was commenting that I've neglected a usual recap. And reality is, neither of us can carve out time to write a letter (and school for both of us starts soon, so there goes any other free time. But here goes for something that I'm sure is substandard. I think for things like this, it is an advantage to have been blogging here and maintaining a photo site at Flickr. Because those areas become the record of a life in thoughts and what was important at the time, like the journals and notebooks of old.

Professional life


Finding a comfy spot to sleepBoth of us are fully in the academic life. S spent the past year working on her tenure portfolio. In addition she has been traveling and performing recitals in Chicago and at her college in Beaver Falls and private students as well as her college students.

L is continuing his career experiment in academia. At Pitt he is now non-tenured faculty with a certain amount of fairly stable outside funding. So far, the experiment is being viewed by all concerned as progressing. He has many projects with the local VA hospital (clearly, Louis did not go too far professionally), a fun quick consulting gig with an architectural firm (Note to self: finish the paper on this). The big change is work with students. He has been shepherding along two PhD students, one at Pitt and a statistics PhD student who was visiting for a year. Both have been very productive. The Pitt student has very good results beyond anyone's expectations from when L started with him and looks to graduate soon. The other student returns to Turkey with good progress on a paper, and her home department is expecting several seminars on topics that they are not strong in. L's own PhD advisor is looking forward to his first academic grandchild, since L is his first student to graduate his own PhD student.

Social and community service


Finding a comfy spot to sleep We have continued many things, such as going to PSO concerts where Louis continues to get comp tickets blogging for them on their blog page. However, they have been scaling back some things. L has finally finished his long tenure on the board of the National Association of Asian American Professionals (NAAAP) Pittsburgh. And, to make sure that they can still wear their fancy clothes on occasion, they still plan on enjoying events such as the PSO gala, Silk Screen gala and Red Cross Ball as part of their ongoing associations throughout the year.

L is continuing volunteering with the Southwestern PA Red Cross. In addition to the ongoing on-call for fires etc. he has had leadership roles in being the disaster assessment lead during heavy snowstorms and taking part in a volunteer review board looking at emergency services operations.

Travels


Big Red Lighthouse in Holland State ParkBoth of us have had trips for work. In addition S and L went to New Orleans, LA; Somerset, PA and Saugatuck, MI visiting friends, relatives, and spending time just together enjoying precious times.

Physical


L continues to serve as radio communicator for various races as part of Amateur Radio Emergency Communications (ARES) in Allegheny County. And this summer, he finally completed the Rachel Carson Challenge on time. Of course, this is probably his last challenge as a participant (for the foreseeable future). In the future he may take part as a volunteer, and go back to something less challenging, like running marathons.

Family


Welcome to the world Bump!The big event of the year was, of course, the birth of our son T on October 30 at McGee Women's Hospital. At 8lb 11 oz T was a surprisingly big boy. We're not sure how he got so big. The pediatrician assures us he will regress to a body type like his parents within two years.

Father and SonWhile runners have a saying that we are all experiments of one, and this applies to life in general, relationships and marriage, it seems to us that raising a child is especially a good application of this principle. Even though a few billion of these have come around, everyone is a bit different. And we've noted a lot of advice forgets this (sometimes because of poor memory, or someone who thinks all people are the same).

What is that on the left?L's mom was here to provide much welcome help the first month. S's parents are here now and for when S goes back to work. We have had easy times, and some hard ones. And not being sentimental people by nature, it is neither as easy or as hard as sometimes we have feared or hoped. And that is probably as it should be. There are many plans and expectations that people have, but we'll let T find his path, with us looking ahead to be with him on the many expected rocky parts to come.

Thursday, December 30, 2010

Parenting: Month 2


Tomie's Three Bears
Originally uploaded by LugerLA
All the baby books say month 1 is the time of upheaval and month 2 is a settling in period. Month 1 seemed fairly straight forward in retrospect. Of course, he was just a blob and his job was eat, sleep, pee and poop. And he was very well mannered for the first month. Month 2 we have a real baby that fusses and cries. The in-laws arrived for the grandparent shift change, the night we went to the emergency room for the first time. They are probably wondering if we were lying about the easy going baby we had.

Some notes along the way

- Doctor gave the dreaded diagnosis - colic. (AKA pediatrician does not know why baby is crying, but the parents better steel themselves for three months of this) Actually, if this is colic, we'll take it and run, because this is easier then what we thought colic was.

- We still have a big blob. He started out as a big boy, and he is staying big. Problem is, most babies his size are older and have learned to crawl. But in his case, we have to do all the exercising for him. Lot's of bicycling time. But that does not come close to what a self-mobile baby does. Good thing he is sick so he does not eat so much. (of course, he is still gaining weight, so no doctor is going to worry too much about him being sick)

- Colic and constipation = complexity. It's getting harder to keep track of everything that we're working on

- He is a bit of a chicken. Lots of things scare him. One of the problems is that it is so cold, so we have not been bringing him out of the house where he can be exposed to other things which is what is supposed to take care of this. (Hint: we need visitors. Call us and come by.)

- Baby gear. We love the Medela line of breast feeding products. We hope that whoever coordinates/manages/develops that line great prosperity for lifetimes to come. That makes life so much easier.

- Baby gear 2 - I like my ring sling. I have a Maya sling that is great because I can carry him and do something else while he is wailing away (or threatening to wail away) or when I'm just holding him asleep (i.e. he would not be sleeping if I was not holding him). This usually means playing music on a CD, iPod or reading on the Kindle. And I can keep this up for a few hours (i.e. the time between feedings). Of course, I am the only one who can use it. We have a Baby Bjorn that mom and grandpa can use, but he needs to be in a very good mood to get in that.

- Holidays - We are very unsentimental about holidays, birthdays, other special events. We're told it might change as he grows up. But not yet.

- Gadgets - non-baby. I'm getting a lot of reading done with the Kindle. What makes it work is that it is light, so I can hold it for extended periods of time with a couple fingers while I'm holding him. If it was closer to a pound, it would get problematic after the first hour or so.

- Carrying - I enjoy holding him. Awake, asleep, happy (even crying). Standing still, sitting down, laying down, dancing (waltz). I'd probably hold him even more if I didn't have to work.

At two months, he clearly dominates our lives. Although we are fighting to see that the world does not completely revolve around him. Mom and grandma are discussing what classes he will be taking (after all, he going on three months). Competitions to enter. And of course, noting that no child of two endurance athletes has a chance of being a sloth. But for now, we enjoy being parents. So far.

Monday, December 27, 2010

Book Review: Data Analysis with Open Source Tools by Philipp Janert

Data Analysis with Open Source ToolsData Analysis with Open Source Tools by Philipp K Janert

My rating: 5 of 5 stars


This is a book that is how to think about data analysis, not only how to perform data analysis. Like a good data analysis, Janert's book is about insight and comprehension, not computation. And because of this it should be a part of any analysts bookshelf, set apart from all the books that merely teach tools and techniques.

The practice of data analysis can get a bad rap, especially by those who think that data analysis is only statistics. Most books on data analysis don’t help because they focus on using the features of a particular tool, leading to the view that data analysis is following a recipe from a cookbook. This book subverts this by being principally of how to think about data analysis, and providing examples using different tools (primarily R and Python, but he uses other examples as well)

Among other topics, Janert covers graphing, single and multi-variable analysis, probability, data modeling, statistics, simulation, component analysis, reporting, financial modeling and predictive analytics. In each section he starts by explaining the concepts, what it is for, and (just as important) what each topic is not. Working through it you get a sense of not just what and how of the various tools and methods discussed, but why they are used as well as some ways these techniques are misapplied.

Janert also illustrates the methods using some data analysis environments. Principally R and Python (with Numpy, Scipy and Matplotlib), but also other tools such as Gnuplot and the Gnu Scientific Library. What is helpful here is the focus is on what techniques and capabilities are needed in the tool, not the tool itself. Instead of being a cheerleader for a particular tool, Janert discusses in his appendix the qualities that make environments such as Matlab, R and Python good data analysis environments. However, this focus means that he does not teach any particular tool. If you want to learn how to use a particular tool for data analysis, you are better off getting a book on R or Python (or Matlab, Excel, etc.)


The book page at O'Reilly.com is here: Data Analysis with Open Source Tools


I review for the O'Reilly Blogger Review Program


View all my reviews

Sunday, December 19, 2010

Lessons Observed: Learning Bayesian Methods

I've been working with one of my students in a project that involves identifying a proper probability distribution and parameters for a fairly complex and diverse data set. As we did our literature review, one thing that was very unsatisfying was the fact that many published papers either used data that was unavailable at the time needed, or employed magic numbers as part of their method (magic numbers are arbitrarily chosen constants). As she did her literature review, we discovered the applications of Bayesian methods. But neither of us had any experience in using this. At the same time, my PhD student had a problem that we uncovered during his proposal presentation. He needed another course. Solution. We'll have an independent study on Bayesian methods with three of us.

We used as a basic text Carlin and Louis, Bayesian Methods for Data Analysis and Alberts, Bayesian Computation with R as a supplementary text. The alternative to Carlin and Louis would be Gelman et. al., Bayesian Data Analysis. We chose the Carlin and Louis text because it seemed to be more technical while Gelman et. al. was aimed at social scientists (as opposed to the mathematical disciplines we came from). (Note: all of these do require some level of programming using R)

While doing this we were also looking at various Markov Chain Monte Carlo (MCMC) toolkits. The best programmer was working with MCMCPack. The least experienced used WinBUGS and I used JAGS.

Lessons learned:

1. For independent study, I should be more forceful on making them do the exercises. By the time we were done, I had implemented many of the models, but I don't think my students did.

2. Carlin was good to work with. I had gotten the instructors solutions guide direct from him (although I did not use it). I also identified a problem in one of the data files for one of the case studies.

3. Of the three of us, JAGS was the only one we got to work well. We had a hard time formulating models in MCMCPack. WinBUGS would work, but it was only good for interactive use (if you called it from R, it would open its own window to do its work, which is a lot of overhead) and we needed something that could be used as a callable library because we needed to apply this to 1000's of cases.

4. There was a benefit to involving my students in learning this field. Because I knew nothing about it, I could model the process of learning a new field of knowledge to my students.

Outcomes

1. The project is turning out to be successful. We're doing comparative performance evaluation now and it does considerably better then the other methods in the literature. The fact that Bayesian methods blend expert knowledge and historical data in a systematic way gives it considerable face validity.

2. The student that I was working with is going back to her home university with an expectation that she will introduce Bayesian methods to faculty and other grad students in her statistics department (at a university outside the U.S.)

All in all, I think this experience was successful. Not that I am an expert in Bayesian methods, but this has led to very good results that I expect to see implemented on live data in the near future. And some insights on situations that allow Bayesian methods to be more useful then most applications of it.

Sunday, December 12, 2010

Book Review: Head First HTML With CSS & XHTML by Elizabeth Freeman and Eric Freeman

Head First HTML with CSS & XHTML (Head First)Head First HTML with CSS & XHTML by Elisabeth Freeman

My rating: 5 of 5 stars

This member of the Head First series teaches in an engaging way with every lesson providing the context and the why, not only what and how, of using HTML and CSS.

I have written web pages before, and even worked through some on-line tutorials. But having some colleagues gently remind me that my web page needed to be updated and filled out provides an opportunity to learn how to do this right.

Head First HTML with CSS & XHTML does a better job then others. The style of teaching lends itself very well. Three case studies (even if contrived) weave their way throughout the book. And having three case studies allow every new concept to be introduced in a usable context. Each chapter had several different kinds of exercises. For all of us who learn in different ways.

I appreciated many sections where they take a break from teaching to explain why certain features of XHTML and CSS were the way they were. So you are not only learning a lot of syntax, but you are also learning why HTML and CSS are the way they are, and how to use them as tools as a coherent whole. Making it easier to remember and retain what they are teaching (almost like learning from first principles in addition to the tutorial they are giving).

Book page at O'Reilly

I review for the O'Reilly Blogger Review Program



View all my reviews

Tuesday, December 07, 2010

Book Review: Baghdad at Sunrise by Peter Mansoor

Baghdad at Sunrise: A Brigade Commander's War in Iraq (Yale Library of Military History)Baghdad at Sunrise: A Brigade Commander's War in Iraq by Peter R. Mansoor

My rating: 5 of 5 stars


This is the memoir of a field-grade officer's tour in Iraq as a Armored brigade commander in 2006. It covers a period where U.S. military doctrine was being debated and changed from active denial that the U.S. was facing an insurgency to fully engaged in counter-insurgency. In particular, as a brigade commander Mansoor was exposed to both decisions from higher up as well as the reality on the ground.

Mansoor demonstrates the capabilities of those in the military. As some recognize (esp. Col Gian Gentile USA), as a practical matter, many in the U.S. military were very aware of tenets of low-intensity warfare from experience in the Balkans, Africa, northern Iraq and around SW Asia and SE Asia. And regardless of what their political masters may say, many have learned that these have to be dealt with, and the U.S. has experience and doctrine to do so, if it is followed.

So the book becomes a memoir of what he faced, how he dealt with the Iraqi people he was there to protect as well as the insurgency he was fighting. And how he handled both as well as the political and military senior leadership of the time (who did not have on-the-ground experience in these same areas). I found it to be candid, and worth reading the thoughts of those who attempted to carry out their countries missions in the unknown of war.



View all my reviews