Morning is Broken

I'm not sure this is the post I want to post, but it's on my mind.

Today I did a positive parenting experiment. Normally Blake and I nag and cajole the girls through their morning, until we're all angry at each other and we end up rushing to school in a sweaty rush. Lousy way to start the day, so I decided to Schäfer it up: I would tell the girls what was expected of them and what I would do, and then I would step back and let them take responsibility for their morning routine.

They were forty minutes late for school.

Here's how it went down. We ate breakfast together, and then I went upstairs to take a shower and dress, with the following message: "You guys need to take your two trips [to the kitchen with stuff from the table], pack your lunches and snacks and get dressed. If you have time can you give Thomas his food and water?" At that point they had enough time to complete everything if they got on with it.

While I was in the shower they fought. While I was getting dressed they fought and then played. After I was dressed I came downstairs—the table was not cleared and they were both still in their pajamas. I carried on without agitation or urgency. I finished clearing the table while they played, them I folded laundry. At 8:30 I let them know the first bell was ringing at school—they were still in their pajamas, but at that point Delphine started to rush. She asked for, and received, help packing her lunch, while Cordelia stayed in her pajamas. Delphine tried to get Cordelia to hurry up, and she agreed to pack Cordelia's snack while she got dressed. Finally we left the house at 9:05, and signed in at school at around 9:20.

I was calm on the outside but on the inside I was freaking out while they played as if they hadn't a thing to do all day. It was a miracle of parental self-restraint. I didn't even nag on the way to school, I let being late speak for itself. (When you say "I told you so" or "let this be a lesson to you" it's called piggybacking and it turns a natural consequence into a punishment, which just gets you caught up in a power struggle and demotivates the child.) Being on time for school is not my problem, it's theirs. My job is to provide them with the tools and information to get to school on time.

Tonight we're going to have a family meeting to talk about mornings. My suggestion will be to make a morning routine poster, and I will let them know that a) I will only remind them of their morning responsibilities once, b) I will not play with them in the morning, and c) I will let them know what time it is every ten minutes. Hopefully they will come up with some ideas of how to stay focussed in the morning.

I hope tomorrow goes better. I know I'm supposed to be detached and aloof, but the school expects the parents to "get" their children to school on time, so I do feel responsible and guilty when they are late. Also, I have a few morning meetings and appointments coming up which I don't want to be late for. I'll have to review my parenting books and see what I'm supposed when my kids are making me late. In the meantime I will repeat the following phrase: "It will get worse before it gets better. It will get worse before it gets better."


What I Did Wrong: I sprung this new behaviour on them without warning. As I said, normally we nag and hustle and bother them all morning and I think that's where they get their clues as to how late they are and what they should be doing. Today I remained calm and I think the girls interpreted that to mean that we were on time, even though I told them in words that we weren't. Actions really do speak louder.

Also, we were running a teeny bit behind right from the start. Not behind enough to make us late, but behind enough that we needed to be brisk. So I would say I'm responsible for about five minutes of that forty. I would rather our mornings were leisurely but focussed, which will mean I need to be more disciplined about getting up and fixing breakfast on time.

What I Did Right: I think otherwise I applied the principles of positive parenting correctly. I remained kind yet firm, I didn't get into any power struggles, I told them what I would do rather than what they should do.

My Parenting Bookshelf

For the last six years I've been reading parenting books. I've read dozens of them, some good, some useless, but a handful stand out as books I've reached for time and again when I had a question or a problem, or just needed some reassuring company. These are the books I would buy (if I were rich) for every expecting mother I know.

Start At The Very Beginning

Well, not the very beginning—there are lots of books about pregnancy and childbirth out there, but childbirth is such an unpredictable and personal thing that you'd have to read a library's worth of books just to learn the handful of things which will apply to your situation. Your best bet is to find a good midwife and stay off the Internet.

Once the baby comes you'll want to feed it, and the best nursing advice I found (in book form—again, a trustworthy advisor is your best bet but unless you were clever enough to marry a lactation consultant you'll need a source of midnight advice) is Breastfeeding Made Simple: Seven Natural Laws for Nursing Mothers by Nancy Mohrbacher and Kathleen Kendall-Tackett. The title is an exaggeration, of course—no book can make breastfeeding simple— but their advice is soothing, practical, and research-based.

