r/ProgrammerHumor • • Dec 06 '19

The best way of saving your code

Post image

[removed] — view removed post

338 Upvotes

12 comments sorted by

14

u/Heberlein Dec 06 '19

Memorize every line and access it through hypnosis.

4

u/3edd00c7 Dec 06 '19

How to bypass export regulations:

2

u/rydogthekidrs Dec 06 '19

Store the source files on your phone by using sshfs to make it a wireless hard drive

1

u/[deleted] Dec 06 '19

I realise it's only a joke, but how do you read code? If you were shown this:

for (i in array){
    foo();
}

you might ignore all the punctuation and read, "for eye in array foo". However, you can run into problems that way:

for (i in array){
    foo();
    bar();
}

for (i in array){
    foo();
}
bar();

These would both be read, "for eye in array foo bar". And it's not always immediately obvious when this kind of problem is occuring.

2

u/[deleted] Dec 06 '19

say the name of every individual ascii character in order

2

u/CoolioDood Dec 06 '19

Read the unicode hex codes.

1

u/Vfsdvbjgd Dec 06 '19

"For eye in array loop foo then bar"

Or

"For conditional statement eye in array end conditional statement code block foo function end code block bar function"

Or in python:

For eye in array indent foo dedent bar"

1

u/[deleted] Dec 06 '19

Your answers are good, but there are other possible ambiguities. Think of "foo bar":

foo(bar);

foo();
bar();

Or how about "foo plus bar times baz":

foo + (bar * baz);
(foo + bar) * baz;

Also, how do you pronounce more unusual syntax constructs?

o = { foo: bar, baz: qux }

1

u/Vfsdvbjgd Dec 07 '19

Function foo with parameter bar

Add foo to bar times baz

Add bar to foo then multiply the result by baz

That's language dependant, in python it's a dictionary, in javascript it's an object. In either you can describe them as key:value pairs of dict||obj o.

1

u/EkskiuTwentyTwo Dec 06 '19

For everything indented, repeat it thrice per indentation.

For i in array, foo bar, foo bar, foo bar.

For i in array, foo foo foo, bar.

1

u/DaCurse0 Dec 06 '19

Translate it to binary, read out the 1s and 0s and use a speech recongition program to load your code.

0

u/[deleted] Dec 06 '19

[deleted]

1

u/DehydratedLube Dec 06 '19

Why not remove these