Sunday, August 31, 2014

Parenting month 46: Pop culture, preschoolers, and competencies

There was a time we were thinking of keeping pop culture mostly out of our kids lives.  And since we are not real big TV or movie people, we thought it would not be too hard.  But then reality tended to get in the way.  The first thing was that children's clothes (especially bargains) tended to be branded.  My wife once came home with Star Wars Clone Trooper shoes for T without realizing the origin. Of course, T's pre-school classmates could recognize it for what it was. Ninjago also entered the household through bargain clothes. At daycare, it is completely evident who was the kid who introduced everyone to superheros. And it would seem that noone in the world who has regular contact with pre-school to pre-teen kids could avoid Dsiney's Frozen last year.  The various learn-to-read books are also saturated (as most vendors of such books have learned that tagging along on pop culture gets their books purchased and read).

LEGO Research Institute
LEGO Research Institute set
So the next question, what do we think about it? And what do we want our children to learn? Answer that, and we can think about what we let in.  First, the classic raising a child answer about allowing fantasy (which is what the problematic pop culture all represents) is that it allows conversations about right and wrong in a safe context (there is no standard correct answer the child has to try to remember and no danger from the point of the view of the child of getting blamed or punished for something when you are talking about people and situations clearly divorced from the real world which is usually the case when they get involved in those kinds of conversations)

