Wyatt is an Intern: Part 2

I am one month into my internship, and I’ve realized that I’m enjoying it.

Alright, I’ve known all along that I’m enjoying this. But it feels like a qualified decision now. This isn’t the awe of new things like, “wow I enjoy working”, or “ooh pretty city”, it’s a genuine appreciation of having a good thing going on.

I work on Webkit. That’s pretty cool. If you already know all about how webkit works, you can go find out what stuff I’ve patched by looking around in the bugzilla. If you don’t know how that stuff works, then I don’t expect you to care – it’s not very important anyway. I’ve only done test conversions so far, and a few other small things. I’m taking some bigger steps now, as I try to make a few actual code changes in the editing section – a cool 33 thousand lines of code among 60 files. Ramping up to speed on that is what this post is about.

My approach to this is holistic, which might be stupid of me. My fundamental assumption is that the better a programmer understands the system they are working within, the better a job they are able to do. I suppose that for an ideally modular system in a perfect world that might not hold, but I think it does here. I invite debate on the topic, but ask that you bring a) evidence which suggests I am wrong or b) viable alternatives to what I’ve said. If we simply disagree, we won’t be productive πŸ˜›

So, the “holistic approach”. I’ll define that as something akin to top-down, or biggest items first. Within the editing code, there’s a class ‘Editor’. It’s a pretty sizeable class – between its headers and implementation, it’s 3-4 thousand lines long. There’s a lot of other smaller classes, too. What my approach means is that I’ll read Editor’s high level definitions, then all of its methods, and as I find things which I don’t understand, branch into them and do similar. This search is a sort of optimised depth-first — only when something seems vital, common, and confusing will I break my task and go investigate it.

In this way, you can get a large chunk of understanding in a go. I spent 10 hours or so at the end of last week reading Editor.h/Editor.cpp and branching into some other important seeming code like Page, Frame, Node, EditorClient, and others. It seems to have gone pretty well. What seemed at first like a very confusing and scary bunch of code is now beginning to fit to a mental model: the Editor has a Page and a Frame and manipulates Nodes, and has all of the “policy information” about editing actions. The editing itself is done by the EditorClient, which is implemented separately by each of the different platforms that have ported Webkit. This large-scale picture makes the task feel much less daunting. I’ll draw an analogy.

Imagine you have a large puzzle with small pieces. The biggest clue for solving it is lookng at the picture on the box. With that frame of reference, you can identify the large objects you have to work with. That’s the first step in the recursion: you broke 1 big problem down into a group of smaller problems. Now the work is to treat each of these smaller problems in the same way: find a key feature or element, and identify subelements in relation to one another. Eventually, you’ll be working at the granularity of single puzzle pieces. Stepping back to code — you’ll eventually reach the granularity of single lines.

I’d like to hear people’s strategies for understanding large, complex, and at times roughly defined systems. I’m very interested in education, and at a certain level of abstraction, I think that all attempts to learn things are attempts to construct mental models which help us navigate complex systems. So I implore you – share your insights πŸ™‚

