Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crap code
Message
De
15/04/2021 17:08:32
 
 
À
15/04/2021 16:20:40
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01679827
Message ID:
01679830
Vues:
97
J'aime (1)
ooOOOOooo.... Yay YOU!!!

You write perfect code, first time, every time!

You NEVER look at code you wrote 5 - 10 years ago (when did VFP 9 come out - 2008?) OK, humpfershumpf years ago and say "Ermagerd that's clunky code, I can write that a better way now that I know better HAVING 20 MORE YEARS OF EXPERIENCE". Good on ya laddie!

Really, I'm truly amazed and astonished to be privileged to be in your prescience. How can you stand to deal with us cretins who are obviously too stupid to understand that you're just trying to edumacate us into better programmer thingies...FROM THE FUTURE!

So hey, here's the sound of one hand clapping for ya! Hope it helps the bruising on the ego.


>Yet another FoxPro 'genius-built' system I inherited. The original developer never upgraded to 9.
>
>Interesting problem today. One of the team added a few lines of code to a procedure. Could not compile because it hit the VFP6 64K limit. Who the hell writes a single procedure that big?
>
>So we had to spend time breaking this piece of crap up into smaller bits of crap. Wanna bet I can reduce the compile size by writing the code in a far more modern style? Removing added but unnecessary select-the-scan-alias before an endscan, etc, etc, etc. Lots and lots of bad habits that this genius, like so many others, have no idea how to do better.
>
>One "genius" who ended up screaming at me for being a showoff wrote the stupidest code. He wanted to show a certain amount of text and 3 dots at the end in a grid column. He wanted the dots to move as the column width expanded. He spent 2 weeks working on this. I did a better job of it in 10 minutes.
>
>Another place the owner asked me to come over to see his system. A few tweaks here and there, running like a shot. Other genius programmer shows up and starts screaming at us.
>
>Another place the owner's nephew wrote code that took 10 hours. The owner had to ask him to ask me how to speed it up. Again, a "genius". I got it down to 10 minutes easily. That jerk spent the rest of my time there being an a$$.
>
>Long ago - I helped a co-worker that was crying because her code ran all night. I asked her what she was trying to do. Within 30 minutes, new code and finished results. That's when I met the Other Jim Nelson. After telling me I should have focused on my work, not hers, they asked how I did that and I spent several weeks giving lessons during lunch.
>
>I post tips for my current team regularly, such as the following. They don't get weepy about it like some people.
>
>The way FoxPro thinks is often not understood. It's not low-level like C. Every command is interpreted. If there are 20 records, this code will require 84 steps.
>
			GO top
>			SCAN
>				IF wScanForEndOfDay = 1
>					replace ScanGrL.OutForEOD WITH 0
>				endif
>				wMessBody = wMessBody + CHR(13) + ALLTRIM(STR(ScanGrL.OrdNmb))
>			ENDSCAN
>			wnAnswer = MESSAGEBOX(wMessBody, 4 + 32 + 256, goApp.cCaption)
>
>This code will take a lot less time to step through in the debugger. The number of interpretations of the lines of code are way less. 26 steps.
>
			IF wScanForEndOfDay = 1
>				REPLACE ScanGrL.OutForEOD WITH 0 for ScanGrL.OutForEOD<>0
>			endif
>			SCAN
>				wMessBody = wMessBody + CHR(13) + ALLTRIM(STR(ScanGrL.OrdNmb))
>			ENDSCAN
>			wnAnswer = MESSAGEBOX(wMessBody, 4 + 32 + 256, goApp.cCaption)
>
>I'm sick and tired of getting grief from fake geniuses, much less security guards. I am doing the best I can and giving the best advice I can. Keep up, smarten up or shut up.
"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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform