The Art of programming
-
@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". :(
-
Don't worry guys. We can do anything. Absolutely anything. We are the experts.
-
@Chris-Kawa said in The Art of programming:
We can do anything.
I have been in meetings like that. That is why I prefer technical meetings with only technical people.
-
Even though everyone is entitled to my opinion, I should probably stay out of this conversation.
-
@Kent-Dorfman
we are just having fun so please feel free to share :) -
"We just need to get this feature in now. Fast. We'll care about the architecture and the cleanup later. Promised."
That's how it goes for every feature.
-
Unfortunately the "art of programming" is being replaced with the "assembly line mentality" of programming. Can you say agile?
-
@Kent-Dorfman I think I see what you mean. I was asked to add some features to some code. The architecture was very basic and inflexible. I rewrote the code and now it is some of the fastest in that industry. The customer was not sure what to think at first, then they realized their code was much more maintainable and higher performing. They were very satisfied with the code in the end. They wanted a cheap fix, they got a better design.