News for hackers. Stuff that matters.
Re:What to Do When Your Colleague Creates Spaghetti Code by douche on Friday September 16, 2016 @11:44AM (#12514770)
Holy hell, partial classes. I'm not convinced that, outside of WinForms designer-generated control definitions, there is ever a legitimate reason to use them.

I just tore apart one of those kinds of monstrosities last week, where the person who originally wrote it, went so far as to do C-style name prefixing on the methods, i.e. Foo_DoThing(), Bar_DoOtherThing(), Foo_DoOtherThing(), but left it all in one honking monster class instead of splitting it out.

Re:What to Do When Your Colleague Creates Spaghetti Code by mhomde on Saturday September 17, 2016 @07:15AM (#12520059)
Yeah... they're really handy for separating generated code from user code... but having to segment classes with them is a rather foul code smell :)

Haha, wow, that's another way to go I guess. It never ceases to amaze me how inexperienced programmers can brute force problems with the limited tools they possess :)

Re:What to Do When Your Colleague Creates Spaghetti Code by Silures on Friday September 16, 2016 @12:03PM (#12514947)
I agree. Partial classes are for supplementing machine-generated code: winforms designer files, generated entity framework classes etc.

That is, wherever the IDE would overwrite any edits you made. I'm currently refactoring a 3 partial class monster usercontrol: 238 lines, 2370 lines, and 4526 lines. Fun.