Tuesday, November 10, 2009

Adventures in Toddler Diets: Raw Fish, Cafeteria Food & Fried Rice

It's a motto of mine that no morality should enter into food, pretty much ever. That includes "Whole Foods" style morality, it includes diet industry morality, and it includes locavore dogma as well. Food is sustenance and pleasure, plain and simple. Preparing and eating food is a big part of what family is: I want to leave that unsullied as long as possible. We eat vegetables because they're good, not good for us.

That said, I am by no means capable of living up to my motto. So, when I learn that Grace eats two and three bowls of food at daycare -- food prepared by the school as part of their now-mandatory lunch program, well, I would be lying if I said I didn't feel a twinge of "you should know better" rooted in the notion that mass food is bad food. And when Grace sits down to sashimi with me and happily devours every last bite of fish, I would be lying if I didn't say I felt a twinge of pride. The beauty of sashimi is that it makes you realize that everything we do to cook fish detracts from the flavor of a fresh, quality product. A small part of me thinks Grace understands this (the same part of me that thinks she has perfect pitch when she sits down to her piano).

Neither of these feelings is really rooted in the healthfulness of the options. On the whole, I think nearly every American could eat more fish and be better for it--but I do have thoughts about mercury and toddlers that mean that even if it were financially feasible, I probably wouldn't have sushi for dinner every night. And though I'm sure there is more of all kinds of "bad" things in the cafeteria food Grace eats, the root of my snobbishness toward it is really cultural more than dietary. Frozen food heated up and served on trays is gross. Period.

But publicly, in my explicit words and actions, I plug on with my philosophy. If Grace enjoys the food at daycare, wonderful, I say! She's learning to enjoy things I would likely never serve her. At home, I continue to cook the food I cook, be it what it may, and serve it up. If Grace eats half a plate, I'm happy. If she pushes her food around the plate and then goes and plays, fine -- play is also fine. K occasionally prods, worried she'll go hungry, but I'm confident no Hinkle has ever gone hungry in the presence of food.

That said, I would be lying if I said I didn't have my private doubts every time Grace leaves her food untouched. Maybe I should whip up some mac and cheese for her, nevermind that she's not asking for it and is now happily engaged in hopping in circles.

Yesterday, though, I had an interesting experience. It was a night when I was home late from work and had to whip something up in a hurry. I had at my disposal a lot of fresh vegetables from a Sunday trip to the store and a bit of leftover rice I had to use: the obvious solution, fried rice. In this case, we were short on rice, so I compensated by chopping about twice as many vegetables as I normally would. The key to my fried rice recipe (which comes from one of my several beloved Jeffrey Alford and Naomi Duguid cookbooks) is that you finish it off with a healthy wallop of fish sauce. I once had my nutritional program do the calculations, and it turns out you get something like 100% of your daily sodium from the recipe. Oh, and you top it off with a fried egg: that adds a fun, toddler-friendly, interactive element to the meal that's very important to both Grace and my pleasure in food.

About half way through dinner I looked up and saw Grace happily picking up one vegetable after another and popping it into her mouth like candy. Zucchini. Pepper. Bamboo shoot. Broccoli. Asparagus. Mushroom (well, that's no surprise, she loves mushrooms above pretty much everything but butter and cheese).

I didn't say anything of course--I'm convinced Grace will cry foul at any attempt to encourage her to eat a given food (I know I would). But I did wonder about it. What was the difference between these vegetables and the countless ones she'd rejected? These were not in soup format (a usual favorite). They were not overcooked and textureless (also a frequent toddler favorite). What they were was abundantly salted (at the last minute, with fish sauce, which is why they didn't lose their texture to the salt).

Which has me thinking: I'm aware salt is an oft-avoided food, but on the pantheon of food evils, I think salt is pretty low. When I first started introducing food to Grace, we avoided salt -- I'd learned somewhere that babies don't show a preference for salt and that baby food was only salted for the sake of parents tasting it. Given the supposed neutrality of the baby, it seemed silly to add salt. I still have no idea whether this is true, but it is certainly true that toddlers show a preference for salt, and an immense one (as do adults, as pretty much every bite of restaurant food I've ever tasted demonstrates). In the case of last night's dinner, it was salt + umami, which fish sauce packs an abundance of.

