|
I think he is trying to teach me how to improve upon an ASP.NET MVC application using 1995 Java techniques!
|
|
|
|
|
My boss said we can relocate you somewhere else if need be....
But I quite like the other people!
And I found the way to cope, just ignore his gibberish! Luckily it's possible! ^^
|
|
|
|
|
Then you´re a better man than I am .
|
|
|
|
|
private string Format(string data, Dictionary<string, string> properties)
{
foreach (string key in properties.Keys)
{
data = data.Replace(key, data);
}
return data;
}
.
|
|
|
|
|
Unless it's purpose was to waste time and memory?
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
|
Would have been better as an extension method.
Don't comment your code - it was hard to write, it should be hard to read!
|
|
|
|
|
using (SqlConnection Connection = Sql.GetConnectionString())
{
using (SqlCommand command = new SqlCommand("*****", Connection))
{
command.CommandType = CommandType.StoredProcedure;
try
{
Connection.Open();
intID = (int) command.ExecuteScalar();
}
catch (Exception ex)
{
command.Dispose();
Connection.Close();
Connection.Dispose();
}
finally
{
command.Dispose();
Connection.Close();
Connection.Dispose();
}
}
}
___ ___ ___
|__ |_| |\ | | |_| \ /
__| | | | \| |__| | | /
modified 2-Apr-14 9:06am.
|
|
|
|
|
Well, at least they're being sure the stuff is disposed of.
Too bad they also disposed of their ability to understand how Try/Catch works too.
|
|
|
|
|
Dave Kreskowiak wrote: disposed of their ability to understand how Try/Catch works and using also...
|
|
|
|
|
Pretty clear developer intent.
Yet it's also a scream for help.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
Bloody beginners!
using (SqlConnection Connection = Sql.GetConnectionString())
{
using (SqlCommand command = new SqlCommand("*****", Connection))
{
command.CommandType = CommandType.StoredProcedure;
try
{
Connection.Open();
intID = (int) command.ExecuteScalar();
command.Dispose();
Connection.Close();
Connection.Dispose();
}
catch (Exception ex)
{
intID = 22;
command.Dispose();
Connection.Close();
Connection.Dispose();
}
finally
{
command.Dispose();
Connection.Close();
Connection.Dispose();
}
}
}
Also a great idea that Sql.GetConnectionString() does not return a string but a SqlConnection .
|
|
|
|
|
Maybe they came from Java and someone told them "you have to use using".
So they put a using in there...
|
|
|
|
|
|
So...did you buy anything from them?
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
I just wanted to know what a particular component does. I'm not looking to buy more.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
I would : they have obviously put all the workforce in the product, not in the marketing/website.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Entropy isn't what it used to.
|
|
|
|
|
Or...they put even less effort into the security than they did the marketing...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
I saw this in a recent programming forum. It's probably time for him to call it a day...
"...one thing that confuses me with programming is putting lines in the correct order."
|
|
|
|
|
|
You mean you can't just write them in reandom order and expect it to work?? Maybe that's been my problem all these years!
|
|
|
|
|
Of course it won't work!
You "just write them in reandom order" and ask in QA to get it fixed
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
Interesting, Grieg's Piano Concerto is my favorite, just so sad to see such a beautiful piece treated so badly.
Dave.
|
|
|
|