|
700 line functions should never be written, no matter the costs or time pressure.
Same for functions that are called "Validate", but do a whole friggin lot more than validating.
There really aren't excuses for that, except "some programmer really doesn't know his trade, or doesn't care enough about it."
|
|
|
|
|
Sander Rossel wrote: 700 line functions should never be written, no matter the costs or time pressure. True. Still, if he'd want a copy of that 'legacy-code' and understands the consequences.. but no, I am not going to even contemplate trying to understand that routine that is obvious commented in Klingon.
Sander Rossel wrote: Same for functions that are called "Validate", but do a whole friggin lot more
than validating. Validate this regex.. say, why is that executing three webservice calls and causing two database-hits?
Sander Rossel wrote: There really aren't excuses for that, except "some programmer really doesn't
know his trade, or doesn't care enough about it." You just tried to convince me that this hypothethical programmer might have been limited in time severely. The amount of care we are allowed to spend is sometimes limited by outside forces
If you are not then the result would not repeat. Doesn't mean you get unlimited time, just the time that it realistically takes - something that cannot be guessed nor guaranteed.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I know the programmer who did this, he wrote most of it last year, he's the lead on this project, he probably has twice my salary, and he's just a really crappy programmer.
Even if he has all the time in the world he'd write 700 line functions scattered with if-statements and duplicate code.
That said, he DOES care about the job. He makes long days, works on his days off, in the weekends, in the evenings, and he'll never complain.
Generally he's even a pretty nice guy.
Too bad he doesn't care more about best practices and a little code education.
|
|
|
|
|
Sander Rossel wrote: That said, he DOES care about the job Probably true, people care in different ways with changing motivations. If you do not consider every way to fold my parachute, what kind of parachute-folder does that make you?
And no, there will be no parachute-jumping during the CodeProject-meeting
Sander Rossel wrote: He makes long days, works on his days off, in the weekends, in the evenings, and
he'll never complain. If a dev is that unmissable something is rather wrong. You already stated that
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: If they don't take it that seriously, then why do you You know the answer to that, professional pride is a strong influence in our industry!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
You're closely describing some code I had inherited over a decade ago. Except that the 700-line function itself was duplicated 6 times.
|
|
|
|
|
dandy72 wrote: Except that the 700-line function itself was duplicated 6 times.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Sander Rossel wrote: But the fact remains that today, I, Sander Rossel, am not feeling so happy
Buck up. Remember that there's always someone worse off than you ... and it's nearly always me!
I am not a number. I am a ... no, wait!
|
|
|
|
|
Because people don't remember your name?
|
|
|
|
|
No-one remembers your name[^] when you're strange.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Nice song, but that's not a strange name though...
I've listened to black metal bands with sounding names such as Ninnghizhidda and Hrossharsgrani.
Actually those names are so weird I DID remember them
|
|
|
|
|
Quote: No-one remembers your name when you're strange.
Nor when you have a three legged dog that is the very personification of cute! I've got so used to being called Alaska's Dad/Master(as if!)/Owner/Friend (everybody asks the dog's name - nobody asks mine!) or just 'the bloke with that dog' that I'm not sure I can remember my name!
I am not a number. I am a ... no, wait!
|
|
|
|
|
Urban legend: Lunching with English friends at the time of her husband's retirement, Madame de Gaulle was asked what she was looking forward to in the years ahead.
"A penis," she replied without hesitation.
The embarrassed silence that followed was finally broken by the former president.
"My dear," he murmured, "I think the English don't pronounce the word quite like that. It's 'appiness.'"
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
xkcd's latest What If[^]
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
I'd be OK, I've got factor 30 in the cupboard.
|
|
|
|
|
I think you'll also need lead-lined speedos
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Chris Quinn wrote:
I think you'll also need lead titanium-lined speedos |
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I'd go with tungsten, given that we're talking about both infrared and X-Rays, plus the normal heat.
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
"When you have eliminated the JavaScript, whatever remains must be an empty page." -- Mike Hankey
"just eat it, eat it"."They're out to mold, better eat while you can" -- HobbyProggy
|
|
|
|
|
Chris Quinn wrote: I think you'll also need lead-lined speedos I don't think mine fit me any more and you really don't want to see me in those.
|
|
|
|
|
It can;t be worse than Sean in a Mankini, trust me...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Last week I posted about the need to set up a Bluetooth to Bluetooth connection from the Hi-Fi to my Android, but all suggested solutions failed, some at the first hurdle - "This product cannot be shipped to Cyprus". I therefore decided to take a different approach, and use LPOW technology.
The process first required a trip to the shed, and bury under eons of "It might come in useful later" stuff, to find the graphic equalizer that I discarded when I got an active crossover to drive the speakers through a matched pair of Mark Levinson's. This was then inserted into the chain after a passive preamp to select the source, and drives into an active class 'A' preamp to stuff lots of power into the MLs - peak power 1700 watts per channel times four channels...
Now I can plug in my Stax and listen with the audio shaped to match my degenerated hearing. I must confess that during the process the technology became LPOFW , and when my wife got home, though she didn't say so, I suspect it became FLPOW tech, as in "That's not staying there!".
So I guess it was actually FLPOFW tech, in the end - but it works just fine!
|
|
|
|
|
Chris C-B wrote: peak power 1700 watts per channel times four channels
Chris C-B wrote: degenerated hearing
OK, now I understand.
|
|
|
|
|
Is there any other way to listen to Pink Floyd?
Anyway, I forgot to add in the 1500 watt subwoofer with its own amp.
|
|
|
|
|
Quote: Is there any other way to listen to Pink Floyd?
It also sounds great on my Bose QC 15s. Best headphones I ever had!
"Go forth into the source" - Neal Morse
|
|
|
|