Click here to Skip to main content
11,478,562 members (68,074 online)

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, embarrasing 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: How to zero-pad a number? Pin
SortaCore2-Oct-13 3:07
memberSortaCore2-Oct-13 3:07 
GeneralRe: How to zero-pad a number? Pin
PIEBALDconsult2-Oct-13 4:12
professionalPIEBALDconsult2-Oct-13 4:12 
GeneralRe: How to zero-pad a number? Pin
Richard Deeming2-Oct-13 4:19
professionalRichard Deeming2-Oct-13 4:19 
GeneralRe: How to zero-pad a number? Pin
PIEBALDconsult2-Oct-13 4:28
professionalPIEBALDconsult2-Oct-13 4:28 
GeneralRe: How to zero-pad a number? Pin
SortaCore2-Oct-13 10:21
memberSortaCore2-Oct-13 10:21 
GeneralRe: How to zero-pad a number? Pin
SortaCore1-Oct-13 11:48
memberSortaCore1-Oct-13 11:48 
GeneralRe: How to zero-pad a number? Pin
Grimlock3-Oct-13 0:19
professionalGrimlock3-Oct-13 0:19 
GeneralThat really makes a difference Pin
mav.northwind26-Sep-13 21:51
membermav.northwind26-Sep-13 21:51 
GeneralRe: That really makes a difference Pin
GuyThiebaut2-Oct-13 6:31
memberGuyThiebaut2-Oct-13 6:31 
GeneralRe: That really makes a difference Pin
Athari7-Oct-13 7:50
professionalAthari7-Oct-13 7:50 
GeneralCan I copy that? Pin
BotCar25-Sep-13 3:32
memberBotCar25-Sep-13 3:32 
GeneralRe: Can I copy that? Pin
Pete O'Hanlon25-Sep-13 3:46
protectorPete O'Hanlon25-Sep-13 3:46 
GeneralRe: Can I copy that? Pin
Nicholas Marty25-Sep-13 5:12
memberNicholas Marty25-Sep-13 5:12 
GeneralWhy is my code so slow?? Pin
vonb24-Sep-13 2:39
professionalvonb24-Sep-13 2:39 
Strange behavior in my code, every operation it had to do took 5 seconds..

At the end I found it:

System.Threading.Thread.Sleep(5000);

It was sitting there since the beggining of the project. Commented it, testing, and it worked normally.

Can't remember why I made the system sleep 5 secs, on 10 operations it's ok, but on production we got 2'500 operations, took forever.. Sleepy | :zzz:
The signature is in building process.. Please wait...

