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

Monday, December 26, 2011

Teaching Notes: Simulation Fall 2011 and using Simpy and Sage

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

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

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

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

Conclusions

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

Sunday, December 25, 2011

Book Review: Cool Tools in the Kitchen by Kevin Kelly

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

My rating: 4 of 5 stars


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

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

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

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



View all my reviews

Monday, December 19, 2011

The Art of Readable Code by Dustin Boswell

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

My rating: 4 of 5 stars


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



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



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



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



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



View all my reviews

Friday, December 02, 2011

Parenting 13 months: Holidays

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

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

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

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