Are programmers controlling when it comes to their code?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

35 Replies - 5362 Views - Last Post: 11 February 2012 - 09:54 PM

#1 nbroemm1  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 8
  • Joined: 28-September 09

Are programmers controlling when it comes to their code?

Post icon  Posted 10 February 2010 - 01:00 PM

I have been programming for about two years now, basically when I started college. All I hear from my professors is that programming in the real world is working in teams or with other people to complete projects.

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?

Is This A Good Question/Topic? 0
  • +

Replies To: Are programmers controlling when it comes to their code?

#2 BenignDesign  Icon User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 5915
  • View blog
  • Posts: 10,332
  • Joined: 28-September 07

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 01:04 PM

I think it is common to be anal retentive about code. I also think it is common to be forced to work in teams. Generally, you just have to grit your teeth and deal with it.
Was This Post Helpful? 0
  • +
  • -

#3 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 782
  • View blog
  • Posts: 7,610
  • Joined: 05-May 05

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 01:08 PM

I think it's a given that you'll end up working with people who shouldn't be writing computer programs most of the time.
Was This Post Helpful? 0
  • +
  • -

#4 Martyn.Rae  Icon User is offline

  • The programming dinosaur
  • member icon

Reputation: 540
  • View blog
  • Posts: 1,406
  • Joined: 22-August 09

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 01:59 PM

I have found that working with others who are how shall we say 'logically challanged', can be quite rewarding as I can gradually phase in my mentoring hat. It is not worthwhile just telling them they are useless, but one should try and look at their positive traits and get them to work slowly but surely on their negative. They respond much better to "Don't you think it would be better done this way?" rather than "The way you have done it is wrong!"
Was This Post Helpful? 4
  • +
  • -

#5 xor-logic  Icon User is offline

  • HAL9000 was an Apple product
  • member icon

Reputation: 128
  • View blog
  • Posts: 764
  • Joined: 04-February 10

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 02:03 PM

My response is just to make sure that mine is good and the way I like it, and that their bit at least works. If they do it strangely, I try not to notice. Then I get home and kick the chihuahua.
Was This Post Helpful? 0
  • +
  • -

#6 Theaegd  Icon User is offline

  • Hater & Lover

Reputation: -125
  • View blog
  • Posts: 944
  • Joined: 15-August 09

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 02:04 PM

Quote

I would do something like
int monthsPassed = 0;

and she would do...
int monthspassed;
monthspassed = 0;

oh my god, that is the most annoying thing someone can do.
Was This Post Helpful? 3
  • +
  • -

#7 5thWall  Icon User is offline

  • Occasional Member

Reputation: 31
  • View blog
  • Posts: 530
  • Joined: 17-September 08

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 02:32 PM

Well, in the workplace you'll also probably have a coding standards document that make sure everyone's code has the same basic style. It will probably cover things like camel case, where brackets go, spaces vs tabs, etc...
Was This Post Helpful? 3
  • +
  • -

#8 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10364
  • View blog
  • Posts: 38,390
  • Joined: 27-December 08

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 02:47 PM

When it comes to my programming projects, I'm not just controlling with my code, but everyone else's as well (unless the instructor says, each person write a method. in which case, so long as the components work, I'm not going to complain). I am very much of the mindset if you're going to do it, do it right or kindly gtfo (and yes, that's what she said).
Was This Post Helpful? 0
  • +
  • -

#9 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 945
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 03:04 PM

View Postnbroemm1, on 10 February 2010 - 03:00 PM, said:

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.


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

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.


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.


View PostBenignDesign, on 10 February 2010 - 03:04 PM, said:

Generally, you just have to grit your teeth and deal with it.


Amen!

View PostWolfCoder, on 10 February 2010 - 03:08 PM, said:

I think it's a given that you'll end up working with people who shouldn't be writing computer programs most of the time.


ditto.
Was This Post Helpful? 0
  • +
  • -

#10 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5770
  • View blog
  • Posts: 12,582
  • Joined: 16-October 07

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 03:54 PM

View Postnbroemm1, on 10 February 2010 - 02:00 PM, said:

I would do something like
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.
Was This Post Helpful? 0
  • +
  • -

#11 DuoShin85  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 39
  • View blog
  • Posts: 135
  • Joined: 18-December 09

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 04:30 PM

The style of other programmers doesn't bother me. As long my code fits the required specifications, I am fine.
Was This Post Helpful? 1
  • +
  • -

#12 nbroemm1  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 8
  • Joined: 28-September 09

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 04:43 PM

I'm so glad I'm not the only one :D
Was This Post Helpful? 0
  • +
  • -

#13 Guest_demosthenes2k8*


Reputation:

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 06:19 PM

I definitely share in your woes, I'm having trouble leading a project where various people are at different levels of knowledge. Trying to have some people work together (or even work at all) is immensely frustrating.
I only get annoyed at peoples' style if you can't read it because it's not indented properly. THAT pisses me off.
Was This Post Helpful? 0

#14 lesPaul456  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 173
  • View blog
  • Posts: 729
  • Joined: 16-April 09

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 06:46 PM

It seems like your background and how you learned to program will affect you habits. The first language I learned was C#. How I program was very much affected by the styles of others who I learned from. I took bits and pieces from other programmers and tweaked it until I was comfortable. Then, when I started learning C++, I noticed that most people who started with C++ programmed so much differently.

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

Was This Post Helpful? 0
  • +
  • -

#15 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10364
  • View blog
  • Posts: 38,390
  • Joined: 27-December 08

Re: Are programmers controlling when it comes to their code?

Posted 10 February 2010 - 07:06 PM

View Postdemosthenes2k8, on 10 February 2010 - 09:19 PM, said:

I only get annoyed at peoples' style if you can't read it because it's not indented properly. THAT pisses me off.


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.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3