GeneralRe: Why is my code so slow?? Pin
Jörgen Andersson24-Sep-13 5:30
professionalJörgen Andersson24-Sep-13 5:30 
GeneralRe: Why is my code so slow?? Pin
vonb24-Sep-13 5:37
professionalvonb24-Sep-13 5:37 
GeneralRe: Why is my code so slow?? Pin
Jörgen Andersson24-Sep-13 9:32
professionalJörgen Andersson24-Sep-13 9:32 
GeneralRe: Why is my code so slow?? Pin
Rage24-Sep-13 6:15
memberRage24-Sep-13 6:15 
GeneralRe: Why is my code so slow?? Pin
Jörgen Andersson24-Sep-13 9:34
professionalJörgen Andersson24-Sep-13 9:34 
GeneralMessage Automatically Removed Pin
24-Sep-13 9:49
memberNishali Kashyap24-Sep-13 9:49 
GeneralRe: Why is my code so slow?? [modified] Pin
CIDev24-Sep-13 6:01
professionalCIDev24-Sep-13 6:01 
GeneralRe: Why is my code so slow?? Pin
OriginalGriff24-Sep-13 9:58
protectorOriginalGriff24-Sep-13 9:58 
GeneralRe: Why is my code so slow?? Pin
@AmitGajjar25-Sep-13 2:57
professional@AmitGajjar25-Sep-13 2:57 
GeneralRe: Why is my code so slow?? Pin
PIEBALDconsult24-Sep-13 16:38
professionalPIEBALDconsult24-Sep-13 16:38 
GeneralRe: Why is my code so slow?? Pin
vonb24-Sep-13 20:20
professionalvonb24-Sep-13 20:20 
GeneralRe: Why is my code so slow?? Pin
PIEBALDconsult24-Sep-13 20:22
professionalPIEBALDconsult24-Sep-13 20:22 
GeneralRe: Why is my code so slow?? Pin
vonb24-Sep-13 20:58
professionalvonb24-Sep-13 20:58 
GeneralRe: Why is my code so slow?? Pin
Nagy Vilmos24-Sep-13 23:14
memberNagy Vilmos24-Sep-13 23:14 
GeneralRe: Why is my code so slow?? Pin
@AmitGajjar25-Sep-13 2:58
professional@AmitGajjar25-Sep-13 2:58 
GeneralRe: Why is my code so slow?? Pin
SortaCore1-Oct-13 11:58
memberSortaCore1-Oct-13 11:58 
GeneralRe: Why is my code so slow?? Pin
Bernhard Hiller25-Sep-13 22:45
professionalBernhard Hiller25-Sep-13 22:45 
GeneralNot really a question of how-do-I... Pin
SortaCore23-Sep-13 0:41
memberSortaCore23-Sep-13 0:41 
GeneralRe: Not really a question of how-do-I... Pin
d@nish 23-Sep-13 1:45
member d@nish 23-Sep-13 1:45 
GeneralRe: Not really a question of how-do-I... Pin
OriginalGriff23-Sep-13 1:51
protectorOriginalGriff23-Sep-13 1:51 
GeneralRe: Not really a question of how-do-I... Pin
Member 205300623-Sep-13 2:01
memberMember 205300623-Sep-13 2:01 
QuestionRe: Not really a question of how-do-I... Pin
Eddy Vluggen23-Sep-13 4:40
mvpEddy Vluggen23-Sep-13 4:40 
GeneralRe: Not really a question of how-do-I... Pin
Suvabrata Roy23-Sep-13 4:26
professionalSuvabrata Roy23-Sep-13 4:26 
GeneralRe: Not really a question of how-do-I... Pin
Dan Neely24-Sep-13 3:57
memberDan Neely24-Sep-13 3:57 
GeneralRe: Not really a question of how-do-I... Pin
0bx24-Sep-13 5:07
member0bx24-Sep-13 5:07 
GeneralRe: Not really a question of how-do-I... Pin
PIEBALDconsult24-Sep-13 16:37
professionalPIEBALDconsult24-Sep-13 16:37 
GeneralRe: Not really a question of how-do-I... Pin
Brisingr Aerowing10-Oct-13 10:21
professionalBrisingr Aerowing10-Oct-13 10:21 
GeneralRe: Not really a question of how-do-I... Pin
BuggyTimes25-Sep-13 4:38
memberBuggyTimes25-Sep-13 4:38 
GeneralAnyone see the problem here? Pin
Mardy Git19-Sep-13 23:50
memberMardy Git19-Sep-13 23:50 
GeneralRe: Anyone see the problem here? Pin
BotCar19-Sep-13 23:57
memberBotCar19-Sep-13 23:57 
GeneralRe: Anyone see the problem here? Pin
Sentenryu20-Sep-13 3:30
memberSentenryu20-Sep-13 3:30 
GeneralRe: Anyone see the problem here? Pin
BotCar20-Sep-13 3:51
memberBotCar20-Sep-13 3:51 
GeneralRe: Anyone see the problem here? Pin
Argonia20-Sep-13 0:50
memberArgonia20-Sep-13 0:50 
GeneralRe: Anyone see the problem here? Pin
Mardy Git20-Sep-13 0:56
memberMardy Git20-Sep-13 0:56 
GeneralRe: Anyone see the problem here? Pin
Richard Deeming20-Sep-13 3:01
professionalRichard Deeming20-Sep-13 3:01 
GeneralRe: Anyone see the problem here? Pin
PIEBALDconsult21-Sep-13 1:44
professionalPIEBALDconsult21-Sep-13 1:44 

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

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


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 22 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid