Click here to Skip to main content
11,481,916 members (65,265 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: Convert.ToInt32 Pin
robocodeboy2-Dec-13 1:17
memberrobocodeboy2-Dec-13 1:17 
GeneralRe: Convert.ToInt32 Pin
Argonia2-Dec-13 1:48
memberArgonia2-Dec-13 1:48 
GeneralRe: Convert.ToInt32 Pin
robocodeboy2-Dec-13 2:06
memberrobocodeboy2-Dec-13 2:06 
GeneralRe: Convert.ToInt32 Pin
robocodeboy2-Dec-13 2:10
memberrobocodeboy2-Dec-13 2:10 
GeneralRe: Convert.ToInt32 Pin
Argonia2-Dec-13 2:18
memberArgonia2-Dec-13 2:18 
GeneralRe: Convert.ToInt32 Pin
robocodeboy2-Dec-13 3:27
memberrobocodeboy2-Dec-13 3:27 
GeneralRe: Convert.ToInt32 Pin
Argonia2-Dec-13 3:29
memberArgonia2-Dec-13 3:29 
GeneralRe: Convert.ToInt32 Pin
robocodeboy2-Dec-13 3:51
memberrobocodeboy2-Dec-13 3:51 
GeneralRe: Convert.ToInt32 Pin
Argonia2-Dec-13 4:19
memberArgonia2-Dec-13 4:19 
GeneralRe: Convert.ToInt32 Pin
robocodeboy2-Dec-13 4:39
memberrobocodeboy2-Dec-13 4:39 
GeneralRe: Convert.ToInt32 Pin
Argonia2-Dec-13 2:12
memberArgonia2-Dec-13 2:12 
GeneralRe: Convert.ToInt32 Pin
robocodeboy2-Dec-13 3:16
memberrobocodeboy2-Dec-13 3:16 
GeneralRe: Convert.ToInt32 Pin
JMK896-Dec-13 7:06
professionalJMK896-Dec-13 7:06 
General... WHY?! Pin
Matt U.19-Nov-13 9:09
memberMatt U.19-Nov-13 9:09 
I'm working on a maintenance project for a client. It's ASP .NET MVC. When exporting some charts, they use an HTML To Image converter. I found this today:

if (Session["tWidth"] != null)
{
    htmlToImageConverter.BrowserWidth = int.Parse("1025");
 
}

I've seen similar posts here before. Why call int.Parse() and pass what's obviously an integer, instead of simply assigning: 1025? Why, oh why? D'Oh! | :doh:
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.

GeneralRe: ... WHY?! Pin
Brisingr Aerowing19-Nov-13 10:16
professionalBrisingr Aerowing19-Nov-13 10:16 
GeneralRe: ... WHY?! Pin
Matt U.19-Nov-13 10:36
memberMatt U.19-Nov-13 10:36 
GeneralRe: ... WHY?! Pin
Brisingr Aerowing19-Nov-13 12:09
professionalBrisingr Aerowing19-Nov-13 12:09 
GeneralRe: ... WHY?! Pin
Quirkafleeg25-Nov-13 23:36
memberQuirkafleeg25-Nov-13 23:36 
GeneralRe: ... WHY?! Pin
Bernhard Hiller19-Nov-13 23:22
professionalBernhard Hiller19-Nov-13 23:22 
GeneralRe: ... WHY?! Pin
RyanDev20-Nov-13 2:24
memberRyanDev20-Nov-13 2:24 
GeneralRe: ... WHY?! Pin
Matt U.20-Nov-13 4:15
memberMatt U.20-Nov-13 4:15 
GeneralRe: ... WHY?! Pin
Bernhard Hiller21-Nov-13 0:12
professionalBernhard Hiller21-Nov-13 0:12 
GeneralRe: ... WHY?! Pin
Matt U.21-Nov-13 4:14
memberMatt U.21-Nov-13 4:14 
GeneralRe: ... WHY?! Pin
Bernhard Hiller21-Nov-13 22:56
professionalBernhard Hiller21-Nov-13 22:56 
GeneralRe: ... WHY?! Pin
Matt U.22-Nov-13 4:38
memberMatt U.22-Nov-13 4:38 
JokeRe: ... WHY?! Pin
walterhevedeich25-Nov-13 23:54
memberwalterhevedeich25-Nov-13 23:54 
GeneralRe: ... WHY?! Pin
Bernhard Hiller26-Nov-13 0:35
professionalBernhard Hiller26-Nov-13 0:35 
GeneralRe: ... WHY?! Pin
Giuseppe Tollini21-Nov-13 10:33
memberGiuseppe Tollini21-Nov-13 10:33 
GeneralRe: ... WHY?! Pin
Matt U.21-Nov-13 11:03
memberMatt U.21-Nov-13 11:03 
GeneralOver-documentation Pin
Ron Beyer16-Nov-13 15:46
professionalRon Beyer16-Nov-13 15:46 
GeneralRe: Over-documentation Pin
PIEBALDconsult16-Nov-13 16:15
professionalPIEBALDconsult16-Nov-13 16:15 
GeneralRe: Over-documentation Pin
OriginalGriff16-Nov-13 23:20
protectorOriginalGriff16-Nov-13 23:20 
GeneralRe: Over-documentation Pin
PIEBALDconsult17-Nov-13 6:26
professionalPIEBALDconsult17-Nov-13 6:26 
GeneralRe: Over-documentation Pin
OriginalGriff17-Nov-13 6:42
protectorOriginalGriff17-Nov-13 6:42 
GeneralRe: Over-documentation Pin
Max Methot28-Nov-13 6:01
memberMax Methot28-Nov-13 6:01 
GeneralRe: Over-documentation Pin
PIEBALDconsult28-Nov-13 6:45
professionalPIEBALDconsult28-Nov-13 6:45 
GeneralRe: Over-documentation Pin
Sander Rossel17-Nov-13 1:09
memberSander Rossel17-Nov-13 1:09 
GeneralRe: Over-documentation Pin
Ron Beyer17-Nov-13 6:21
professionalRon Beyer17-Nov-13 6:21 
GeneralRe: Over-documentation Pin
Sander Rossel17-Nov-13 7:54
memberSander Rossel17-Nov-13 7:54 
GeneralRe: Over-documentation [modified] Pin
ENOTTY18-Nov-13 6:24
memberENOTTY18-Nov-13 6:24 
GeneralRe: Over-documentation Pin
Ron Beyer18-Nov-13 6:41
professionalRon Beyer18-Nov-13 6:41 
GeneralRe: Over-documentation Pin
d@nish 17-Nov-13 7:20
member d@nish 17-Nov-13 7:20 
GeneralRe: Over-documentation Pin
Ron Beyer17-Nov-13 7:55
professionalRon Beyer17-Nov-13 7:55 
GeneralRe: Over-documentation Pin
Bernhard Hiller18-Nov-13 0:01
professionalBernhard Hiller18-Nov-13 0:01 
GeneralRe: Over-documentation Pin
ENOTTY18-Nov-13 6:05
memberENOTTY18-Nov-13 6:05 
GeneralRe: Over-documentation Pin
CPallini18-Nov-13 8:39
mvpCPallini18-Nov-13 8:39 
GeneralRe: Over-documentation Pin
Marc Clifton19-Nov-13 9:24
protectorMarc Clifton19-Nov-13 9:24 
GeneralRe: Over-documentation Pin
Stewart Judson20-Nov-13 1:49
memberStewart Judson20-Nov-13 1:49 
GeneralRe: Over-documentation Pin
Ron Beyer20-Nov-13 4:08
professionalRon Beyer20-Nov-13 4:08 
GeneralRe: Over-documentation Pin
s_mon25-Nov-13 10:56
members_mon25-Nov-13 10:56 

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 24 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid