Saturday, November 29, 2014

Parenting Month 49: An introvert in an extrovert's world

Earlier this month, one of T's teachers decided to give him his assessment a bit early, since he was going to a new class and new teacher soon (moving from the 3s room to Pre-K (everyone from 4 years until moving into kindergarden).  He pretty much maxed out the academics, meaning he covered everything that was expected from the 3s room and everything that the Pre-K had been doing (from the description, we figure she ran out of available assessment material, and probably was also beginning to reach the extent of T's patience). This is not the usual outcome of an assessment for T, the normal outcome is that he is quiet and does not give answers to things that we are all quite certain he knows so he assesses as generally age appropriate, maybe a bit ahead.  The difference is that it was done in the course of daily activity and the teacher was one he knows well as opposed to a new teacher (he takes 2-3 months to warm up to new staff).

The underlying issue is that he is an introvert, and pre-elementary assessments are designed based on an outgoing child who will actually present the knowledge he/she has to the assessor.  But, while the majority of preschoolers in any grouping (say, a daycare or preschool) are wild and rambunctious, T had always been the quiet one who stayed in one place.  As a 2 and 3 year old his play at day care or in group settings was marked by him staying in one place as the other kids would swarm from play area to play area around him. And the kids realized this too. His most common playmates were also the quiet ones who did not swarm as fast as the others (e.g. girlfriend from the 2year old room was also a shy one, and there are three boys that the staff have marked as hanging around together instead of participating in the usually rowdyness of preschool boys.)

