Click here to Skip to main content
15,888,454 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: How to add a single item to an array Pin
Marc Clifton23-Jan-18 3:55
mvaMarc Clifton23-Jan-18 3:55 
GeneralRe: How to add a single item to an array Pin
Nelek23-Jan-18 4:13
protectorNelek23-Jan-18 4:13 
GeneralRe: How to add a single item to an array Pin
Bernhard Hiller23-Jan-18 21:50
Bernhard Hiller23-Jan-18 21:50 
GeneralRe: How to add a single item to an array Pin
Eddy Vluggen24-Jan-18 0:44
professionalEddy Vluggen24-Jan-18 0:44 
GeneralRe: How to add a single item to an array Pin
GuyThiebaut24-Jan-18 3:56
professionalGuyThiebaut24-Jan-18 3:56 
GeneralRe: How to add a single item to an array Pin
kalberts28-Jan-18 21:11
kalberts28-Jan-18 21:11 
GeneralRe: How to add a single item to an array Pin
GuyThiebaut28-Jan-18 21:59
professionalGuyThiebaut28-Jan-18 21:59 
GeneralRe: How to add a single item to an array Pin
kalberts28-Jan-18 22:38
kalberts28-Jan-18 22:38 
As the Wikipedia article says: "In nearly all versions of APL, it is theoretically possible to express any computable function in one expression, that is, in one line of code" - the one-liner Game of Life is an excellent example.

I learned APL as early as 1975-76, on one of the worlds earliest "PCs", the IBM 5100 - APL was almost exclusively an IBM thing then - and it was a well known joke that IBM was working on writing the entire OS360 (the first operating system for the 360/370 mainframe series) in a single line of APL Smile | :)

There are still elements of APL that I miss, in particular the "workspace" concept: You do your stuff in a sandpit where you throw in functions, variables and whatever stuff, and throw them out when no longer needed - while the "program" (workspace) running. On the 5100, you could save the entire workspace on disk in its current state, or you could declare selected variables as persistent. There were file system operations, but you rarely needed it. There have been languages with similar concepts (I believe Smalltalk comes close), but mainline programming 40 years later still are based on concepts that could be compared to "Of course you have to tell how much space to reserve for a file before starting to use it" (that's essentially how IBMs mainframe file systems were at the time). APL was so much more flexible and dynamic...

I'm getting carried away. Maybe I tonight should curl up in my recliner in front of my fireplace with the old APL book, memorizing what the world was like when I was a youngster...
GeneralRe: How to add a single item to an array Pin
MikeTheFid29-Jan-18 3:31
MikeTheFid29-Jan-18 3:31 
GeneralRe: How to add a single item to an array Pin
kalberts29-Jan-18 3:46
kalberts29-Jan-18 3:46 
GeneralRe: How to add a single item to an array Pin
MikeTheFid30-Jan-18 2:33
MikeTheFid30-Jan-18 2:33 
GeneralRe: How to add a single item to an array Pin
OldTomas2-Feb-18 6:34
professionalOldTomas2-Feb-18 6:34 
GeneralRe: How to add a single item to an array Pin
theoldfool29-Jan-18 13:22
professionaltheoldfool29-Jan-18 13:22 
GeneralRe: How to add a single item to an array Pin
Rob Grainger27-Feb-18 23:38
Rob Grainger27-Feb-18 23:38 
GeneralRe: How to add a single item to an array Pin
Danilo Nascimento Cunha29-Jan-18 7:55
professionalDanilo Nascimento Cunha29-Jan-18 7:55 
GeneralRe: How to add a single item to an array Pin
PIEBALDconsult24-Jan-18 14:23
mvePIEBALDconsult24-Jan-18 14:23 
GeneralRe: How to add a single item to an array Pin
Eddy Vluggen27-Jan-18 11:19
professionalEddy Vluggen27-Jan-18 11:19 
GeneralRe: How to add a single item to an array Pin
Jon McKee27-Jan-18 17:35
professionalJon McKee27-Jan-18 17:35 
GeneralRe: How to add a single item to an array Pin
jsc4225-Jan-18 22:48
professionaljsc4225-Jan-18 22:48 
GeneralRe: How to add a single item to an array Pin
MikeTheFid29-Jan-18 3:33
MikeTheFid29-Jan-18 3:33 
GeneralRe: How to add a single item to an array Pin
englebart29-Jan-18 4:01
professionalenglebart29-Jan-18 4:01 
GeneralRe: How to add a single item to an array Pin
Mark S. Finn29-Jan-18 5:20
professionalMark S. Finn29-Jan-18 5:20 
GeneralRe: How to add a single item to an array Pin
uoods29-Jan-18 6:45
uoods29-Jan-18 6:45 
GeneralRe: How to add a single item to an array Pin
Stefan_Lang31-Jan-18 21:06
Stefan_Lang31-Jan-18 21:06 
GeneralRe: How to add a single item to an array Pin
Member 1156133529-Jan-18 17:47
Member 1156133529-Jan-18 17:47 

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.