I Know It’s Like Training Wheels, But….
Thursday, June 26th, 2014 by The DirectorI know this is just a simple trick that marks me as a beginner, but I like to add a comment at the end of a block to indicate what block of code is ending.
Java:
} // if button displayed }catch (NoSuchElementException e){ buttonState = "not present"; } // try/catch return buttonState; } // check button } //class
Ruby:
end # until end # wait for browser end # class end
Sure, an IDE will show me, sometimes faintly, what block a bracket closes, but I prefer this clearer indication which is easier to see.