Click here to Skip to main content
15,895,871 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: useless... Pin
supercat97-Jun-10 6:08
supercat97-Jun-10 6:08 
GeneralRe: useless... PinPopular
J4amieC7-Jun-10 6:31
J4amieC7-Jun-10 6:31 
GeneralRe: useless... Pin
supercat97-Jun-10 8:52
supercat97-Jun-10 8:52 
GeneralRe: useless... Pin
PIEBALDconsult8-Jun-10 3:21
mvePIEBALDconsult8-Jun-10 3:21 
GeneralRe: useless... Pin
Hired Mind13-Jul-10 10:23
Hired Mind13-Jul-10 10:23 
GeneralWhen you got your numbers, who needs other types Pin
Yusuf3-Jun-10 8:12
Yusuf3-Jun-10 8:12 
GeneralRe: When you got your numbers, who needs other types Pin
Dan Mos3-Jun-10 9:15
Dan Mos3-Jun-10 9:15 
GeneralRe: When you got your numbers, who needs other types Pin
Ian Shlasko3-Jun-10 9:17
Ian Shlasko3-Jun-10 9:17 
It's not even doing that much.... All it's doing is checking whether the state changed to/from 2 (Or neither)...
VB
If oldState = newState Then
  StockChange = False
Else if oldState = StockStates.WhateverTheHell2Means Then 
  StockDir = 1
Else if newState = StockStates.WhateverTheHell2Means Then
  StockDir = -1
End If


Don't ya just hate legacy code?
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)

GeneralRe: When you got your numbers, who needs other types Pin
Yusuf3-Jun-10 9:50
Yusuf3-Jun-10 9:50 
GeneralRe: When you got your numbers, who needs other types PinPopular
Andrew Rissing3-Jun-10 9:36
Andrew Rissing3-Jun-10 9:36 
GeneralRe: When you got your numbers, who needs other types Pin
DaveyM694-Jun-10 10:43
professionalDaveyM694-Jun-10 10:43 
GeneralRe: When you got your numbers, who needs other types PinPopular
Thomas Krojer3-Jun-10 21:56
Thomas Krojer3-Jun-10 21:56 
GeneralRe: When you got your numbers, who needs other types Pin
_Erik_3-Jun-10 23:56
_Erik_3-Jun-10 23:56 
GeneralRe: When you got your numbers, who needs other types Pin
Jeremy Hutchinson4-Jun-10 9:12
professionalJeremy Hutchinson4-Jun-10 9:12 
GeneralRe: When you got your numbers, who needs other types Pin
Yusuf4-Jun-10 10:45
Yusuf4-Jun-10 10:45 
GeneralSize Matters Take Two Pin
Paul Hooper27-May-10 3:19
Paul Hooper27-May-10 3:19 
GeneralRe: Size Matters Take Two Pin
ricmil4227-May-10 5:24
ricmil4227-May-10 5:24 
GeneralRe: Size Matters Take Two Pin
CDP180228-May-10 2:43
CDP180228-May-10 2:43 
GeneralRe: Size Matters Take Two Pin
Nagy Vilmos4-Jun-10 10:20
professionalNagy Vilmos4-Jun-10 10:20 
GeneralRe: Size Matters Take Two Pin
Luc Pattyn4-Jun-10 11:40
sitebuilderLuc Pattyn4-Jun-10 11:40 
GeneralRe: Size Matters Take Two Pin
Hired Mind13-Jul-10 10:31
Hired Mind13-Jul-10 10:31 
GeneralRe: Size Matters Take Two Pin
Jeroen De Dauw27-May-10 5:25
Jeroen De Dauw27-May-10 5:25 
GeneralRe: Size Matters Take Two Pin
Dan Mos30-May-10 6:24
Dan Mos30-May-10 6:24 
GeneralRe: Size Matters Take Two Pin
peterchen7-Jun-10 2:46
peterchen7-Jun-10 2:46 
GeneralRe: Size Matters Take Two Pin
Gary R. Wheeler13-Jun-10 11:47
Gary R. Wheeler13-Jun-10 11:47 

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.