Click here to Skip to main content
15,887,083 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: The changing landscape of OOP (from class to struct) Pin
Nelek27-Sep-23 9:26
protectorNelek27-Sep-23 9:26 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
ChristianLavigne29-Sep-23 2:33
professionalChristianLavigne29-Sep-23 2:33 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
raddevus29-Sep-23 10:15
mvaraddevus29-Sep-23 10:15 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
PIEBALDconsult29-Sep-23 9:33
mvePIEBALDconsult29-Sep-23 9:33 
GeneralRe: The changing landscape of OOP (from class to struct) Pin
honey the codewitch4-Oct-23 4:56
mvahoney the codewitch4-Oct-23 4:56 
RantThe Day I Learned to Deal With the BOM Pin
kmoorevs15-Sep-23 9:21
kmoorevs15-Sep-23 9:21 
GeneralRe: The Day I Learned to Hate the BOM Pin
trønderen15-Sep-23 9:53
trønderen15-Sep-23 9:53 
GeneralRe: The Day I Learned to Hate the BOM Pin
kmoorevs17-Sep-23 12:25
kmoorevs17-Sep-23 12:25 
Thanks for the reply and for allowing me to realize that I had mis-titled the thread. I understand that the word 'Hate' was inappropriate for a number of reasons, firstly because I despise that word, and secondly because of your point about reality.

In my defense, the 'problem' had already been dealt with, (code fixed, tested, compiled, tested, and deployed) for the two affected imports before I made that post. I was simply annoyed about spending that hour diagnosing and fixing something that I'd never seen before...weird characters trashing the first element in a csv. Confused | :confused:

Per your post, I had a few ways to deal with it, now having a crash course in BOM:
0: Tell the customer that they would have to change the encoding. (put up a sign) The customer gets these data files from other departments/systems. To change the encoding is would likely be a manual process. Not ideal at all.

1: Be aware that a text/csv file might have those three weird characters at the beginning of the file. If so, disregard the BOM and move on.

2: Go into full research mode and discover all that there is to know about BOM and how it might be needed for all of my non-US customers. (current/future === none)

I chose option 1. The reality is that I have to deal with it. The chances that I get a file from a US customer that is BOM encoded, and that does not have headers, and where the first element of the line is important have become realized. I didn't account for the BOM and got 'bitten'. Laugh | :laugh:

Anyhow, my customer is happy again. Smile | :) I've learned something new and improved my software. Smile | :)

One of my favorite things about this profession is the constant learning and improving.
"Go forth into the source" - Neal Morse
"Hope is contagious"

GeneralRe: The Day I Learned to Hate the BOM Pin
PIEBALDconsult20-Sep-23 12:20
mvePIEBALDconsult20-Sep-23 12:20 
GeneralRe: The Day I Learned to Deal With the BOM Pin
Richard MacCutchan17-Sep-23 22:03
mveRichard MacCutchan17-Sep-23 22:03 
GeneralRe: The Day I Learned to Deal With the BOM Pin
PIEBALDconsult20-Sep-23 12:18
mvePIEBALDconsult20-Sep-23 12:18 
GeneralRe: The Day I Learned to Deal With the BOM Pin
honey the codewitch4-Oct-23 4:59
mvahoney the codewitch4-Oct-23 4:59 
Generaljsfiddle nightmare: Schrodinger's lost code Pin
raddevus4-Aug-23 4:45
mvaraddevus4-Aug-23 4:45 
GeneralRe: jsfiddle nightmare: Schrodinger's lost code Pin
Richard Deeming4-Aug-23 4:49
mveRichard Deeming4-Aug-23 4:49 
GeneralRe: jsfiddle nightmare: Schrodinger's lost code Pin
raddevus4-Aug-23 4:59
mvaraddevus4-Aug-23 4:59 
PraiseRe: jsfiddle nightmare: Schrodinger's lost code Pin
Slacker00729-Aug-23 6:43
professionalSlacker00729-Aug-23 6:43 
GeneralRe: jsfiddle nightmare: Schrodinger's lost code Pin
Gary R. Wheeler7-Sep-23 13:01
Gary R. Wheeler7-Sep-23 13:01 
JokeRe: jsfiddle nightmare: Schrodinger's lost code Pin
Peter_in_27807-Sep-23 13:15
professionalPeter_in_27807-Sep-23 13:15 
GeneralRe: jsfiddle nightmare: Schrodinger's lost code Pin
Richard Deeming7-Sep-23 21:32
mveRichard Deeming7-Sep-23 21:32 
GeneralRe: jsfiddle nightmare: Schrodinger's lost code Pin
Jeremy Falcon25-Sep-23 8:04
professionalJeremy Falcon25-Sep-23 8:04 
GeneralMicrosoft IIS FTP docs Pin
raddevus7-Jul-23 8:56
mvaraddevus7-Jul-23 8:56 
GeneralRe: Microsoft IIS FTP docs Pin
honey the codewitch26-Jul-23 9:32
mvahoney the codewitch26-Jul-23 9:32 
GeneralOne of the worst routines I've ever written. Shame on me? Pin
honey the codewitch21-Jun-23 3:16
mvahoney the codewitch21-Jun-23 3:16 
GeneralRe: One of the worst routines I've ever written. Shame on me? Pin
charlieg27-Jun-23 15:30
charlieg27-Jun-23 15:30 
GeneralRe: One of the worst routines I've ever written. Shame on me? Pin
honey the codewitch27-Jun-23 15:32
mvahoney the codewitch27-Jun-23 15:32 

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.