Now given how much joy Grace takes from sprinkling kosher salt onto food when we cook together, I'm thinking it might not be the worst thing in the world to let her salt her own food. Maybe with a little MSG for the umami.

A quick check of parenting and nutrition websites shows that in having these thoughts, I'm pretty much the devil. But of course, these recommendations never seem to take into account actual tastes. I wonder how many people try to cook the "right" way, find it doesn't work at all, and end up supplementing with packaged foods with far more salt than they'd add in cooking in the first place. In Grace's case, for example, she may well make up all of those calories she doesn't eat at dinner in crackers and cheese. Given that, wouldn't it make more sense to let her eat the salt with her dinner?

And now just having read those websites I looked up is making me start to shrink back into moralizing and guilt and all of those feelings that make you skip real food altogether in frustration and grab a candy bar or a cracker for the calories... which kind of brings me back to the beginning. Good food, right? Focus on the good part, not the good for you. Sashimi with soy sauce, vegetables with rice and fish sauce, these things are good. I would much rather Grace grow up knowing a variety of delicious foods that might not quite pass the nutritional test than trying to down bland and virtuous "good" food while fantasizing about the delicious "bad".

Wish me luck.

Tuesday, July 28, 2009

Two OSV sentences at 20 months

This week I had the pleasure of hearing the first of Grace's clear three word sentences with verbs. Better yet, the first two clear three word sentences I can remember Grace producing were in Object-Subject-Verb word order, a word order that rarely occurs in the English Grace hears all the time. This makes me confident she's generating the sentence rather than hearing it as one word (she also says "I love you", but it's likely she's learned this whole phrase as one unit).

Alas, I already forgot the first sentence I heard, though I did note the OSV word order. The second one was cute enough I'll probably always remember it.

After I gave Katharine a kiss, Grace said:

[mama dada ma] (1)
mom dad kiss
Dad kissed mom

Though the word order is strange, my guess is that she is following a topic-comment pattern. I feel like this is true of a lot of her two-word utterances as well, though I can't think of a list of good examples at the moment. I wonder if patterns of topic (or of theme/rheme) are more fundamental than subject/verb/object patterns in some way.

Clearly whatever is going on in her mind is not at all a form of imitation or statistical analysis of English. She's got her own little grammar engine starting up. I can't wait for more complex sentences to start.

(K, on the other hand, may already be tiring of my attempts to analyze her language)

Notes:
1. "ma" is an example of Grace's preference for imitative words. Though she understands the standard "kiss", she prefers to use the sign for kiss accompanied by the "ma" sound, which is from her goodbye ritual at daycare. This is one of many instances of her preference for onomatopoeia, even when she has sounds she could use to say the harder word. For example, she prefers "ba" to "sheep" ([ba] and not [ʒi]), "roar" to "bear" ([ro] and not [be]), and "arf" to "dog" ([af] and not [da]) and "quack" to "duck" ([ʀ] and not [dʌ]). This is true even when the name of the animal is much easier to say than the sound (such as "bear" and "duck" which use the early sounds "b" and "d").

Monday, June 22, 2009

Support & Open Source

My love/hate relationship with my Dell Mini 12 continues.

On the love side, every time I see folks with other laptops, I think to myself, my God that thing is huge and smugly congratulate myself on my tiny machine.

On the hate side, Dell's proprietary crap makes this thing a PITA on Ubuntu (wireless driver + graphics card). This was mostly fixed by Jaunty, which basically just works on the mini-12 (to get the graphics card fully supported you just have to enable the ubuntu-mobile ppa). However, the problem with relying on a PPA etc is that everything is a bit more fragile. So, for example, when Ubuntu recently pushed a kernel upgrade (-> 2.26.28-13), the graphics broke. Of course, Ubuntu keeps your old kernel around after an upgrade just in case your system gets hosed, so I was able to boot from the old kernel with working graphics, but suddenly the wireless network card wasn't being recognized by the old kernel.

