Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I shortcut this code?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00316384
Message ID:
00316807
Vues:
15
Ed,

I agree with you. Some of these shortcuts seem real nice, but might slow things down. It's too bad you never know until you test. And I also agree that one-liners can be too hard to decipher and maintain by other programmers. I hate it when I can't see how something works at a glance.

I am from the old school of Assembly Language programming where you had to use 100 commands to do what some VFP functions do in 1 command. And I have written hardware firmware (in machine language) which took many commands to do a single operation such a grab a pen from a plotter's pen holder. That's why sometimes I go to the other extreme and write many lines of code to accomplish something that VFP can do in one line of code. It's hard to break old habits.

I remember when some of us used to have to store everything in bytes and bits and some programmers would store a separate value in each of the 8 bits of a byte and some would even store values in half-bits. Talk about fun! (he said sarcastically) I'm glad those days are history.

And I also agree that you have to be consistent throughout when repeating groups of code for similar tasks. And I have no problem with lots of comments either. I think one has to find a happy medium half-way between the two extremes in coding (one-liners vs. way-too-many-liners).

Your points are well-taken. Thanks for that.
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform