Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
My most favorite code sample
Message
 
À
14/01/2014 13:31:52
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01591669
Message ID:
01591860
Vues:
55
>>>>>Can abyone see why this guy was let go?
>>>>
>>>>Was he the one who came up with the stp*sub* naming convention?
>>>
>>>in my book adhering to this convention makes refactoring via breaking out own subclasses much easier -
>>>works great if you are up against a couple of 1000+ lines long functions from a previous dev who left the company...
>>
>>I agree about the advantage given by name sequencing when refactoring. For a work in progress, it looks pretty clever to me. The only downside is that, after the break-up, the sequence of steps has to be enforced by the programmer, whereas before, it was enforced by the program itself. As an example in the code sample, stp2sub40 is invoked before stp2sub10, which apparently breaks the sequence imposed by the naming convention.
>>However, to be honest, the code looks pretty clear and maintainable. From the code samples alone, I see that he is (ab)using the logical expression evaluation in VFP, and he's assuming that all methods invoked there return a logical success value. Still, I don't see the clear reason for firing him (yes, the religious comments have no place there, but I don't find them offending since they refer only to himself. Would he had been fired if he stated that he got his energy from the glass of milk he had that morning? Those comments can be removed easily. If he put that in a messagebox, it would have been a different story:). Disclaimer: I am not a religious person. Neither do I drink milk in the morning, nor do I consider this the start of a conversation about religion.
>
>
>
>I never said he was fired. This code was a nightmare to maintain because he wished to show others how much smarter he was than everyone else. A 40 function else condition is beyond the pale. Too bad we didn't have code-reviews back then, that would never have gotten traction. It was pure gibberish and gave no indication as to what was failing.
>
>That code was written 2 years before he was let go, so he had multiple warnings and chances.

Sorry, I thought "let go" meant "fired" in a more diplomatic way.
I would have assumed that each step/sub method logged its success/result somewhere, in which case a global success/failure message at the end would have been ok, IMO. Also, I'm guessing that it is about a conversion process, in which case there is some quality in the listing and sequencing of the steps there. However, there's no excuse in refactoring working code just to make it more cryptic. And for a guy with an attitude, many may look for reasons to "let him go". And they usually find them. No comment there.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform