How much time should be spent on the little things
-
I put out a programming style guide and the boss overruled a few things. For example I had call to a function as function_name( param1, param2 ); and my boss changed it to function_name (param1, param2); Honestly, to me it doesn't matter which way or even if both ways are used as long as an individual is consistent. However, I've written 8K SLOC in my style (before the guide came out) and now my boss wants me to "take however long it has to" to meet his style. BTW, no actual schedule relief is allowed and I'm supposed to be done this Monday. I can get the code working by COB Monday without his style guide changes to it. I may be another week of mind numbing work to change the spacing. So how much time should be spent doing the little things such as changing style? (just to let you know, the boss was going to put out the style guide until it was 4 months late then gave me the task) Thanks Joe Q
Your boss wants to overrule, man! Because he could have asked you do this as you go. The fact he asks you to do it in one big chunk does not make too much sense. Especially since IDEs support smart indent, and autostyle.
-
Tell it conforms 100% to published guides, if you are using VS then use FX-Cop and stick with that.
Blog Have I http:\\www.frankkerrigan.com
Actually, we're using National Instruments LabWindows CVI (C with Virtual Instrumets). It's C with a lot of extensions to control hardware. NI's tools are mainly for hardware guys with 1 programming course under their belts. In NI examples goto's are used quite often. What I'm saying is, there are no standards outside what we impose as a project. What I'll probably do is tell my boss it's on my 2010 todo list. Thanks
-
I put out a programming style guide and the boss overruled a few things. For example I had call to a function as function_name( param1, param2 ); and my boss changed it to function_name (param1, param2); Honestly, to me it doesn't matter which way or even if both ways are used as long as an individual is consistent. However, I've written 8K SLOC in my style (before the guide came out) and now my boss wants me to "take however long it has to" to meet his style. BTW, no actual schedule relief is allowed and I'm supposed to be done this Monday. I can get the code working by COB Monday without his style guide changes to it. I may be another week of mind numbing work to change the spacing. So how much time should be spent doing the little things such as changing style? (just to let you know, the boss was going to put out the style guide until it was 4 months late then gave me the task) Thanks Joe Q
A simple regex will fix that in 0.000001 sec (depending on cpu spec of course)
Todd Smith
-
Joe Q wrote:
I'm supposed to be done this Monday. I can get the code working by COB Monday without his style guide changes to it. I may be another week of mind numbing work to change the spacing.
So you've got a couple of days work (assuming you do unpaid overtime over the weekend :rolleyes:) to do a week's worth of work? I guess if he insists it be done, your project is just going to have be delivered late. Just make sure everyone knows why X|
0 bottles of beer on the wall, 0 bottles of beer, you take 1 down, pass it around, 4294967295 bottles of beer on the wall. Awasu 2.2.4 [^]: A free RSS/Atom feed reader with support for Code Project.
-
A simple regex will fix that in 0.000001 sec (depending on cpu spec of course)
Todd Smith
-
I put out a programming style guide and the boss overruled a few things. For example I had call to a function as function_name( param1, param2 ); and my boss changed it to function_name (param1, param2); Honestly, to me it doesn't matter which way or even if both ways are used as long as an individual is consistent. However, I've written 8K SLOC in my style (before the guide came out) and now my boss wants me to "take however long it has to" to meet his style. BTW, no actual schedule relief is allowed and I'm supposed to be done this Monday. I can get the code working by COB Monday without his style guide changes to it. I may be another week of mind numbing work to change the spacing. So how much time should be spent doing the little things such as changing style? (just to let you know, the boss was going to put out the style guide until it was 4 months late then gave me the task) Thanks Joe Q
I've always preferred the least spaces except after the comma: function_name(param1, param2) { }
"This perpetual motion machine she made is a joke. It just keeps going faster and faster. Lisa, get in here! In this house, we obey the laws of thermodynamics!" - Homer Simpson Web - Blog - RSS - Math - LinkedIn - BM
-
Your boss wants to overrule, man! Because he could have asked you do this as you go. The fact he asks you to do it in one big chunk does not make too much sense. Especially since IDEs support smart indent, and autostyle.
Pierre Leclercq wrote:
fact he asks you to do it in one big chunk does not make too much sense
My boss isn't to big on the common sense thing. He sort of manages as he goes. He gave me a major chuck of code to do, then he started giving me other things to do (such as the style guide). Then, in a meeting with the customer he announced I was the software lead. BTW, I wasn't in the meeting and didn't figure out I was lead for a week after the meeting when I was going through the charts. I'm not a fan of the "Suprise!" style of management. He's a good software guy, but not necessarily a good manager.
-
I'm learning perl and regular expressions right now in my spare time. Hey, this sounds like a good project for me. Any help on what the regular expression should be to change the spaceing? Thanks
For this task I would think a search and replace in files would work replace " )" with ")" visual studio supports regular expressions (see the checkbox and docs) if you find special cases where the above replace isnt enough.
Todd Smith
-
For this task I would think a search and replace in files would work replace " )" with ")" visual studio supports regular expressions (see the checkbox and docs) if you find special cases where the above replace isnt enough.
Todd Smith
-
I put out a programming style guide and the boss overruled a few things. For example I had call to a function as function_name( param1, param2 ); and my boss changed it to function_name (param1, param2); Honestly, to me it doesn't matter which way or even if both ways are used as long as an individual is consistent. However, I've written 8K SLOC in my style (before the guide came out) and now my boss wants me to "take however long it has to" to meet his style. BTW, no actual schedule relief is allowed and I'm supposed to be done this Monday. I can get the code working by COB Monday without his style guide changes to it. I may be another week of mind numbing work to change the spacing. So how much time should be spent doing the little things such as changing style? (just to let you know, the boss was going to put out the style guide until it was 4 months late then gave me the task) Thanks Joe Q
Put on your armour and dust of some RegEx:~
-
No visual studio here. It's National Instruments LabWindows CVI. I am doing that type of replace. Thanks
-
I put out a programming style guide and the boss overruled a few things. For example I had call to a function as function_name( param1, param2 ); and my boss changed it to function_name (param1, param2); Honestly, to me it doesn't matter which way or even if both ways are used as long as an individual is consistent. However, I've written 8K SLOC in my style (before the guide came out) and now my boss wants me to "take however long it has to" to meet his style. BTW, no actual schedule relief is allowed and I'm supposed to be done this Monday. I can get the code working by COB Monday without his style guide changes to it. I may be another week of mind numbing work to change the spacing. So how much time should be spent doing the little things such as changing style? (just to let you know, the boss was going to put out the style guide until it was 4 months late then gave me the task) Thanks Joe Q
Little things add up to big things. Look after the pennies and the pounds will look after themselves. An avalanche is made up of pebbles. It only takes one. ... I could go on.
regards, Paul Watson Ireland & South Africa
Shog9 wrote:
I don't see it happening, at least not until it becomes pointless.
-
I put out a programming style guide and the boss overruled a few things. For example I had call to a function as function_name( param1, param2 ); and my boss changed it to function_name (param1, param2); Honestly, to me it doesn't matter which way or even if both ways are used as long as an individual is consistent. However, I've written 8K SLOC in my style (before the guide came out) and now my boss wants me to "take however long it has to" to meet his style. BTW, no actual schedule relief is allowed and I'm supposed to be done this Monday. I can get the code working by COB Monday without his style guide changes to it. I may be another week of mind numbing work to change the spacing. So how much time should be spent doing the little things such as changing style? (just to let you know, the boss was going to put out the style guide until it was 4 months late then gave me the task) Thanks Joe Q
I prefer your style. For some reason I like to have spacing around parentheses. For function calls, there is no space between the function name and the opening parenthesis; for statements which require parentheses around a condition, I leave a space between the keyword and the opening parenthesis. That is:
foo( bar );
for ( int i = 0; i < 4; ++i )
{
// statements
}As long as other programmers can read and understand it - that is, there are no egregious errors in formatting that lead to confusion, like erroneous indentation implying one block structure where in fact the language syntax imposes a different one - I'd ignore it. Example of error:
if ( condition )
statement1;
statement2;which implies (from the indentation) that statement2 will only be executed if condition is true, whereas it will actually always be executed. We don't actually have a coding standard in this area, although I don't think any of us use K&R bracing style - opening braces always get a line to themselves. I find placing the first line of a controlled block immediately after the control statement looks too compressed - I normally add a blank line after an
If condition Then
line in VB anyway.Stability. What an interesting concept. -- Chris Maunder
-
Little things add up to big things. Look after the pennies and the pounds will look after themselves. An avalanche is made up of pebbles. It only takes one. ... I could go on.
regards, Paul Watson Ireland & South Africa
Shog9 wrote:
I don't see it happening, at least not until it becomes pointless.
Paul Watson wrote:
An avalanche is made up of pebbles.
There are a lot of sayings a long that line. I haven't seen many avalanches on flat ground no matter how many pebbles are there. My point is how much schedule should be sacrificed to do the little things? The schedule he came up with is already way to tight (bordering impossible) How many hours away from your family should be sacrificed for things like that? My family is more important to me.
-
I prefer your style. For some reason I like to have spacing around parentheses. For function calls, there is no space between the function name and the opening parenthesis; for statements which require parentheses around a condition, I leave a space between the keyword and the opening parenthesis. That is:
foo( bar );
for ( int i = 0; i < 4; ++i )
{
// statements
}As long as other programmers can read and understand it - that is, there are no egregious errors in formatting that lead to confusion, like erroneous indentation implying one block structure where in fact the language syntax imposes a different one - I'd ignore it. Example of error:
if ( condition )
statement1;
statement2;which implies (from the indentation) that statement2 will only be executed if condition is true, whereas it will actually always be executed. We don't actually have a coding standard in this area, although I don't think any of us use K&R bracing style - opening braces always get a line to themselves. I find placing the first line of a controlled block immediately after the control statement looks too compressed - I normally add a blank line after an
If condition Then
line in VB anyway.Stability. What an interesting concept. -- Chris Maunder
Mike Dimmick wrote:
As long as other programmers can read and understand it - that is, there are no egregious errors in formatting that lead to confusion, like erroneous indentation implying one block structure where in fact the language syntax imposes a different one - I'd ignore it.
That is my point too. If someone can read "func_one (param);" and not "func_one( param );" they should probably go to marketing or some other job. Or at least have a cat scan (I'll get the cat! :laugh:)
-
Paul Watson wrote:
An avalanche is made up of pebbles.
There are a lot of sayings a long that line. I haven't seen many avalanches on flat ground no matter how many pebbles are there. My point is how much schedule should be sacrificed to do the little things? The schedule he came up with is already way to tight (bordering impossible) How many hours away from your family should be sacrificed for things like that? My family is more important to me.
Joe Q wrote:
I haven't seen many avalanches on flat ground no matter how many pebbles are there.
If they pile up they become a mountain and then you'll get avalanches ;)
Joe Q wrote:
The schedule he came up with is already way to tight (bordering impossible) How many hours away from your family should be sacrificed for things like that? My family is more important to me.
Your boss should not be asking you to do this on your own time. But it sounds like your project has bigger problems than code style. Sounds like you need to talk to your boss about the project timeline and how it is not realistic, how it is sacrificing quality and how it is risky.
regards, Paul Watson Ireland & South Africa
Shog9 wrote:
I don't see it happening, at least not until it becomes pointless.
-
Joe Q wrote:
I haven't seen many avalanches on flat ground no matter how many pebbles are there.
If they pile up they become a mountain and then you'll get avalanches ;)
Joe Q wrote:
The schedule he came up with is already way to tight (bordering impossible) How many hours away from your family should be sacrificed for things like that? My family is more important to me.
Your boss should not be asking you to do this on your own time. But it sounds like your project has bigger problems than code style. Sounds like you need to talk to your boss about the project timeline and how it is not realistic, how it is sacrificing quality and how it is risky.
regards, Paul Watson Ireland & South Africa
Shog9 wrote:
I don't see it happening, at least not until it becomes pointless.
Paul Watson wrote:
Your boss should not be asking you to do this on your own time.
You're right, but it's a fairly common practice at this place.
Paul Watson wrote:
But it sounds like your project has bigger problems than code style. Sounds like you need to talk to your boss about the project timeline and how it is not realistic, how it is sacrificing quality and how it is risky.
It does. The customer set the deadline and our management said "Yes, we can meet that" without checking with engineering. There's also a big problem with requirments creep, most of the programmers people are hardware guys and haven't done much software in the past. Yes, we have bigger problems but this one (software style) is one the boss can actually address and control.
-
Paul Watson wrote:
An avalanche is made up of pebbles.
There are a lot of sayings a long that line. I haven't seen many avalanches on flat ground no matter how many pebbles are there. My point is how much schedule should be sacrificed to do the little things? The schedule he came up with is already way to tight (bordering impossible) How many hours away from your family should be sacrificed for things like that? My family is more important to me.
Joe Q wrote:
My point is how much schedule should be sacrificed to do the little things?
Well, I'd say, do the important things and see what's left on the schedule :-D
-
Pierre Leclercq wrote:
fact he asks you to do it in one big chunk does not make too much sense
My boss isn't to big on the common sense thing. He sort of manages as he goes. He gave me a major chuck of code to do, then he started giving me other things to do (such as the style guide). Then, in a meeting with the customer he announced I was the software lead. BTW, I wasn't in the meeting and didn't figure out I was lead for a week after the meeting when I was going through the charts. I'm not a fan of the "Suprise!" style of management. He's a good software guy, but not necessarily a good manager.
Joe Q wrote:
Then, in a meeting with the customer he announced I was the software lead.
Arf arf arf!!!! :laugh: :laugh: It's like everybody knows you're in charge, except ... you!
-
Joe Q wrote:
My point is how much schedule should be sacrificed to do the little things?
Well, I'd say, do the important things and see what's left on the schedule :-D