Click here to Skip to main content
15,891,951 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: COTD Pin
hairy_hats18-Jun-14 4:37
hairy_hats18-Jun-14 4:37 
GeneralRe: COTD Pin
Rob Grainger18-Jun-14 2:36
Rob Grainger18-Jun-14 2:36 
General[Frustration:] Down to the depth of the sea... Pin
kalberts17-Jun-14 22:54
kalberts17-Jun-14 22:54 
GeneralRe: [Frustration:] Down to the depth of the sea... Pin
Rage17-Jun-14 22:57
professionalRage17-Jun-14 22:57 
RantRe: [Frustration:] Down to the depth of the sea... Pin
Jarek Kruza18-Jun-14 0:09
Jarek Kruza18-Jun-14 0:09 
GeneralRe: [Frustration:] Down to the depth of the sea... Pin
Rage18-Jun-14 0:12
professionalRage18-Jun-14 0:12 
GeneralRe: [Frustration:] Down to the depth of the sea... Pin
MarkTJohnson18-Jun-14 2:29
professionalMarkTJohnson18-Jun-14 2:29 
GeneralRe: [Frustration:] Down to the depth of the sea... Pin
kalberts18-Jun-14 3:42
kalberts18-Jun-14 3:42 
The craziest code I ever saw was written using the Fortran "RETURN k" mechanism: You could supply one or more labels as an argument to a function. If a statement like "RETURN 4" was executed, control returned to the caller, not at the line following the call, but at the label supplied as argument #4 to the function.

When we were students, way back in 1978-79, a popular kind of puzzle was a set of four plastic cubes with differently colored sides. The problem was to make a row of them so that all tne top four sides were red, the four front sides white, the bottom sides blue, and the sides on the back green. (Or whatever colors - four like-colored sides in a row, all the way around.) A progamming exercize to teach backtracking was to generate instructions on how to rotate the four cubes to create a solution.

My classmade solved this in something like 40 lines of Fortran (which did not allow recursion! "Classical" Fortran didn't need a stack), where the core of his logic was eight calls to ROTATE(...). Each of the eight calls was labeled, and six of the arguments to ROTATE were labels of other ROTATE calls (or to itself, repeating the call). The logic of the ROTATE function was essentially a sequence of tests, each ending up in a "RETURN 3" to "RETURN 8" (the first to arguments carried the current state), a few of the cases causing one line of instructions to be printed.

When this code was run, the only thing you would know in advance was that the textually first ROTATE call was the first to be executed. The only way to know which would be next was to analyze the ROTATE logic for given values of the first two parameters - it could be from any of the six labels in the argument list; there was no way to tell without knowing the input values.

My classmate's solution did work. A few months later I asked him to explain the logic behind it. He made a serious try, but had to give up: The code he had written himself, only a few months earlier, made no sense at all to him. His own code was like Greek to him. (If I meet him, I'll ask if he deep in his archives have got that piece of code - I'd like to see it again!)
GeneralIt's over 259,000!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Pin
Simon Lee Shugar18-Jun-14 3:40
Simon Lee Shugar18-Jun-14 3:40 
GeneralCCC 18/6/14 Pin
Dalek Dave17-Jun-14 22:04
professionalDalek Dave17-Jun-14 22:04 
GeneralRe: CCC 18/6/14 Pin
Mark Parity17-Jun-14 23:16
Mark Parity17-Jun-14 23:16 
GeneralMQOTD Pin
V.17-Jun-14 21:58
professionalV.17-Jun-14 21:58 
GeneralRe: MQOTD Pin
Johnny J.17-Jun-14 22:09
professionalJohnny J.17-Jun-14 22:09 
GeneralRe: MQOTD Pin
Karen Mitchelle17-Jun-14 22:13
professionalKaren Mitchelle17-Jun-14 22:13 
GeneralRe: MQOTD Pin
OriginalGriff17-Jun-14 22:20
mveOriginalGriff17-Jun-14 22:20 
GeneralRe: MQOTD Pin
Karen Mitchelle17-Jun-14 22:30
professionalKaren Mitchelle17-Jun-14 22:30 
GeneralRe: MQOTD Pin
Kenneth Haugland17-Jun-14 22:59
mvaKenneth Haugland17-Jun-14 22:59 
GeneralRe: MQOTD Pin
Karen Mitchelle17-Jun-14 23:10
professionalKaren Mitchelle17-Jun-14 23:10 
GeneralRe: MQOTD Pin
Rage17-Jun-14 22:59
professionalRage17-Jun-14 22:59 
GeneralRe: MQOTD Pin
OriginalGriff17-Jun-14 23:14
mveOriginalGriff17-Jun-14 23:14 
GeneralRe: MQOTD Pin
Rage17-Jun-14 23:23
professionalRage17-Jun-14 23:23 
GeneralRe: MQOTD Pin
Karen Mitchelle17-Jun-14 23:25
professionalKaren Mitchelle17-Jun-14 23:25 
GeneralRe: MQOTD Pin
Johnny J.17-Jun-14 22:25
professionalJohnny J.17-Jun-14 22:25 
GeneralRe: MQOTD Pin
OriginalGriff17-Jun-14 22:23
mveOriginalGriff17-Jun-14 22:23 
GeneralRe: MQOTD Pin
Rajesh_Francis17-Jun-14 23:03
professionalRajesh_Francis17-Jun-14 23:03 

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.