Click here to Skip to main content
16,008,175 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: Aaaarg....use the namespace Pin
PIEBALDconsult12-Jun-12 4:49
mvePIEBALDconsult12-Jun-12 4:49 
GeneralRe: Aaaarg....use the namespace Pin
Eddy Vluggen12-Jun-12 9:00
professionalEddy Vluggen12-Jun-12 9:00 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult12-Jun-12 9:45
mvePIEBALDconsult12-Jun-12 9:45 
GeneralRe: Aaaarg....use the namespace Pin
Eddy Vluggen12-Jun-12 9:59
professionalEddy Vluggen12-Jun-12 9:59 
GeneralRe: Aaaarg....use the namespace Pin
Nagy Vilmos12-Jun-12 23:10
professionalNagy Vilmos12-Jun-12 23:10 
QuestionRe: Aaaarg....use the namespace [modified] Pin
Eddy Vluggen13-Jun-12 1:30
professionalEddy Vluggen13-Jun-12 1:30 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult14-Jun-12 4:20
mvePIEBALDconsult14-Jun-12 4:20 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult12-Jun-12 3:51
mvePIEBALDconsult12-Jun-12 3:51 
I disagree, it's just code, the compiler doesn't care* and it's better to give the next developer too much information rather than too little.

But could they have all shared one static instance?

How often are these methods called? Are there threading issues? How big do the StringBuilders become? Can you estimate how big? If large, then pre-allocating enough memory or re-using existing instances can eliminate a lot of needless re-allocation.


* However, I suspect that when you use the using directive** the compiler must have to spend some additional time looking them up.

** Qualification added for clarification.

modified 12-Jun-12 14:23pm.

GeneralRe: Aaaarg....use the namespace Pin
Sentenryu12-Jun-12 4:41
Sentenryu12-Jun-12 4:41 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult12-Jun-12 4:50
mvePIEBALDconsult12-Jun-12 4:50 
GeneralRe: Aaaarg....use the namespace Pin
Sentenryu12-Jun-12 5:12
Sentenryu12-Jun-12 5:12 
GeneralRe: Aaaarg....use the namespace Pin
PIEBALDconsult12-Jun-12 8:23
mvePIEBALDconsult12-Jun-12 8:23 
GeneralRe: Aaaarg....use the namespace Pin
Sentenryu12-Jun-12 8:55
Sentenryu12-Jun-12 8:55 
GeneralRe: Aaaarg....use the namespace Pin
thatraja14-Jun-12 23:00
professionalthatraja14-Jun-12 23:00 
GeneralRe: Aaaarg....use the namespace Pin
Sander Rossel15-Jun-12 13:04
professionalSander Rossel15-Jun-12 13:04 
GeneralRe: Aaaarg....use the namespace Pin
Edward Giles22-Jul-12 12:39
Edward Giles22-Jul-12 12:39 
GeneralRe: Aaaarg....use the namespace Pin
Sander Rossel22-Jul-12 20:10
professionalSander Rossel22-Jul-12 20:10 
GeneralWhat can you do when you have different timetable Pin
Mohibur Rashid10-Jun-12 20:52
professionalMohibur Rashid10-Jun-12 20:52 
GeneralRe: What can you do when you have different timetable Pin
RobCroll11-Jun-12 13:38
RobCroll11-Jun-12 13:38 
GeneralRe: What can you do when you have different timetable Pin
Ingo11-Jun-12 21:37
Ingo11-Jun-12 21:37 
GeneralRe: What can you do when you have different timetable Pin
Mohibur Rashid11-Jun-12 22:59
professionalMohibur Rashid11-Jun-12 22:59 
GeneralRe: What can you do when you have different timetable Pin
Ingo12-Jun-12 3:25
Ingo12-Jun-12 3:25 
GeneralBridging ObjectDataSource to Entity Framework with a Generic BusinessObject Pin
Woppelmann P9-Jun-12 2:32
Woppelmann P9-Jun-12 2:32 
GeneralRe: Bridging ObjectDataSource to Entity Framework with a Generic BusinessObject Pin
_Amy28-Jun-12 22:23
professional_Amy28-Jun-12 22:23 
GeneralThe lazy way to check if the file is present. Pin
Ammar_Ahmad8-Jun-12 11:11
Ammar_Ahmad8-Jun-12 11:11 

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.