The Code Is The Design 354
danielread writes "In 1992 C++ Journal published an essay by Jack W. Reeves called 'What Is Software Design?' Many credit this essay as being the first published instance of assertions such as 'programming is not about building software; programming is about designing software' and 'it is cheaper and simpler to just build the design and test it than to do anything else'. developer.* Magazine has republished this groundbreaking essay, plus two previously unpublished essays, under the title Code as Design: Three Essays by Jack W. Reeves."
Oh Boy. (Score:5, Funny)
The UML monkeys are gonna have a fit!
Re:Oh Boy. (Score:5, Insightful)
Well, I am no UML monkey and I have seen software development process overdone so badly even the lowliest coder had rigor mortis. But let me share a few experiences that may be exceptional but I doubt it.
Re:Oh Boy. (Score:5, Funny)
Re:Oh Boy. (Score:4, Funny)
It's not any more? Damn! I just spent all day recoding the highly readable 50 lines of C++ I wrote yesterday as a single line Perl before checking it in.
Re:Oh Boy. (Score:3, Insightful)
The best way I have ever heard someone explain how you can tell of an interface is good is if you look at it and think, "Of course. How else would you do it?". The design is natural and flows well for your average *skilled* programmer. If someone is very taltented but no one else can understand their designs then the code is not maintainable. Code that is not maintainable is not good. Creating unmaintainable code is something BAD programmers do. So you should consider th
Re:Oh Boy. (Score:3, Insightful)
And I maintain that UML is to programmers what bicycles are to fish...
Re:Oh Boy. (Score:4, Insightful)
We never found that useful, but what we did do was generate all header and implementation files from the diagrams. To change the class, you changed the diagram and regenrated the files. This way ensured the diagrams accurately reflected the static interdependecies among classes. All the real logic was in the code blocks, of course, which the tool simply copied verbatim from version to version.
Was it useful? I guess so. I'm not sure it was more useful than the same information extracted into in a textual document more like Javadoc though.
Anyways, yeah, you need requirements and specifications too. But don't forget those requirements and specifications are just as buggy as code that's never been compiled or run, because that's exactly what they are - very high level pseudocode, that can't be subjected to the rigor of execution in themselves.
i think in uml therefore why draw it (Score:3, Interesting)
diagrams, but I see spending 4hrs drawing some crap as a waste when I could have completed the code by then.
I tend to write my code as nice as possible that even a drunk coder could understand it.
I may code up stuff fast with out UML diags, but if people/others need to maintain it, doing a high level UML or layout diag is easy enough to do on demand. Somethings are sometimes too easy to comprehend so id rather not waste hours doing fancy diagrams putting m
I'll Add... (Score:4, Insightful)
Re:I'll Add... (Score:2, Insightful)
Re:I'll Add... (Score:5, Funny)
Re:I'll Add... (Score:2, Insightful)
Re:I'll Add... (Score:5, Insightful)
Re:I'll Add... (Score:4, Interesting)
Ye whimsical faerie of yore
Whence came thee upon me?
Forlorn sit I stilled,
Prey to thy designs.
Now, the author wrote about his helplessness at dealing with his past.
Just because you can't understand what he said does not mean he should not have said it.
Perhaps it is the skill of the reader that must rise to match that of the author?
Perhaps it should be rewritten like this:
Memories from a hidden place make me sad?
Still too poetic, less descriptive?
How about: I am saddened by a memory.
You can make good code go bad by writing for the least common denominator in your organization (always the worst programmers)
Managers: You can raise code quality by letting go your bad coders. Not because they won't be writing bad code, but because the other coders will be able to write more powerful code.
Re:I'll Add... (Score:3, Interesting)
An extreme extension of your statement would be that the instructions for the machine have less gravity than the instructions for the devel
Re:I'll Add... (Score:5, Interesting)
Alas, of late I've been dealing with stuff that doesn't have embedded comment docs and so I haven't been able to do that as much.
Re:I'll Add... (Score:2)
Don't ask me why, but I like this page.
Debug only code - comments can lie. [javaranch.com]
Re:I'll Add... (Score:3, Insightful)
Comments shouldn't be telling you what the code is doing, they should tell you why it's doing it.
boiler plates (Score:2, Insightful)
Re:boiler plates (Score:4, Insightful)
Fair enough, but would that same programmer have produced a decent design anyway? UML, pseudo-code, anything?
In my opinion if their code is disorganised, their design would be too.
Cheers,
Ian
Re:boiler plates (Score:5, Insightful)
Six Laws of the New Software (Score:4, Interesting)
Six Laws of the New Software [slashdot.org]
ideally this would be true (Score:2, Insightful)
While we are at it, the comments are not needed either (there should be a compiler warning for them).
(not completely joking)
In practice languages are too low level no matter what you use or have "leaky abstractions" which cause problems.
Re:ideally this would be true (Score:2)
In the "old days" we had architecture, design and coding. For all the UMLs, extreme programming, etc. we essentially have these.
Re:ideally this would be true (Score:3, Interesting)
(not completely joking)"
I'd go a step further and throw a semantic error if suffeciant comment's were not found before certain constructs. Hell, make them part of the language. Or, at least provide an easier interface for programmers to document their code in a way similar to how many DVD's have the directories commentary attached...
Re:ideally this would be true (Score:2)
map > > > x;
Or function calls like:
void do_work()
Re:ideally this would be true (Score:2)
map< u_int32_t, map< string, pair< double, vector< SomeObject > > > > x;
Re:ideally this would be true (Score:2, Insightful)
If you subsume the design into the implementation, then someone who goes looking at the implementation will have no way to distinguish between what was a design decision from what should be relatively arbitrary implementation decisions.
Why is the distinction important? Two reasons, really. One is versatility. You don't want to constrain a design to having just one implementation. It's useful to be able to choose among com
How High is Sufficiently High? (Score:3, Funny)
And God said, "Let There Be Light."
God uses a very high level language: four words, and the hard work is done.
-kgj
What a lousy magazine (Score:5, Funny)
I'm supposed to be impressed by this? Ten years to republish an article? What a rag. Why, here on Slashdot, you barely have to wait te--
[sound of post getting modded into oblivion]
Regardless of whether this guy is right or not (Score:2, Insightful)
His titles are misleading. (Score:5, Insightful)
It makes it sound like he's talking about coding with no forethought and eschewing all documentation (including all comments) in favor of letting the code be the documentation (the "self-documenting code" falacy that has been touted - and known to be false - since at least the early '70s).
What he's actually arguing is that the steps of the process are misnamed - and that this results in mismanagement. The documents currently called the "design" are just requirements and a high-level / overview documentation of early thoughts. The process currently called "coding" is actually most of the design work.
This is recognized in the silicon industry - where CAD tools have evolved the process of "designing a chip" into something virtually identical to "writing an application". But in the silicon industry the nomenclature is still "designers" for "programmers" - and "verification-" or "design assurance-" engineers for "test engineers".
(The latter, by the way, is a highly skilled specialist {in either software or hardware operations} that many software shops don't use, substituting "testers", or confusing them with testers when they happen to have gotten one by mistake. On the "hard side of the force" such people are normally recognized as high-status (and high-pay) pros - the architect's police force and the designers' respected teammates and designated rescuers.)
False Economy (Score:5, Insightful)
Re:False Economy (Score:5, Insightful)
That's what they all say. Every language is self documenting when "coded properly". C++ failed in part because of the unfounded belief that its supporters had in its abilities, all of which resided not in the language itself but in the programmer's ability to "code properly". Sadly, there is nothing in the language to enforce such coding practice and it is as rare in C++ as any language.
TWW
Re:False Economy (Score:2)
Re:False Economy (Score:2, Funny)
Re:False Economy (Score:3, Insightful)
Dictionary attack- how many devs do you know who use the full name rather than an abbreviation? I can't blame them- ppm makes sense and is much easier than parts_per_million. You also have to get devs who can spell (I went through a 6 kloc assembly program misspelling the work caffeine. Thi
Re:False Economy (Score:2)
Re:False Economy (Score:2)
Re:False Economy (Score:3, Insightful)
Re:False Economy (Score:3, Insightful)
The nexus here is the inability of people to agree on a level of competency to understand how true Meyers, and your post, are. C++ is not only capable of showing what the code does (duh, it has to) but also reflecting design decisions. The only reason I can understand the people that do not accept this is because of limited understanding or total lack of it.
Given its "hardcore
Re:False Economy (Score:2)
I must have missed the memo that C++ had "failed". I'd call being one of the most popular languages around, still a major part of the software industry some two decades after its introduction, one of the bigger success stories in software development history.
As for belief in its abilities: the problem C++ has is more PR than anything else. A lot of people learned it ten years ago, or were taught by or learned fr
Re:False Economy (Score:3, Interesting)
In the sense that it made no real difference. The programming world today is largely the way it is because of C, not C++. If C++ had never happened, but C, Smalltalk and Simula etc. still had happened, then I don't think there would be any noticable difference in modern programming style or technique, not even much difference in syntax. I think, anyway.
Obviously, C++ programmers might not agree!
TWW
Re:False Economy (Score:2)
Nor, I imagine, would Java programmers, C# programmers, ...
Re:False Economy (Score:2)
C++ failed? Hmm, the last time I checked one of the two OSs that I use on a regular basis is written in C++. And the web browser, email client, instant messenger, IDE, PDF viewer, source control software, mp3 player, and word processor that I have opened right at this moment is written in C++.
Mod parent conveniently making up bullshit or funny definition of failure.
Re:False Economy (Score:2)
Given that it's likely most of the software that most of the people reading your comment use today is written in C++, I can only assume that you're trolling?
The Falacy of self-documenting code. (Score:5, Interesting)
Actually there is: Co-evolving the spec documents, comments, and code. Yes it helps a LOT to plan ahead - and it's a must if you want things to have a chance of getting done in any reasonable time. But trying to cast a spec into concrete in advance of coding is a false economy, too. The spec must remain maleable so the internal problems with it that are discovered during the coding phase can be corrected.
The thing there IS no substitute for is documentation separate from the code itself - whether it's a spec document, good comments, or (preferably) both. Self-documenting code is a falacy - because the code only documents what the code does, not what the code SHOULD do. (Grep is a great program. But it's REALLY broken if what you wanted was cat, or ftp.) Testing doesn't check that a program is "right" - only that it matches a spec. If you're trying to verify correctness of someone else's "self-documenting" code the only thing you can test is the complier. B-)
That applies to you trying to test your OWN code later. You are not the same person you were two months - or even two hours - after you wrote it.
Re:The Falacy of self-documenting code. (Score:4, Funny)
Slight nitpick: cat is a subset of grep. Just use a pattern that matches every line like ".*". Granted, if you said "write cat" and your programmer wrote grep, you should have a talk with him about creeping featuritis.
Other than that I agree.
TTFN
Re:The Falacy of self-documenting code. (Score:4, Interesting)
Documentation that says what code should do merely moves the problem. Now you have to test the documentation.
That's one I disagree with. It's true on its face. But it misses the underlying point of documentation - whether comments or specs.
Having a separate representation to match against during a testing phase is actually a secondary benefit. The primary reason is to require the designers to create two, separate, expressions of the program's intent, in two languages / representation modes that are as distinct as practical.
Thinking in different languages (i.e. english prose vs. C++) gives them more opportunities to "view the bug hiding behind the blind spot from a different angle" and spot it. (If they're written by different people with different blind spots, so much the better.)
The idea is to have the CORRECT behavior documented in at least ONE of the representations. Then the testing process becomes one of finding the discrepancies, determining WHICH representation was right, and correcting the other.
This is surprisingly effective - even when both representations are written by the same person.
Documentation should be an abstraction of the code. It should describe at a higher level what is going on, so that an abstracted understanding can be achieved that is non-obvious by reading the code. This is merely to increase the efficiency of understanding unfamiliar software.
Again this is PART of its purpose - because educating the programmer is part of its purpose. Documentation can give explicit statements of structure that is only implied in the code. Documentation can explain emergent behaviors of assemblies that are non-obvious from the component pieces. Documentation can explain pitfalls which must be avoided - which are represented in the code only by their absense. And so on.
But documentation at a different level of abstraction also "shifts the view angle" and moves the blind spots - again helping to expose the hidden bugs by giving a "correct" representation when the code is incorrect. Documentation can also be redundant, giving more than one extra view.
IMHO the education of programmers is secondary - while the redundant, divergent, expressions of the same algorithm is key.
Testing will always have to be between code and end user expectation.
That I agree with.
Everything in between is fluff for testing.
And as you see above, that I disagree with. The things in between are useful tools to produce two desired effects:
- A desired behavior for the program, in the programmers' mind(s), which is reasonable, internally consistent, and well-vetted.
- A match between the programmers' idea of what the program should do and what it actually does.
The "design it twice in two ways" approach creates the latter two with high confidence. Then the only remaining issue is mismatch between the programmers' and end users' expectation. With bugs constrained to this narrow field they're generally few and quick to fix.
But programmers generally have little trouble understand a reasonable user's expectations when they actually sit down to think about it and write them out. The bulk of bugs come, not from user idea / programmer idea disconnect, but from programmer idea / code disconnect. Thinking of your documentation job as SOLELY addressing the first disconnect risks disaster.
= = = =
Interestingly, your logic DOES correctly state the reason "program proof of correctness" is also a falacy.
- Formal correctness proofs prove, not that the program is correct, but only that the program is consistent with a formal satatement of what is correct. (Again, "grep" might be perfect if you wanted a pattern matcher, but it's definitely broken if you wanted a web browser.)
- To be useable by a correctness proof (whether human or automated), what constitutes corr
Re:False Economy (Score:5, Insightful)
Why do you presume that reading a software design (source code) would be any different?
It's hard to read a design - even a good one - until you "get it." Until you grok it. Those other documents you talk about are freaksihly important, and the author doesn't deny that - but they are not the design. They are of fundamental importance to the success of the design, but we shouldn't pretend that they are the design.
You're absolutely right to refer to those things as "documents." They help document. But they are not the design.
He's not saying skip design, he's saying that you do what you have to, in order to think the problem through (some design, some documentation, some testing, etc.), and then you work on the real, actual design (the source code.)
Refering to "the initial programmer" like you do is completely ignoring everything he's saying.
Re:False Economy (Score:2)
Re:False Economy (Score:4, Interesting)
Those are the worst. You have the source, which seems to almost work. Then you've got the comments in the code, which are sort of relevant, but whenever the code gets sufficiently tricky that you'd have to read any of the comments, they're simply wrong. Then there are all the dependencies, which are incomplete and only include the obvious connections and not the ones which were added later. Finally, there are the requirements, which not only don't describe the actual program, but are simply impossible.
The best projects are ones where there's a bunch of code, which is written with names that suggest what things actually are and do, where everything is broken down into chunks which are sufficiently small to understand if you look at them, which has gotten arranged so that everything flows in accordance with the underlying problem being solved, and which is grouped logically, with related functions near each other within a file, in files, and in directories; and there is additional documentation, revised after the last change to anything it documents, which explains everything that isn't obvious from reading the code, as well as explaining where in the code to start reading.
The sole reason that code is the best documentation is that it is never incorrect. The program will definitely do what its source says it will. All other documentation must be held to the same standard, even though there is no automatic check for it. (One advantage of javadoc-style tools is that there are some automatic checks for accuracy; you can't have javadoc which gives the wrong name for a function). The worst thing is documentation which pretends to be authoritative, but which is out of date, and any document which predates the code is going to be out of date, unless the project is so trivial that someone with no experience could do it on the first try-- because that is what the original design documents are: the first try by people who do not yet have experience.
Personally, I think the best balance might be to start writing code with minimal planning (come up with the idea, divide the tasks, decree the coding style, arrange the process for adding tasks), but to have bitter and anal code reviews of everything that goes in. This requires the programmers to demonstrate that the code is clear enough to read and that the result including all additional documents is accurate and sufficient for someone who didn't write it to understand it based exclusively on the design.
Re:False Economy (Score:3, Informative)
I'd agree that if you're doing waterfall, doing design docs is better than not doing design docs. But I disagree that there's no subsitute.
Having done a few Extreme Programming projects, I muc
Re:False Economy (Score:2)
A nice quote (Score:5, Insightful)
> the desk staring at the ceiling can be "doing
> design" just as seriously as someone playing
> with UML diagrams in ROSE.
So true. Although I find it helpful to move along these reveries by writing little test apps to put wheels on some ideas... just little 10-20 liners to help get a better handle on things.
Re:A nice quote (Score:2)
I think I used to maintain that guy's code, no documentation written anywhere and the code looks like it was written as several different prototypes and then jumbled together in some form of working fashion.
While I realize this is not always the case and I write code the same way myself, the real benefit to "writing documentati
Re:A nice quote (Score:2)
And when it does happen, that documentation time and money goes down the drain. If you had simply written well documented code to start with, that new requirement could hav
Re:A nice quote (Score:2)
This is advantageous when your job is to design, and pass the implementation off to someone else. Of course, using UML is not and should not be a substitute for the creative design process. I encourage designers to think out thier designs using whatever method works best: flowcharts, psued
Re:A nice quote (Score:3, Interesting)
1) Write down the problem
2) Think very hard
3) Write down the solution
Re:A nice quote (Score:3, Interesting)
I don't know how many times I've used a whiteboard to just diagram, erase, list, or whatever. Extremely useful tool, and when it's done, you have a picture you can translate into a design document.
i wholeheartedly and utterly agree. (Score:2, Insightful)
code is design.
take any programming language, whatever virtue, whatever failure, it does not matter. the fact that it is a language at all, proves it.
because any single language exists solely and uniquely by and for design. language is for designing things, and describing the design of things to other people, over a process called 'time'.
design implies persistence, and as we all know, time destroys all things. language is design o
What is Software Design? (Score:5, Funny)
X=1024; Y=768; A=3;
J=0;K=-10;L=-7;M=1296;N=36;O=255;P=9;_=1<< 15;E;S;C;D;F(b){E="1""111886:6:??AAF"
"FHHMMOO55
"31/531/53"[b ]-64;S=b<22?9:0;D=2;}I(x,Y,X){Y?(X^=Y,X*X>x?(X^=Y
)):(E=X); }H(x){I(x, _,0);}p;q( c,x,y,z,k,l,m,a, b){F(c
);x-=E*M
*z/M-D*D *M;a=-x *k/M -y*l/M-z *m/M; p=((b=a*a/M-
b)>=0?(I (b*M,_
(c,x,y, z,k,l, m,a){Z=! c? -1:Z;c <44?(q(c,x
l,m,0,0 ),(p> 0&&c!= a&& (p<W ||Z<0) )?(W=
p,Z=c): 0,o(c+ 1, x,y,z, k,l, m,a)):0
U;u;v;w
&&Z>=0? (e+=h*W/M,f+=i*W/M,g+=j*W/M,F(Z),u=e-E*M,v=f-S*M,
/3,H(u*u+v*v+w*w),b/=D,b*=
E):0,E=(h*u+i*v+j*w)/M,h-=u*E/(M/2),i-=v*E/(M
,Z,0,0),Q/=2,T
,Q+=V&1?b
,j=g>0?g/8:g/ 20):0,j >0?(U= j *j/M,Q =255- 250*U/M,T=255
-150*U/M,U=255 -100 *U/M):(U =j*j
/M,T=255-435*U
/M,T=168-113*U / M,U=111 -85*U/M) ),d!=P?(Q/=2,T/=2
,U/=2):0);Q=Q< 0?0: Q>O? O: Q;T=T<0? 0:T>O?O:T;U=U<0?0:
U>O?O:U;}R;G;B
*L-M*30*(A*y+b)/Y/A+M*15,0,M, 0,P, -1,0,0);R+=Q
b):(++b<A?t(x,y,0,b):0);}r(x, y){R=G=B=0;t(x,y,0,0);x<X?(printf("%c%c%c",R/A/A,
/A/A,B/A/A),r(x+1,y)):0;}s(y){r(0,--y?s(y),y:y)
"\n",X,Y);s(Y);}
Courtesy IOCCC:http://www0.us.ioccc.org/2004/gavare.c
Re:What is Software Design? (Score:2)
Re:What is Software Design? (Score:2)
Re:What is Software Design? (Score:2)
Re:What is Software Design? (Score:5, Informative)
The blah is the blah.... (Score:4, Insightful)
Stop with the pseudo-clever melodramatic BS already.
Good code following the design is nothing new. Jumping straight into coding without a design document that the WHOLE team AND your clients/users can read however is insane.
I'm all for productive laziness but this is just plain BS.
Re:The blah is the blah.... (Score:2, Insightful)
It does - but that phrase seems to be the submitter's invention, at least from a cursory look at the fine article. Reeves's point is much more sublte and interesting:
Re:The blah is the blah.... (Score:2)
In the manufacturing world, seperating your design and manufacturing departments leads to parts which are very expensive (if even possible) to manufacture.
The end goal of a small production product is not the specifications. It is typically a list of raw materials, tools, a plant specific part routing, step by step directions for every cut and alignment need, CNC programs, and a testing program. These specific instructions (p
Re:The blah is the blah.... (Score:2)
Of course not. That's because design and manufacturing, in every succesful company, know an awful lot about each other.
How much do you know about your compiler? And when you're done linking source code, how much does your compiler know about your design?
Re:The blah is the blah.... (Score:2)
Did you even read the article? He clearly and specifically addresses this misconception of what he's saying at least three times that I can remember off the top of my head.
To summarize it for you (since you're such a fan of laziness that you won't even try to understand someone's point before you try to shoot it down): everything you call "design" is important - really, really imp
Re:The blah is the blah.... (Score:2)
If you put something in such a way its so easy to misconstrue while simultaneously trying to put yourself up as an nisightful guru you'd better expect intelligent people who aren't bamboozled to say "hang on a minute".
Sigh (Score:4, Insightful)
Yes, staring at the ceiling can be just as good as playing with UML. But your job is to communicate -- to the team, to the customer, to the poor maintenance programmer -- just what the heck you are trying to accomplish in your code. The "being the smart kid" should be the easy part. The "getting clarity and agreement on scope and solution space" is what they are paying you for.
I've found that it is very hard to communicate to the customer the contents of a switch statmenet using polymorphism. Hence the reasons for layers of abstraction. Model, design, plan at just enough detail that you can communicate and agree on a strategy with all the stakeholders. Then go play with the bits and bytes.
Re:Sigh (Score:2)
The compiler doesn't care how much you communicated. Clearly you need to communicate to solve sufficiently large problems. He never said anything different! Everything you do, right up until the point where you type actual code makes no difference to the compiler. Since the finished product (the executable) is what you intend to build, and the compiler actually buil
My company. (Score:5, Funny)
Dilbert: I'd quit and become an entrepreneur, but I don't know how they handle such huge risks.
Wally: Denial, probably.
Alice: We got bought by our arch-rival this morning. Their CEO says he plans to be as "humane" as possible.
Dilbert: He sounds nice.
Wally: Maybe we'll get bonuses.
Flex (Score:2, Interesting)
I agree completely (Score:5, Insightful)
Well written code should read like a book and only need commenting for blocks of code which are not completely obvious as to what their intent happens to be (for example some hack you write up to get around a bug in a library you are using at the time).
One of the most annoying things is the fact I choose not to use an IDE, so developer documentation inserted into the code to describe a function or class or whatever just clutters up the reading of the actual code.
Furthermore, most of the developer documentation of your typical programmer is such that all it describes is the arguments a function takes and what is supposed to be returned, while doing nothing to explain the purpose of the function and why it might be used. In other words, most of the time documentation is useless and just gets in the way because it doesn't relate to anything which makes sense (for humans to understand something new, usually you need to relate it to something they already understand).
So as a general rule of thumb, if you can read the code out loud (or in your head) and you don't constantly have to stop to analyze the code to see what the context of some variable happens to be at any given time, then you are doing a good job. If on the other hand your code cannot be read out loud (because of inaudible variable names), then the odds are some other programmer is going to have to review every other line of your code just to try and make sense of it all.
An ex-employee of mine who I didn't audit very well, spent a ton of time documenting his code in some of the most anally-retentive ways. However, his code just never had any flow. To date, I have had to scrap much of what he worked on because his code was not maintainable.
So in essence, if you have poorly written code, then all the documentation in the world won't do much because poorly written code makes your design inflexible and hard to work with, while well-written code that you can read like a book usually is simple enough that you can mold it into something more useful later on.
So I agree that the code is the design and the design is the code. You can come up with the most elaborate UML diagram known to man, but if the code has no flow to it, and a whole lot of hacks are needed to implement a rigid design structure, then the design overall in the end is going to suck.
If you are going to do documentation, keep your modules small and do it once you are pretty certain the modules won't be changing much from that point on. If you are uncertain, then it is probably best to just ignore the documentation process until things are more set in stone.
13 years later and he's still right (Score:4, Insightful)
Dangerous.... (Score:2, Interesting)
I will admit to being a project manager, not a developer. And I know that thinking through requirements and design specs is the "eat your vegetables" part of programming, and no one really enjoys it nearly as much as writi
Re:Dangerous.... (Score:4, Insightful)
Sweet Jesus! Did you even read the articles linked? For example, this part?
If you're going to misunderstand the guy, you could at least do it in a new and interesting way.
I will admit to being a project manager, not a developer.
Ah, so that's why you feel qualified to give opinions on something you didn't even take the time to do the reading on.
Yet Another Metaphor About Carpenters (Score:5, Insightful)
But, you can't live in a design, so both skills are needed.
In the end, people who stand around and argue that good carpenters don't need designs, or vice versa, miss their completion date and lose the customer.
Re:Yet Another Metaphor About Carpenters (Score:3, Insightful)
Re:Yet Another Metaphor About Carpenters (Score:4, Insightful)
I find it funny that you and many other people use Carpentry as a metaphoric model for coding. However, after working as a carpenter for over half a year I have to say that it is appropriate.
The world's best carpenter won't build much of a house unless someone's done the design
Houses are built as a variation on a template for their entire neighborhood. In richer areas, more variation occurs, but then more money is poured into the project. In older areas, the variation in house styles is mainly due to renovation by the various tenets over the years.
Unfortunately, most code written is mostly re-inventing of the wheel at the design and implementation level. Closed source techniques necessitated this for a long time (the highly-copyrighted Numerical Recipes books, anyone?) Open source should change the re-inventing of the wheel, but I still see a lot of people re-inventing the wheel 6 or 7 times out of 10 projects. The 8th and 9th will probably shoehorn in a custom library of crufty utility code they wrote years ago for college homework.
But, you can't live in a design, so both skills are needed.
Never owned a house, have we? People who can't afford to spend a long time in a motel/hotel/vacation-resort will live in half finished (but up to code) houses and use kitchens that are being actively remodeled. Similarly, you can go grab open source projects from sourcefroge.net to do little more that compile and jump right in. If I recall correctly, I had to code a Ethernet driver module for the 1.7 kernel series. No driver existed for my card. My RedHat Linux 5.6 would loose network functionality after the install. I this any different from living in a multi-story house while the bathrooms on the other floors are being built?
In the end, people who stand around and argue that good carpenters don't need designs, or vice versa, miss their completion date and lose the customer.
A lot causes schedule slippage in both coding and carpentry. Both in carpentry and in programming projects regularly go over schedule. Customers are told that sickness and surprises will cause the schedules to slip on any construction. With programming projects it is hard to tell people that extra, unexpected work is needed. Showing customers the termite damage in a wall is easy, showing the hacks in a networking library is not.
The correct people and only the correct people talk to customers. These people typically are the people or work with the people who do the design. With coders/software-designers being stereotyped as uncouth and kept away from the customer, the design may not reflect reality. When the customer is not aware of what they are asking (i.e. requirements creep) it is easy to tell them that additional carpentry and materials are not free. Management and the Customer seem to think that additional software features are not free. Your customer facing people must know when to say 'No' and when to say 'it will cost THIS much,' not pander to the idea that coder-time is free because the results aren't physical.
With trim and paint to cover errors, you can get away with 'rules of thumb' in carpentry[1]. Some voids are needed to allow for expansion and contraction of joints. Management never seems to understand the need for well-defined APIs or plug-in architectures (let alone security or data integrity.) Plus, the computer is a little less tolerant of taking the software equivalent of power tools to the virtual memory manager.
Come to think of it, carpentry is a very bad model for programming[2].
------
1. Literally a thumb used as a ruler. With the massive non-squareness of some people's idea of a *square wall*
you have to hate the flexibility of wood over long periodic thermal cycling. Here's a hit: like with bad code, a slightly off wall creeps further out of square with t
Yes, I read tfa (Score:5, Interesting)
Picasso could not tell people how he did it, or rather people could not understand picasso's explanation.
An F-16 fighter, however, given enough years of schooling, could be explaned in great detail to anyone. This is why, although incredibly complex, there are thousands of F-16s out there. Yet there are only Picasso's picassos.
Likewise a great coder can't really explain how he wrote the great code. He just could. You can see the result, admire it, copy it even. But to apply the same "creative process" to a different problem, you'd have to be the original programmer.
I say this is why great programming is art and bad programming is not. Just like picasso is an artist and the guy who repainted the wall is not. It's because the "creative process" can't be passed on. It has to be self-invented.
Anything Shakespeare is Shakespeare. Nobody else can write Shakespeare, because they don't have the same creative process he did.
You can study Shakespeare, Picasso, Beethoven all your life and never be able to emulate them. Likewise a great coder's code can be copied, but the process that made the code can't be replicated.
Re:But we want F-16s (Score:2)
Re:That's Just Wrong (Score:4, Insightful)
You can codify writing like Heinlein, Herbert, Dickens and Rand.
No matter how many average writers you put together in a room, you won't end up with the Dune saga.
Complexity is the enemy of elegance and power.
C, Lisp, python are so popular because they are elegant, simple, and thus powerful.
It's not its complexity that makes a system great, it's its simplicity.
Likewise Shakespeare.
>Coding is not an art. It's a science. No matter how good the code is, it can be taken apart and understood by others.
Likewise Shakespeare, Heinlein, Asimov, etc. Yet still art. Because while you can reduce it to 26 + punctuation, it's the organization in time and space that makes them unique.
Great code just works, and nobody needs to go back and fix it later, because it's never going to be broken.
If it needs to be modified, you say.
I reply, why?
Because it no longer performs the needed business function you say.
I ask: And that means its broken?
You say: No, it means it needs to do something else.
I Reply: You mean, a different function?
Exactly, you beam.
I counter: Follow the Unix Way: Each program does one thing: What you need is another program.
You slouch. You know I am right.
Zen lesson over.
Low Level vs. High Level (Score:2, Interesting)
For example, I might be able to
I agree with basic Idea I think (Score:2, Insightful)
Then I start coding, and about 10 lines into it I realize I've got a major flaw in my design that I could seen weeks ago if I'd been coding. So insofar as "The Code is the Design" stands in opposition to and absolutist commitment to "Da all Design First, Code Later" I'm 100% for it. Insofar as it stands in opposition to "Think about what you are going to do, then
experiment (Score:5, Funny)
Re:No! (Score:2)
[Double-clicks PowerPoint logo]
[Clicks File]
[Clicks Open...]
[Double-clicks my_project.exe]
This application has attempted an illegal operation and will be shut down.
Nope, the code doesn't work too well as the design, either.
ph34r my 1337 c0d1n9 5ki11z (Score:4, Insightful)
Let me tell you something about that. I have worked on way too many projects (including the current one) where this was the case - there was only code, or the docs were so out of date that really, there was only the code. It's horrific in most cases. Certainly there are horror levels but I am serious, it is just freaky.
Do you know what happens to a project without documentation? Let me tell you what happens: the only way someone can maintain it, given strict deadlines and/or budget constraints is by fixing the bugs without actually understanding the design. So your fix becomes just a special rule for a special case and in the worst scenario it is also a fix that only works for a special kind of data. So what happens at the end with such a project? A 30 year old COBOL program situation - too many rules that are not generalized all over the place with all kinds of side-effects. Good luck supporting that shit.
I will take a high level document describing the system any time instead of jumping into the code right away. I prefer to know the components of the system, the main players, where the configurations are, what patterns are used to develop the system before jumping into the code. It is just too damn bad that it does never happen that way.
There are many "levels" of design (Score:3, Insightful)
What if you asked your average customer to work out if they'd like the car based on these ideas?
This is very much like what you're asking business analysts and users to do if you provide a source code listing and nothing more. If I was in charge of a project, and that's what you handed me after I gave you business requirements, I'd seek to have you removed from the project.
read the damn article (Score:5, Interesting)
He's not saying you don't do traditional software design work, or document. He's saying that if you compare the work that a software engineer does, it is equivlant to the design phase of normal engineering, not the manufacturing phase. That the program you deliver, is in essence, a completed "design" not a manufactured "product".
When you roll out and install this "design" in the target environment, this is the step which equates to normal manufacturing.
It's actually pretty insightful.
Design paralysis (Score:4, Funny)
I have to agree (Score:3, Insightful)
We have ISO at my orkplace. The hardware guys have a sequence of steps of design and manufacture that are well laid out. Getting this applied to the software guys has been more difficult.
One allowable thing is to write test apps to check out areas of coding that one isn't familiar with. This mimics the hardware steps of mockups and prototyping.
Recently I wrote a network app for the first time. Once that experimentation/research was done, I had some useful info to add to the Design (text) Doc. Once I had this much done though, when the time came to "develop" (according to ISO) the developing consisted of nothing more than cutting and pasting my test app, and tweaking some parameters.
I've been wondering about this for a while because it didn't seem right, that I must have been doing something wrong, but the article filled in the missing understanding.
The Microsoft Solution Framework (Score:4, Interesting)
Flame away for mentioning MS in a good light.
Software Design Still Hard, News at 11 (Score:3, Insightful)
Over the years, management has attempted to quantify software development. They've pointed to the visible tools of the trade, the flow charts and the UML, and a lot of them have mistaken that for the process of designing software. In fact the only thing that you really need to design software is an understanding of your customer's requirements (Or your requirements) and the know-how to turn that into a working system. Unfortunately that's not quite so easy to quantify, and so most management types ignore those traits in their programmers.
The folks who are always going on about six-sigma and CMM level 5 always seem to be stumped as to why they can't just give a chmpanzee a UML generator and churn out working project after working project. Turns out that despite all efforts, software design still requires you to think about your problem and how to get from where you are to where you want to be. Go figure.
Re:Less is more (Score:3, Insightful)
Re:The Code Is The Design (Score:5, Funny)
You haven't seen my code. Nothing designed about it.
I assume you work for Microsoft?
Re:Free UML (Score:2)
Again, I have no idea about the quality of the plugin. Just one I've noticed along the way.