The question is what do we do as someday he will be assessed, and there will be an outcome of the assessment. And that, especially in the pre-elementary and elementary stages, the assessment will be done in a way that greatly favors the extrovert (est 75% of the U.S. population).  Some things that we have been trying include playing piano (he plays happily at home, but in any other location, he maintains excitement until he gets close to the piano in question, then he freezes.), activities in busy areas (the regular museum visits offer many opportunities to interact, in fact it is hard to avoid the other kids, but he clams up as he gets close to interacting with anyone, even after watching us do so many times in many contexts.), play dates (we have not had that many, most of the neighborhood is older, there is one neighbor only 2 years older who really likes playing with T, but she is very much the extrovert and it does not help whne movin to a new setting.  There is one sense that it does not matter, that T will learn enough how to function in an extroverted world in time for it to matter, but another thought is that time may not be that far into the future.

In other developments, A has become quite the talker. In addition, she has developed a sense of will where there are times where she can decide to want something, and make deliberate and sustained efforts to get it.  And as part of that, the first stage of mobility, she can roll both clockwise and counterclockwise at will.

T's main development was moving up to Pre-K from the 3s room. This actually was an issue as the Pre-K in our daycare had maxed out the capacity of the room. We were part of a minor rebellion threatening to leave enmasse until they created a new class of Pre-K. There is an issue as the additional class starts out the day using a room that is also used by an afterschool program, so they need to move back into the regular Pre-K/3s room before the public school kids (kindergarden is halfday in W Pa.) return. So it is a lot of moving around, but at least T spends time with older kids again.

USS REQUIN at the Carnegie Science Center - Pittsburgh
Turning the wheel of the USS Requin (SS-481)

USS REQUIN at the Carnegie Science Center - Pittsburgh
These beds are small

Tuesday, November 25, 2014

Using blogs and news articles as class mini-cases - How discrete-event simulation can help project prison populations

How discrete-event simulation can help project prison populations (SAS Subconscious Musings)

My experiment this semester is more intensive use of news articles as subjects for in-class discussion of examples of applications of what we are learning.  While I have done this in the past, this semester I made it a deliberate plan to discuss one article a week in each class.  So far this semester in my simulation and decision models classes, I have covered reactions to the W. Africa Ebola outbreak, Game 7 of the 2014 World Series, Gamergate, flu vaccinations, commercial manned space transport, pulling a goalie in hockey, cargo shipping, business expansion, business divestiture, automation of manufacturing, health care system operations, among other things.

I identify articles through the use of RSS feed aggregators. My news feed includes a number of feeds from a range of business school professors focusing on supply chain and operations management issues.  I follow the CDC MMWR as well as the journal Health Affairs to get health care related articles.  And the New York Times front page and Google News are good for a lot of different stories.  The key is finding an article where the reporter was good enough to discuss the various options that were available and enough details that you can figure out the values of various actors involved.

The key a good class case article is that there are potentially reasonable alternatives to discuss.  In the decision models course, the discussion revolves around identifying the courses of action available, the sequence in which decisions need to be made and information becomes available, assessing the attributes (values) of the people involved, then assessing how they may assess probabilities of various events.

For the simulation course, the focus on case discussions is on understanding how a decision maker in the article may use the simulation, then we do a whiteboard exercise where we draw out an event graph diagram to model that system, focusing on what needs to be included (states, events) based on the decision maker needs. The goal is to discuss modeling in a specific context, so we can talk about what needs to be included, and what does NOT need to be included in the model to fit the particular purpose.  The contrast is to the textbook homework problems, which generally provide a very specific context and set of details which have be included in the model to answer the homework problems.  Textbook problems generally do not include thinking about modeling in such a way to determine what is the right question and how to simplify the model to address the question.

Last week we looked at the decisions made by the North Carolina Sentencing commission.  Unlike most cases, in this case we happen to know for a fact that a simulation was used in the decision making process.

Our discussion began with purpose: why would the North Carolina Sentencing Commission be interested in a simulation of prison population. We came up with the need to plan prison space, make arrangements with neighboring states to house NC prisoners, and to allocate resources to monitor parolees.

Next, a discussion of what would the simulation need to track to fulfill the purpose of the NCSC. This would include the number of prisoners and the number of parolees. And the time remaining for each prisoners sentences. Then, we have the state of the system being the prisoners and parolees, and the terms of sentencing. (we decided not to discuss the size of the prison, since that is something that was being determined).

The last part of the discussion was where the typical homework or exam problem started, diagramming the events tracked by the system, how each events changes the system state, and then how to generate delays in the simulation.

The purpose of the exercise was to discuss modeling. Not in terms of how you build a model from a system description, but to think through how to model and make modeling trade-offs given the decision that needs to be made about a specific system.  The cost of this discussion is time, doing this results in us not completing a semester syllabus of a class that is quite analytical. But, as textbooks usually begin modeling examples with a system description and a purpose, I think it adds to the course and I think the compromise is worth it.

Thanks to Natalia, Jeff, and Leo from SAS for our conversations about this particular SAS case at the INFORMS conference. It enriched the class discussion to know what was happening behind the scenes of the Subconscious musings blog article.

Sunday, November 16, 2014

Testing in pairs: The Global Day of Coderetreat

Global day of Coderetreat: a day to celebrate passion and software craftsmanship

A Coderetreat is like a master class for computer programmers. It is a chance to view programming as a craft that can be practiced and honed.  And like other crafts, the way you develop skill and creativity is to create limits, then use your creativity to accomplish the goal while working around the limits.

As an engineer, I am not primarily a programmer, although I have some level of skill, so this is not the typical view of programming, which is viewed more as a tool and a necessary evil. The effect is that improved competency is not valued, which leads to  inability to deal with dirty data, models that cannot be implemented, and results that cannot be reproduced.

Code retreat is build around the four principles of simple design, due to Kent Beck

  1. Runs all the tests
  2. Expresses every idea that we need to express
  3. Says everything once and only once
  4. Has no superfluous parts
The structure of the Coderetreat is six sessions where we work with Conway's Game of Life. For each session, we pair with a different partner. In addition, in each session we are to begin from scratch, and there is a twist to the rules.  The goal was never to actually implement the Game of Life (although in two cases we actually had all of the parts working and tested), but to spend time working with someone else on code.


1.  Pair programming.  This was my favorite aspect of the Coderetreat, pairing with six different people.  I figure there were two where I was generally more skilled, two where I was generally less skilled, and two where we were pretty much even. In every case our end solutions had very different designs as it was a combination of our different ways of looking at things and our experiences of having tried different designs in previous sessions, and the skill levels of the people involved.  When I worked with students, we would occasionally have a session where we worked together to solve a problem, and some of my students have commented that they found those sessions to be invaluable because they had a chance to watch how I worked and saw how I dealt with different types of problems.  But this time I did pair programming on people on a much more even footing and I get to experience it as well.  It showed in how we used different tools (although I was experimenting with a new IDE), how we solved problems in code and how we solved logic problems. 

2.  Test driven development (TDD). I've heard of the concept before, and I have even contributed to a unit test framework, but I've never really done it.  What TDD did was to encourage more modular code. It also forced us to put more thought into our design, as we had to consider what information was required an in what format to do what we needed.  In one session, one member of the pair would write tests and the other would write the code, and the two were not allowed to communicate. As the one writing the tests, since we could not otherwise communicate, I realized that in writing the tests I was forcing a set of data structures and a design in my tests.

3.  Throwing away dsigns.  We started each session with a clean code base. What it meant was that we did each session using the lessons from what went before.  The first two sessions we did not get much progress, but the third was the one where we made the most progress, as we basically learned from the combined mistakes made over the first two sessions and designed the tests with the past problems faced in mind, and the solution was fairly easy after that.  That was good because the next three sessions were the ones with the wierder twists.

4.  New languages.  Python is by far my strongest language, but I did one session in Clojure and one session with Java.  In both cases I learned a lot about how people set up their tools and the idioms they used, which were different than what you see in standard texts.

5.  Dealing with constraints. There were three weird twists. One was mute pairs, one was limitations on the size of methods, one was no use of conditional statements.  Mute pairs forced the design to be simple and clear (especially difficult because we did it in Clojure, which I barely can say I know without the aid of a book in front of me), the size of methods led us to generate very ugly method/class hierarchy to deal with the extreme restrictions, no conditionals lead to a range of creative hacks.  This has an effect similar to a lot of exercises done in the creative arts, adding constraints is one way of encouraging more creativity.

This was a valuable experience. Most of the people there had computer science backgrounds, and pairing with them taught me a lot.  And I was somewhat glad to know I could add to people's knowledge base as well.

Thanks to Code & Supply (@codeandsupply) and Think Through Math (@ThinkThroughMath) for making this event possible and for helping to keep it free, and to IBM for hosting.

Pittsburgh Code & Supply Logo

Think Through Math logo

Saturday, November 01, 2014

Parenting month 48: Now that we are four

Before T was born, we thought that the first few years did not really matter, that we would not really start trying to teach T anything before he was four. Because we did not think we had any strong opinions on what needed to be done before that.

(I'll pause and wait for everyone to stop laughing. But the real reason for this was that we promised not to stress over any differences in parenting style between us and both pairs of grandparents by deciding ahead of time that it really did not matter, and I think we did pull that off.)

And now, surprise, he is four. So time to take stock of where we are.

1.  Our engaged with parents but not with others has turned into a talker. He plays with many of the other kids now (and he does like being one of the older ones in his room). While he would not be considered an extrovert by preschooler standards, he is a long way from the one who took three months before he would get comfortable with daycare/preschool staff.

I am playing the drums
Drums at the Mattress Factory

2.  He likes being competent. Today's trick was building a LEGO set for his birthday reading the instructions himself (I only helped when the issue was finger strength). Granted, it was a set that was designed so young children could make it, (aimed at 4-7 years), but he was happy to say he did it. We've been consciously trying to get him to feel good about being competent and accomplishing things, whether it is building something, playing music, working with the garden, building things with tools, or anything else that preschoolers can do.
These are parsley roots from my garden
These are parsley roots from my garden

3.  He can read simple books. For a while we thought he was  just memorizing books, but we have caught him figuring out new words through phonics.

The American Academy of Pediatrics says you should read to newborns.
Reading for my little sister
4.  He has always had empathy in the sense of responding to our feelings, but now it expresses itself in a new way as he is the big brother who cares for his little sister.

But now that he is four, and we obviously did not let things ride for the first few years of life, what does it mean to be thinking deliberately about his growth?  We are watching the progression to kindergarden, as the cutoff point for school has been moving earlier over the years (parents have been holding their children back for fear that they were not developmentally ready), and now T is on the other side of it, so we are worried that based on the public school cutoff points, he will have to wait and double up a year in preschool at some point before he is eligible for kindergarden/first grade, and that will be boring.  So we are thinking of ways for him to get into the school system despite the cutoff date.

Some favorites from the year:

Song: Let it go from Frozen, like the majority of preschoolers around the world. And he gets it in both english and mandarin.

Books: The Scholastic, DK, and Random House Readers series.

Museum: Carnegie Museum of Natural History

Playground: The yellow and gold playground by the swimming pool in North Park

Toy:  LEGO  (actually, I think parents are the true favorite toy)

Movie:  The LEGO Movie

On the other end, A is a full on babbler. She can play with things put into her crib, and she likes putting things in her mouth (T always tested things before putting them in). Latest trick is turning over. She can kick and swing enough to go from back to front. Of course she does not know what to do after that so the sense of accomplishment quickly gets replaced by frustration.