After a while your baby will be ready for, as we call it, people food, and the best introduction to the subject is Better Baby Food: Your Essential Guide to Nutrition, Feeding and Cooking for All Babies and Toddlers by Daina Kalnins and Joanne Saab. Published by Toronto's Hospital for Sick Children, this book introduces you to the nuts (actually no nuts) and bolts of feeding babies and small children, from nutrition advice to guidelines on when to introduce different foods. There are recipes for everything from purees to delicious entrees the whole family will enjoy. We love their hot and sour soup, and the chocolate chip oatmeal cookies are divine. There is a good mixture of healthy meals and homemade treats, plain food and sophisticated flavours. All the recipes are clearly written and easy to follow, with common ingredients.

My only caveat with Better Baby Food is that it was published before the latest advice moved weaning age up to six months, so their baby food recipes are suggested for four months and up.

Sleep, Gentle Sleep

The best sleep advice around is to be found in Dr. Marc Weissbluth's Healthy Sleep Habits, Happy Child. Weissbluth is pragmatic, respectful of your child's need to sleep (and yours) and insistent on the importance of a good night's sleep. I wish the book were better edited, as it is sometimes hard to slog through his academic pontificating to get to the actual advice, but once you've found it it's gold. People keep borrowing my copy.

Dear God What Next?

Children change all the time; no sooner do you think you've figured your little one out then they become someone slightly different. I have often thought to myself, sometimes dispairingly, "Is this just a phase, or is this what she's really like?" The Your N-Year-Old series by Louise Bates Ames and Frances Lillian Ilg can help answer that question. Each book comes with a subtitle which is a teaser for what you can expect in that year of your child's life; your three-year-old is "Friend or Enemy", your four-year-old is, alarmingly, "Wild and Wonderful, but then you're rewarded with a "Sunny and Serene" five-year-old.

These books have given me perspective on what my children are going through developmentally and what I can expect from them, both good and bad. Now, when Cordelia throws a giant fit because I cut her toast the wrong way, I can just wait it out with a shrug—"She's four"—rather than dispairing that I've borne a drama queen and she'll always be like this. These books make it possible to untangle the influences of developmental stage from my children's real personalities.

Discipline

No less than four books (plus two) on this topic. They all cover about the same territory but in slightly different ways, so I suppose you could pick your favourite and just read that, but I find it's helpful to reinforce this stuff periodically, and this way you don't have to do it by rereading the same book over and over.

Kids Are Worth It by Barbara Coloroso, Positive Discipline by Dr. Jane Nelsen, Unconditional Parenting by Alfie Kohn, and Breaking The Good Mom Myth by Alyson Schäfer are all books about positive parenting, or unconditional parenting, or democratic parenting, or Adlerian parenting, which are variations on a philosophy of parenting which regards children as full and equal members of the family with equal rights to respect and dignity. It's the style of parenting I have chosen because it seems most right and effective to me, and the books listed are all excellent guides to parenting in that style.

How To Talk So Kids Will Listen and Listen So Kids Will Talk by Adele Faber and Elaine Mazlish is a light but effective guide to talking to your kids (rather than at them). This book is thick with specific ideas and techniques to help you communicate with your kids. The same authors wrote Siblings Without Rivalry, which teaches how to manage siblings, with plenty of examples, cartoons and summaries.

Reading

In between feeding, disciplining and putting your children to sleep you might want to spend some time with them, and a great way to do that is in the company of books. Babies Need Books: Sharing the Joy of Books with Children from Birth to Six by Dorothy Butler is an impassioned appeal to parents to read early and often. Butler tells us not only why and how we should read, but what, with long lists of great books for every stage from birth to six.

Perspective

