Click here to Skip to main content
15,887,379 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: Burn Baby, Burn! Pin
MSBassSinger20-Jul-18 5:41
professionalMSBassSinger20-Jul-18 5:41 
GeneralRe: Burn Baby, Burn! Pin
maze320-Jul-18 2:06
professionalmaze320-Jul-18 2:06 
GeneralRe: Burn Baby, Burn! Pin
Richard Deeming20-Jul-18 3:15
mveRichard Deeming20-Jul-18 3:15 
GeneralRe: Burn Baby, Burn! Pin
ttennebb20-Jul-18 3:30
professionalttennebb20-Jul-18 3:30 
GeneralRe: Burn Baby, Burn! Pin
Greg Lovekamp20-Jul-18 3:44
professionalGreg Lovekamp20-Jul-18 3:44 
GeneralRe: Burn Baby, Burn! Pin
Steven121820-Jul-18 6:17
professionalSteven121820-Jul-18 6:17 
GeneralRe: Burn Baby, Burn! Pin
kevinkin20-Jul-18 7:59
kevinkin20-Jul-18 7:59 
GeneralRe: Burn Baby, Burn! Pin
CodeWraith25-Jul-18 10:22
CodeWraith25-Jul-18 10:22 
Randor wrote:
The hardware has become so much better... but I somehow feel that something is wrong with the way we write software today.
No. It's still the same old game.

I still have my first computer with whopping 4k memory, a 256 byte ROM and a small risky CPU. You would not believe what we got running on this limited hardware. But that comes at a price. You must cut all corners that you can. Forget everything you ever heard about clean, maintainable code.

GOTOs (or branching instructions) are now your best friend. Avoid subroutines with their overhead for passing parameters, saving registers and returning results. Write highly specialized spaghetti code instead. It's, by today's standards, unmaintainable. Only the limited scope of your code makes this a reasonable idea. And it will be compact, even performant. Once you got it working.

Unfortunately there is no compromise. Make it compact and then it will not be very maintainable or the other way around. Memory vs. performance is a similar tradeoff, but here you have more room for compromises.
I have lived with several Zen masters - all of them were cats.

His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

GeneralRe: Burn Baby, Burn! Pin
Dr.Walt Fair, PE6-Oct-18 11:29
professionalDr.Walt Fair, PE6-Oct-18 11:29 
GeneralWhen Did That Happen? Pin
David A. Gray12-Jul-18 11:57
David A. Gray12-Jul-18 11:57 
GeneralRe: When Did That Happen? Pin
  Forogar  13-Jul-18 8:48
professional  Forogar  13-Jul-18 8:48 
GeneralRe: When Did That Happen? Pin
David A. Gray13-Jul-18 9:17
David A. Gray13-Jul-18 9:17 
JokeRe: When Did That Happen? Pin
  Forogar  16-Jul-18 2:10
professional  Forogar  16-Jul-18 2:10 
JokeRe: When Did That Happen? Pin
jan larsen5-Oct-18 1:39
jan larsen5-Oct-18 1:39 
GeneralRe: When Did That Happen? Pin
David A. Gray6-Oct-18 9:48
David A. Gray6-Oct-18 9:48 
GeneralRe: When Did That Happen? Pin
kmoorevs13-Jul-18 10:48
kmoorevs13-Jul-18 10:48 
GeneralRe: When Did That Happen? Pin
David A. Gray13-Jul-18 10:51
David A. Gray13-Jul-18 10:51 
GeneralRe: When Did That Happen? Pin
#realJSOP15-Jul-18 23:52
mve#realJSOP15-Jul-18 23:52 
GeneralRe: When Did That Happen? Pin
Eddy Vluggen16-Jul-18 0:13
professionalEddy Vluggen16-Jul-18 0:13 
GeneralRe: When Did That Happen? Pin
  Forogar  16-Jul-18 2:18
professional  Forogar  16-Jul-18 2:18 
GeneralRe: When Did That Happen? Pin
David A. Gray16-Jul-18 10:23
David A. Gray16-Jul-18 10:23 
GeneralRe: When Did That Happen? Pin
RossMW19-Jul-18 16:25
professionalRossMW19-Jul-18 16:25 
GeneralRe: When Did That Happen? Pin
Richard Deeming16-Jul-18 8:28
mveRichard Deeming16-Jul-18 8:28 
GeneralXPath string comparisons Pin
kmoorevs12-Jul-18 5:46
kmoorevs12-Jul-18 5:46 
GeneralRe: XPath string comparisons Pin
Richard Deeming12-Jul-18 6:27
mveRichard Deeming12-Jul-18 6:27 

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.