August 6, 2008

Bulk view

Do what works for you; It’s not about being Gen Y, it’s about being new

Luis Suarez has just realized that being a Web 2.0 evangelist doesn’t mean getting into every new Web 2.0 tool, and he linked to Chris Brogan’s post on doing what works for you.

This reminds me of a point I’ve been wanting to think about for a while. =)

When people look at the way new generations or new hires immerse themselves in learning, they often think that they themselves could never do that, could never find the time to try out and learn all these different things.

If you’ve ever told yourself that or heard someone say that, I’d like to help you remember what it was like to be on the other side of the fence, and I’d like to remind my future self what it’s like to be here.

Yes, being new means I have no bad habits to unlearn. That’s part of it. But it’s also true that I don’t have as many good habits as you do, or even “good enough” habits that can get me through. That’s one of the things that drives me to go out there and experiment. Because I don’t have a “good” way of dealing with so many things, I need to try lots of different ways and see which ways work for me.

In other areas, where I’ve found things that work for me, I stick with them and get deeper and deeper into them. Someday, my mind might have been so shaped by the tools I’ve used that I won’t see any need or potential beyond them, and it might be someone else’s turn to explore even further.

I think that the trick, then, is to keep “breaking” things, keep stepping out of my comfort zone, so that I always feel the urge to learn something. For example, even though I’ve used Emacs for years, I’m always pushing it to do something new, and I’m always tinkering with other editors and other systems to see if I can steal any good ideas.

Helping other people also stops me from becoming complacent, becoming too comfortable with my current toolkit. When I’m helping people brainstorm, answering their questions, customizing systems to fit their needs, I learn more about them, the system, and myself. I learn in the process of teaching.

I’m not going to adopt every single thing that comes along, especially when I’ve already got something that works out quite well. (Look at how old my text editor is!) That’s okay. That kind of exploration will naturally fit other people. What I can do, though, is:

  • expand the breadth and depth of my tools so that I’m not just replacing interchangeable parts, but exploring new territory
  • keep exploring the depths and the interconnections between different tools
  • help people with as many tools as I can, especially if that takes me outside my toolkit
  • borrow ideas from other tools

That’s how I plan to mix being both new and experienced. =)

How do you keep yourself new?

Making things tangible: agile bug-tracking with LEGO!

What a creative way to make things concrete… <laugh>

Lifehacking: Switching to a rolling laptop bag

I’ve been paying attention to the preventive advice I picked up during my last session with a registered massage therapist, and I thought I’d post an update on how things are going with this life-hacking.

  • I switched to flat shoes. When the massage therapist mentioned that high-heeled shoes could be the reason why some of my muscles were tense, I said I’d switch to flat shoes. This was apparently not the way most women react. They’re more likely to say, “Sure, when they make flat shoes that aren’t ugly.” Well, I found two pairs of shoes that look presentable enough for the office. =)

    It turns out that you really do need to walk a mile in your own shoes before they’re broken-in enough to be comfortable. Both of my new pairs of flat shoes are now comfy enough for extended walks. The fancy insoles I picked up to add arch support threw me off balance and induced enough pain to make me hobble, so I got rid of the insoles. Now I just use plain liners to keep the shoes relatively clean.

  • I switched to crossing my legs at the ankles, not at the knees. Sometime after grade school, I picked up the habit of crossing my legs at the knees. I suppose it was because practically everyone else I saw did it. Probably not good for my back muscles and circulation in the long run. Stopping this behavior took a little conscious thought for a couple of days, and then it felt natural not to do it any more. Now I just cross at the ankles if I want to, all proper-like.
  • I switched to a rolling laptop case instead of a backpack. Yes, it’s a bit of a challenge getting a bulky rolling laptop case through the wickets or up and down stairs, but my shoulders think it’s a good trade-off.

There’s only one thing I’m having a hard time doing: leaning back. The massage therapist said that some of my back and neck muscles are tenser than they need to be because I lean forward instead of using the chair back. I’m not used to the idea of leaning back against the chair. It feels casual, and it sometimes means that I’m not in quite the right position to type.

Hmm…

Drupal, Emacs, and templates: Module update functions

Drupal’s coding conventions make it easier to hook into system behavior, but they also result in a lot of repetitive typing. For example, you can run code when upgrading a module by putting the code in a function named modulename_update_N() in your module’s install file. I found myself scrolling up and copy-pasting stuff too many times, so I decided to automate it instead.

I’ve been using yasnippet for my Emacs templates. All I needed to do to automate that little update bit was to write some code that figured out what the next update number should be. Here’s the snippet file I’ve just added (~/elisp/snippets/php-mode/drupal-mode/_update):

function `(sacha/drupal-module-name)`_update_`(sacha/drupal-module-update-number)`() {
  $ret = array();
  $0
  $ret[] = array(
    'success' => true,
    'query' => '$1',
  );
  return $ret;
}

The relevant functions from my ~/.emacs:

(defun sacha/drupal-module-update-number ()
  "Return the number of the next module update function.
This is one more than the highest number used so far.
This function should be called in a module's .install file."
  (save-excursion
    (save-restriction
      (widen)
      (goto-char (point-min))
      (let ((module-name (sacha/drupal-module-name))
	    (max 0))
	(while (re-search-forward
		(concat "function[ \t\n]+" module-name "_update_\\([0-9]+\\)") nil t)
	  (setq max (max (string-to-number (match-string 1)) max)))
	(number-to-string (1+ max))))))

(defun sacha/drupal-module-name ()
  "Return the Drupal module name for .module and .install files."
  (file-name-sans-extension (file-name-nondirectory (buffer-file-name))))

I can’t think of how I’d do that in Eclipse. =) Don’t get me wrong–I still like Eclipse–but I heart being able to hack my editor on the fly.