|
Waiting for it to appear...
|
|
|
|
|
This looks like "Security through obscurity" or the writer of this code wants to write such mess.
If this is the style of the writer he ist a danger for the company.
Greetings from Germany
|
|
|
|
|
I have a general R&D solution I use to fiddle and explore various technicalities in. I add little disposable projects here and there as I need to explore some CLR or language feature or something. I only have one project at a time configured to build, the one I'm busy on, so I don't get dependency problems etc.
So, I add a little WinForms project to test aspects of inheritence, and I hit F5 to run it, but this damn Assembly Search dialogue pops up, defaulted to a TestDriven.NET assembly. I check the key mapping for F5 and it's normal. I exit VS and start again, with the same damn Assembly Search dialogue invading my precious peace. I disable TestDriven.NET and on trying again I still get this hell spawn dialogue popping up.
Then I notice I have an AssemblySearch project in the solution, , and it's set as the Startup Project
I didn't expect it do do anything because it's excluded from the solution build, but, it wasn't building, just running.
|
|
|
|
|
That happens.
I discovered that same thing a while back, the thing that bothers me most is having to mark side projects (tests) to no build or vise-versa. It is irritating to have all subprojects rebuilt when I only want to rebuild the current one, especially if the current one is trying to test a piece of code that is causing an error in one of the other projects.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
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.......
Moose Man
|
|
|
|
|
Look at the bright side, the code was easy to understand.
|
|
|
|
|
didn't he try to compile it before he gave you the code.... or better yet, Didn't the syntax highlighting of whatever the latest and greatest IDE you're using catch it... or 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)
|
|
|
|
|
TheCoolestDudeInComputerWorld wrote: didn't he try to compile it before he gave you the code.... or better yet, Didn't the syntax highlighting of whatever the latest and greatest IDE you're using catch it...
Why would it?? It's perfectly legal code! It's not up to the IDE to do optimizations.
TheCoolestDudeInComputerWorld wrote: if this is c++ why didn't he just go int_i++
That's probably why it's in the Coding Horrors forum.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
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
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
|
|
|
|
|
C# doesn't have an integer keyword - it's Java. I'm fairly sure that java.lang.Integer is a class, not a straightforward value type - that's still called int . That would make an Integer the equivalent of a boxed int in C#/.NET.
|
|
|
|
|
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
|
|
|
|
|
|
May have used # define integer int or typedef
|
|
|
|
|
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.
|
|
|
|
|
I can't see anything wrong with that code.
Attitudes like that stop people like me (Students from college) from becoming developers, because no-one wants a newbie. Catch 22.
Tom
|
|
|
|
|
Functionally the code would work. Just weird, when some smarty-pants with a 4-years information system B.-degree and some >=3-years 'experience' codes crap like that.
Imagine then, 4 out of 5 (internal) programmers at the company where i was emplyed, churned out crap like that, for a complex financial system.
Mind you, the lead programmer was creating such code himself.
I have, in my 9 years as developer came across countless exampless of coding horrors, which are created to show-off their 'skill'.
Tom Moore wrote: I can't see anything wrong with that code.
Attitudes like that stop people like me (Students from college) from becoming developers, because no-one wants a newbie. Catch 22.
met vriendelijke groet,
Michiel Erasmus
|
|
|
|
|
Ok, that's pretty scary.
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
At least it probably wasn't copied and pasted from an example on a disk that came with a book.
|
|
|
|
|
More proof that an idiot can write bad code in any language - not just VB.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
|
More proof that an idiot can make any language look like VB...
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
|
|
|
|
|
eunderwo00 wrote: private integer inc(integer int_i)
And what language is this, btw? Looks like C# or Java except for the integer type which is VB-like.
|
|
|
|
|
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
|
|
|
|