All of this was very sad: I was left with either a working network card or a working graphics driver. On the assumption that it would be a while before the graphics driver was fixed, I wasted a good hour trying to get wireless working again with my old kernel (networking requires a non-free driver, but it had just worked with ubuntu on the initial install).

Tonight I decided I'd rather have ugly graphics than no wireless and went back to the new kernel. While at it, I decided to drop into the ubuntu IRC channels to see what I could find. I went to #ubuntu-mobile, explained my situation, and left the window there while working. Within a half hour or so, the packager of the ubuntu-mobile PPA was talking to me. I was able to give him a useful error message that instantly told him what the bug was. He released a new version of the graphics module that fixed the bug, I installed, rebooted, and confirmed it worked.

This was quite cool. Within 1/2 hour of looking for help through online chat, I found the developer of the software that had broken. Within an hour the problem was fixed, not just for me, but for all users.

Here's what I'm thinking: this is why open-source development works. This is what's so cool about linux. I remember stories of my mother making similar breakthroughs with Microsoft support when she'd found easily reproducible bugs in Excel graphs -- only in her case she got a 8-step workaround to the bug and no fix. With open-source package management tools, it's easy to push updates out to all users fast, so a problem like this can be fixed right away.

Here's the problem, though: my solution wouldn't have been remotely possible if I was still using the version of ubuntu Dell installed. Dell has no one in their phone support team who could be nearly this helpful, and most likely has no one in its support system who could access someone this helpful. It strikes me that when companies think about using linux, they should think about harnessing the power of the linux user and developer communities as well. In short, maybe they should simply try to hire this guy to maintain a package archive for them that will make their hardware work with vanilla ubuntu. It seems it might work better than their home-rolled distro anyway, and it would certainly be better supported.

Tuesday, June 16, 2009

Simple scripting tasks

This afternoon Katharine asked me to do a very simple task. She needed to create a certain number of random groups from a population of students. The groups weren't purely random -- rather, they had to ensure an even distribution by grade level and gender.

