One of my favorite features of Grace's language right now is a simple rule that she has that, it seems to me, is the same as the rule for forming plurals in Spanish. My guess is that this is a rule of syllables rather than a rule of grammar per se, which is interesting because of what it seems to imply about Grace's perception of English (or does it? Truthfully, I have no idea).
Grace's rule is as follows:
- If a word ends with a consonant and you need to add an "s", you add "[iz]" (normal spelling=eeze).
- If a word ends with a vowel and you need to add an "s", you add "z" alone (this is the standard English rule).
The result is some pretty adorable sentences, such as the following, which I heard (it seems) several thousand times last night:
[no, mo bʊkiz] (Nooo, mo' bookies) - No, more books!
The explanation that comes to mind right away is that Grace has a similar template for syllables as, e.g., Spanish and Italian, where a syllable can consist of [CONSONANT + VOWEL + CONSONANT], with both consonants being optional. Of course, in standard English, as many as 4 consanants can stack up, as in "sixths" ([sIksθs]).
I have no idea if this is the "right" explanation. If it is, it's consistent with other consonant reductions in her speech, which I think are pretty universal to toddler speech, such as:
stuck -> tut (reduction + duplication)
spinning -> tinning
etc.
It's hard to know whether she *hears* "stuck" as "stuck" but then says "tuck", or whether she hears "stuck" as "tuck" in the first place (or as "tut"). It's hard to believe that she could hear books" as "bookies", though.
Another complication: I'm pretty sure she says the following:
[næns] for "dance" (standard: [dæns]).
That would imply that maybe her syllable template prohibits a stop to be part of a consonant cluster, but allows clusters with nasals (and probably liquids etc).
Thoughts from a language teacher who also happens to be an armchair linguist,an amateur musician, a programmer, and a new father.
Wednesday, December 23, 2009
Monday, December 7, 2009
Why it's hard to say you're "fluent"
Here are some things Grace can say, at 2, that I don't know how to say in Spanish, in spite of years speaking and teaching the language:
* Jellyfish
* Reindeer
* Futon
Okay, that's my whole list for now, but the point is, vocabulary comes in strange ways. There are probably hundreds of words your average Spanish-speaking four or five year old knows that I don't know, even though I am basically fully conversant and of course have all of the educated vocabulary five year olds don't have. Words for plants and animals (which, oddly, seem so much important in toddlerdom than adulthood), words for parts of cultural rituals, and on.
* Jellyfish
* Reindeer
* Futon
Okay, that's my whole list for now, but the point is, vocabulary comes in strange ways. There are probably hundreds of words your average Spanish-speaking four or five year old knows that I don't know, even though I am basically fully conversant and of course have all of the educated vocabulary five year olds don't have. Words for plants and animals (which, oddly, seem so much important in toddlerdom than adulthood), words for parts of cultural rituals, and on.
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.
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:
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").
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.
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:
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.
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:
- Easy access to data in rows, regardless or source, and easy export of data in rows, regardless of needed format.
- Easy actions on data in rows
- Easy filtering of data.
- Simple string operations, search operations, etc., to turn one form of data into another.
- Calculations and comparisons.
- Shuffling, randomizing, etc.
- 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 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!
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
This script creates student user accounts based on a CSV file with the following structure:
username, first, last, group, password
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...
*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)
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, roughly | Phonemes 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)
Wednesday, May 13, 2009
Now that's style...
From google docs...
This is actually a bit annoying as I'm using google docs for a time sensitive assignment... but nonetheless, I appreciate their astonishing dedication to the half-full glass. I should work on some error messages like that for Gourmet.
The bad news is that Google Docs has just encountered an error.
The good news is that you've helped us find a bug, which we are now looking into.
This is actually a bit annoying as I'm using google docs for a time sensitive assignment... but nonetheless, I appreciate their astonishing dedication to the half-full glass. I should work on some error messages like that for Gourmet.
Friday, April 10, 2009
Two experiences with customer service, a world apart
Since we've gotten two new gizmos here over the past month (dell mini + kindle2), I've had a few chances to enjoy giant-corporate phone support. At times past I've felt like all companies end up being equally frustrating, but my recent experiences leave me feeling otherwise. Here's a look at two very different experiences -- Amazon and Dell.
Dell:
I had various issues with my dell laptop's ubuntu installation out of the box. First, the weekend I got it, the Dell software repositories were down for a few hours, so no kind of update or installation would work at all (I had no way of knowing at the time that this was a temporary problem). Next, a number of things weren't working too well -- the machine had crashed several times (more than any linux machine I've ever used before), ssh was not working (so I couldn't copy all my working files from my other machine over our network), and I had found a reproducible bug that crashed the dell launcher every time I changed the background. Finally, I had questions about whether and how to update the machine from 8.04 (what it came with) to 8.10 (what is current); the standard ubuntu procedures didn't seem to be supported, but it seemed like it would be worth trying an update to see if it fixed some of the issues I was experiencing.
I went to Dell's website to see what I could see. I found a phone number and a chat support link. I called the phone line and opened up the chat support, figuring I'd learn which was faster. The chat took about 10 minutes to connect me with a service representative. I had to type in the service code from the back of the computer, etc., before I could describe my problem to them. When they learned the issue I had was with their ubuntu set up, they informed me I had to call a phone number (a different number than the one listed in my docs on the machine and on the website). At this point, I hung up the phone (I was on hold all this time) and called the new phone number. I was on hold on the order of 45 minutes before being connected to a service representative, to whom I had to read various serial numbers off of my laptop etc. When she learned that I needed support with their ubuntu installation, she told me I needed to talk to their ubuntu experts who were only available from 10-5 (it was 9:50 at this time -- I'd been trying to get support for over an hour at this point).
At 10, I did try calling the number I'd been given again, but when I heard tones and a computerized voice saying "you're being forwarded", I got suspicious I'd been moved out of the ubuntu support area anyway, and gave up entirely.
Amazon:
Katharine's new kindle developed a dead pixel (or rather, a dead line -- a whole one-pixel-wide vertical line of white) some time a few weeks ago. When you're reading, you barely notice it, but it's the kind of thing that's worth getting repaired while it's under warranty.
Today I decided to get around to calling support. I googled "amazon kindle support" and the first web page I found informed me that I could call, or I could sign in with my amazon account and have them call me, in which case they'd have all of my information ready. That sounded better to me, so I signed in under Katharine's account (to which the kindle is registered). I chose "hardware defect" from a dropdown menu of potential problems, chose "now" from a menu of times at which I'd liked to be called, entered my phone number, and clicked "Call me".
A window popped up telling me the phone was ringing and sure enough my phone rang. A computer voice told me I'd be waiting for 1 minute. In a few seconds I got a human. He confirmed that I really was Katharine by asking for my name and address (okay, I'm not Katharine, but I know enough to fake it). He talked me through how to hard reboot the kindle. I was pretty sure this wouldn't do anything, and sure enough it didn't. He confirmed that this sounded like a hardware issue and said a replacement kindle would be in the mail today and would most likely arrive by Monday. He said an email would go out to Katharine with tracking information, information on sending the defective kindle back, and directions on registering the new kindle to her account.
The whole process was done in just under 9 minutes (my phone has a timer, so I know).
Conclusions:
In both cases, I was calling tech support for a new product (Dell has just released the Mini-12 with ubuntu, within the past few months; the Kindle2 is under a month old), so in both cases the support training etc. must be relatively fresh. But the design, polish, and programming behind these two systems was worlds apart.
In Dell's case, they seemed determined to disappoint at every step. Their advertised 24/7 support does not apply for software issues. Add to that a slew of technical problems in their ubuntu setup and you have a lot of frustrated ubuntu users. But when you try to access them through their phone and chat support, you get bounced around on the phone with no indication of where you are, how long you'll be there, or how close you are to getting help.
Amazon doesn't offer 24/7 support either, but when you go to their website, it's very clear what they do offer (the hours are right there). They also make it easy for you to save them time and money by having them call you after you've logged in, which gives them all of your account information and so on and prevents you from having to read awkward serial numbers in on the phone. The minute I got on the phone, Amazon gave me an estimate of how long I'd be waiting, so I knew whether I should settle into some other task while on hold or not. When I got a hold of a representative, the representative already knew everything about me, so all I had to do was confirm my address (I didn't need to spell anything out since he surely had the info in front of him on a computer screen).
Dell obviously understands that phone support is frustrating -- they've added chat support which is surely cheaper for them to implement and less annoying for many customers. But they haven't linked any of this to your account information (which would bypass all of the serial code reading), and they haven't linked their website directly to their phone system.
I realize Amazon had a lot of advantages in this comparison -- a hardware problem is easier to diagnose and support than a software problem; they also obviously had more call center people on hand when I called. That said, a lot of this is simply a question of design. Even with the same resources, I'd imagine if Amazon had designed Dell's system, my experience would have gone something like this:
1. I go the Dell website, log in under my account, and then say I need support.
2. I answer a few quick questions (drop-down menus) that determine that I have a software problem and I have the Dell-supplied Ubuntu 8.04 operating system.
3. I come to a screen that tells me that Ubuntu support is available from 10-5. I can either call a phone number listed there, or enter my phone number to have Dell call me at a specified time between 10 and 5. I click "call me at 10"
4. At 10:00 I get a call with an estimated wait time. Presumably even with the same staff, my wait time will be substantially less now that my call has been directed correctly, since their phone support people aren't being tied up redirecting misdirected customers, having people read out serial numbers, and so on.
Surprisingly, the redesign would actually improve my experience by replacing two human-to-human interactions that I had with computer interactions: first, instead of chatting with a person, I could have used a dropdown menu to tell them the nature of my problem; second, instead of waiting on hold to find out when software phone support was open, the web page could have told me. I know humans are normally nicer to talk to than computers, but when all you want is to give some basic information, a well designed form is much better than a human you have to wait to talk to.
A final note: I have no idea how good the Dell techs are at troubleshooting and supporting you over the phone, because I never got to one. Now that I know it takes upwards of an hour to contact them, I'm highly unlikely to call their support again.
Luckily, google has a plethora of information about all things linux, so I was able to learn a few key things that Dell support likely wouldn't have known anyway, such as how to fix ssh on their install (which is broken by a broken wireless setup by default), how to activate ubuntu repositories properly for the low power intel architecture dell shipped with, and why upgrading to 8.10 won't work yet (even though a Dell salesperson told me she was pretty sure it would).
Dell:
I had various issues with my dell laptop's ubuntu installation out of the box. First, the weekend I got it, the Dell software repositories were down for a few hours, so no kind of update or installation would work at all (I had no way of knowing at the time that this was a temporary problem). Next, a number of things weren't working too well -- the machine had crashed several times (more than any linux machine I've ever used before), ssh was not working (so I couldn't copy all my working files from my other machine over our network), and I had found a reproducible bug that crashed the dell launcher every time I changed the background. Finally, I had questions about whether and how to update the machine from 8.04 (what it came with) to 8.10 (what is current); the standard ubuntu procedures didn't seem to be supported, but it seemed like it would be worth trying an update to see if it fixed some of the issues I was experiencing.
I went to Dell's website to see what I could see. I found a phone number and a chat support link. I called the phone line and opened up the chat support, figuring I'd learn which was faster. The chat took about 10 minutes to connect me with a service representative. I had to type in the service code from the back of the computer, etc., before I could describe my problem to them. When they learned the issue I had was with their ubuntu set up, they informed me I had to call a phone number (a different number than the one listed in my docs on the machine and on the website). At this point, I hung up the phone (I was on hold all this time) and called the new phone number. I was on hold on the order of 45 minutes before being connected to a service representative, to whom I had to read various serial numbers off of my laptop etc. When she learned that I needed support with their ubuntu installation, she told me I needed to talk to their ubuntu experts who were only available from 10-5 (it was 9:50 at this time -- I'd been trying to get support for over an hour at this point).
At 10, I did try calling the number I'd been given again, but when I heard tones and a computerized voice saying "you're being forwarded", I got suspicious I'd been moved out of the ubuntu support area anyway, and gave up entirely.
Amazon:
Katharine's new kindle developed a dead pixel (or rather, a dead line -- a whole one-pixel-wide vertical line of white) some time a few weeks ago. When you're reading, you barely notice it, but it's the kind of thing that's worth getting repaired while it's under warranty.
Today I decided to get around to calling support. I googled "amazon kindle support" and the first web page I found informed me that I could call, or I could sign in with my amazon account and have them call me, in which case they'd have all of my information ready. That sounded better to me, so I signed in under Katharine's account (to which the kindle is registered). I chose "hardware defect" from a dropdown menu of potential problems, chose "now" from a menu of times at which I'd liked to be called, entered my phone number, and clicked "Call me".
A window popped up telling me the phone was ringing and sure enough my phone rang. A computer voice told me I'd be waiting for 1 minute. In a few seconds I got a human. He confirmed that I really was Katharine by asking for my name and address (okay, I'm not Katharine, but I know enough to fake it). He talked me through how to hard reboot the kindle. I was pretty sure this wouldn't do anything, and sure enough it didn't. He confirmed that this sounded like a hardware issue and said a replacement kindle would be in the mail today and would most likely arrive by Monday. He said an email would go out to Katharine with tracking information, information on sending the defective kindle back, and directions on registering the new kindle to her account.
The whole process was done in just under 9 minutes (my phone has a timer, so I know).
Conclusions:
In both cases, I was calling tech support for a new product (Dell has just released the Mini-12 with ubuntu, within the past few months; the Kindle2 is under a month old), so in both cases the support training etc. must be relatively fresh. But the design, polish, and programming behind these two systems was worlds apart.
In Dell's case, they seemed determined to disappoint at every step. Their advertised 24/7 support does not apply for software issues. Add to that a slew of technical problems in their ubuntu setup and you have a lot of frustrated ubuntu users. But when you try to access them through their phone and chat support, you get bounced around on the phone with no indication of where you are, how long you'll be there, or how close you are to getting help.
Amazon doesn't offer 24/7 support either, but when you go to their website, it's very clear what they do offer (the hours are right there). They also make it easy for you to save them time and money by having them call you after you've logged in, which gives them all of your account information and so on and prevents you from having to read awkward serial numbers in on the phone. The minute I got on the phone, Amazon gave me an estimate of how long I'd be waiting, so I knew whether I should settle into some other task while on hold or not. When I got a hold of a representative, the representative already knew everything about me, so all I had to do was confirm my address (I didn't need to spell anything out since he surely had the info in front of him on a computer screen).
Dell obviously understands that phone support is frustrating -- they've added chat support which is surely cheaper for them to implement and less annoying for many customers. But they haven't linked any of this to your account information (which would bypass all of the serial code reading), and they haven't linked their website directly to their phone system.
I realize Amazon had a lot of advantages in this comparison -- a hardware problem is easier to diagnose and support than a software problem; they also obviously had more call center people on hand when I called. That said, a lot of this is simply a question of design. Even with the same resources, I'd imagine if Amazon had designed Dell's system, my experience would have gone something like this:
1. I go the Dell website, log in under my account, and then say I need support.
2. I answer a few quick questions (drop-down menus) that determine that I have a software problem and I have the Dell-supplied Ubuntu 8.04 operating system.
3. I come to a screen that tells me that Ubuntu support is available from 10-5. I can either call a phone number listed there, or enter my phone number to have Dell call me at a specified time between 10 and 5. I click "call me at 10"
4. At 10:00 I get a call with an estimated wait time. Presumably even with the same staff, my wait time will be substantially less now that my call has been directed correctly, since their phone support people aren't being tied up redirecting misdirected customers, having people read out serial numbers, and so on.
Surprisingly, the redesign would actually improve my experience by replacing two human-to-human interactions that I had with computer interactions: first, instead of chatting with a person, I could have used a dropdown menu to tell them the nature of my problem; second, instead of waiting on hold to find out when software phone support was open, the web page could have told me. I know humans are normally nicer to talk to than computers, but when all you want is to give some basic information, a well designed form is much better than a human you have to wait to talk to.
A final note: I have no idea how good the Dell techs are at troubleshooting and supporting you over the phone, because I never got to one. Now that I know it takes upwards of an hour to contact them, I'm highly unlikely to call their support again.
Luckily, google has a plethora of information about all things linux, so I was able to learn a few key things that Dell support likely wouldn't have known anyway, such as how to fix ssh on their install (which is broken by a broken wireless setup by default), how to activate ubuntu repositories properly for the low power intel architecture dell shipped with, and why upgrading to 8.10 won't work yet (even though a Dell salesperson told me she was pretty sure it would).
Friday, April 3, 2009
I'm famous...
Monday, January 19, 2009
Weekend in food
So this weekend in food I...
- Made injera (or rather I made an injera hack -- made with regular wheat flour and only a half-day's fermentation). Injera + a nice flavorful stew + lentils + a couple of pastes/sauces to add more heat for the grown-ups made for a highly entertaining meal. For Grace, I just spread the bread on her placemat and spooned lentils, meat, etc. onto her plate. For once we were all eating with our hands, so she was right in place. Though the flavor was off, the texture of the injera was just right, and the whole point is that it does such a good job soaking up the other flavors anyway. Once the meat and sauces hit the bread, it was pretty awesome.
- Made two loaves of raisin bread with Grace. Making bread is becoming a tradition -- she loves helping me knead. We ate one loaf almost instantly, but still haven't cut into the other. It will make nice toast whenever we break into it.
- Made brownies with the Obama logo on them for tomorrow. I actually made two pans -- one round with the Obama logo and one square, on which I attempted to do an Obama silhouette. I had to abandon the silhouette, which resulted in a vague blue and red tie-dye look... oops. I'll be cutting those into squares so they look less like a screw up.
All of this is pretty firm evidence that I had a boatload of work to do this weekend... nothing like procrastination to make me ambitious in the kitchen.
Saturday, January 17, 2009
Lullabies
It turns out that if I limit myself to the first five frets of the guitar, I can put Grace in the sling, sit in my desk chair, and play. Luckily the arrangement of the Brahms lullaby I've worked out is easily played in the first five frets.
Sweetest thing in the world: watching your baby fall asleep on your shoulder while you play.
Sweetest thing in the world: watching your baby fall asleep on your shoulder while you play.
Subscribe to:
Posts (Atom)