Just because it's there, doesn't mean you should use it. |
No, but I didn't say that. I said that it should be /considered/, just like you say:
You should assess each feature of the language and decide if it's use is applicable, or a best practice |
(Er, might be that my understanding of "consider" is not completely what it really means. My dictionary tells me that I used it when I should have used "assess"...)
High level design documentation should have "pictures" (UML, CASE etc diagrams) |
These are diagrams showing the structure of the code. They don't show algorithmic aproaches, data visualizations from program tests and alike.
It's more than just this. Any half-decent company with Software Developers should have a formal standard of what methodology, coding style etc to use. |
In the case of literate programing, (at least with noweb, the program I use) the code generated by "make source" /can/ be 100% compliant with any company policy. It wolud be rather stupid to write "usual" comments in a literate program, giving up all the formating power (formulas etc.), but then again it is possible to extract the tex documentation chunks as comments (would take a script, I didn't need that until now...).
For small programs with complex tasks I can see some very good uses for this. |
Thats how it started for me....
But for large programs, or multi-developer teams, I would see this as an obstacle to development. You 1 file application would be an example of this, it'd be very impractical to have more than just yourself working on it.
[...]
Literate programming, as described by the web-site, and shown by your work to me is definitely not a scalable real-world development methodology. While it may have worked well for your 1-developer project. I could never see this being a practical methodology for a 20+ person development team. |
20+ persons might be difficult, I agree. But that would depend on the organization and architecture. I have learned that not using a signle file is more of a "conservative concept", something one is /used to/, but not really because it is the only feasable approach. The whole concept of files has flaws, I think: how do you sort your music collection (if not on a computer, in form of CDs, which I would then view as files)? After composer, interpret, genre, mood, ...? No matter how, it is sorted the wrong way when you look for something special. And when you use a database which manages the tags of individual files, how large should the files be? One symphony? Or one movement? 1:30 minute pieces? You remember how something was like, but not the names you have to look for.
These problems cannot be solved by putting all files into one, that's correct. But having files as an "orientation guide" is not as intuitive and useful as often assumed. And working in one file on source code, searching for something using regex has become much more useful for me thang going over several files, looking through all (and on team projects, where I have to, I use grep to do it - thats a 'Esc !grep <regex> ../include/* -R intead of '/<regex>', which is OK but certainly not "better" - and yes, you may declare me completely crazy for using VIM instead of an IDE).
Another example here is the .cpp/h splitting. Surely you know the Pimpl Idiom. Problem: the declaration of private members is not in the header where you would expect it. With noweb, I write (code chunks only, no documentation...):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
<<class declaration>>=
class C
{
struct impl;
<<class impl data members>>=
int* a;
int* b;
<<class declaration>>=
std::auto_ptr<impl> pimpl_;
public:
...
};
...
<<classes impl>>=
struct C::impl
{
<<class impl data members>>
...
};
@
|
Now, the members are extracted to the right code file for the compiler, but are listed were they belong - to the class that uses the impl. (You might consider the Pimpl Idiom "not good" for this reason or whatever else, please don't bother about this special case, think about cases in your code where this extra abstraction yields in more "locality for the reader" - where the reader can be the implementor, library user, maintainer, ... Note that not only source code, but also configuration files, testing scenarios etc. can be contained in this form right were they are applied.
What scale of development have you worked on? |
I get an engine which I have to use, and I can complain about it but that doesn't change anything, so I count the development team for the engine out (and any component developed similarly)... after that, the team size is ~5-8 developer, so quite small. Furthermore, until now only two of us were using literate programming. Noone else ever noticed, until my superviser onece dropped by when I did some implementation... Working with 2 people on one file is quite different from 20+, yes. But I'm pretty sure that much of it would scale, and that the rest could be re-designed to become scalable (I wouldn't have said that and been pretty sceptical if heared that about 2 years ago, so I understand if you say "grow up and work in a real team...").
I think that it would scale because it the extra abstraction allows for new ways to split the code: one can write high level blocks, like
<<merge sort>>=
<<split data if not sorted>>
<<merge now sorted data>>
@
the other one can implement the low-level blocks. CVS will notice that no confilcts are present... Or, one can write the chapter "Data Structures Supporting Ranges", the other one the chaprer "Algorithms on Ranges". The chapters are physically seperated, so a CVS merge does it all.
I can 100% guarantee that your code is not 100% Bug Free |
But you *did* get that it was ment as a joke, didn't you