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

 
GeneralHow to split a string the hard way (VB6) Pin
AaronM_NZ7-Mar-10 12:58
AaronM_NZ7-Mar-10 12:58 
GeneralRe: How to split a string the hard way (VB6) Pin
GibbleCH8-Mar-10 6:14
GibbleCH8-Mar-10 6:14 
GeneralRe: How to split a string the hard way (VB6) Pin
peterchen9-Mar-10 8:57
peterchen9-Mar-10 8:57 
GeneralRe: How to split a string the hard way (VB6) Pin
OriginalGriff9-Mar-10 9:25
mveOriginalGriff9-Mar-10 9:25 
GeneralRe: How to split a string the hard way (VB6) Pin
Stanciu Vlad9-Mar-10 10:30
Stanciu Vlad9-Mar-10 10:30 
GeneralRe: How to split a string the hard way (VB6) Pin
Paulo Zemek9-Mar-10 10:35
mvaPaulo Zemek9-Mar-10 10:35 
GeneralEver heard of casting? Pin
ArchimaX3-Mar-10 0:49
ArchimaX3-Mar-10 0:49 
GeneralRe: Ever heard of casting? [modified] Pin
OriginalGriff3-Mar-10 1:11
mveOriginalGriff3-Mar-10 1:11 
Never mind casting - at least he didn't use a loop:
decimal tenE18 = 1;
for (int i = 0; i < 18; i++)
    {
    tenE18 *= 10;
    }

Still, I think I will stick to the old-fashioned, boring way:
decimal d = 1E18M;

[edit]Got the number of zeros wrong, didn't I? Oops.[/edit]
You should never use standby on an elephant. It always crashes when you lift the ears. - Mark Wallace

C/C++ (I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste) - fat_boy

modified on Wednesday, March 3, 2010 11:21 AM

AnswerMessage Removed Pin
3-Mar-10 1:24
chevu3-Mar-10 1:24 
GeneralRe: Ever heard of casting? Pin
johannesnestler3-Mar-10 3:52
johannesnestler3-Mar-10 3:52 
GeneralRe: Ever heard of casting? [modified] Pin
chevu3-Mar-10 16:25
chevu3-Mar-10 16:25 
GeneralRe: Ever heard of casting? Pin
Luc Pattyn3-Mar-10 16:41
sitebuilderLuc Pattyn3-Mar-10 16:41 
GeneralRe: Ever heard of casting? Pin
johannesnestler4-Mar-10 22:54
johannesnestler4-Mar-10 22:54 
GeneralRe: Ever heard of casting? Pin
Luc Pattyn3-Mar-10 4:39
sitebuilderLuc Pattyn3-Mar-10 4:39 
GeneralRe: Ever heard of casting? Pin
harold aptroot3-Mar-10 7:11
harold aptroot3-Mar-10 7:11 
JokeRe: Ever heard of casting? Pin
Stanciu Vlad3-Mar-10 3:25
Stanciu Vlad3-Mar-10 3:25 
JokeRe: Ever heard of casting? Pin
johannesnestler3-Mar-10 4:53
johannesnestler3-Mar-10 4:53 
GeneralRe: Ever heard of casting? Pin
johannesnestler3-Mar-10 3:48
johannesnestler3-Mar-10 3:48 
GeneralRe: Ever heard of casting? Pin
OriginalGriff3-Mar-10 4:29
mveOriginalGriff3-Mar-10 4:29 
GeneralRe: Ever heard of casting? Pin
johannesnestler3-Mar-10 4:42
johannesnestler3-Mar-10 4:42 
GeneralRe: Ever heard of casting? Pin
OriginalGriff3-Mar-10 4:51
mveOriginalGriff3-Mar-10 4:51 
GeneralRe: Ever heard of casting? Pin
johannesnestler3-Mar-10 4:55
johannesnestler3-Mar-10 4:55 
AnswerMessage Removed Pin
3-Mar-10 16:50
chevu3-Mar-10 16:50 
GeneralRe: Ever heard of casting? Pin
Luc Pattyn3-Mar-10 17:23
sitebuilderLuc Pattyn3-Mar-10 17:23 
GeneralRe: Ever heard of casting? Pin
chevu3-Mar-10 18:17
chevu3-Mar-10 18:17 

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.