Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which Is More Readable To You?
Message
From
04/03/2008 21:16:12
 
 
To
04/03/2008 15:55:38
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01298471
Message ID:
01298747
Views:
29
>Beautify is your friend!
Agreed. I did have to adjust a few things on my layout style just so the result doesn't end up looking mangled afterwards (minor bits like avoiding the use of && if it is a standalone comment -- mainly because the code beautifier tends to remove leading spaces from these comments if they are found on a line by itself).
Frequently used the code beautifier just so I can make sense of a (former) co-worker's code. His indentation not only varied wildy in size and form (number of spaces would frequently vary -- even within the same chunk of code, and sometimes he'd use tabs and other days spaces -- whatever fit his mood at the moment), but it was often inconsistent with the structure of the code (e.g. code within a loop structure would frequently be de-dented -- and forget about anything lining up within IF-ELSE-ENDIF and similar blocks of code). Also fun was the way he'd wrap long lines -- simply insert a semicolon, then continue starting on the following line at the first column. Worst bit was when he'd do this in the middle of a string literal. I once requested that he comment some of his code, and document some of the bugfixes he was implementing so that it's easier to understand. Yup, scattered within the code were comments line "Append blank to table" or "Increment counter by one" -- but nothing that really explained what exactly he was doing in a logical sense. His documentation of patches would consist of "changed code", "corrected syntax error" or "fixed problem reported by customer" (but no reference to where in the code) -- and whenever he'd list the dates of the changes, the date format would vary (usually it was mm/dd/yy, but other times he'd use dd/mm/yy or mm.dd -- whatever seemed to fit his mood that day).
Previous
Reply
Map
View

Click here to load this message in the networking platform