Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any basic standards and practices for making human readable code?

More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student?

like image 824
nobrandheroes Avatar asked Sep 28 '10 12:09

nobrandheroes


2 Answers

  1. Use consistent casing and naming.

  2. Use tabs (and brackets where available) to provide a visual flow.

  3. Use comments that explain what's happening conceptually as well as technically. (e.g., //Do we have a valid user? not //Check that user_ID is not -1)

I'm sure some more seasoned developers will have more suggestions, but those are my top 3.

like image 73
clifgriffin Avatar answered Nov 06 '22 12:11

clifgriffin


Proper indention and informative comments.

like image 26
Ruel Avatar answered Nov 06 '22 13:11

Ruel