Our student database is all in an online database, which, allows you to export data from it in a reasonably sane way. My approach to solving her task, which took 10-15 minutes to do, was as follows (I'll give the physical equivalent of each step):

1. Make an index card with each kid's name, class, and gender on it (export a CSV file)
2. Divide those cards into piles by grade level
3. Divide those piles into a male pile and female pile
4. Shuffle the decks of cards
5. "Deal" from each deck of cards into one "hand" per group needed.

I'm quite confident most people could come up with the algorithm above -- no programming skills needed. But, in our world, it's still not possible for most people to do the above programmatically. The physical solution is available, of course, but it's not repeatable, and it doesn't scale up well (the beauty of the program is it is equally easy to run for virtually any number of kids, groups, and factors you need to divide by).

My solution was roughly 50 lines of code, though it could have been much shorter. It strikes me that essentially this kind of data management is a large part of what computers are useful for -- whether it be converting one kind of table into another kind of table, or iterating over data to create things. Programs like Excel and tools like mail merge offer some of this power, but they usually fall short at some point[1].

So my question is, is a tool that would put this kind of programming into the reach of non-programmers conceivable? Available? In the works somewhere? I've often thought that a desktop-wide macro recorder would be enormously useful[2] but I'm not sure that's really what I'd want. Perhaps AppleScript gets at this, but I'm not sure that does what I want.

Here's an initial list of features that such a language or tool would need to allow:
  1. Easy access to data in rows, regardless or source, and easy export of data in rows, regardless of needed format.
  2. Easy actions on data in rows
  3. Easy filtering of data.
  4. Simple string operations, search operations, etc., to turn one form of data into another.
  5. Calculations and comparisons.
  6. Shuffling, randomizing, etc.
  7. Graphical interface or other tool that makes syntax errors an impossibility and make semantic errors difficult to make. Recording macros, for example, it is impossible to make a syntax error.
I realize this may be a completely insane idea. Perhaps people who think like me (and therefore want this tool) are already programmers (and therefore don't need it). Still, I have to think there's a population of computer users who can see what makes for an automatable task but simply lacks the tools to do it.

I also have to think that given the variety of ways that data presents itself, and the ways in which people regularly need to move data between one application and another, there are many tasks that can't be anticipated by programmers of any given application, but could be automated given the right environment.

[1]In this example, they fall short in a number of places. I've had them fail at much simpler tasks though -- I wanted Excel, for example, to look at a numeric grade and give me a letter grade. Because of the limited syntax of Excel functions, the obvious solution was to use nested if statements, but it limits the number of nested function calls at 7 -- alas, I had more than 7 grades (A,A-,B+,B,B-,C+,C,C-,D,F)

[2] Growing up, I had such a tool in a very early Mac OS and found it incredibly useful). But macros can't introduce elements like randomness or even simple calculations (unless you get very clever). Trying to imagine a macro language becoming powerful for basic scripting, I'd have to suddenly imagine GUI equivalents to powerful programming and commandline tools like the random library, grep, sed, and awk, and on and on. One enticing possibility is building on something like the firefox macro extension (imacros) -- given the diversity of webpages and webapps out there, nearly everything becomes possible via macros on the web.

Friday, June 12, 2009

Here's another update on Grace's consonants. I recently confirmed that she really is using a uvular trill for a "k" (actually, realized that she seems to have two separate sounds for the "k" sounds in English, neither of them standard, but one of them is definitely a trill).
It's so much fun!



Grace's sound, roughly

Phonemes she uses the sound for (in rough "English-y" notation)
stops
d

/t/ and /d/
b

/b/ and /p/
d (back a bit)

/k/ (in "car"). We sometimes think we hear a proper "k" here but we're pretty sure it's a "d" variant, a bit like the "d" in an Indian accent.
p

/p/ in a whispered tractor sound and sometimes in "papa" (grampa). We debate whether this is a "p" or a "b", it may be an unaspirated "p" (and sometimes she whispers the whole word in an attempt at aspirating her "p"?)
nasals
n

/n/
m

/m/
fricatives & approximants


ʒ (zh)

/s/, /z/ /ʃ/ (sh),/tʃ/ (ch) /dʒ/ (j)
w (some version of it)

/ɹ/ (r) and /w/ - as in "wawa ("flower" or "water")

θ (th)

/s/ (word-terminal only) - as in "bus"

x? ʃ?

/tʃ/ (ch) (word-terminal only) - as in "beach"

Trills & funny sounds
[R] (uvular trill)

Used for the "back" K, as in "quack" and "chloe")
[ʙ] (bilabial trill)

Used joyfully and frequently for silliness
r̼ (linguolabial trill)

Used joyfully and spitfully for silliness

Thursday, June 11, 2009

User creation script

A consultant recently asked me for a copy of a script I created for our school to automate user creation. I thought it would be more useful for myself and the world if I just archived it here where I can always find it, and where other folks can use it (I find it much harder generally to find usable sample window code &c. than I do with linux).

These are my first (and hopefully last) scripts in virtual basic scripting. I'm putting them here to make it easier to share them, but these haven't really been prepared properly for sharing (I was simply working from examples until these worked). Obviously it would be worth setting these up with tweakable parameters up top at some future point.

Script for creating students


Create Users



This script creates student user accounts based on a CSV file with the following structure:

username, first, last, group, password


' Script to create student accounts
' Created by Tom Hinkle
' (or, if he's moved on,
'
' Requires file named students.csv in same directory with requisite information.
'
' File format is plain csv (no escaping) as follows:
'
' username, first, last, year-of-grad, password
'
' Note that year-of-grad is used for group names. We expect there to be an OU
' with the name of e.g. YOG2012 for each year-of-grad. Also, student folders
' are named by YOG, so we expect the students folder to contain a folder titled
' e.g. YOG2012

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Wscript.Shell")
upnSuffix = "cpcs.com"
Set objRootDSE = GetObject("LDAP://rootDSE")

dim fs,objTextFile
set fs=CreateObject("Scripting.FileSystemObject")
dim arrStr
set objTextFile = fs.OpenTextFile("students.csv")

