Another Horror
-
Narotham Babu Kalluri wrote:
this part is written in many places of the application
That's too bad. What was the programmer thinking?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
I think he'd switched off ;) Regards, --Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds -
I think he'd switched off ;) Regards, --Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus TorvaldsPerspx wrote:
switched
:laugh: Nice play on word there :-D
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
Perspx wrote:
switched
:laugh: Nice play on word there :-D
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
Thanks :) Regards, --Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds -
I've found this piece of code recently in my new project
if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
And this part is written in many places of the applicationIt seems that someone simply has knowledge leaks. Knowing that it is possible to pass a value of a variable to a function directly not like this, is bloody essential thing and it would be nice if someone told him or her that. Just snoop around to find out who wrote this and make a good deed today. Hmm.. it's a funny horror anyway. :)
Greetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
-
I've found this piece of code recently in my new project
if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
And this part is written in many places of the applicationNarotham Babu Kalluri wrote:
I've found this piece of code recently in my new project if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
Since this programmer obviously can't make a switch in code, your company should make a switch of employees.
-
Narotham Babu Kalluri wrote:
I've found this piece of code recently in my new project if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
Since this programmer obviously can't make a switch in code, your company should make a switch of employees.
Someone voted you down for that. Gave you a 5 to balance it out :rolleyes:
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
Someone voted you down for that. Gave you a 5 to balance it out :rolleyes:
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
Paul Conrad wrote:
Someone voted you down for that. Gave you a 5 to balance it out
:laugh: Thanks
-
I've found this piece of code recently in my new project
if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
And this part is written in many places of the applicationAh. Don't worry about it. You see, the compiler takes a look at this and works out the redundancy. In fact, the redundancy notices should be on their desks by the time the link cycle has completed.
Deja View - the feeling that you've seen this post before.
-
Yes, it is. Hopefully the coder is no longer with that company.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
I hope your using the term "Coder" loosely there... Probably better said by saying **** Monkey, with approporiate word inserted in place of Code..
-
Narotham Babu Kalluri wrote:
I've found this piece of code recently in my new project if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
Since this programmer obviously can't make a switch in code, your company should make a switch of employees.
if (a >= 1 && a <= 4)
DoSomething(a);is a better option than a
switch
I think :) .Greetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
-
if (a >= 1 && a <= 4)
DoSomething(a);is a better option than a
switch
I think :) .Greetings - Gajatko Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
gajatko wrote:
if (a >= 1 && a <= 4) DoSomething(a); is a better option than a switch I think .
Hmmmm...in this case, yes :)
-
I've found this piece of code recently in my new project
if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
And this part is written in many places of the applicationLOL
-
I've found this piece of code recently in my new project
if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
And this part is written in many places of the applicationThat is almost beautiful in it's inelegance! It is hard to come up with something convoluted and still have code that looks like the person writing it didn't try hard to make it as convoluted as possible...
-
gajatko wrote:
if (a >= 1 && a <= 4) DoSomething(a); is a better option than a switch I think .
Hmmmm...in this case, yes :)
-
I've found this piece of code recently in my new project
if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
And this part is written in many places of the application -
VentsyV wrote:
And that's why your previous post got voted down.
:laugh: once I start caring, I might start paying attention to the scores.
-
VentsyV wrote:
And that's why your previous post got voted down.
:laugh: once I start caring, I might start paying attention to the scores.
-
VentsyV wrote:
That post was for Paul Conrad's benefit really.
A pity, then, that it appeared as a reply to MY post. I am an INNOCENT BYSTANDER!! :^)
-
I've found this piece of code recently in my new project
if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
And this part is written in many places of the application -
I've found this piece of code recently in my new project
if(a==1 || a==2 || a==3 || a==4) { if(a==1) DoSomething(1); else if(a==2) DoSomething(2); else if(a==3) DoSomething(3); else if(a==4) DoSomething(4); }
And this part is written in many places of the application