My Checkbox Does Nothing!
Top down and bottom up are two different and complimentary design and implementation strategies I use when programming every day. Both have a place and both have strengths and weaknesses which complement the other. I typically design top down and implement bottom up. I find this helps me conceptualize large problem domains and what parts I need to work towards while remaining firmly grounded in a working and growing implementation. I’ve been doing this without consciously acknowledging it until recently, it just kind of “made sense” to me and I took that for granted and have been doing it for years.
I recently worked on a work project with another developer who implements top down. I’ve worked on large projects with many people before, but I was working pretty low-level in the guts of game code and my stuff had to interface with existing material. In school I worked on multi-person projects, but nearly always ended up carrying the bulk of the code on my shoulders and directing development efforts in my own way. This is in contrast to developing a system from scratch with another developer in a roughly 50/50 situation.
I was shocked when I encountered a form in which only half of the fields actually did anything. Of course I’ve done pen and paper or Photoshop mock-ups of interfaces before building them, but it is rare that I will lay an interface down before making sure I’ve got all the things it is supposed to be interfacing with done (or at least done to a testable state so that the interface can interact with my code). Or, if I do, I’ll incrementally add on to the interface as I go.
I don’t trust myself and so I always work in such a way that an incomplete portion of the system is blatantly obvious, especially when there is danger of something being missed as in a half-working interface with no indication as to which half is working. This top-down approach to implementation struck me like a whip and put me on edge. I found myself wondering how much of what I was looking at worked and how much of it was simply frosting over an abyss. It made me uneasy. The same would be true if I were looking at a class structure and found that the dependencies of that class did not exist.
I feel much safer building a system by top-down analysis (to avoid interfaces not matching up) and bottom up programming because you’ve got a pretty good idea of how things fit together and you stay grounded with working sub-systems. I can’t really envision how working the other way around could build a reliable system, it seems like you would be stuck patching up holes hidden by the facade you initially created and hoping you got them all before the deadline.
Any thoughts?