The Art of programming
-
Having a bit of Friday fun about the big DD ;)
(DD = Design and Documentation) -
Even the most complex program, starts with the first line of code
-
@mrjj said in How to enter Images in a listWidget inside tabWidget:
A complex program starts with design and specifications. :)
In which universe? :-)
-
@J-Hilk said in How to enter Images in a listWidget inside tabWidget:
@mrjj
šØ fine šBut let's be honest, everything starts with
int
as inint main()
Unless you use Python :-P
-
Heh :)
Im not really sure they do include it as they seem to only tell about main.cpp and
nothing else exists :)If you must use comments, make sure it simply repeats what the code said
// make new object
Object *obj = new Object;and not that intent of it
// prepare account object for insertion to database
Else its far too easy to the maintenance crew.
Also do not alter the comments if you change the code. :)
-
@mrjj said in How to enter Images in a listWidget inside tabWidget:
If you must use comments, make sure it simply repeats what the code said
Absolutely spot-on with this! And not just comments, it drives me mad that often that actual end-user documentation/Help for the FooBar button says "Does a FooBar". Gee, I would never have guessed without that! But what does that actually do? Will it reformat my disk?
-
@JonB
ahah exactly. :)Like sitting with a very expensive raid controller and
have the field that says
Idle time for GX44 interrupt core.
and the docs says"Allows you to change the value"
No shit sherlock..
ps. maybe we should fork the thread :)
-
This is how my designs usually go:
- Customer: We want to do "this"
- Me: What do you want "this" to look like?
- Customer: I don't know
- Me: <creates interface and basic functionality>
- Me: How about "this"?
- Customer: Well we don't want "that"! Here is what we want...
- Me: <thinking>Why didn't they say that before?
So for anything I build that sequence events is usually how every project starts. Rarely do I get specs at all. Even from my management who programs. They usually say "this" with no real details.
-
@fcarney
So true! At least I know I am not alone....One step worse: your example implies when they see it they say "we didn't want it done (looking) that way, we wanted it done this way". But I often get: "we don't want that at all, we want it to do something totally different from what we said we wanted it to do". :(