Another goal is most strongly made from the superhero genre. Fantasy play provides those who usually have no power (children) an experience where they have agency, the ability for their choices and actions to have an impact on their world. And as there are clear boundaries that authority figures have put into the lives of pre-schoolers, being able to identify with an actor in a fantasy world allows them to think and play where their boundaries and capabilities are much greater than reality. (Disney's Frozen really is blatant about this in the song "Let it go")

So there are two things that I want when my son interacts with pop culture fantasy. First, that it is a vehicle for talking about what is right or wrong and promoting empathy, second that it teaches agency and competence.

For the first, we can follow the standard good guy-bad guy play of boys. And as he plays, we can interject with questions about why a character in his play did what they did. What is good and bad, nice and not-nice.  And we can steer his play through our questions.  So one day, when a bad LEGO character was part of the play and we thought about how everyone reacts, he had all of the good LEGO minifigs got together to push the bad guy away (he knows about super heroes, but I don't think he has gotten the idea that super heroes are anything special, so he needs to use numbers to be on the good guys side).  Playing with Star Wars space ships turned into them being fire-fighting space ships.

LEGO Star Wars Brickmaster Ice Speeder, assembled by T

For agency, there are two aspects. First, we encourage the characters in his play to do things. Firefighters fight fire. Medics get people who are injured, Doctors heal sick people. Police chase and catch crooks. People hike, cook, kayak, run, etc.  The second part of agency is that he has to create. At this time the major entries of pop culture in our house are as toys is in the form of LEGO and in woodworking projects from Home Depot and Lowe's, so he was part of making all of it, either through assembling or through use of hammer, nails, and glue. Right now, it is a big deal for him that we have a LEGO Star Wars vehicle where he is the one who made it by reading and following the instructions. Because it is the most complex thing he has made without any adult helping him. And we want him to be proud of being competent at things, whether it is making toys, or reading, playing music, helping around the house, or physical play.

Major development news for T.  He has started learning piano. So far, he is learning the standard Mary had a little lamb, but added to that is Old Macdonald had a farm.  There are a couple of other songs in the queue that all have the characteristic that they can be played on white keys without moving the fingers.  That means that playing the piano is reduced to hitting the right note and keeping time (which are conveniently whole increments) Which is within the realm of a pre-schooler.

Studying butterfly wings at the Carnegie Museum of Natural History, Pittsburgh.
Studying butterfly wings under a microscope a the Carnegie Museum

Mommy and daddy school is moving up another notch. We have started working through a Kumon workbook, and there is one that is supposed to done over the course of the year and comes complete with stars for completing lessons, and certificates for completing week-long sequences. The certificates are finding their way onto our walls as he progresses.

Socialization has improved greatly. He is now quite talkative at day care, chatting and playing with other kids. We have even observed him instigating play with other kids when we come in to pick him up in the afternoon. Maybe our socially withdrawn kid is breaking out into the world. Of course, this means the other kids have influence on him. So he is now starting to think about birthday parties, as in when does he have one.

At a slightly different point along the way, AY is a full on babbler. She is getting much practice making sounds, and even alternating with whoever is the current conversation partner. It is amusing as she is still expanding the range of sounds she can make. And she is very amused when a new sound comes out of her mouth (you also see her thinking "did I just do that?")  She is also a good smiler, both in terms of the big grin, and the fully body-shaking-smile that happy babies can do.  She is also learning to explore. She is in the beginning stages of being able to manipulate things with fingers, and we can see that, unlike T, she likes putting things in her mouth (T better keep track of the LEGO)
Mommy, someone behind you is taking a picture
Hi there!

Next, school has started for both parents. T is going to 5-day a week daycare while A stays with grandparents. This will be a challenge to T for further growth the socialization department.

Friday, August 29, 2014

Clojure for Machine Learning by Wali: Book review

Clojure for Machine LearningClojure for Machine Learning by Akhil Wali
My rating: 3 of 5 stars

For a book that is about [programming language] for [computational task], there are two approaches. One is to assume basic competence in the language and teach the task, the other is to assume that the reader has basic competence in the task and teach how to do it in a language. This book assumes knowledge of Clojure and tries to teach machine learning. But I find that it does just enough to be dangerous. It has a series of methods but does not provide discussion on why you would choose once class of method over another, and it completely skips model evaluation. What this creates is someone who has a good idea of the mathematics and implementation of methods, but not when to use it or if it actually did what was intended.

This makes me slightly different than the ideal audience of this book. I am learning Clojure and have only started using it for data analysis in real life. However, I have used Python and R for data analysis for several years now, and I have use both of them (and trained students to help me using both) for different machine learning projects (and I use R for teaching a course in data science).

Each chapter in Clojure for Machine Learning takes a look of a class of machine learning algorithms and takes several looks at it. Generally, Wali looks at the mathematics and theory of the algorithm, then a simple implementation in Clojure, then some examples of using existing library implementations on a problem. The mathematical treatment seems nice, but it would not compare to an actual text on machine learning/data mining. And while seeing an implementation in Clojure has some value, I would have liked to have seen more humility in doing so (i.e. some recognition that there are limitations of an implementation that can actually fit into a book of this size with everything else that needs to be done).

Two things that bother me about this after I finished was realizing that for each class of algorithms, the book only covers one or two methods. Which is fine, but it does not even acknowledge that there is a greater world. And as there is no discussion on how to perform model evaluation, an enthusiastic reader may reach the conclusion that they know what they are doing when implementing them against a data set and problem. Essentially, the enthusiastic reader knows enough to be dangerous and does not know what he does not know. If I were to suggest this book to someone, it would have to go with a severe caveat that what you know after this is how to set up a machine learning problem. More research has to be done to determine what actually needs to be done (the libraries used are much broader than what is covered) and then, learn from somewhere else how to evaluate or tune the methods used.

In the end, I would treat this as a book of examples or cases of Clojure being used in machine learning. There is room in the world for a book on Clojure for machine learning, but this is not it.

View all my reviews

Tuesday, August 19, 2014

Clojure Data Analysis Cookbook by Eric Rochester

Clojure Data Analysis CookbookClojure Data Analysis Cookbook by Eric Rochester
My rating: 5 of 5 stars

This book is a good tutorial on data science using Clojure. It starts with working with data (access and cleaning up), then the various chapters cover a range of tasks from focusing on numeric computing (performance, parallel processing), statistics (Incanter and other numerical libraries), working with other numerical software (Mathematica and R), graphics, and the web. The topics are actually a fairly complete look at data science, so it feels more like a tutorial than a cookbook.

I found this to be a great text on working with data in Clojure. My background is in technical computing, mostly R and Python although I also use C, Java, and Fortran as needed. I've been dabbling in Clojure, but I had not made the jump from doing tutorials and exercises in Clojure to doing something for real. Working through this book has improved my skills in setting Clojure up and using it for real tasks. The book code also provides a nice example of good programming style (I think) that I can see myself trying to emulate.

A book on data science is necessarily about the practical details of implementation, not about mathematical and statistical methods. Presumably, the reader has another source about the details of various statistical and machine learning methods that they can use to figure out what to do, then the Clojure and Incanter API documents tell you how to do it, and this book is about how to do the 80% of data science that is not about implementing the algorithm, but about how to manage the data, then work to communicate the results of the algorithm in understandable ways. This book is probably what brings me from dabbling in Clojure to being able to use Clojure for real tasks. Well done.

View all my reviews

Saturday, August 09, 2014

Functional Thinking by Neal Ford: Book review

Functional ThinkingFunctional Thinking by Neal Ford
My rating: 4 of 5 stars

Functional programming can often sound like magic, in its promises of greatly improved productivity and near guarantees of accuracy and expressiveness. But one problem is that the examples usually given are those in an unfamiliar form, using languages very different than the procedural and object oriented languages most of us are used to. And the advantages are not apparent when presented. What Ford does in Functional thinking is to present the advantages of functional programming within the context of an object oriented language that can support this, then move to more appropriate languages to show how the advantages can be more clear when the language supports it more directly. It does not stand alone, you will not learn functional programming from this book, but it does offer a more clear argument for why functional programming can useful and better in some circumstances.

The setting that I have seen functional programming explained and taught has always been in the context of demonstrating a functional programming language, such as a Lisp (Lisp, Scheme, Clojure). Or sometimes, a language that has some functional features (R, Python). But I always had to take the commentators word at why this was good. Ford using Java 8 (as it adds some functional features), Groovy, Scala, and Clojure provides a progression from functional features in an object-oriented language (Java), to functional features in multi-paradigm language (Groovy and Scala), to it look in a language that is clearly functional (Clojure). This provides a good look at its qualities by showing how these features improves upon an object-oriented solution, then how it is more expressive and closer to the problem when presented in the cleaner form (i.e. in Groovy, then Clojure). I probably would not have caught the lessons of this if this was my first exposure, and I stopped after the first chapter to watch one of Ford's talks on YouTube so I could get an overview of the book before I finished. But the reward is that it gives context for my learning of Clojure (and functional programming in general).

Not for learning a programming language, but for learning how to think about problems in new ways, enabled by functional programming.

Note: I received a free electronic copy of this for review as part of the O'Reilly Press Blogger program.

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

Sunday, July 27, 2014

Parenting Month 45: Visitors and limits

Cousins working together on a Blue construct
Cousins playing at the Carnegie Science Center Blue exhibit

This month was marked by my family visiting.  My parents came for a month, and my sisters and nephew came for a week.

The highlight, of course, was grandparents spending time with a new grandchild.  The other highlight was the cousins recurring time with each other. As T and J get older, their interaction becomes richer as both grow in their abilities to deal with other people.

Grandma and grandson at the Carnegie Museum of Natural History

AY has been notable in her responsiveness. As she is the second, we cannot help making comparisons to the only baseline we know. At this time, T was in the midst of colic. In comparison, AY is very responsive, trying out a range of facial expressions when we are talking to her, and vocalizing in call and response fashion. We are also entertained by her kicking and reaching out to things.

Baby looking out from lamb blanket
T is still the very good big brother. He likes to tell everyone that AY talks, sleeps, poops, and cries. He also still read and talk to his little sister, and helps with bath and diaper changing time.  However, the novelty is wearing off, and he is not always as excited to help out as he was.

We have noticed that while T is more outgoing and social (talks and plays at pre-school, tells short stories at home), he is regressing in other areas. We have noted that he used to have a relatively long attention span, focusing on one activity longer than others his age before switching. But it has gotten shorter. This is observable when reading books or when making things (Lego or woodworking).  Another not so good trend is that he is becoming more self-conscious of his limitations. Things that he used to try (and do fairly well) are now approached with a statement of "I can't do it".  While he is still a very well behaved and happy child, we do see some of the not so welcome traits that are probably quite prevalent in preschoolers, some that we are hoping that he skips the worst of. Part of this may come with paying attention more to others his age, and taking on their habits, playing, and capabilities. Some of these are fairly innocuous, like growing a liking for superheroes (and yes, there is one kid in his class that bears most of the responsibility for teaching everyone about superheroes) and the fact that he picks up pop culture (everyone knows Frozen, but Star Wars, TMNT, and others are common. I consider it part of my duty to try to get a step ahead of what he learns from his classmates :-) )  But he has also picked up increased instances of the use of the word 'no' and occasionally trying out tantrums to try to get his way. At this point, we are still pretty successful at working our way around 'no' through humor, and we're trying to teach him that tantrums don't work nearly as well as other things (like reminding him of some of the things we can do with him because we are not worried about tantrums at all)

Hi, I love mei-mei

One more month of summer, then both academic parents go back into a full work schedule, but for now, we are thankful that a relatively relaxed summer lets us have this level of interaction with our kids.

Monday, July 21, 2014

Java Cookbook by Ian Darwin: Book review

Java CookbookJava Cookbook by Ian F. Darwin
My rating: 4 of 5 stars

What you want from a programming language cookbook is instruction on the basic tasks that are needed to form the scaffolding that you build around your application. Language teaching and references can teach you syntax and good practices. Topical books can demonstrate how to tasks in the large. But the cookbook is for the small but necessary tasks. And for me, who does not spend much time in the JavaVM ecosystem, the Java Cookbook is a very welcome addition to my bookshelf.

I spend most of my time doing scientific programming in Python and R, but I am starting to return to the JVM because of the need to deploy what I develop. But while other languages like Jython, Groovy, Scala, and Clojure exist on the JVM, to use them well means you need grounding in Java, certainly most of the instructional material assumes more than passing understanding of the JVM and the Java standard library.

I've been building a prototype application using Java as my means of re-learning Java. Where this cookbook has helped me already is in understanding better how to configure projects, more effective use of the Java data structures and I/O, and some utilities. While I know what I need to do through my experiences in other languages, and Java tutorials and references can identify the libraries and functions that I need, the Java Cookbook provides well written examples that I can use to guide me through the JVM.

There are some warts. This book (like most JVM books) seems to be written with the understanding that the readers are web programmers and I think that the discussion of the options available are filtered with that in mind. But this is a very good reference for those times when you know what you need to do, and it is not the type of thing that gets put into a tutorial.

Disclaimer: I received a free electronic copy of this book through the OReilly Blogger program

View all my Goodreads reviews

I review for the O'Reilly Reader Review Program

Thursday, July 10, 2014

Me and My Big Mouse by Ethan Long: Book Review

Me and My Big MouseMe and My Big Mouse by Ethan Long
My rating: 3 of 5 stars

This is a fun book about a boy who has a pet mouse who he has to take everywhere, but the pet mouse is often very annoying. It is notable in that it has a message, that even something we find endearing can be very annoying. My three-year old son has caught onto the idea that something you like can also do something bad (make messes, break things) and be annoying. He does not quite catch on to the idea that this can be an analogy to a younger sibling (has a newborn sister), so he may be a bit young for this.

The discrepancy between word and picture may be hard to understand at this point, as irony is not yet part of his mental makeup. The pictures are cute, and get the point across of so this book is one that he occasionally asks for. And maybe as he gets older, we can reference it when he does reach the point he regards his little sister as annoying. :-)

View all my reviews

High Performance Python By Micha Gorelick, Ian Ozsvald: Book review

For someone like me who is a technical programmer but did not study CS, I've seen hints on how to speed up Python numerical code, but I only had a vague understanding of the principles and application.  This Early Release version of High Performance Python has examples that demonstrate why certain data structures are faster than others in particular situations, and how to use the various data structures provided.

But what may be unique is the chapter on the ways of speeding up Python through compiled code. There are many ways of using compiled code through Python, C and FORTRAN extensions, Cython and PyPy, and more recently Numba. But this book explains the strengths and limitations for each, along with a number of other ways of using compiled code along with Python that I had not heard of before. There are many references for each of these, but no general overview of this group of resources.

This is still an Early Release stage, so there are some warts. Many of the code examples are raw, and you have to know what you are doing to fill them in and get them to work. A website or Git repository with the source code examples would be very helpful.

Disclaimer: I received a free electronic copy of the Early Release edition of this book as part of the O'Reilly Press Blogger Program.

I review for the O'Reilly Reader Review Program