Click here to Skip to main content
15,911,715 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: 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 
QuestionRe: One of the worst routines I've ever written. Shame on me? Pin
Eddy Vluggen2-Sep-23 11:05
professionalEddy Vluggen2-Sep-23 11:05 
AnswerRe: One of the worst routines I've ever written. Shame on me? Pin
honey the codewitch2-Sep-23 11:20
mvahoney the codewitch2-Sep-23 11:20 
GeneralRe: One of the worst routines I've ever written. Shame on me? Pin
Daniel Pfeffer2-Sep-23 18:59
professionalDaniel Pfeffer2-Sep-23 18:59 
GeneralRe: One of the worst routines I've ever written. Shame on me? Pin
honey the codewitch2-Sep-23 19:26
mvahoney the codewitch2-Sep-23 19:26 
GeneralRe: One of the worst routines I've ever written. Shame on me? Pin
Eddy Vluggen5-Sep-23 4:52
professionalEddy Vluggen5-Sep-23 4:52 
GeneralRe: One of the worst routines I've ever written. Shame on me? Pin
Graeme_Grant26-Jul-23 13:35
mvaGraeme_Grant26-Jul-23 13:35 
GeneralRe: One of the worst routines I've ever written. Shame on me? Pin
honey the codewitch26-Jul-23 14:55
mvahoney the codewitch26-Jul-23 14:55 
GeneralRe: One of the worst routines I've ever written. Shame on me? Pin
Graeme_Grant26-Jul-23 14:58
mvaGraeme_Grant26-Jul-23 14:58 
GeneralE-mail validation stupidity Pin
PIEBALDconsult8-Jun-23 10:47
mvePIEBALDconsult8-Jun-23 10:47 
GeneralRe: E-mail validation stupidity Pin
Nelek8-Jun-23 11:30
protectorNelek8-Jun-23 11:30 
GeneralRe: E-mail validation stupidity Pin
PIEBALDconsult8-Jun-23 11:32
mvePIEBALDconsult8-Jun-23 11:32 
GeneralRe: E-mail validation stupidity Pin
Craig Robbins9-Jun-23 0:59
Craig Robbins9-Jun-23 0:59 
GeneralRe: E-mail validation stupidity Pin
Sander Rossel10-Jun-23 2:27
professionalSander Rossel10-Jun-23 2:27 
GeneralRe: E-mail validation stupidity Pin
trønderen10-Jun-23 2:58
trønderen10-Jun-23 2:58 
Sander Rossel wrote:
Capital letters are larger than lower case letters so they take up more disk space.
No. Uppercase A-Z has values from 65 to 90, while lowercase a-z has values from 97 to 122.

This refers to ASCII. Uppercase can be encoded in as little as 5 bits (Baudot code) or 6 bits (Univac Fieldata; there are other 6 bit encodings as well).

If space is really at premium, you should go for Morse code. Lots of people never realized that the coding table is sorted by frequency: E, the most common letter (in English), is a single 'di'. T, the second most common letter, is a single 'dah'. The third most common is I, so it is 'di di', #4 is A: 'di dah', #5 is N: 'dah di', #6 is M: 'dah dah', all the way to rarely used special characters, such as colon: 'dah dah dah di di di' or comma: 'dah dah di di dah dah'.

We may argue the frequencies, and for other languages than English they may be significantly off. For special characters, usage may have changed since 1844. Nevertheless, the fundamental principle behind the Morse code is frequency sorting, to reduce the time for transmitting a message to a minimum.
GeneralRe: E-mail validation stupidity Pin
Richard MacCutchan10-Jun-23 3:36
mveRichard MacCutchan10-Jun-23 3:36 
GeneralRe: E-mail validation stupidity Pin
Sander Rossel10-Jun-23 5:13
professionalSander Rossel10-Jun-23 5:13 
GeneralRe: E-mail validation stupidity Pin
Richard MacCutchan10-Jun-23 5:28
mveRichard MacCutchan10-Jun-23 5:28 
GeneralRe: E-mail validation stupidity Pin
trønderen10-Jun-23 7:24
trønderen10-Jun-23 7:24 
GeneralRe: E-mail validation stupidity Pin
Richard MacCutchan10-Jun-23 8:21
mveRichard MacCutchan10-Jun-23 8:21 

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.