Do while NOT objTextFile.AtEndOfStream
arrStr = split(objTextFile.ReadLine,",")
givenName = arrStr(1)
lastName = arrStr(2)
sn = lastName
cn = givenName & " " & lastName
OU = "YOG" & arrStr(3)
samAccountName = arrStr(0)
' Specify the NetBIOS name of the domain.
strNetBIOSDomain = "cpcs"
userPrincipalName = samAccountName & "@" & upnSuffix
homedir = "\\mms1.cpcs.com\students\" & OU & "\" & samAccountName
groupname = "LDAP://ou=" & OU & ",ou=Student,DC=CPCS,DC=com"

Set objContainer = GetObject(groupname)
Set objUser = objContainer.Create("User", "cn=" & cn)
objUser.Put "sAMAccountName", samAccountName
objUser.Put "userPrincipalName", userPrincipalName
objUser.Put "sn", sn
objUser.Put "givenName", givenName
objUser.Put "displayName", givenName & " " & sn
objUser.Put "userAccountControl", 512
objUser.Put "homeDirectory", homedir
objUser.Put "homeDrive", "H"
objUser.Put "scriptPath", "SLogon.bat"

On Error Resume Next
objUser.SetInfo
If (Err.Number <> 0) Then
Wscript.Echo "Unable to create " & samAccountName
End If
'On Error GoTo 0


objUser.SetInfo
objUser.SetPassword arrStr(4)
objUser.SetInfo



' Create folder, based on:
' http://www.eggheadcafe.com/software/aspnet/30289055/modifying-user-home-direc.aspx


If (objFSO.FolderExists(homedir) = False) Then
' Create folder.
On Error Resume Next
objFSO.CreateFolder homedir
If (Err.Number <> 0) Then
Wscript.Echo "Unable to create home directory for " & strSAM
End If
On Error GoTo 0
End If
If (objFSO.FolderExists(homedir) = True) Then
' Assign permissions to home directory.
intRunError = objShell.Run("%COMSPEC% /c echo Y| cacls " _
& homedir & " /T /E /C /G " & strNetBIOSDomain _
& "\" & samAccountName& ":F", 2, True)
If (intRunError <> 0) Then
Wscript.Echo "Unable to assign permissions for " & samAccountName
End If
End If
Loop
objTextFile.Close
set objTextFile = Nothing
set fs = Nothing
wscript.Echo("When you are done, you will want to go into active directory, highlight the new users manually, and add them to the group Students. You'll also need to disallow changing the password. Sorry I didn't get this done programmatically, but it's relatively simple to do manually")

Saturday, May 16, 2009

Does it count as unvoiced if the whole word is whispered?

Needless to say I've been excitedly tracking Grace's acquisition of various sounds as she learns to speak and I've been waiting anxiously to hear her first unvoiced consonant.

The other day, we came to a fine page in a book with the following text:

"The PIG is driving the tractor... putt-putt-putt..."

The putt-putt-putt is supposed to be a tractor sound (there are round poofs of smoke which illustrate the rhythm going out of the tractor tailpipe).

Grace finds this page highly entertaining, enough so that she echoed back:

"PUH PUH PUH PUH PUH!"

It was the first time I ever heard a clear "P" from her, so I was very excited. But then I realized she had whispered the rest of the word (a shouted whisper).

Oh well.

If you're curious, Grace's consonants so far are roughly as follows...




Grace's sound, roughlyPhonemes she uses the sound for (in rough "English-y" notation)
stops
d/t/ and /d/
b/b/ and /p/
nasals
n/n/
m/m/
fricatives
ʒ (zh)/s/, /z/ /ʃ/ (sh),/tʃ/ (ch) /dʒ/ (j)
approximants
ɹ (some version of it)/ɹ/ (r) and /w/
funny sounds
p/p/ in a whispered tractor sound
r* (coronal trill)Used consistently for what a duck says -- I have no idea why
[ʙ] (bilabial trill)Used joyfully and frequently for silliness
r̼ (linguolabial trill)Used joyfully and spitfully for silliness

*Katharine things this might be [ʀ] (uvular trill), which would make some more sense of it since this at least has her tongue somewhere close to the position needed for a "quack" sound (velar plosive)