I love finding old comments....
-
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
} -
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
}I'd love the old lounge back, :sigh:
www.software-kinetics.co.uk Wear a hard hat it's under construction
-
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
} -
My favorite I keep finding from someone who no longer works here...
/*
PUT LOGIC HERE*/
Common sense is admitting there is cause and effect and that you can exert some control over what you understand.
Oh yes, inside comment blocks is the perfect place to put logic :laugh:
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
-
Oh yes, inside comment blocks is the perfect place to put logic :laugh:
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
The only sure way to ensure no errors! (or no logic..)
modified on Thursday, July 7, 2011 8:19 AM
-
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
} -
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
} -
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
} -
How about this for error handling comments:
Try
.
.
.
.
Catch ex As Exception
' Hmmmm.....
' Obviously didn't think of something.
Throw New ApplicationException("Exception Occured")
End Try -
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
} -
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
}I left a comment for one of the page I coded for future developers.... /*Sentimental value attached to the part of the code which is redundunt now. */ It took me around 3 months to get everything working the way client wanted and at the end management decided to dump it ...
Zen and the art of software maintenance : rm -rf * Math is like love : a simple idea but it can get complicated.
-
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
}I can remeber a comment in an old C++ class I came accross that made me laugh and cry at the same time: // I seriously have to get out of here.... ...all suddenly made sense ;)
-
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
} -
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
}A piece of C++ code from a certain popular game engine:
BasePort = 7777; // oh well.
Note that the network port is also configured in an ini file, but why bother using that?
-
A piece of C++ code from a certain popular game engine:
BasePort = 7777; // oh well.
Note that the network port is also configured in an ini file, but why bother using that?
My latest...
/// <summary>
/// A collection of classes for generating Hashes
/// </summary>
public class Hash
{
/// <summary>
/// Returns a MD5 hash - DO NOT use this for encryption
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
/////Using this for encryption would render you a complete tool. public string GenerateMD5Hash(string str) { } }
-
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
}I had to take over support of a vb6 program that had bounced around the dept a few times. One of the fixes documented before large section of commented out code was
'WVK: Removed WASL & write_file
' Logging_file "Before weird ass sort loop (WASL)"The commented out code was followed by
'Logging_file "After WASLoop, Before write"
'ansewer = write_file(In_Order(), in_order_nbr)
'
'm_blnOption = 1
'Unload Me
'WVK: thats better -
Just found this gem whilst going over some old code..
/// <summary>
/// Returns a FQ path on the server for a relative path
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
public string GetFilePath(string relPath, string filename)
{
if (relPath.StartsWith("~/"))
{
return HttpContext.Current.Server.MapPath(relPath + filename);
}
else
{
return relPath + filename; //This ain't a virtual path mate.
}
}Great comment on implementing a custom GINA DLL when dealing with Remote Desktop... // Duplicate what the GINAFULL example does - this clears the TS session but // does not log the user in (although it was supposed to in the example) // Flush the toilet full of Micro$oft terminal server session entanglement sins here // then re-try sending the XXXXXX SAS from the servant service