Click here to Skip to main content
15,903,856 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
JokeRe: what is the difference in one _gc * and two _gc *? Pin
Vikram A Punathambekar15-May-07 2:32
Vikram A Punathambekar15-May-07 2:32 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Pete O'Hanlon15-May-07 2:54
mvePete O'Hanlon15-May-07 2:54 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Chris Losinger15-May-07 6:03
professionalChris Losinger15-May-07 6:03 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Shog915-May-07 8:06
sitebuilderShog915-May-07 8:06 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Chris Losinger15-May-07 8:23
professionalChris Losinger15-May-07 8:23 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Shog915-May-07 8:46
sitebuilderShog915-May-07 8:46 
GeneralRe: what is the difference in one _gc * and two _gc *? Pin
Pete O'Hanlon15-May-07 9:17
mvePete O'Hanlon15-May-07 9:17 
GeneralFor loops and array Pin
Mladen Janković14-May-07 5:41
Mladen Janković14-May-07 5:41 
<br />
                                for (int c = 0; c < _myHand.CardCount; c++)<br />
                                {<br />
                                    if (_myHand.Cards[c].Equals(1))<br />
                                        e[1] = e[1] + 1;<br />
                                    else<br />
                                        if (_myHand.Cards[c].Equals(2))<br />
                                            e[2] = e[2] + 1;<br />
                                        else<br />
                                            if (_myHand.Cards[c].Equals(3))<br />
                                                e[3] = e[3] + 1;<br />
                                            else<br />
                                                if (_myHand.Cards[c].Equals(4))<br />
                                                    e[4] = e[4] + 1;<br />
                                                else<br />
                                                    if (_myHand.Cards[c].Equals(5))<br />
                                                        e[5] = e[5] + 1;<br />
                                                    else<br />
                                                        if (_myHand.Cards[c].Equals(6))<br />
                                                            e[6] = e[6] + 1;<br />
                                                        else<br />
                                                            if (_myHand.Cards[c].Equals(7))<br />
                                                                e[7] = e[7] + 1;<br />
                                                            else<br />
                                                                if (_myHand.Cards[c].Equals(8))<br />
                                                                    e[8] = e[8] + 1;<br />
                                                                else<br />
                                                                    if (_myHand.Cards[c].Equals(9))<br />
                                                                        e[9] = e[9] + 1;<br />
                                                                    else<br />
                                                                        if (_myHand.Cards[c].Equals(10))<br />
                                                                            e[10] = e[10] + 1;<br />
                                                                        else<br />
                                                                            if (_myHand.Cards[c].Equals(12))<br />
                                                                                e[12] = e[12] + 1;<br />
                                                                            else<br />
                                                                                if (_myHand.Cards[c].Equals(13))<br />
                                                                                    e[13] = e[13] + 1;<br />
                                                                                else<br />
                                                                                    if (_myHand.Cards[c].Equals(14))<br />
                                                                                        e[14] = d[14] + 1;<br />
<br />
                                }<br />


This is just great Smile | :) And this thing doesn't appear at one place, but all over the code!

Mostly, when you see programmers, they aren't doing anything. One of the attractive things about programmers is that you cannot tell whether or not they are working simply by looking at them. Very often they're sitting there seemingly drinking coffee and gossiping, or just staring into space. What the programmer is trying to do is get a handle on all the individual and unrelated ideas that are scampering around in his head. (Charles M Strauss)

GeneralRe: For loops and array Pin
PIEBALDconsult14-May-07 6:12
mvePIEBALDconsult14-May-07 6:12 
GeneralRe: For loops and array Pin
Mladen Janković14-May-07 11:07
Mladen Janković14-May-07 11:07 
GeneralRe: For loops and array Pin
jhwurmbach21-May-07 22:57
jhwurmbach21-May-07 22:57 
GeneralRe: For loops and array Pin
Michael Sadlon14-May-07 6:26
Michael Sadlon14-May-07 6:26 
GeneralRe: For loops and array Pin
PIEBALDconsult14-May-07 6:43
mvePIEBALDconsult14-May-07 6:43 
GeneralRe: For loops and array Pin
Michael Sadlon14-May-07 8:07
Michael Sadlon14-May-07 8:07 
GeneralRe: For loops and array Pin
Dan Neely14-May-07 7:01
Dan Neely14-May-07 7:01 
GeneralRe: For loops and array Pin
mav.northwind14-May-07 8:43
mav.northwind14-May-07 8:43 
GeneralRe: For loops and array Pin
John R. Shaw14-May-07 17:22
John R. Shaw14-May-07 17:22 
GeneralRe: For loops and array Pin
Mladen Janković14-May-07 22:25
Mladen Janković14-May-07 22:25 
GeneralRe: For loops and array Pin
John R. Shaw15-May-07 1:04
John R. Shaw15-May-07 1:04 
GeneralAgain, where are cases 0 and 11 ? Pin
Kochise15-May-07 4:05
Kochise15-May-07 4:05 
GeneralRe: Again, where are cases 0 and 11 ? Pin
PIEBALDconsult15-May-07 7:22
mvePIEBALDconsult15-May-07 7:22 
GeneralRe: Again, where are cases 0 and 11 ? Pin
Mladen Janković15-May-07 7:53
Mladen Janković15-May-07 7:53 
GeneralRe: Again, where are cases 0 and 11 ? Pin
PIEBALDconsult15-May-07 9:18
mvePIEBALDconsult15-May-07 9:18 
GeneralRe: Again, where are cases 0 and 11 ? Pin
Dan Neely15-May-07 9:20
Dan Neely15-May-07 9:20 
GeneralRe: Again, where are cases 0 and 11 ? Pin
PIEBALDconsult15-May-07 10:18
mvePIEBALDconsult15-May-07 10:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.