In the thick of all this advice you'll want some perspective. Having a second child is a great way to get perspective, as well as a good dose of humility (if you thought your child's awesomeness was to your credit) or absolution (if you thought your child's horribleness was your fault). If you're not ready for another child, though, these books will put your parenting—and all the advice you're getting—into its proper context.

The amply sub-titled The Boy Who Was Raised As A Dog: And Other Stories from a Child Psychiatrist's Notebook: What Traumatized Children Can Teach Us About Loss, Love and Healing by Bruce Perry and Maia Szalavitz is a collection of case studies of children who have gone though horrible trauma—abuse, cults, neglect—and what they can teach us about childhood development and resiliency. This book will help you because no matter what you're doing "wrong" you can't do as much harm to your child as has been done to these children, and because despite such miserable childhoods many of these kids go on to be normal, functioning adults.

Perfect Parents: Baby-care Advice Past and Present by Christina Hardyment is an overview of the crazy, yet earnest, advice given to parents (usually mothers) over the last hundred and fifty years. Parents have been admonished on topics from hugging (bad) to breastfeeding (bad) to warm baths (bad), and some of the advice will leave you open-mouthed. Following the advice is almost always presented as vital to the fabric of society, and yet somehow, civilization has soldiered on despite the failings of mothers everywhere.

How Not To Be The Perfect Mother by Libby Purves is a memoir written by Purves while she was, as she puts it, at the "coalface of practical early motherhood". Funny and pragmatic, Purves offers advice and reassurance without judgement. "A good hungry dog mooching around the high chair helps."

My children are six and four, and I expect I have at least ten years of parenting books ahead of me, so I suppose this list will change, but I've been through two babyhoods and two toddlerhoods and am now firmly in the realm of parenting children. Books have been a terrific help and comfort to me through this journey, and I hope this list can help other parents find their path.

Things To Do: Be More Awesome

Back in November I talked about those women who do a million and one things—have a career, have a nice house, do charity work, volunteer at school—and how I'm going to be more like them. So far it's going pretty well—I helped with a fundraiser at school, I'm chair of a somewhat underachieving Eco-committee (part of the problem being that whenever we think of something eco to do it turns out the school is already doing it), and so far my children haven't starved to death or sickened due to the filthy state of the house. One thing did falter: I missed a few notes in the Christmas concert because I wasn't at the dress rehearsal. Lesson learned.

But I digress. The reason I bring this up is that I realized that this ambition, to Do Lots of Things, is a subset of a bigger ambition which I have just put into words: Be More Awesome.

As I have discussed before, I see myself as a veritable well of unfulfilled potential. Sure, I have a rather lame math degree and two lovely children, but other people my age are running for city councillor and writing books and,well, being awesome. I want at least a little piece of that.

Let me digress again for a moment. The school is getting a second kindergarten playground, and the eco-committee wants it to be a natural playground, one of those jobbies with logs and rocks to play on instead of metal and plastic playstructures. Great idea, very eco. We (mostly I) came up with this idea ages ago, but I wasn't sure where to start, who to talk to, how to broach the subject. So I didn't do anything.

And then last week I busted up my back (You know why? Because in my last post I was all "I haven't hurt my back for over a year!" Stupid.) and I was stuck on the couch all week. Rather than be completely useless I did some research on natural playgrounds and then I emailed the principal. I was all, "The eco-committee is exploring the idea of a natural playground for the new kindergarten playground", and I went on to briefly describe a natural playground, and explain why we (I) thought it would be a good idea. I cc'd the vice-principal, our trustee, and the rest of the committee, and hit send.

Three minutes later the trustee replied saying he would be happy to attend a meeting about this proposal. Proposal! It was just an idea, a whim! But by writing it down and sending it to some people, it became a proposal. Thirty minutes later the principal responded with a five-paragraph email, cc'd to about a billion more people, saying that they had considered a natural playground, we should meet soon and what was my thinking? We're meeting on Tuesday.

That's it. That's all it took: an idea, some Googling and a judiciously cc'd email, and now we have a proposal and a meeting. Obviously I'm going to have to prepare for the meeting, and there will be other jobs coming down the pipeline, but all it took to get the ball rolling was one email message.

What I have learned from this is that the path to awesomeness is paved with tiny baby steps. This a truth neither profound nor abstruse, but it has been a long time coming to me. I don't like to act on things unless I know how they're going to turn out. And not just the first step, I like to know what's going to happen four or five steps down the line. I like to think things through and anticipate problems, and prepare for them. This is a wonderful trait if you're going camping, or taking two small people downtown, or going on vacation, but it has its limits. When I'm contemplating something complicated or new, or that involves other people, I can can always think of nine or ten ways stuff could go horribly wrong. Thus, paralysis. Inaction. Failure to be awesome.

A while ago I read a book called Feel the Fear... And Do It Anyway by Susan Jeffers and as you can see from my discussion of it, a) this blog post is well overdue and b) I am a broken record. The good news is that I've taken the lessons I learned from the book on board—the ideas that were new to me back in 2008 are a comfortable part of my daily coping repertoire now. So, odd as it seems, these realizations, that I am scared to act if I don't know I will succeed, and that it only takes a small step to start getting things done, actually represent progress in my quest to be more awesome.

