Originally posted by: thornc
Glad to hear that there people out there that understand the need to write "Solid Code" in every go.
The excuse of not having enough time doesn't convince me.... there's a rule from a book I once read that I have applied ever since. The find out the time a project is going to take to be finished, take your first estimate for the design time and double it, take your first estimate for the implementation time and multiply it by 10, take your first time estimate for debugging and testing and triple it; add everything togheter and double it again. The result should be enough to make the project in time! (Barely 🙂 )
Originally posted by: thornc
Glad to hear that there people out there that understand the need to write "Solid Code" in every go.
The excuse of not having enough time doesn't convince me.... there's a rule from a book I once read that I have applied ever since. The find out the time a project is going to take to be finished, take your first estimate for the design time and double it, take your first estimate for the implementation time and multiply it by 10, take your first time estimate for debugging and testing and triple it; add everything togheter and double it again. The result should be enough to make the project in time! (Barely 🙂 )
Originally posted by: BingBongWongFooey
I have the pleasure of working with a few people right now who are *very* good at doing the exact opposite of what that page describes. OOP, specific language strengths, refactoring, descriptive, verbose naming, all go very far to make code alot more elegant and less buggy.
Originally posted by: ergeorge
Originally posted by: BingBongWongFooey
I have the pleasure of working with a few people right now who are *very* good at doing the exact opposite of what that page describes. OOP, specific language strengths, refactoring, descriptive, verbose naming, all go very far to make code alot more elegant and less buggy.
I've seen "verbose naming" get pretty abusive though. Who the hell wants a loop index like IndexForOuterLoopOfPrimaryObjectPropagation
I'm exagerating a bit here ... but I've seen some ugly ones. And if you get to verbose when naming methods it can get really ugly in complicated formulas. Kind of a tradeoff.
bool status; // bad name
int status; // still a bad name
enum status; // good name
int i; // could be just fine--idiomatic
string name; // still ambiguous
Originally posted by: Ynog
I agree that having an intelligent name is good, but not everyone has GUI based text editors to work with. Nothing like having to use a shell where you have at most 80 columns and someones variable name or function name takes two lines, which ofcourse has to be wrapped or in somecases it doesn't wrap, making it difficult to read in both cases.
By no means am I saying that you should have variable names that are asdf. But you can also add comments.
Funny thing is, on a same topic, I have found alot of people who want intelligent and super long variable names, don't add units to the variable name if the variable has units. Nothing like propagation time variable without units. Is it sec, ms, microseconds, nano?
Edit: Little mistake
Originally posted by: Descartes
Originally posted by: thornc
Glad to hear that there people out there that understand the need to write "Solid Code" in every go.
The excuse of not having enough time doesn't convince me.... there's a rule from a book I once read that I have applied ever since. The find out the time a project is going to take to be finished, take your first estimate for the design time and double it, take your first estimate for the implementation time and multiply it by 10, take your first time estimate for debugging and testing and triple it; add everything togheter and double it again. The result should be enough to make the project in time! (Barely 🙂 )
That's a pretty wild way of estimating. I guess it's great if you are an in-house developer where they allow you an absurdly long time to finish the simplest of tasks, but there's no way I'd get any projects if I were that expensive.
Methinks this form of estimation is just to cover up the fact that either a) the developer is poor at estimating his own ability, knowledge and lack thereof, and b) whoever does the requirements is poor at doing so.
Originally posted by: glugglug
That site ain't got nothing on this.
Yes, the linked piece of code actually works, as long as you compile it as straight C, NOT C++.