From the Canyon Edge -- :-Dustin

Wednesday, September 15, 2010

Learning to Wink, Learning to Code


My wife, Kim, isn't a hacker.

She's a kindergarten teacher. She likes to crochet, and she's pulling a needle and thread through some embroidery on the couch next to me right now.

And this is why I nearly choked on my tortilla chips at the Red Iguana in Salt Lake City a few days ago when she asked me, "When you say you're coding, what are you actually doing?", soon followed by, "So why do you hate on Java so much?"

Kim wasn't asking just to wind me up or kill time -- she was genuinely curious about my work, perhaps for the first time. Fortunately, we had a 3+ hour drive after dinner that night. In the passenger seat, she cracked open her Lenovo S10-2 netbook running Ubuntu 10.04 and wrote hello world in 5 different languages: C, Perl, Python, Shell, and Java. Kim particularly liked how Gedit color coded her syntax.

We worked through the difference between compiled and interpreted languages. Unsurprisingly, she found Perl, Python, and Shell straightforward, and C slightly more complicated.

Her favorite language after 30 minutes of experimentation was Shell, so we decided to try something slightly more interesting: input and output. Here's what she came up with:
#!/bin/sh
echo "what is your favorite color?"
color=$(head -n1)
echo "oh, $color is my favorite too"
Kim finally asked, "What is this Byobu thing you're always talking about?" Yep, I lit up like a light again. So I demonstrated Byobu for her, and she took to the status notifications at the bottom of the screen.

She suggested creating a plug in that would remind me to take a break from work periodically and have dinner :-) We shelved that one for now, and instead, she made a plug in that "winks" every few seconds. Here's her code:

/home/kim/.byobu/bin/2_wink
#!/bin/sh
if [ -f /tmp/wink ]; then
echo ":)"
rm /tmp/wink
else
echo ";)"
touch /tmp/wink
fi
She made it executable with:
chmod +x /home/kim/.byobu/bin/2_wink
And a few seconds later, Byobu is winking at her!

I'm extremely proud of Kim's keen curiosity about my work, and particularly her follow-through . I'm not sure I'll be crocheting a doily any time soon, but I am running her winky face notification in Byobu. It reminds me what a lucky guy I am. ;-)

:-Dustin

19 comments:

  1. > And we made quite sure she clearly understood the evils of Java.

    Umwhat? Evils?

    ReplyDelete
  2. I keep hearing people complain about Java, what is so bad about it?

    ReplyDelete
  3. I found out from a fellow software developer at work (female) that there is a high cross-over between female software developers and various types of needlework. It was explained to me (by her) that software creation and the needlework are actually very similar in nature. I found it very fascinating.

    BTW, what do you consider the evils of Java (I'm honestly curious of your opinion not trying to start a flame war or anything).

    ReplyDelete
  4. Awesome. That sounds like she had fun and ya'll had a nice bonding moment.

    ;) :) ;) ...

    ReplyDelete
  5. Sorry for the offensive language about Java. I have actually dedicated a new post to this topic:

    http://blog.dustinkirkland.com/2010/09/java-isnt-evil-but-its-not-for-me.html

    Thanks for keeping me honest ;-)

    :-Dustin

    ReplyDelete
  6. Don't worry, I'll teach you to crochet at UDS so when you go home you can surprise her.

    ReplyDelete
  7. Anon:
    Hi, I'm a female software developer and I do cross stitch, embroidery, crochet, tailoring, and very rarely from-scratch sewing. I've knitted on occasion too. What that boils down to is: I've been reverse engineering since before I could read*. No surprise to me, then, that thinking in algorithms seems to come naturally.


    * How do you think I learn new patterns? Eventually I sorted out how to read a written pattern, but that was after 10-15 years of doing each of those forms of threadcraft. I grew up analyzing existing pieces and recreating them.

    ReplyDelete
  8. Great comment, Maco. I've been trying to figure out the best analogies and vocabulary to use when explaining programming to Kim, in terms of thread-craft.

    I like your suggestions around "patterns" and "reverse engineering".

    :-Dustin

    ReplyDelete
  9. Dustin:
    I was crocheting a snood at SELF and wound up reciting my pattern as a few nested for-loops to one of the guys in the car to demonstrate that there are algorithms involved.

    ReplyDelete
  10. Dustin, I love it.. Maybe your wife can explain some stuff to my wife.

    ReplyDelete
  11. I hope you demonstrated Byobu after pulling over!

    ReplyDelete
  12. I felt the same way when my girlfriend learned Python. :)

    ReplyDelete
  13. Dustin, I am sorry, but I can't agree with you. In the interests of marital harmony, you are obliged to demonstrate a similar interest in your wife's hobbies as she has shown in yours. :-) I can say that because if I ever start talking about computers to my wife, she does not even try to stifle the yawns!

    ReplyDelete
  14. beautiful, I love it when people are able to understand and appreciate diff programming languages.

    Anyways I had a question on byobu. So basically I configured my ubuntu terminal to launch byobu by making it launch custom command instead of my shell. This seems to work well until I did a ssh localhost from byobu. It made it go into an infinite loop of launchin new byobu's :)

    Is it expected, bug or am I doing s.th wrong..

    Again beautiful article

    ReplyDelete
  15. beautiful, I love it when people are able to understand and appreciate diff programming languages.

    Anyways I had a question on byobu. So basically I configured my ubuntu terminal to launch byobu by making it launch custom command instead of my shell. This seems to work well until I did a ssh localhost from byobu. It made it go into an infinite loop of launchin new byobu's :)

    Is it expected, bug or am I doing s.th wrong..

    Again beautiful article

    ReplyDelete
  16. Beatiful article, Dustin!

    I'm too a Java hater.

    But there is only one thing that i hate more then Java on the IT world: Apple stuff.
    For me Apple, as company and also as pure lockin philosophy, it's really a bad thing for the market and also for the entire world.

    I'm curious, Dustin: what do you think about Apple ?

    ReplyDelete
  17. Hi anonymous,

    My thoughts on Apple? That probably deserves a post of its own. But I can summarize here:

    I don't own any Apple products. My family had an Apple IIe when I was about 7 years old, and I bought (and later sold) a PowerPC Mac Mini on CraigsList, which I needed temporarily for a special Linux-based project. I personally avoid buying Apple.

    Apple is a remarkably innovative company. Product after product are really impressive from a technical point of view.

    But I'm a software tinkerer at heart, and Apple's OS and software are not geared for free software hackers. They're not losing much market share on that front, though ;-)

    Anyway, I have a lot of respect for the inventiveness that comes from Apple. I like that they're not Microsoft. But as you mention, the vendor lock-in at Apple is pretty severe. And generally speaking, I prefer the PC platform, as I see that as more "open".

    Cheers,
    :-Dustin

    ReplyDelete
  18. Thank you for sharing your (very intersting) opionion. I mostly agree with your pov.

    The unique little difference, it's that i haven't any respect for his "inventiveness" because, IMHO, the unique good thing that Apple it's really strong, it's on pure *marketing*. As manufacturer and/or software-house i don't see any special merit or innovation, really.

    Anyway, thank you for sharing :-)

    ReplyDelete

Please do not use blog comments for support requests! Blog comments do not scale well to this effect.

Instead, please use Launchpad for Bugs and StackExchange for Questions.
* bugs.launchpad.net
* stackexchange.com

Thanks,
:-Dustin

Printfriendly