That's the End of 2009

I got a great email newsletter from David Allen (of Getting Things Done fame) about taking stock of the year's accomplishments and completions. He included a list of categories to focus on, which I am going to use to consider how 2009 was for me and what I'm going to change in 2010.

Physical

After a c-section in 2003, another in 2005 and gallbladder removal in 2007, 2009 was refreshingly free of major or minor surgery. I don't think I had a single episode of major back pain, either, so maybe I have finally figured out how to deal with that (mainly stretching, and strategic use of ab muscles). I did some running after school started in September, but a bout of H1N1 in November sapped my motivation and I haven't run since.

I recently went to the doctor for my irregularly scheduled annual checkup and everything checked up fine, but I have gained twenty pounds I wasn't entirely expecting. (I don't weigh myself at home so the pounds have lots of time to creep on between doctor visits.) I will be addressing that situation in the new year, along with everyone else in North America. I've been very self-indulgent with my eating habits lately—I need to be more sensible about that, and I'm going to switch from running to walking in the hopes that I can slip it into my daily routine easier. I also think that doing yoga regularly would cure most of my mechanical problems.

Emotional

I have to admit this has been a difficult year for me, emotionally. I have been pretty unhappy about a couple of things—doing all the housework myself, for example—and have felt almost entirely alone with that unhappiness. Blake and I are rubbish at confrontation so I tend to never try and resolve problems with him. And they fester. As if that's not bad enough, I don't have an extra-marital emotional support system to listen and offer support and suggestions. I used to have my brother, then I had Sascha and my BF-as-it-turns-out-not-F Janet. My brother and Sascha got lives and Janet dumped me, and then Delphine was born, and I guess I haven't had any real emo needs since then, until this year. This year has been very emo but I've mainly dealt with it on my own, mostly in the basement while folding laundry. That sucks. Kat is a good ear, but I can't drop everything and cry on the phone to her whenever I'm unhappy. The laundry needs folding and she has a job.

Obviously in 2010 I have to do that a little better. What do I do? Make a new friend? One without a job or any children? Get a therapist? Start a private journal? Go to a marriage counsellor? I will have to figure something out.

Mental

Mentally I think I have held my ground this year. As I mentioned in my book blog, this year hasn't been terrifically intellectually rigorous, but I read a few thinky books and I've been keeping up with my Walruses and New Scientists. I'm happy and excited with my decision to pursue writing as a career. I love to read and think and write, and if I can possibly make some kind of money at it that would be awesome.

Next year, obviously, I have to kick the writing into a higher gear. It's very hard to get anything done in the two hours that Cordelia is at school, so I have to figure out how to focus my efforts in that time (less twitting and housework, more actual writing). I have both girls on a list for daycare starting in September, but of course paying for daycare demands that I earn an income. This is more terrifying to me than perhaps it should be.

Spiritual

I think I'm in the same place spiritually that I was a year ago. I don't think about it much. I don't believe in the supernatural but I derive a feeling of wonder from the immensity of the universe, from the magical unlikeliness of our existence, from my children. I try to be good. In 2010, more of the same.

