Rapid Red

Your rapid development experts

Ruby on Rails by proven experts.

Everything I know about Ruby I learned from my kids

While I was up much too late last year, I did some dangerous reflecting. My conclusion?

Parenting and programming are more similar than I’d care to admit.

Just hear me out. I think I’m on to something.

If you leave too much crap around, it will wind up on the floor.
===
I walked into my kids room yesterday and found every piece of dollhouse furniture, horse, Lego, and dress-up outfit sprawled around. I laughed, because I know it could have been worse. We’d just boxed up 4 large moving boxes worth of stuff that the kids will never miss. We didn’t even think about running around putting deprecated stickers on the toys we didn’t want the kids to use.

Now, you can tell me that more choice in a programming language is always a good thing. I’ve come from Java, and I know better. One little deprecated tag doesn’t stop a method from being used any more than seventeen “warning” stickers on the latest EJB release would. People will take out the toys to play. While Java is grafting on Generics to fix bad policy (you can’t break backward compatibility, they say), the Ruby language is preparing for a 2.0 release that will break backward compatibility by fixing some real problems in the language. But when the dust settles, Ruby will be a better language for it.

Keep instructions simple, or suffer the consequences.
=====
When my daughter was three, I told her not to spill juice on our new couch. I then explained that she could not put the juice down on the coffee table when the dog was around, and she had to leave the lid on. I told her that her sippie cup was different than the ones that sealed, so she couldn’t take lay the cup down.

After my wife quit laughing hysterically, she took the kid off of the couch, and put her in the kitchen and said “Keep the juice in the kitchen, or I will take it away.” The kid left the kitchen with the juice; my wife took it away. Sometimes, I suck as a parent.

Give me a programming language that’s simple. Don’t make me jump through unnecessary hoops with type casts and checked exceptions. Mostly, XML is to be avoided, not embraced. Generics for Java are moving in exactly the opposite direction.

Instead, give me a language that gets out of my way.

You have to teach the teachers.
======
The peace corps says it like this. Give a man a fish, and feed him for a day. Teach a man to fish, and feed him for a lifetime. Teach the teachers, and feed a nation. Or something like that.

My oldest daughter had a friend come over and play. The friend had an incident involving meanness, a tube of yogurt, and the hair of my youngest daughter. I asked her about it; she laughed; I sent her home early. She’s never taken the youngest daughter for granted again. If there’s a kid in the neighborhood that likes blowing up frogs and coming home late, my kids can’t play with them. I limit TV. I have two dyslexics (and am myself dyslexic), so we’ve had to teach some public school teachers how to help our kids. (Next year, they’ll both be in a wonderful private school for dyslexics, but that’s the subject of another post.) Oh, and I married well.

The point is this. If others are more effective teachers and influences, I don’t have to work as hard to teach my kids what I want them to know. So I work hard to teach the teachers. You might be thinking, “Bruce. You’re really going to say you’re metaprogramming your kids, aren’t you?”

Yup. That’s exactly what I’m saying.

The same idea works with a language too. You start with a good language, and use it to build pieces of a higher-level language. The bigger the slice of the base language you can control, the better off you are. Ruby’s a great metaprogramming language. And metaprogramming matters.

But wait…there’s more
=======
Draw your own conclusions about these:

  • If hit hurts when you press down on it, don’t press down on it.
  • Positive reinforcement works better
  • You are what you eat
  • Nagging doesn’t work
  • Have fun
  • Immediate feedback gets you results faster

Maybe I should start calling Julia Ruby. Too far?

Blog