Get rid of this programmer
-
TheCoolestDudeInComputerWorld wrote:
if this is c++ why didn't he just go int_i++ its a lot faster then inc(int_i) (assuming he had his datatypes spelled right)
This is not C++. The
private
keyword cannot precede a function like this in C++. Looks like some C#/VB hybrid to me ;P But if it was C++, this function would most probably be optimized away by the compiler, so there would be no performance penalty.
It's entirely C#, not a hybrid.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
I hired a programmer right out of school. Started him on a very simple project. I performed a tech review of the code and saw the following method call private integer inc(integer int_i) { integer int_j=int_i+1; return int_j; } He no longer works for the company.......:wtf: Moose Man
I would have to see the rest of their work before deciding, unless they where expected to work alone. A degree does not guarantee that someone is a programmer, only that they are capable of learning. Until recently I did not have a degree and I have been a programmer for years. I did already have an associates degree in electronics, but I was not a technician long enough to claim it as a profession. Here is an idea: Give them a personality test, that way you will have a better idea of how good a programmer they have the potential of becoming.
INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
-
It's entirely C#, not a hybrid.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007C# doesn't have an
integer
keyword - it's Java. I'm fairly sure thatjava.lang.Integer
is a class, not a straightforward value type - that's still calledint
. That would make anInteger
the equivalent of a boxedint
in C#/.NET.Stability. What an interesting concept. -- Chris Maunder
-
More proof that an idiot can write bad code in any language - not just VB. :-D
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
C# doesn't have an
integer
keyword - it's Java. I'm fairly sure thatjava.lang.Integer
is a class, not a straightforward value type - that's still calledint
. That would make anInteger
the equivalent of a boxedint
in C#/.NET.Stability. What an interesting concept. -- Chris Maunder
Whoops! Missed that one. Comes from using primarily VB.NET to do all my work.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
C# doesn't have an
integer
keyword - it's Java. I'm fairly sure thatjava.lang.Integer
is a class, not a straightforward value type - that's still calledint
. That would make anInteger
the equivalent of a boxedint
in C#/.NET.Stability. What an interesting concept. -- Chris Maunder
Mike Dimmick wrote:
C# doesn't have an integer keyword - it's Java.
Just like C#, Java doesn't have
integer
keyword. Here is the list of Java keywords.[^]
-
I would have to see the rest of their work before deciding, unless they where expected to work alone. A degree does not guarantee that someone is a programmer, only that they are capable of learning. Until recently I did not have a degree and I have been a programmer for years. I did already have an associates degree in electronics, but I was not a technician long enough to claim it as a profession. Here is an idea: Give them a personality test, that way you will have a better idea of how good a programmer they have the potential of becoming.
INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
I didn't consider the possibility, maybe he just had a brain fart? I can remember writing what i was thinking one or two times. Granted he SHOULD have read over his code before presenting it... I can say I've presented code to my boss without fully testing it out of stupid young confidence.
-
I didn't consider the possibility, maybe he just had a brain fart? I can remember writing what i was thinking one or two times. Granted he SHOULD have read over his code before presenting it... I can say I've presented code to my boss without fully testing it out of stupid young confidence.
-
I didn't consider the possibility, maybe he just had a brain fart? I can remember writing what i was thinking one or two times. Granted he SHOULD have read over his code before presenting it... I can say I've presented code to my boss without fully testing it out of stupid young confidence.
That was more than a brain fart, but it would have done what it was designed to do. It was just a foolish thing to do. I have never had a boss that could really understand the code without me explaining it to him. Matter of fact I cust one for saying I did not understand the question, when the fact was he did not understand the answer. Of course they had just hired him and he eventialy learned that I knew what I was doing.
INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
-
C# doesn't have an
integer
keyword - it's Java. I'm fairly sure thatjava.lang.Integer
is a class, not a straightforward value type - that's still calledint
. That would make anInteger
the equivalent of a boxedint
in C#/.NET.Stability. What an interesting concept. -- Chris Maunder
May have used
# define integer int
ortypedef
-
I hired a programmer right out of school. Started him on a very simple project. I performed a tech review of the code and saw the following method call private integer inc(integer int_i) { integer int_j=int_i+1; return int_j; } He no longer works for the company.......:wtf: Moose Man
Did you offer him/her constructive criticism? :) Otherwise they'll continue writing bad code. IMHO it's not really bad code as from what I can tell it looks valid. More bad practice, which is something only experience can teach you - at least osmething that trivial as I don't think Fowler, etc address those kind of design choices. :P
I'm finding the only constant in software development is change it self.
-
May have used
# define integer int
ortypedef
PIEBALDconsult wrote:
May have used # define integer int or typedef
C# does not have them although
using
can be used for that purpose in a file scope, but I honestly think that the OP made a typo. Maybe he should be fired, rather than the poor beginner programmer :)
-
I hired a programmer right out of school. Started him on a very simple project. I performed a tech review of the code and saw the following method call private integer inc(integer int_i) { integer int_j=int_i+1; return int_j; } He no longer works for the company.......:wtf: Moose Man
-
I hired a programmer right out of school. Started him on a very simple project. I performed a tech review of the code and saw the following method call private integer inc(integer int_i) { integer int_j=int_i+1; return int_j; } He no longer works for the company.......:wtf: Moose Man
-
I hired a programmer right out of school. Started him on a very simple project. I performed a tech review of the code and saw the following method call private integer inc(integer int_i) { integer int_j=int_i+1; return int_j; } He no longer works for the company.......:wtf: Moose Man
So what is wrong with it? Use of private before a return declaration? I'm unfamiliar with this syntax. In C++, private and public are used in the class declaration, not the function definitions.
-
I hired a programmer right out of school. Started him on a very simple project. I performed a tech review of the code and saw the following method call private integer inc(integer int_i) { integer int_j=int_i+1; return int_j; } He no longer works for the company.......:wtf: Moose Man
eunderwo00 wrote:
private integer inc(integer int_i) { integer int_j=int_i+1; return int_j; }
Ok this is an unnecessary function but what is the reason you let him go?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy)
"Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School) -
eunderwo00 wrote:
private integer inc(integer int_i) { integer int_j=int_i+1; return int_j; }
Ok this is an unnecessary function but what is the reason you let him go?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy)
"Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)I'm wondering if he wrote additional functions for the remaining operators.
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
PIEBALDconsult wrote:
May have used # define integer int or typedef
C# does not have them although
using
can be used for that purpose in a file scope, but I honestly think that the OP made a typo. Maybe he should be fired, rather than the poor beginner programmer :)
Nah, it's valid pseudo-pseudocode.
-
eunderwo00 wrote:
I hired a programmer right out of school.
Right out of Jr. High? :laugh: How did the "programmer" pass his classes with skills like that?
█▒▒▒▒▒██▒█▒██ █▒█████▒▒▒▒▒█ █▒██████▒█▒██ █▒█████▒▒▒▒▒█ █▒▒▒▒▒██▒█▒██
Captain See Sharp wrote:
How did the "programmer" pass his classes with skills like that?
To me this code shows that the programmer does not know c++ java or has not used it in a very long time.
Last modified: 2hrs 11mins after originally posted --
John
-
eunderwo00 wrote:
private integer inc(integer int_i) { integer int_j=int_i+1; return int_j; }
Ok this is an unnecessary function but what is the reason you let him go?
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that.'" - Tommy (Tommy Boy)
"Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)I can only think that int_j should be explicitly assigned a value at declaration, before actual use in case int_i is passed unassigned, hence : private integer inc(integer int_i) { integer int_j=0; int_j=int_i+1; return int_j; }