Financial

We paid off our line of credit! Of course, Blake was on contract and he didn't pay taxes all year, so come April we may be in debt again, but for now we are debt-free. Hopefully a year from now we will be debt-free for sure.

Family

My family is awesome. The girls are going through an utterly charming patch, and I'm happy with our parenting. I haven't yelled in ages! Next year, I hope that will continue. Five and seven are both supposed to be pretty charming ages, so that looks good.

Further afield, I would like to be closer to my brother. He just moved in with a girl who I know next to nothing about, and I have no idea what's going on with him generally. I should also call my mother more often. So should you, probably.

Community Service

Before this year I wouldn't have had a lot to say in this category, but this year I did a ton of work for my kids' school, and did it ever open my eyes to the amount of free labour the school boards of Canada get from parents. I worked in the library, volunteered in the classroom, helped run a craft room for a fundraiser, went on a field trip, was class parent for Delphine's class, and signed up to head the Eco-committee.

This year I hope to actually do something as head of the Eco-committee, and I'm going to try and pursuade our School Council to donate some money to a school without so many deep-pocketed parents. I suppose I'll be roped into running the craft room again next Christmas, too.

Fun / creativity / recreation

You know, I've been thinking about fun lately, specifically in the context of play. The children play most of the time and work hardly at all—Delphine works a little bit at school, and she has a couple of jobs at home, but most of her time is free time. Cordelia is four—she plays at school and she plays at home, and her only job is feeding the cat.

But when do I play? On the one hand I'm in the very lucky position of rarely having to do something which I'm not intrinsically motivated to do. I look after the children because I love them, I take care of the house because I want my house to be taken care of. I read and write because I love to do so, I have fun volunteering for the school. There is almost nothing I do that's pure drudgery. And a lot of what I do is pure fun: most of my reading, choir, my friendships, and watching TV are all things I do for myself.

In 2010 I would like to read more, and keep singing and seeing my friends. I'm even happy with the amount of TV I watch, or rather with the quality of TV I watch. I should try and use my time more mindfully, so I don't fritter it away. I have too much fun stuff to do to spend time doing things which are merely diverting.

That's that. It's 12:21 am on January 1. I hope everyone has a wonderful year in 2010!

