Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Re-factoring
Message
De
25/06/2013 15:17:07
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
25/06/2013 14:21:20
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01577083
Message ID:
01577129
Vues:
67
>John
>
>>Do you really think anyone here wants to look at hundreds of lines of code? You alos totally evaded my point of refactoring the vfp code to .net. You can't see how .net would help you, becuase you still think in vfp term or use whatever method you may happen to run across without learning the why's and wherefores of the code.
>
>I don't think this has anything to do with .NET vs VFP. The code should have been refactored in VFP already. I agree with the rest of your observations. I broke them all in the past, thinking that the more complex the code is, the better programmer you are. In fact the best programmers spend lots of time to keep it as simple (and readable) as possible
>
>Walter,

We all have, that's part of the learning process. I look at code I've written a year ago (after 30+ years experience) and shake my head wondering what was I thinking when I wrote that mess. The difference is that we, as competent programmers, solve our own problems (with the help of google first and advice second) not expecting someone else to do it for us and learning from our mistakes and not repeating them. The longer I program, the simpler my code gets. We had a guy here with us who has long since been laid off (nearly 5 years now and still out of a job). He was a master at obfuscating code, figuring that if only he could maintain it, that was job security. What'd the company do? Laid him off and hired someone else to rewrite the code in a more manageable style.

I rarely write a method longer than 8-10 lines of code. I name things what they are and what they do. I don't care if the name is 200 characters long, it will describe what it does. I totally believe in the assertion that good code is self documenting. I rarely use comments after attending a session by one of my heroes. Jonathan Cogley, the founder of Thycotic, presented at a code camp and basically said, "if someone else can't figure out your code by how you name things and write it, then all the other stuff is meaningless". He said if you need to comment code, then you need to rewrite it so it doesn't need comments.


Cheers..
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform