Jamie Zawinski
37
Zawinski: I usually end up putting the leaf nodes up at the top of the
file—try to keep it basically structured that way. And then usually up
at the top, document the API. What are the top-level entry points of
this file, this module, whatever? With an object-y language, that’s done
by the language for you. With C you’ve got to be a little more explicit
about that. In C I do tend to try to have a .h file for every .c file that
has all the externs for it. And anything that’s not exported in the .h file
is static. And then I’ll go back and say, “Wait, I need to call that,” and I
change it. But you’re doing that explicitly rather than just by accident.
Seibel: You put the leaves first in the file, but is that how you write?
Do you build up from leaves?
Zawinski: Not always. Sometimes I start at the top and sometimes I
start at the bottom. It depends. One way is, I know I’m going to need
these building blocks and I’ll put those together first. Or another way
of thinking about it is, you’ve sort of got an outline of it in your head
and you dig down. I do it both ways.
Seibel: So suppose for the sake of argument that you were going to
come out of retirement and build a development team. How would
you organize it?
Zawinski: Well, I think you want to arrange for there to be no more
than three or four people working really closely together on a day-to-
day basis. Then that can scale up a lot. Say you’ve got a project where
you can divide it up into twenty-five really distinct modules. Well, you
can have twenty-five tiny teams—maybe that’s a little much. Say ten.
And as long as they can coordinate with each other, I don’t think
there’s a whole lot of limit to how big you can scale that. Eventually it
just starts looking like multiple projects instead of like one project.
Seibel: So you’ve got multiple teams of up to four people. How do
you coordinate the teams? Do you have one grand architect who’s
managing the dependencies and mediating between those teams?
Zawinski: Well, there’s got to be agreement about what the interface
between modules is. For that very modular approach to work at all,
the interface between modules has to be clear and simple. Which,