Click here to Skip to main content
15,896,727 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.

 
GeneralRe: Give your boss a break, man [modified] Pin
Burnsys225-Sep-07 2:26
Burnsys225-Sep-07 2:26 
GeneralRe: Give your boss a break, man Pin
leppie25-Sep-07 4:12
leppie25-Sep-07 4:12 
GeneralRe: Give your boss a break, man Pin
Xiangyang Liu 刘向阳25-Sep-07 4:52
Xiangyang Liu 刘向阳25-Sep-07 4:52 
GeneralRe: Give your boss a break, man Pin
Tristan Rhodes25-Sep-07 22:48
Tristan Rhodes25-Sep-07 22:48 
GeneralRe: Another from my boss! Pin
KarstenK25-Sep-07 1:20
mveKarstenK25-Sep-07 1:20 
JokeRe: Another from my boss! Pin
Pete O'Hanlon25-Sep-07 1:36
mvePete O'Hanlon25-Sep-07 1:36 
GeneralRe: Another from my boss! Pin
KarstenK25-Sep-07 2:04
mveKarstenK25-Sep-07 2:04 
GeneralTemporal coding. Pin
Burnsys227-Sep-07 1:38
Burnsys227-Sep-07 1:38 
Another one from my boss! lol.
This is actually from a final production software developed by my boss a couple years ago, now we are going to .net and he told me to "Do the same that this module".
so here is part of the code:

tmpAdd = tmpAdd + Format(tmp5, "###,##0") + Chr(9)
                   tmpAdd = tmpAdd + Format(tmp6, "###,##0") + Chr(9)
                   tmpAdd = tmpAdd + Format(tmp3 + tmp5, "###,##0") + Chr(9)
                   tmpAdd = tmpAdd + Format(tmp4 + tmp6, "###,##0") + Chr(9)
                   mTotalesMSF(6) = mTotalesMSF(6) + tmp6 + tmp4
                   If tmp1 = 0 Then
                       tmpCero = 100
                   Else
                       If tmp3 + tmp5 = 0 Then
                           tmpCero = 0
                       Else
                           tmpCero = ((tmp3 + tmp5) / tmp1) * 100
                       End If
                   End If
                   tmpAdd = tmpAdd + Format(tmp3 + tmp5 - tmp1, "#,##0") + Chr(9)
                   tmpAdd = tmpAdd + Format(tmpCero, "#,##0") + "%" + Chr(9)
                   If tmp2 = 0 Then
                       tmpCero = 100
                   Else
                       If tmp4 + tmp6 = 0 Then
                           tmpCero = 0
                       Else
                           tmpCero = ((tmp4 + tmp6) / tmp2) * 100
                       End If
                   End If
                   tmpAdd = tmpAdd + Format(tmp4 + tmp6 - tmp2, "#,##0") + Chr(9)
                   tmpAdd = tmpAdd + Format(tmpCero, "#,##0") + "%"
                   mTotalesMSF(7) = mTotalesMSF(7) + tmp4 + tmp6 - tmp2
                   If tmp1 + tmp2 + tmp3 + tmp4 + tmp5 + tmp6 <> 0 Then msfConsulta.AddItem tmpAdd
                   rstmp.MoveNext


At last, tmp4,6,7,2,3 etc are variables with things like, total sales, proyected sales, pending orders, etc..
GeneralRe: Temporal coding. Pin
lepipele28-Sep-07 8:22
lepipele28-Sep-07 8:22 
GeneralRe: Temporal coding. Pin
Michael Sync2-Oct-07 21:37
Michael Sync2-Oct-07 21:37 
GeneralRe: Temporal coding. Pin
hogan31-Oct-07 8:02
hogan31-Oct-07 8:02 
GeneralOLE Pin
Lutosław19-Sep-07 1:36
Lutosław19-Sep-07 1:36 
GeneralRe: OLE Pin
NormDroid19-Sep-07 3:33
professionalNormDroid19-Sep-07 3:33 
GeneralRe: OLE Pin
Lutosław19-Sep-07 3:58
Lutosław19-Sep-07 3:58 
GeneralRe: OLE Pin
Pete O'Hanlon19-Sep-07 3:35
mvePete O'Hanlon19-Sep-07 3:35 
GeneralRe: OLE Pin
Mike Dimmick19-Sep-07 4:35
Mike Dimmick19-Sep-07 4:35 
GeneralRe: OLE Pin
Patrick Etc.19-Sep-07 8:21
Patrick Etc.19-Sep-07 8:21 
GeneralRe: OLE Pin
Mike Dimmick19-Sep-07 9:37
Mike Dimmick19-Sep-07 9:37 
GeneralRe: OLE Pin
NormDroid20-Sep-07 1:08
professionalNormDroid20-Sep-07 1:08 
GeneralRe: OLE Pin
AEternal1-Oct-07 9:50
AEternal1-Oct-07 9:50 
GeneralRe: OLE Pin
NormDroid1-Oct-07 20:27
professionalNormDroid1-Oct-07 20:27 
GeneralRe: OLE Pin
Judah Gabriel Himango21-Sep-07 11:48
sponsorJudah Gabriel Himango21-Sep-07 11:48 
GeneralRe: OLE Pin
KarstenK24-Sep-07 1:43
mveKarstenK24-Sep-07 1:43 
GeneralIf at first you don't succeed... Pin
sushicw18-Sep-07 7:32
sushicw18-Sep-07 7:32 
GeneralRe: If at first you don't succeed... Pin
Pete O'Hanlon18-Sep-07 10:56
mvePete O'Hanlon18-Sep-07 10:56 

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.