|
Mike Hankey wrote: [CodeProjectQAQuality] Surely, nobody here produces SUCH bad code?
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
#define, #if and some imagination.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
I'm going to be the heretic here, and claim the "kludgey" code should not be in the public repository of your library. It should either work properly, or be kept in your private repository until it can be fixed.
To give examples from other engineering fields, would you tolerate a building code which deems it acceptable that a building will collapse approximately 1 in a million times that you lock the front door? would you tolerate electronics that burst into flame approximately 1 in a billion times you switch them on? So why should your clients be expected to tolerate "kludgey" code?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
|
How about a SinisterHackAttribute for makeshift code that still needs attention? Don't beat around the bush and use a name that says exactly what's going on. And you might also need the TheBossWillKillYouIfYouMessWithThisCodeAttribute.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
MarkedForImprovement
ToBeReworked
NotFinalYet
FutureOptimization
IncomingChanges
...
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Consider
#warning This code is dodgy, I was sober when I wrote it
public void Kludge()
{
}
Warning in your output every time you build
veni bibi saltavi
|
|
|
|
|
So, an OutOfGinAtribute()
|
|
|
|
|
Even when it is referred to by other code?
|
|
|
|
|
PIEBALDconsult wrote: not-yet-ready-for-primetime
Seems to be a natural state for all the code in the world. The opposite ReadyForPrimetimeAttribute or just WorkingAttribute belongs to science fiction.
|
|
|
|
|
PIEBALDconsult wrote: But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it.
OMG. No.
Is there ever any code you don't intend to rework?
Over time my code would evolve into endless warnings every time I compiled it. Until I turn it off, making it completely pointless.
|
|
|
|
|
Sure, yet some are worse than others, or at least some times I know what I want to do when I have the time.
|
|
|
|
|
I use #warning directives in my C# for this. Their messages show in every compile including product builds, so I can't forget things that need to be reviewed. It's nagging without being obstructive.
Software Zen: delete this;
|
|
|
|
|
Even when referencing something in a DLL?
|
|
|
|
|
For developing at my desk, the warning message is only issued when compiling the DLL, obviously. Our automated build process builds all parts of the product from source which causes the warnings to be in the build log. Both results are sufficient to help me keep track of items for later changes.
The exceptions to both of these cases are third-party libraries supplied without source code. We use several of those to control hardware we buy off-the-shelf.
Software Zen: delete this;
|
|
|
|
|
What do you guys think for these containers? After using them for a while with VS, I think this technology is a rubbish. Too many moving parts. Versioning nightmare. URLs changing, living you high and dry, conflicts between solution and projects etc.
Is it just me who is not fully appreciate/understand this library management mechanic?
There is only one Vera Farmiga and Salma Hayek is her prophet!
Advertise here – minimum three posts per day are guaranteed.
modified 3-Mar-21 14:58pm.
|
|
|
|
|
Never used it. Worthless. Leave it for the cargo-cultists.
|
|
|
|
|
PIEBALDconsult wrote: Never used it.
PIEBALDconsult wrote: Worthless.
How would you know it is worthless, if you never used it?
|
|
|
|
|
By reading the reviews of those that have.
They list the aims, advantages, pitfalls and disadvantages.
I too, fail to see the overall experience as being worthwhile.
|
|
|
|
|
For a long time I tried to stop the use of NuGet packages, but after a bunch of new colleagues arrived they had their way and now the builder is totally dependent on NuGet and the internet.
And of course they were totally surprised that suddenly version conflicts arose.
But on the positive side: I must admit that last year I tried to get the new NpgSql driver for PostgreSQL working and could not get it done without using NuGet.
I even have plans to create a privat NuGet server, see: private-nuget-servers[^]
So as the saying goes: "Go with the flow" ...
|
|
|
|
|
I've had a few run-ins with NuGet during my career, but apart from one time, nothing I couldn't fix.
What really bothers me is that it tells me to update to package v5.0.0, which I know to be built on .NET 5.0, while my project is .NET Core 3.1.
That's not compatible, yet it wants me to update...
It shouldn't be that difficult to recognize my .NET version and then only show me updates for that particular version, or so you'd think.
|
|
|
|
|
Technology exists not to "being fixed", but to HELP development! If nuget has defect in working principles, I see no reason even mention this tool.
|
|
|
|
|
If technology could never be fixed we'd all be out of a job dead (probably)
|
|
|
|
|
We just moved from 2.x to 5.
Good luck when you get there, take booze!
veni bibi saltavi
|
|
|
|
|
I'll skip 5 as it's not an LTS release.
Although the move from 3.1 to 5 should be pretty painless... In theory
One of my customers, the only one with a software (1-man) team of their own, is on .NET 5 and so far it looks exactly like my 3.1 code
|
|
|
|