I am looking for examples (preferably open source) of C# projects I could use in my thesis as an example of bad code. Ideally a small project you would expect a "garage developer" to create. E.g. horrible naming, not disposing objects, god classes, super long methods etc.
Asked
Active
Viewed 2,575 times
-1
-
As this is part of your thesis, why don't you build such a project by yourself? You already named observations that bad coding style is about, plus you can add all necessary "bad code" you want to fit your thesis' content that is not contained in an existing project. Additionaly, I don't think that it would be fair to expose anyone's project an call it "bad example for coding style" - unless the project is intended to be used as a bad example, of course. – Matthias R. Mar 04 '16 at 09:51
2 Answers
1
I hate this:
public Student Find(List<Student> list, int id)
{
Student r = null;
foreach (var i in list)
{
if (i.Id == id)
r = i;
}
return r;
}
Why continue the loop when you already found the item.

Carlos Toledo
- 2,519
- 23
- 23
-1
_inputValidator.AtleastOneIsTrue(true, viewModel.IsAdmin, viewModel.IsCoach, viewModel.IsAgreementManager)) {
lol!!

dont_trust_me
- 540
- 8
- 24