Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Good Programming Form

Name: Anonymous 2007-11-09 17:48

What elements constitute good programming form?  I eternally hear of "elegant" code, but never any elaboration on what makes code elegant.  I'm not a great programmer, and I will brute force if/when/always necessary; so I am greatly keen on learning about this subject.

Name: Anonymous 2007-11-09 17:49

Great code is like great porn - you know it when you see it.

Name: Anonymous 2007-11-09 18:27

Abstraction in the right places, sticking to standard styles, commenting appropriately, making your code readable to yourself in a year's time. That sort of thing.

Name: Anonymous 2007-11-09 18:38

Use a lot of gotos, that's all I can say.

Name: Anonymous 2007-11-09 18:45

if youre bad at programming and dont care to get better, at least make sure your code is legible so people suffer less when reading your garbage.

if youre good at programming, at least use comments to explain abstract portions so others can figure it out what parts are important.

if youre great at programming, you give specs and expect other people to understand your obscure code or do it themselves.

Name: Anonymous 2007-11-09 18:52

>>4
DON'T HELP HIM!!

Name: !MhMRSATORI 2007-11-09 18:55

>>6
I invented that meme.

Name: Anonymous 2007-11-09 19:40

Use comments to explain why rather than how. You should be able to trace how the program works in a debugger.

Name: Anonymous 2007-11-09 19:52

>>8
yes, that seems like a good advice. I rarely comment out what a function/method does, the code should be enough documentation.

Name: Anonymous 2007-11-09 20:26

also, read sicp.
no trolling. reading that book will make your code elegant, believe me.

Name: Anonymous 2007-11-10 2:37

Code is elegant when the calculation is hidden so that one can operate entirely on the program's flow -- the algorithm.

Name: Anonymous 2007-11-10 3:58

Use comments to explain how and why. Code should be as terse as possible, to save space on the filesystem. One-liners should be preferred whereever possible. Study LISP, it will make you a better programmer. Oh, be an active member of the /prog/ text boards is also important.

Name: Anonymous 2011-02-03 5:52

Name: Anonymous 2011-02-04 18:17

<

Name: Anonymous 2013-01-19 23:49

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Don't change these.
Name: Email:
Entire Thread Thread List