Functions that are more trouble than they're worth
-
I see a common trend in Q&A and that is that almost everyone who uses RegisterStartupScript (or one of its variations) is under the impression that they are calling javascript code from code-behind, or that the js is executing immediately in the browser. Needless to say the problem they are having is almost invariably the result of this misunderstanding rather than an issue with the code itself. I think Microsoft should rename this function to something like
RegisterStartupScriptPSYourJavascriptIsNOTRunningImmediatelyInTheBrowserYouCANNOTCallJavascriptFromCodeBehind.
Interop is another issue that many have problems understanding and again almost everyone that posts with an Interop problem is labouring under the impression that "Interop" is simply .net code that manipulates Office documents (it's always Office). Microsoft should rename the Interop namespace to something like
InteropPSThisCodeIsJustAProxyToYourCOMApplicationItIsNOTStandAloneCodeYouNeedTheActualApplicationInstalledOnAnyMachineYouWantThisCodeToRunOn
It's not just Microsoft, I think some standards should be updated to remove issues too. Almost everyone who posts with a CORS issue is attempting to solve the issue by adding the allow origin headers to the request they are sending. I think that the "Access-Control-Allow-Origin" header should be renamed to something like
Access-Control-Allow-Origin-PS-You-Add-This-Header-To-The-Server-Not-The-Client-What-Good-Is-Any-Security-Measure-The-Client-Can-Simply-Disable
I think the problem is that the teachers don't understand what a "client-server" model is and as a result their students don't have a clue either. And testing websites on the development PC (which is also the server) doesn't discourage that misunderstanding at all. How many times do we see server code with
Messagebox.Show
in it? :doh:Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
I see a common trend in Q&A and that is that almost everyone who uses RegisterStartupScript (or one of its variations) is under the impression that they are calling javascript code from code-behind, or that the js is executing immediately in the browser. Needless to say the problem they are having is almost invariably the result of this misunderstanding rather than an issue with the code itself. I think Microsoft should rename this function to something like
RegisterStartupScriptPSYourJavascriptIsNOTRunningImmediatelyInTheBrowserYouCANNOTCallJavascriptFromCodeBehind.
Interop is another issue that many have problems understanding and again almost everyone that posts with an Interop problem is labouring under the impression that "Interop" is simply .net code that manipulates Office documents (it's always Office). Microsoft should rename the Interop namespace to something like
InteropPSThisCodeIsJustAProxyToYourCOMApplicationItIsNOTStandAloneCodeYouNeedTheActualApplicationInstalledOnAnyMachineYouWantThisCodeToRunOn
It's not just Microsoft, I think some standards should be updated to remove issues too. Almost everyone who posts with a CORS issue is attempting to solve the issue by adding the allow origin headers to the request they are sending. I think that the "Access-Control-Allow-Origin" header should be renamed to something like
Access-Control-Allow-Origin-PS-You-Add-This-Header-To-The-Server-Not-The-Client-What-Good-Is-Any-Security-Measure-The-Client-Can-Simply-Disable
Error 18446744073709551616: Symbol length exceeds system limit. (and my screen width)
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
I see a common trend in Q&A and that is that almost everyone who uses RegisterStartupScript (or one of its variations) is under the impression that they are calling javascript code from code-behind, or that the js is executing immediately in the browser. Needless to say the problem they are having is almost invariably the result of this misunderstanding rather than an issue with the code itself. I think Microsoft should rename this function to something like
RegisterStartupScriptPSYourJavascriptIsNOTRunningImmediatelyInTheBrowserYouCANNOTCallJavascriptFromCodeBehind.
Interop is another issue that many have problems understanding and again almost everyone that posts with an Interop problem is labouring under the impression that "Interop" is simply .net code that manipulates Office documents (it's always Office). Microsoft should rename the Interop namespace to something like
InteropPSThisCodeIsJustAProxyToYourCOMApplicationItIsNOTStandAloneCodeYouNeedTheActualApplicationInstalledOnAnyMachineYouWantThisCodeToRunOn
It's not just Microsoft, I think some standards should be updated to remove issues too. Almost everyone who posts with a CORS issue is attempting to solve the issue by adding the allow origin headers to the request they are sending. I think that the "Access-Control-Allow-Origin" header should be renamed to something like
Access-Control-Allow-Origin-PS-You-Add-This-Header-To-The-Server-Not-The-Client-What-Good-Is-Any-Security-Measure-The-Client-Can-Simply-Disable
Youwrotetomuchwithinonelinewithoutusingasinglespacesothewholetextdoesdropoutoftheframeanditdoesnotonlylookstrangebutalsoiskindaannoyingifyourscreenaintbigenough.
if(this.signature != "")
{
MessageBox.Show("This is my signature: " + Environment.NewLine + signature);
}
else
{
MessageBox.Show("404-Signature not found");
} -
I see a common trend in Q&A and that is that almost everyone who uses RegisterStartupScript (or one of its variations) is under the impression that they are calling javascript code from code-behind, or that the js is executing immediately in the browser. Needless to say the problem they are having is almost invariably the result of this misunderstanding rather than an issue with the code itself. I think Microsoft should rename this function to something like
RegisterStartupScriptPSYourJavascriptIsNOTRunningImmediatelyInTheBrowserYouCANNOTCallJavascriptFromCodeBehind.
Interop is another issue that many have problems understanding and again almost everyone that posts with an Interop problem is labouring under the impression that "Interop" is simply .net code that manipulates Office documents (it's always Office). Microsoft should rename the Interop namespace to something like
InteropPSThisCodeIsJustAProxyToYourCOMApplicationItIsNOTStandAloneCodeYouNeedTheActualApplicationInstalledOnAnyMachineYouWantThisCodeToRunOn
It's not just Microsoft, I think some standards should be updated to remove issues too. Almost everyone who posts with a CORS issue is attempting to solve the issue by adding the allow origin headers to the request they are sending. I think that the "Access-Control-Allow-Origin" header should be renamed to something like
Access-Control-Allow-Origin-PS-You-Add-This-Header-To-The-Server-Not-The-Client-What-Good-Is-Any-Security-Measure-The-Client-Can-Simply-Disable
Some more for the list:
- Using
MsgBox
/MessageBox.Show
from the code-behind; - Using
Process.Start
to try to open a file on the client; - Using the
FileName
property of aFileUpload
/HttpPostedFile
to try to read the file directly from the client's disk;
All of which "work" when you run the site in Visual Studio. Maybe we should be blaming VS for encouraging incorrect reasoning about the code? Then there's the "There must be a way to bypass this security feature - my client requires it!" brigade. And the "I need to show 1 million records in one page without filtering or paging, and it needs to load in less than one second - it's a client requirement!" brigade:
Quote:
Agnes Skinner: And you! Start over! I want everything in one bag. Bag Boy: Yes, ma'am. Agnes: But I don't want the bag to be heavy. Bag Boy: I don't think that's possible... Agnes: What are you, the "possible police"? Just do it!
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
- Using
-
I see a common trend in Q&A and that is that almost everyone who uses RegisterStartupScript (or one of its variations) is under the impression that they are calling javascript code from code-behind, or that the js is executing immediately in the browser. Needless to say the problem they are having is almost invariably the result of this misunderstanding rather than an issue with the code itself. I think Microsoft should rename this function to something like
RegisterStartupScriptPSYourJavascriptIsNOTRunningImmediatelyInTheBrowserYouCANNOTCallJavascriptFromCodeBehind.
Interop is another issue that many have problems understanding and again almost everyone that posts with an Interop problem is labouring under the impression that "Interop" is simply .net code that manipulates Office documents (it's always Office). Microsoft should rename the Interop namespace to something like
InteropPSThisCodeIsJustAProxyToYourCOMApplicationItIsNOTStandAloneCodeYouNeedTheActualApplicationInstalledOnAnyMachineYouWantThisCodeToRunOn
It's not just Microsoft, I think some standards should be updated to remove issues too. Almost everyone who posts with a CORS issue is attempting to solve the issue by adding the allow origin headers to the request they are sending. I think that the "Access-Control-Allow-Origin" header should be renamed to something like
Access-Control-Allow-Origin-PS-You-Add-This-Header-To-The-Server-Not-The-Client-What-Good-Is-Any-Security-Measure-The-Client-Can-Simply-Disable
Weddings, christening and those awful work parties that you're forced into attending! X|
Ah, I see you have the machine that goes ping. This is my favorite. You see we lease it back from the company we sold it to and that way it comes under the monthly current budget and not the capital account.
-
I think the problem is that the teachers don't understand what a "client-server" model is and as a result their students don't have a clue either. And testing websites on the development PC (which is also the server) doesn't discourage that misunderstanding at all. How many times do we see server code with
Messagebox.Show
in it? :doh:Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
OriginalGriff wrote:
How many times do we see server code with
Messagebox.Show
in itHey! I resent resemble that remark. :sigh: From the very first website I ever built with ASP.Net and VB over half a decade ago.
if (Object.DividedByZero == true) { Universe.Implode(); } Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
-
I think the problem is that the teachers don't understand what a "client-server" model is and as a result their students don't have a clue either. And testing websites on the development PC (which is also the server) doesn't discourage that misunderstanding at all. How many times do we see server code with
Messagebox.Show
in it? :doh:Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
I remember someone, this time not me but out application architect, leaving a message box in a 'never happen' branch of the server code. Guess when it hit the branch? About 3 frickin a.m. one night, luckily I wasn't in bed. Actually I had been in bed, but I was on my home and had stopped off for a beer...
veni bibi saltavi
-
I see a common trend in Q&A and that is that almost everyone who uses RegisterStartupScript (or one of its variations) is under the impression that they are calling javascript code from code-behind, or that the js is executing immediately in the browser. Needless to say the problem they are having is almost invariably the result of this misunderstanding rather than an issue with the code itself. I think Microsoft should rename this function to something like
RegisterStartupScriptPSYourJavascriptIsNOTRunningImmediatelyInTheBrowserYouCANNOTCallJavascriptFromCodeBehind.
Interop is another issue that many have problems understanding and again almost everyone that posts with an Interop problem is labouring under the impression that "Interop" is simply .net code that manipulates Office documents (it's always Office). Microsoft should rename the Interop namespace to something like
InteropPSThisCodeIsJustAProxyToYourCOMApplicationItIsNOTStandAloneCodeYouNeedTheActualApplicationInstalledOnAnyMachineYouWantThisCodeToRunOn
It's not just Microsoft, I think some standards should be updated to remove issues too. Almost everyone who posts with a CORS issue is attempting to solve the issue by adding the allow origin headers to the request they are sending. I think that the "Access-Control-Allow-Origin" header should be renamed to something like
Access-Control-Allow-Origin-PS-You-Add-This-Header-To-The-Server-Not-The-Client-What-Good-Is-Any-Security-Measure-The-Client-Can-Simply-Disable
-
I see a pattern evolving in your function naming scheme. I'd hate to use your libraries. :-)
-
I see a common trend in Q&A and that is that almost everyone who uses RegisterStartupScript (or one of its variations) is under the impression that they are calling javascript code from code-behind, or that the js is executing immediately in the browser. Needless to say the problem they are having is almost invariably the result of this misunderstanding rather than an issue with the code itself. I think Microsoft should rename this function to something like
RegisterStartupScriptPSYourJavascriptIsNOTRunningImmediatelyInTheBrowserYouCANNOTCallJavascriptFromCodeBehind.
Interop is another issue that many have problems understanding and again almost everyone that posts with an Interop problem is labouring under the impression that "Interop" is simply .net code that manipulates Office documents (it's always Office). Microsoft should rename the Interop namespace to something like
InteropPSThisCodeIsJustAProxyToYourCOMApplicationItIsNOTStandAloneCodeYouNeedTheActualApplicationInstalledOnAnyMachineYouWantThisCodeToRunOn
It's not just Microsoft, I think some standards should be updated to remove issues too. Almost everyone who posts with a CORS issue is attempting to solve the issue by adding the allow origin headers to the request they are sending. I think that the "Access-Control-Allow-Origin" header should be renamed to something like
Access-Control-Allow-Origin-PS-You-Add-This-Header-To-The-Server-Not-The-Client-What-Good-Is-Any-Security-Measure-The-Client-Can-Simply-Disable
How about renaming the courses these students take? IT Course PS this will only teach you some basics because the teachers don't really know what's going on either anyway if you're a moron now you'll be a moron on graduation (but somehow you'll still graduate). Minimum requirements: Common sense Scrapped due to a drop in enrollments
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
-
I see a common trend in Q&A and that is that almost everyone who uses RegisterStartupScript (or one of its variations) is under the impression that they are calling javascript code from code-behind, or that the js is executing immediately in the browser. Needless to say the problem they are having is almost invariably the result of this misunderstanding rather than an issue with the code itself. I think Microsoft should rename this function to something like
RegisterStartupScriptPSYourJavascriptIsNOTRunningImmediatelyInTheBrowserYouCANNOTCallJavascriptFromCodeBehind.
Interop is another issue that many have problems understanding and again almost everyone that posts with an Interop problem is labouring under the impression that "Interop" is simply .net code that manipulates Office documents (it's always Office). Microsoft should rename the Interop namespace to something like
InteropPSThisCodeIsJustAProxyToYourCOMApplicationItIsNOTStandAloneCodeYouNeedTheActualApplicationInstalledOnAnyMachineYouWantThisCodeToRunOn
It's not just Microsoft, I think some standards should be updated to remove issues too. Almost everyone who posts with a CORS issue is attempting to solve the issue by adding the allow origin headers to the request they are sending. I think that the "Access-Control-Allow-Origin" header should be renamed to something like
Access-Control-Allow-Origin-PS-You-Add-This-Header-To-The-Server-Not-The-Client-What-Good-Is-Any-Security-Measure-The-Client-Can-Simply-Disable
Yes, but MS doesn't use Java! :laugh:
Follow my adventures with .NET Core at my new blog, Erisia Information Services.
-
I remember someone, this time not me but out application architect, leaving a message box in a 'never happen' branch of the server code. Guess when it hit the branch? About 3 frickin a.m. one night, luckily I wasn't in bed. Actually I had been in bed, but I was on my home and had stopped off for a beer...
veni bibi saltavi
Why use MessageBox? What's wrong with writing to a log?
We're philosophical about power outages here. A.C. come, A.C. go.
-
Some more for the list:
- Using
MsgBox
/MessageBox.Show
from the code-behind; - Using
Process.Start
to try to open a file on the client; - Using the
FileName
property of aFileUpload
/HttpPostedFile
to try to read the file directly from the client's disk;
All of which "work" when you run the site in Visual Studio. Maybe we should be blaming VS for encouraging incorrect reasoning about the code? Then there's the "There must be a way to bypass this security feature - my client requires it!" brigade. And the "I need to show 1 million records in one page without filtering or paging, and it needs to load in less than one second - it's a client requirement!" brigade:
Quote:
Agnes Skinner: And you! Start over! I want everything in one bag. Bag Boy: Yes, ma'am. Agnes: But I don't want the bag to be heavy. Bag Boy: I don't think that's possible... Agnes: What are you, the "possible police"? Just do it!
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
FOCK! You have some stupid clients. I hope you're taking advantage of them.
- Using
-
FOCK! You have some stupid clients. I hope you're taking advantage of them.