I was taught by an old-time programmer who called this nested code
if(condition){
<div>
<b>text <u>text</u></b><br/>
<table>
<tr>
<td>a</td>
<td>b</td>
</tr>
</table>
</div>
} else {
log();
}
as opposed to this code which was considered to be not nested
if(condition){<div>
<b>text
<u>text</u></b>
<table><tr><td>a</td><td>b</td></tr></table>
</div>
} else {log();}
When I started reading tutorials I found early on that I had the wrong definition to nested.
Messy vs clean is not sufficient for this because messy code encompasses other problems that I am not talking about, for example confusing flow of logic, using static initializers inappropriately, poor use of variable names, using twice the code to get the job done in a more confusing manner, etc.
What is the right word for this, where the first example is ... and the second example is not ...?