Skip to content

Instantly share code, notes, and snippets.

@mbmccormick
Created August 31, 2012 16:09
Show Gist options
  • Save mbmccormick/3555204 to your computer and use it in GitHub Desktop.
Save mbmccormick/3555204 to your computer and use it in GitHub Desktop.
Shit that annoys me.
public int FetchMediumType(string device)
{
SQLSelect select = new SQLSelect(Connection);
select.Columns("MediumType");
select.From("dbo.Links");
select.Distinct = true;
select.Where("FromPort", Op.Like, device)
.Or("ToPort", Op.Like, device);
return select.ExecuteScalar<int>();
}
public int FetchMediumTypeFromString(string type)
{
SQLSelect select = new SQLSelect(Connection);
select.Columns("PK");
select.From("dbo.MediumType");
select.Distinct = true;
select.Where("MediumType", Op.Equal, type);
return select.ExecuteScalar<int>();
}
@mbmccormick
Copy link
Author

Why the hell are there so many empty lines in this method? Why is there no new line between these methods? If these are similar methods, put them in a fucking region!

@mbmccormick
Copy link
Author

And for the record, this is NOT my code...

@mgroves
Copy link

mgroves commented Aug 31, 2012

A region!? Bleh!

@swanson
Copy link

swanson commented Aug 31, 2012

regions, hiding bad code since 2003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment