Sunday, November 1, 2009

What's a server ?

The single biggest issue I see in ASP.NET forums is people who code as if their server code, runs on the client. This obviously works when they are testing and the server IS the client. Then they deploy, and the questions start...

I want to restrict user to access my site if his Caps Lock Key is Off, so i need to check caps lock status whether he presses a-z,A-Z,or 0-9 keys in code.
i have tried following code which is working on Local but not on Server

if (Console.CapsLock)
lbl.Text="Caps is on";

Someone explained that the best you could do is handle a keypress and check if a letter is uppercase, but that this doesn't mean caps lock is on.

so this means we can get caps status only if v r using letters(a-z) not digits(0-9) or we are using windows application.

The same point gets made again. You can't do this in a web app. He replies:

i want that user can't logged in if his caps lock is not ON, this is a security feature which is not known to anonymous users and for logging in he has to enter numbers not letters.So hw to validate dis sceneraio????

Someone ELSE replies to say again that this is not possible, and he replies with this:

Thanks for the reply... but i have to search for it as it is my duty to obey my uneducated seniors.....

The other big issue, of course, is that if the programmer is clueless, they will agree to anything a client asks for and then scour the web for solutions. A real programmer would have killed this idea the moment it was suggested, and spoken with authority about the real technical limitations, not muttered something as they worried about how they could get this done.

At least this guy was answering people, most of these folks ask the insane then never reply. Like this guy:

Hi Everybody,

This is vijay.. Im new to .NET..I have a requirement of Capturing a Picture From Webcam and compare that with the SQL Server Database.. If that picture is matched with any one of Database Image I have to Display "It is Existing" else "Not Existing".. Can anybody Help me ? I look forward for your help...

Any Help would be greatly appreciated
Thank you

Hello, I am new to .NET. I want to control a camera through a website ( there's that server/client issue again ) and THEN I want to compare two different images to see if they are of the same thing ( a pretty complex task at the best of times ). Someone asked him what his question was, and he said:

I dont know how to start

Thank you

Well, what do YOU think that means ? I'd like to be a brain surgeon, but I don't know where to start. Pass the scalpel.

Several people tried to get info from him ( I basically tried to get the full story so I could point out the foolishness if his taking a job like this when he plainly has no idea how to do it, or even how complex it is ), but he never replied again.

1 comment:

  1. My last job, for a large corporation in South Carolina that makes lots of money writing software for mega-churches, had hundreds of pages of code that demonstrated no understanding of state - why it doesn't exist on the internet or how various operating systems have provided work-arounds. They would access the database itself (SQL-Server) as if it was Access sitting on the client machine.