|
Find a new job and/or buy this[^].
|
|
|
|
|
A goblin home makes blood red you know? (11)
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
modified 17-Jan-19 4:11am.
|
|
|
|
|
Should be 11 letters. Or are you becoming American?
|
|
|
|
|
Fixed.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Must be the American spelling?
|
|
|
|
|
Fixed.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
The first I felt that the clue to CCC was easy.
|
|
|
|
|
If you think it's that easy, answer it!
Then you can set one tomorrow!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Haemoglobin.
Anagram of
OriginalGriff wrote: A goblin home
Makes blood red.
|
|
|
|
|
Is the correct answer - you are up tomorrow!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I'm no good at setting these up.
Going into research mode. Hopefully, tomorrow won't be as easy.
|
|
|
|
|
You can never tell - some I thought would be gone in five minutes didn't get solved at all, and some I figured were a real challenge were answered immediately.
We have a lot of different brains here, and they all think differently...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
A meeting is scheduled at 0900 hrs UTC. Will post by 0930 hrs.
|
|
|
|
|
Haemoglobin
Anag. of "A goblin home"
|
|
|
|
|
Ah, so close!
|
|
|
|
|
Ah, so late!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
we have a lot of class where all properties are readonly and have constructor with 40+ parameters to initialize those said properties.
And, in the unit test code with have code like
public static T EmptyConstructor<T>()
{
return Newtonsoft.Json.JsonConvert.DeserializeObject<T>("{}");
}
This is the kind of typical web developer code that make me sick to just look at it.
Where do web developers learn to code?
That seems to be fairly typical practice for web developer to do that, but it makes me want to vomit!
|
|
|
|
|
SO, for the not so web developer amongst us, what is wrong with that ?
|
|
|
|
|
- constructor with lots (I mean, 40+ mandatory parameters) is kind of a bad idea (i.e. an endless source of pain)
- having all property setter, and the using reflection to call the private setter anyway, or having zillion of mandatory parameters and using reflection tricks to automatically fill them for you is what I would call bad practice and generally cause endless source of perfectly avoidable pain, while providing little concrete benefit (more like, what if benefits)
not too mention such code has bad performance and is hard to understand and modify, quite often.
|
|
|
|
|
OK, what would be the correct way to handle the parameters then ? (Genuine question, trying to learn here).
|
|
|
|
|
If your method requires more than 3 or 4 parameters then refactor your method. Break it down into several smaller, more manageable methods. Also, look at passing an object into the method instead of multiple parameters.
If I see a method requiring more than 3 or 4 parameters I will take immediate action. This is something I have addressed in the development team's coding standards document.
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
We have Sonar set up to flag > 7 parameters as a defect. Even 7 would require a very good reason to get passed at code review.
|
|
|
|
|
We use Resharper, but not sure if it flags this up or not. I'm going to have a look though.
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
This Sonar tool sounded interesting, but all links that google found were "IP address not found". Does this tool still exist?
A human being should be able to change a diaper, plan an invasion, butcher a hog, navigate a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects! - Lazarus Long
|
|
|
|
|