Click here to Skip to main content
15,886,611 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: 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 
GeneralRe: E-mail validation stupidity Pin
David O'Neil26-Jun-23 14:08
professionalDavid O'Neil26-Jun-23 14:08 
GeneralRe: E-mail validation stupidity Pin
Sander Rossel10-Jun-23 5:17
professionalSander Rossel10-Jun-23 5:17 
GeneralRe: E-mail validation stupidity Pin
trønderen10-Jun-23 7:06
trønderen10-Jun-23 7:06 
GeneralRe: E-mail validation stupidity Pin
Nelek10-Jun-23 11:41
protectorNelek10-Jun-23 11:41 
GeneralRe: E-mail validation stupidity Pin
honey the codewitch21-Jun-23 3:23
mvahoney the codewitch21-Jun-23 3:23 
GeneralRe: E-mail validation stupidity Pin
David O'Neil26-Jun-23 14:15
professionalDavid O'Neil26-Jun-23 14:15 
GeneralRe: E-mail validation stupidity Pin
Jeremy Falcon27-Sep-23 3:23
professionalJeremy Falcon27-Sep-23 3:23 
GeneralASP.Net webforms and disabled controls Pin
DerekT-P23-May-23 12:17
professionalDerekT-P23-May-23 12:17 
GeneralRe: ASP.Net webforms and disabled controls Pin
MarkTJohnson24-May-23 4:32
professionalMarkTJohnson24-May-23 4:32 
GeneralRe: ASP.Net webforms and disabled controls Pin
Herman<T>.Instance7-Jun-23 23:20
Herman<T>.Instance7-Jun-23 23:20 
RantAnother Visual Studio Update, Another Level of Ineptitude. Pin
Rick York17-May-23 21:00
mveRick York17-May-23 21:00 
GeneralRe: Another Visual Studio Update, Another Level of Ineptitude. Pin
Richard Deeming17-May-23 21:28
mveRichard Deeming17-May-23 21:28 

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.