Click here to Skip to main content
16,019,435 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: But it feels so _diiirtyyy_! Pin
PIEBALDconsult1-Mar-23 9:08
mvePIEBALDconsult1-Mar-23 9:08 
GeneralRe: But it feels so _diiirtyyy_! Pin
Mircea Neacsu1-Mar-23 9:22
Mircea Neacsu1-Mar-23 9:22 
GeneralRe: But it feels so _diiirtyyy_! Pin
PIEBALDconsult1-Mar-23 9:32
mvePIEBALDconsult1-Mar-23 9:32 
GeneralRe: But it feels so _diiirtyyy_! Pin
jschell20-Mar-23 7:20
jschell20-Mar-23 7:20 
GeneralRe: But it feels so _diiirtyyy_! Pin
PIEBALDconsult20-Mar-23 10:04
mvePIEBALDconsult20-Mar-23 10:04 
GeneralRe: But it feels so _diiirtyyy_! Pin
jschell21-Mar-23 5:35
jschell21-Mar-23 5:35 
GeneralRe: But it feels so _diiirtyyy_! Pin
PIEBALDconsult21-Mar-23 5:50
mvePIEBALDconsult21-Mar-23 5:50 
GeneralRe: But it feels so _diiirtyyy_! Pin
jschell23-Mar-23 5:55
jschell23-Mar-23 5:55 
PIEBALDconsult wrote:
No, not failing a million times, failing once.


You did say in the OP the following which seemed to me to suggest that it would have failed a million times.

"Apparently having the catch fire occasionally is OK, but firing a million times in rapid succession is decidedly not."


PIEBALDconsult wrote:
In general, yes, non-ASCII characters cannot be considered invalid by the reader, only the caller can determine that


Back to being too idealistic to me in terms of your original point of how the code should handle it.

The method is only part of this process. It is not part of a multi-use library (presumably.) And the problem being solved does involve characters that are not ascii. So nothing wrong with this method specifically dealing with that by using the 'if' solution.

You could, idealistically, make the caller deal with it before calling the method in the first place. To me even spending time on that consideration seems like overkill. It would not be worth my time for consideration.
GeneralRe: But it feels so _diiirtyyy_! Pin
PIEBALDconsult23-Mar-23 6:53
mvePIEBALDconsult23-Mar-23 6:53 
GeneralChatGTP: Write me a poem about programming Pin
Marc Clifton1-Feb-23 3:00
mvaMarc Clifton1-Feb-23 3:00 
GeneralRe: ChatGTP: Write me a poem about programming Pin
Sean Ewington1-Feb-23 3:02
staffSean Ewington1-Feb-23 3:02 
GeneralRe: ChatGTP: Write me a poem about programming Pin
Slacker00716-Feb-23 1:13
professionalSlacker00716-Feb-23 1:13 
GeneralRe: ChatGTP: Write me a poem about programming Pin
Andre Oosthuizen28-Feb-23 2:03
mveAndre Oosthuizen28-Feb-23 2:03 
GeneralRe: ChatGTP: Write me a poem about programming PinPopular
Daniel Pfeffer1-Feb-23 3:22
professionalDaniel Pfeffer1-Feb-23 3:22 
GeneralRe: ChatGTP: Write me a poem about programming Pin
Slacker0071-Feb-23 4:33
professionalSlacker0071-Feb-23 4:33 
GeneralRe: ChatGTP: Write me a poem about programming Pin
Daniel Pfeffer1-Feb-23 6:41
professionalDaniel Pfeffer1-Feb-23 6:41 
GeneralRe: ChatGTP: Write me a poem about programming Pin
Jeremy Falcon1-Feb-23 8:31
professionalJeremy Falcon1-Feb-23 8:31 
GeneralRe: ChatGTP: Write me a poem about programming Pin
peterkmx1-Feb-23 4:02
professionalpeterkmx1-Feb-23 4:02 
GeneralRe: ChatGTP: Write me a poem about programming Pin
Ron Anders1-Feb-23 9:16
Ron Anders1-Feb-23 9:16 
GeneralRe: ChatGTP: Write me a poem about programming Pin
SteakhouseLuke15-Feb-23 1:02
SteakhouseLuke15-Feb-23 1:02 
GeneralSpan<T> equality Pin
Rob Grainger31-Jan-23 14:05
Rob Grainger31-Jan-23 14:05 
GeneralRe: Span<T> equality Pin
Richard Deeming31-Jan-23 21:50
mveRichard Deeming31-Jan-23 21:50 
GeneralRe: Span<T> equality Pin
Richard Deeming7-Feb-23 4:12
mveRichard Deeming7-Feb-23 4:12 
GeneralWeird One: CPU utilization Pin
raddevus25-Jan-23 8:31
mvaraddevus25-Jan-23 8:31 
GeneralRe: Weird One: CPU utilization Pin
RickZeeland25-Jan-23 9:06
mveRickZeeland25-Jan-23 9:06 

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.