35 Replies - 4671 Views - Last Post: 11 February 2012 - 09:54 PM
#1
Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 01:00 PM
So far I have taken c and c++ and right now am taking java just for fun. My professor requires us to work with a partner since it is simulating work in the real world. The way she has us work is at one computer and one compiler just switching back and forth every little task we are assigned for the day.
The partner that was randomly assigned to work with me for the rest of the semester has never programmed and she is a little scatter brained... It drives me crazy every time she codes something that I would change, even if it the slightest difference...
For example:
I would do something like
int monthsPassed = 0;
and she would do...
int monthspassed;
monthspassed = 0;
There are other things she does like leaving empty space were it shouldn't go, or declaring variables randomly throughout the code, or not even having a scheme to the way the program should be laid out.
Am I doomed to never be able to program with anyone!? I am not controlling at all when it comes to ANYTHING else, but this drives me crazy.
Does anyone else have similar problems when it comes to programming with others?
Replies To: Are programmers controlling when it comes to their code?
#2
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 01:04 PM
#3
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 01:08 PM
#4
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 01:59 PM
#5
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 02:03 PM
#6
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 02:04 PM
Quote
int monthsPassed = 0;
and she would do...
int monthspassed;
monthspassed = 0;
oh my god, that is the most annoying thing someone can do.
#7
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 02:32 PM
#8
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 02:47 PM
#9
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 03:04 PM
nbroemm1, on 10 February 2010 - 03:00 PM, said:
If the variables are only used for a limited life time, that actually is not always a bad idea. If they are used throughout the program then there is a problem. Limiting the life time of a variable reduces the chance of it corrupting other values and introducing bugs. With out seeing an example it is hard to know for sure. It can be annoying though.
Quote
No two programmers have the same coding style. That is why it is believed that writing a program to check if two programs would create the same results is considered a theoretical impossiblity for non-trivial programs. You may find in the workplace that you will be required to write classes for a large project where you will have complete control over the code. The other person using your class shouldn't need to know how the class works, just that if does what you tell them it will do.
BenignDesign, on 10 February 2010 - 03:04 PM, said:
Amen!
WolfCoder, on 10 February 2010 - 03:08 PM, said:
ditto.
#10
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 03:54 PM
nbroemm1, on 10 February 2010 - 02:00 PM, said:
int monthsPassed = 0;
and she would do...
int monthspassed;
monthspassed = 0;
This would make me twitch. In reality, any style is acceptable as long as it's consistent. However, subjectively, if it's not my style it's wrong. ;)
I've tried to impose certain practices on my programmers; some stick, some don't. Some folks don't even seem particularly bothered about the format as long as it works.
Since I'd rather program than "fix" other people's work, I simply use my style consistently let others do as they will. It's funny, seeing snippets of production code I've written pop up in other people's projects. You can spot it on formatting alone. If I swipe existing code, I can't be content until it's formatted properly.
#11
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 04:30 PM
#12
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 04:43 PM
#13 Guest_demosthenes2k8*
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 06:19 PM
I only get annoyed at peoples' style if you can't read it because it's not indented properly. THAT pisses me off.
#14
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 06:46 PM
For example, in C# I might do something like this:
public void SomeMethod()
{
// Some code
}
and a C++ programmer might do it like:
void someMethod() {
// Some code
}
The way that most people would format the braces and have their public methods and members lower case drove me crazy, because that's not how I learned to do things.
This post has been edited by lesPaul456: 10 February 2010 - 06:47 PM
#15
Re: Are programmers controlling when it comes to their code?
Posted 10 February 2010 - 07:06 PM
demosthenes2k8, on 10 February 2010 - 09:19 PM, said:
We need to post this in the big, yellow READ THIS FIRST box. It is so annoying trying to debug someone's code, and they won't even indent it for you. In general though, as long as the indentations don't detract from my following the logic flow, I won't complain too loudly about that person's spacing style. Personally, though, I prefer the C++ style of indentations vs. the C# style. It is much more organized and easier to look at, as there are fewer lines to read.
|
|

New Topic/Question
Reply



MultiQuote












|