Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comments
Message
From
05/02/2019 17:03:01
 
 
To
05/02/2019 16:46:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01665935
Message ID:
01665937
Views:
69
>>HI All,
>>
>>This has been a pet-peeve of mine for some time. A long long time ago, when disk space was sparse, comments in code was frowned on. Too many comments would bring sever finger shaking at me. "We can not afford wasting disk space!" OK. That was then, this is now, with terabytes of disk space, why not take the time and place a comments as to what the code is intended to do? I still see new code with very little to no comments to help me follow the purpose of the code. Not to mention (ok, i will), planning the flow of the code ahead of coding.
>>
>>Why is this? Should I be striping the comments out before sharing it with others, and to help confuse myself years later when I revisit the code for maintenance?
>
>I don't have a large enough sample to judge, but there's a guy here on UT whose code I have to decipher from time to time. My initial hunch is that the guy whose code you have to read has a spiritual twin.
>
>That would mean there are just two of them, but we aren't so lucky. && omit fucking before lucky
>
>>Only looking for comments on the subject. ;)
>
>I guess you wouldn't be looking for code examples...

An example that occurred...

A few years ago, I was contracted to do some maintenance on a VFP8 code. They need to change out the method of sending email to a newer means. I agreed. I felt it would be a simple task. BUT. When I first looked at the code, it had no comments. All the commands were in their 4 letter abbreviation version. And the method where long and not indented. Plus the method names did not hint at the purpose of the code.

I informed the owner (boss) that it might that a bit longer then I thought it should, do to the fact I would have to reverse engineer the code to determine the places the changes would be needed. They were not happy, but after seeing the problem I was facing they reluctantly agreed. I completed the task but had to add some comments and expand some of the shortened commands to understand the code. My only guess was the original coder must have done it for job security or something. It is for this reason that I generally change by the hour, an not by the job.
Greg Reichert
Previous
Reply
Map
View

Click here to load this message in the networking platform