(By the way, you can subscribe to David Allen's Productive Living newsletter here. I've only received one, so I don't know how good they generally are, but since I used the latest one to inspire this post I figure I should at least point you to the source. I do use the Getting Things Done system and find it very effective and comprehensive.)

Small Children Are Funny Because They Don't Know Things

This post is for those of you who enjoy that particular kind of humour derived from small children saying entirely inappropriate things in all innocence. Lucky for us we have a four-year-old, so we have plenty of that.


The other day Blake and the girls and I took the bus to the Ontario Science Centre. It was a chilly morning so while we waited for the bus we huddled together, the girls in between Blake and I, like penguins. Since I don't know what sound penguins make, I said, "Buck, buck, buck, bgawk!"

With that Cordelia squeezed out of our little cluster and declared loudly, "I got laid!"


The other morning Blake was brushing his teeth, and because we have small children, he wasn't alone. He has a tongue pierce, and part of its care and feeding is that you have to brush the stainless steel balls of the jewellery every day. So, that's what he was doing when Cordelia asked the obvious question, "Are you brushing your balls?"

"Yes. Yes I am."

"You should tell Mummy!"


This one is less inappropriate. The other day my friend Kat and I watched that "David after dentist" YouTube video for the first time—the one with the kid recovering from anaesthesia and saying silly things. Kat works with little kids and I live with them, and we didn't find the video particularly funny because kids say peculiar things all the time.

Case in point: Today, after a full day, then dinner, with her jammies on and her teeth about to be brushed, Cordelia asked, "Mama, is it morning or bedtime? I don't know when it is. I forgot!"

So yeah, "Is this real?" doesn't seem all that funny.

Books Read in 2009: Year In Review

Another year, another giant stack of books. Here's how it all boiled down in ought-nine.

  • Total books read: 66
  • Adult Novels: 16, of which six mysteries, and six for the book club.
  • Young Adult Novels: 4, two of which by Kit Pearson
  • Non-Fiction: 42, of which:
    • 9 books about writing;
    • 6 books about parenting;
    • 16 how-to and self-help (or psychology) books;
    • leaving 11 others.
  • Memoir: 5, three by Bill Bryson
  • CanCon: 12

I felt like I wasn't reading much this year, and I was right. Further, it wasn't my most profoundly intellectual of reading years. I only read four adult non-mystery novels of my own accord (the rest were for the book club). I read a bunch of non-fiction books, but plenty of them were "how to decorate" or "how to garden"-type books.

Interesting that I read three more books about writing than I did about parenting. I guess I'm getting pretty confident about the latter, but still petrified to take the plunge into the former.

Here are some standout books, in no particular order:

  • Pictures of Perfection by Reginald Hill is a beautifully written mystery.
  • A Handful of Time and A Perfect, Gentle Knight by Kit Pearson both made me cry, as did
  • Elijah of Buxton by Christopher Paul Curtis
  • Free-Range Kids by Lenore Skenazy and Unconditional Parenting by Alfie Kohn pushed me to raise my parenting game
  • Dead Men Do Tell Tales by William R. Maples and Michael Browning was surprisingly profound and yet also provided me with lots of gross anecdotes for cocktail parties.
  • I called Everyday Survival by Laurence Gonzales as one the best of the year back in January when I read it, and I was right. It's astonishing in its depth and breadth, and the way Gonzales brings it all together is breathtaking. In fact, I can hardly believe it was so good—I'm going to have to read it again and see.
  • And a special mention to Getting Started As A Freelance Writer by Robert Bly for planting the seed of the idea that I might be able to earn a living at this thing I do for fun.

Next year I'm going to try and clear out at least half of the two feet of my to-be-read shelf before the end of May. I'm going to try and read more novels, and I'm going to strive, as always, to be a more attentive and thoughtful reader.

This Is the Last of Them: Books in December

A while ago I read The Ten Year Nap by Meg Wolitzer, for book club, but I forgot to write it down and therefore didn't blog about it at the time. It's about a handful of New York mothers who variously work, don't work, volunteer, don't volunteer, bake, don't bake, have great marriages or disappointing ones. It's about the choices women make about work and life, and about how you sometimes find you've made life-changing choices without really knowing it at the time.

Unfortunately nothing happens in the first 92 pages of this book. There are chapters and chapters and chapters of character development and backstory until you wish you could step into the book with a handgun just to make something happen. Finally something happens, there's a couple of chapters of action, and the book ends. It's all a bit boring and I probably wouldn't have finished it, if it weren't for the book club. Ironically I didn't end up going to the book club meeting, but I bet it was a good one. We always have more fun talking about books we didn't like, and despite the slowness of the story, this book provided plenty of discussion fodder for a group of urban mothers.

Heat Wave is a book "by" Richard Castle, the fictional protagonist of the TV series Castle. He's a well-connected mystery writer, played by Nathan Fillion, who shadows a sexy New York cop (Stana Katic) for research. The book is about a magazine writer who shadows a sexy New York cop for research. It was very disconcerting to read a book written by a fictional character, about a second-order fictional character who was clearly based on the first-order fictional character (who in turn is played by an actor who I follow on Twitter, providing yet another layer of reality/unreality confoundment). But besides that it was a clever and funny mystery very much in keeping with the TV show.

Another torturous read courtesy of the book club (it's been a bad year): Autobiography of Santa Claus by Jeff Guinn is a history of Santa Claus written as an autobiography, from the character's origins as a child named Nicolas who would be a bishop and later a saint, all the way to the portly elf we know today. Along the way Guinn explains how Santa manages to make all the toys and get all the way around the world so fast. He might explain some other stuff, but I stopped reading around the time Santa Claus convinced Queen Isabella to sponsor Christopher Columbus's search for a better route to India. The book is full of such Forrest Gumpian connections. The funny thing is, all the people that old St Nick befriends, including King Arthur, and Attila the Hun, share the same early-21st century belief system as Santa (and, I imagine, most of the readers of this book).

I love Christmas and I love Santa Claus—well, I don't mind him—but this book is simple-minded glurge. I would enjoy a real history of Santa Claus: how his story has changed throughout history, and what the changes mean in the context of their time. This is not that book.

Welcome to Blog-o!

Greetings, visitors, and welcome to our funny little blog. Blog-o! is written by me (Amy)—I'm a stay-at-home mother who loves to read, write, bake, and blog about all of those things and anything else—and my husband Blake, who is a full-time work-from-home coder who likes to bike and eat my baking.

This blog is hard to put into a category—some days it's a mommy blog, some days it's a book blog, some days it's a coding blog, some days it's just an annoying self-absorbed emo blog. It's not what you'd call a focussed writing project. But it's us, and some people think we're pretty amusing. We'd love it if you stay awhile, poke around, maybe drop us a note. Enjoy!

(Note to regular readers: I wrote a guest post for Allie at No Time For Flash Cards and she was kind enough to link back to Blog-o!, so I thought I'd better say "Hi" to those nice people.)

How folder modes work.

Earlier today, I was asked by Andreas Nilsson to give him a hand with a folder pane header bug he was trying to fix. In the middle of digging around in the code, I thought “I should really write this down, so that I can understand it later.”, and so here it is.

The main place we’ll need to change is in this object.

We start in the load method, which calls registerMode, to add the mode with its localized name. There is also a default list of modes, which will come into play later.

When the user chooses to cycle the mode, it calls the setter for mode, passing it the modename, which comes from the _modeNames list (which contains both the defaults and any newly-registered modes). Then, in the setter, if the mode is a default mode, it will fail the if-test, and get the localized name from the “bundle_messenger” string bundle. If it’s a newly-registered mode, they will have passed in a localized name which we will have stored in this._modeDisplayNames, and so we will use that.

The point of the bug is to switch the label-and-two-buttons to a dropdown menu, so at this point I think we should start with an empty menulist in the XUL, and in the load method add menuitems corresponding to the values in the _modeNames array. Then, in the registerMode and unregisterMode methods, we should add and remove new menuitems, which I’m hoping will just automatically show up in the dropdown. Finally, we need to change the setter for mode to not calculate the new name, but just select the appropriate menuitem set the mode attribute on the _treeElement, and call _rebuild(). At that point, I think we’re done, but only time will tell.

Okay, so this was really posted on Dec 22nd, but I wanted to back-date it so as not to bump Amy’s “Welcome” post off the top a mere day after she posted it.

Experiments in OpenGL (on the iPhone 3GS).

While I was at the Toronto iPhone Tech Talks, I attended the OpenGL ES sessions by Allan Schaffer. Seeing the “Shock” demo was really inspiring, and caused me to want to try my hand at some simple OpenGL Shader demos.

The base XCode OpenGL ES Application template sets you up pretty nicely for some simple experimentation, the only things that gave me any trouble were:

  1. remembering to set the identifier to ca.latte.whatever so that I could build, and

  2. remembering that the OpenGL ES 2.0 path only ran on the device, so of course none of the changes I was making were showing up on the simulator1, and finally

  3. Figuring out that depth was position.w, and not position.z. (Did I mention that I’m a bit of a newbie at this?)

Anyways, after it was all up and running, I made the x and w co-ordinates vary on a different period than the y co-ordinate, and now the square moves around in 3 dimensions in a pleasing (to me) way.

A pretty square.

Since this is intended for me to play around with shaders, I’m not going to bother updating the OpenGL ES 1.0 code path, but if you’ve got an iPhone 3GS, or a 3rd generation iTouch, feel free to grab the code at BitBucket, and play around. I'll be adding branches and tags and keeping it updated as I play with new stuff.


  1. Rune let me know that Open GL ES 2.0 is supported in the latest version of the simulator. I guess I must have been testing with an earlier version of the SDK, or XCode, or something.