Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Quite some time ago I remember reading an article from 'Joel on Software' that mentioned collocation of information in code was important.

By collocation, I mean that relevant information about the code is present when the code is. I'm currently writing an article that has a small bit in it about collocation so I went searching for sources and found the quote in the article 'Making Wrong Code Look Wrong'

In order to make code really, really robust, when you code-review it, you need to have coding conventions that allow collocation. In other words, the more information about what code is doing is located right in front of your eyes, the better a job you’ll do at finding the mistakes. When you have code that says

For me, collocation isn't just about the code itself, but the tool used to view the code. If it can help with the 'collocation factor' (term coined by me?) I believe it can help with the programmers productivity. Take for example the modern IDEs that show you the variables type by hovering over it.

Are their any other articles written about collocation in code and/or are their other terms that this is known by?

share|improve this question
    
Ah yes, Joel's infamous defence of Hungarian notation. All that article did for me was illustrate the strength of strong semantic typing over the reliance of obfuscating variable names with secret code letters. –  smithco Feb 21 '11 at 4:36
add comment

1 Answer

up vote 2 down vote accepted

"Object-oriented inspection in the face of delocalisation" describes the problem in some depth, as it relates in particular to object-oriented programming. It doesn't provide solutions so much as calling for further research into the problem:

Rather, further research is required which must address: partitioning code for inspection ("what to read"), reading strategies ("how to read"), and support for understanding what isn't read - "localising the delocalisation".

share|improve this answer
    
Thanks for the answer. It would appear there really isn't that much on what would appear to be such an important factor for productivity/maintainability in programming –  Dan McGrath Feb 24 '11 at 19:34
1  
Indeed! I suspect one would need to step away from working with code in a bunch of files to "relocalise" things. There has been some work in the Smalltalk community (OmniBrowser, Whisker), but probably nowhere near sufficient work. –  Frank Shearar Feb 24 '11 at 21:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.