Click here to Skip to main content
15,902,198 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: Wasted space Pin
Jim (SS)9-Oct-09 8:25
Jim (SS)9-Oct-09 8:25 
GeneralRe: Wasted space Pin
Robert Surtees9-Oct-09 14:49
Robert Surtees9-Oct-09 14:49 
GeneralRe: Wasted space Pin
Jim (SS)12-Oct-09 6:09
Jim (SS)12-Oct-09 6:09 
GeneralRe: Wasted space Pin
David Skelly12-Oct-09 22:58
David Skelly12-Oct-09 22:58 
GeneralRe: Wasted space Pin
OriginalGriff9-Oct-09 22:19
mveOriginalGriff9-Oct-09 22:19 
GeneralRe: Wasted space Pin
David Skelly12-Oct-09 22:50
David Skelly12-Oct-09 22:50 
GeneralRe: Wasted space Pin
Jim (SS)13-Oct-09 5:34
Jim (SS)13-Oct-09 5:34 
GeneralRe: Wasted space Pin
supercat919-Oct-09 9:07
supercat919-Oct-09 9:07 
David Skelly wrote:
He holds on to the old idea that a line of source code must never be more than 80 characters long. Why not?


While displays are certainly capable of displaying more than 80 characters, there are trade-offs between maximum column width, font size, and window width. If a program is mostly written using lines that happen to be 60-80 characters long, except for a few lines that are 240 characters long, then one must either tolerate having some lines which cannot be viewed in their entirety, or else widen one's windows or shrink the font, leaving most of the right 2/3 of the window blank, so the longest lines will fit.

If different team members have different displays, it would seem entirely reasonable to have policies regarding preferred line width limits, recognizing that there are and should be some exceptions (e.g. if many lines of code are going to slightly exceed the desired width limit, it may be better to have them all be slightly too wide than to have every line split in two).

BTW, I've sometimes wished for a programming language environment that could embed formatting marks in code so that code would wrap sensibly in the editor when necessary, regardless of screen width; such marks would have to be invisible to a compiler. Once upon a time I played around with MS-Word, but that was well over a decade ago and I never really used it.
GeneralRe: Wasted space Pin
Dan Neely19-Oct-09 10:31
Dan Neely19-Oct-09 10:31 
GeneralRe: Wasted space Pin
David Skelly19-Oct-09 22:21
David Skelly19-Oct-09 22:21 
GeneralRe: Wasted space Pin
Richard MacCutchan19-Oct-09 10:50
mveRichard MacCutchan19-Oct-09 10:50 
GeneralRe: Wasted space Pin
OriginalGriff19-Oct-09 22:16
mveOriginalGriff19-Oct-09 22:16 
GeneralRe: Wasted space Pin
Richard MacCutchan19-Oct-09 23:56
mveRichard MacCutchan19-Oct-09 23:56 
GeneralRe: Wasted space Pin
David Skelly19-Oct-09 22:18
David Skelly19-Oct-09 22:18 
GeneralRe: Wasted space Pin
Machaira15-Oct-09 2:31
Machaira15-Oct-09 2:31 
GeneralRe: Wasted space Pin
dojohansen15-Oct-09 0:50
dojohansen15-Oct-09 0:50 
GeneralRe: Wasted space Pin
justastupidgurl15-Oct-09 2:54
justastupidgurl15-Oct-09 2:54 
GeneralRe: Wasted space Pin
Richard MacCutchan19-Oct-09 23:58
mveRichard MacCutchan19-Oct-09 23:58 
GeneralRe: Wasted space Pin
OriginalGriff20-Oct-09 0:26
mveOriginalGriff20-Oct-09 0:26 
GeneralRe: Wasted space Pin
emunews11-Dec-09 11:36
emunews11-Dec-09 11:36 
GeneralHow to check if one date is bigger than another... Pin
Paulo Zemek29-Sep-09 3:26
Paulo Zemek29-Sep-09 3:26 
GeneralRe: How to check if one date is bigger than another... Pin
Richard MacCutchan29-Sep-09 3:41
mveRichard MacCutchan29-Sep-09 3:41 
JokeMessage Closed Pin
3-Oct-09 5:52
Bernard Laplace3-Oct-09 5:52 
GeneralRe: How to check if one date is bigger than another... Pin
Jeroen De Dauw3-Oct-09 6:30
Jeroen De Dauw3-Oct-09 6:30 
GeneralRe: How to check if one date is bigger than another... Pin
QuiJohn23-Oct-09 2:44
QuiJohn23-Oct-09 2:44 

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.