I know the general trend against comments explaining how something works, and how it's a good idea to use them only to explain why you're doing what you're doing, but what about using comments as a means of dividing up the code?
Assume you have a script that does a preamble, searches through a bunch of records, prints the records, then closes everything:
// Preamble ... preamble code, say about 10-15 lines ... // Find records ... sql query ... ... put records into array ... ... some other stuff ... // Print records ... printing records, 20-30 lines a record ... // Close everything ...
More of a way to visually divide the code, make it easier to find a certain section. Like if in a month you need to fix the printing code, rather than reading through a couple hundred lines to try and find the right spot, just look at the comments to see where it is.
What actually happens in each section being fairly straightforward and easy to tell what's going on, would this approach to comments be considered good or bad?
Edit: I'm working mostly with PHP scripts, where you either can't put code into functions, or it's impractical to do so. However, the same sort of thing would apply to large class files, with several methods that do related things, like getters/setters, database updates, etc.