Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which Is More Readable To You?
Message
De
06/03/2008 14:22:40
 
 
À
06/03/2008 13:37:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01298471
Message ID:
01299441
Vues:
19
He was the system 'architect'


And part owner of the company

>>In some of the more 'involved' code (lots of do whiles, if, cases), I'd copy the chunk of code in question to another window and run beautify. Found quite a few mis-matched 'end**' that way.
>>
>>He claimed he couldn't read the code with the 'ends' lined up with the 'starts'.
>
>Just curious... was it integral to his job to read code? Either way, that's a whole lot of power to be exercising for a personal "shortcoming".
>
>
>
>>
>>>I seldom mess with code that I'm modifying unless it can really be improved by doing so (accuracy, speed, readability, et al) because many programmers are very sensitive about that. However, I'm afraid that if I was reading through that code the first thing I would do is run Beautify!
>>>
>>>
>>>>>Beautify is your friend!
>>>>
>>>>Yes, it is, until you work for someone who wants the ending commands to be indented. For example
>>>>
>>>>
>>>>do while somecondition
>>>>     if thiscondition
>>>>          process this
>>>>     else
>>>>          process that
>>>>          endif
>>>>     command
>>>>     command
>>>>     select data
>>>>     scan
>>>>          if anothercondition
>>>>               process thisstuff
>>>>               endif
>>>>          endscan
>>>>     enddo
>>>>another condition
>>>>
>>>>
>>>>
>>>>also had the habit of having Case statements do things.....as in
>>>>
>>>>
>>>>do case
>>>>     case !seek('key','file')
>>>>          (commands)
>>>>     case file.field = value
>>>>          (commands)
>>>>     endcase
>>>>
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform