Python simply takes this idea one step further and gives meaning to the indentation.Tips IDLE is designed to automatically indent code for you. For instance, pressing Return after typing the : in an if-header automatically indents the cursor on the next line. The amount of indentation matters:...
@asottileThere is no "standard" width of a tab. The default width of a tab differs depending on what domain it appears in. In the domain of programming, most IDEs allow tab size to be configured by the user (or the file).
I.e., participants in such experiments did not only need to understand the structure of the code (which is emphasized by indentation), but also the meaning of the code (while this meaning is not obvious). In case the effect of understanding some difficult code is much larger than ...
0. vim's autoformat/indent works pretty well. First, put this line in your ~/.vimrc: filetype plugin indent on. Then open a file in vim and type gg=G. ( gg moves cursor to the first line. = runs the indent command. G tells indent command to run from here to the last line.)...
On Windows try Notepad2 or Notepad++, which are both available free of charge, and much better for programming than what you get with Windows. They will support automatic indentation. Set the options to "replace tabs with spaces" and "tab = 4 spaces." There are explanations in the Java...