4 thoughts on “Wyatt is an Intern: Part 2

  1. What you’re doing is so cool. And since I can’t not comment after being implored πŸ˜› :
    1) Reading your post made me realise a similarlity between top-down and bottom-up approach. Your description I would have classified as bottom-up approach, but doubling back on that since you stated it as top-down, I realise yours to be the accurate classification. And so I am taking this as top-down approach being a subset of the class of approaches called ‘holistic’ of which bottom-up would also be a subset. (Are there other holistic approaches?) This is novel to me, and I’m now sure I’ve made this misappropriation at least a dozen times before, although maybe everyone else already knew this hahaha.
    2) I know many people can learn things well in a non-holistic way. This can be very efficient to minimize the learning curve (time between feet-wet to working). However, others (myself in this group) learn much better (varying degrees of better) with a holistic approach (personally, incapable of getting to the application stage without it). I know as a student I benefit much more from studying together with people who have the same need for holistic approach as I do, but as a worker it is more productive to have a team with a mixture of both learning types (if a threshold is drawn to classify the gradient into two catagories). I think it would be interesting to try making a population study of groups of students (children? adults? dogs? primates?), and compare the time and/or amount of information required before each student becomes capable of starting to perform tasks to a reasonable amount of success, and perhaps measuring how rapidly then they are able to proceed to more difficult tasks after start of performance. I think major sources of variance could arise from the different catagories of what is being learned (language acquisition, numerical tasks, kinetic tasks, abstract vs. visual tasks, etc) as well as with age and educational background. To defend the idea that educational background would play a role, I think learning style often has a lot to do with habit (or at least gets reinforced/engrained by habit). So as a personal example, I am pretty sure that before starting higher level eduation I would have been able to learn a kinetic task without lower-level understanding, but having conditioned myself by years of study to be very used to a holistic approach, I was recently incapable of learning how to aim a “gun” (laboratory gun! not millitary!) without first understanding its component parts and being able to sketch a force-diagram to understand how to position my arm so that muscles could align in the direction the force had to be applied and bones in the way of recoil. From a production perspective, I’d throw myself out of the assembly line for the cost associated with the time and energy wasted on my learning curve, but if the educator’s aim is to have every little lemming to safety before the level is nuked, this would be a required step for some percentage of the lemmings, while others would already be tapping their toes in the bunker.
    3) It will be hilarious and a little embarassing in the kenneth branaugh sense of the word if my comment has a higher word count than the original post. See what happens when you use strong language like ‘implore’ backed up by the power of a pedestal?

  2. Stepping back on what might have sounded a little egotistical by the recommendation of an experimental approach in a world where this study has probably already been addressed; there have been of course many studies related to this topic!
    Incase anybody is looking for a little reading I will throw out a few links I stumbled upon, but with the admission that I did not by any means do a thorough search and I am sure there are more relevant and better readables out there!

    ~Human Resources & Organizational Learning empirical type links:

    1)http://i-learn.uitm.edu.my/resources/journal/learning%20style.pdf
    -flip down to pg 4 for the relevant section, a discussion of cognitive styles draws a classification scheme, and interestingly enough does call them the “-habitual- way in which an individual processes information”
    -outlines general classification scheme originally by Riding (ur-dude on the subject apperantly) broken into two dimensions, one with a subset of verbal vs. image, and the more relevant dimension subset into “wholists vs. analytics” where wholists look at the whole picture and analytics break stuff down into pieces
    -discusses classroom applications but not with a statistical model for what percentage of learners might fall into each catagory, more of the lemmings approach (unsurprisingly :P)

    2) Kevin Warburton writes some of what I would subjectively call ‘old-fashioned’ school of thinking whereby describing a holistic learner as a “deep-learner” and is a proponent of imposing this learning style on everybody. No direct link because the articles are not public :(. The main point of mentioning is in relation to both phases of the learning curve, initial feet-wet to performing tasks phase versus the improvement and moving ahead to more difficult tasks phase. Cost cutting in phase 1 only helps if no negative impact on phase 2 concept.

    3)Jones, Anne Elizabeth wrote a very comprehensive review about learning styles titles “Reflection-Impulsivity and Wholist-Analytic, two fledglings?..or is R-I a cuckoo?”
    -unfortunately not public.

    4)Learning Style’: frameworks and instruments by Eugene Sadler-Smith provides an excellent review as well as a study of university business students providing quantitative population data! w00t!

    ~Lovely irony of self-reference by approaching learning from a neurobiology perspective type links:

    1)Hemispheric Specialization, Cognitive Differences, and Their Implications for the Design of Decision Support Systems by Rao, Jacob and Lin
    -Discusses the biological inaccuracy of the left-brain right-brain ‘thing’ that we’ve all heard about.

    2)Measuring Managers’ Minds: The Assessment of Style in Human Information Processing by Robey and Taggart
    -Tries to elucidate information processing with measuring beta waves in the brain (and this hemisphere stuff, its older than the first link)
    -Seems to be a lot of handwaving. my opinion: not enough is known about brain function for cognitive style to be understood on a bitwise basis. Especially not in 1981 when this was written πŸ˜‰
    Physiological studies seem to be at the level of dopamine receptors being linked to motivation which might relate to behaviour which might relate to congnition, and structural differences in children and adolencents that show age-related differences to the parts of the brain that might have something to do with motor and speech functions…in so many words too low-level to be related to cognitive styles.

    ~Douglas Adamist humans are actually only the 3rd most intelligent species on earth type links:

    1) Coussi-Korbel and Fragaszy, On the relation between social dynamics and social learning
    -unfortunately not public so no direct link. discusses social learning in animals. mostly of interest for definitions that can be applied to learning in animals such as birds, very different from humans so maybe find something fundamental there from an ecological instead of biological perspective.

    An additional thought on the topic of habit:
    Possibility that it is sometimes beneficial to force people out of their learning patterns and comfort zones to induce development. University programs often encourage that students try to both learn more holistically in the classroom while learning modular subroutines in a practical environment, so that by overlay of the subroutines learned in depth, over a more skeletal holistic framework, provides overall a more dimensioned understanding of the subject (oh no, now I am wondering if understanding of a person can be modeled in 3-space, and a weighted-variable volume optimization problem be applied to solving how much fundamental to practical, holistic to modular eduation be provided. What is the shape of the understanding of a novice versus a master? Along which vectors must the shape expand to reach full form? Is there a time component of expansion rates changing over time?) –But the point being, that in such a multi-directional approach to learning, many students find themselves pushed out of their comfortable learning style some of the time, which might be beneficial to overall growth, to be forced to at least try all different angles.

  3. Although overly specific, I find that looking at past CLs or bug reports helps when creating that mental model you mentioned. Often, you can see the evolution of a project/module and the design decisions that went into the code you’re currently modifying.

    P.S. Why no +1 button? πŸ˜‰

  4. Just wanted to point out something that is perhaps obvious and not worth pointing in response to your RFC on knowing the system you work on.

    Of course the long list of good reasons to know your system includes:
    -Knowing which features are available and which you could/should leverage in your solutions
    -Ensuring compatibility with the rest of the project and promoting maintainability by keeping with the set standard

    The one pitfall that can happen however, is that assumptions can be made that perhaps shouldn’t be. Assuming that your system will continue to function in the way you know it to exist now can lead to problems down the road. Of course, proper software development processes would avoid this. Proper unit tests on the section you’re modifying and the sections that it talks to would largely mitigate the risks.

    Just my two cents.

Leave a Reply

Your email address will not be published.