Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Microsoft launches new open source codeplex foundation
Message
De
30/09/2009 08:39:42
 
 
À
30/09/2009 03:53:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01424841
Message ID:
01426826
Vues:
65
I really enjoyed that :o)


>>>>The point is that it has nothing in the "pro" list and lots in the "con" list. There is really no good reason for case-sensitivity. You're constantly doing something or using some tool in order to get it right. And not every case sensitive language has those tools. Take JavaScript for example. It trips you up. You're writing some complex code and get fooled by an error that actually turns out to be a case issue when you're looking past that to something more complex. Then you realize its a stupid case issue. We have enough troubles in this industry with the relentless change, integration of complex technologies, etc., etc. etc. We don't need to trip ourselves up with stupid issues like case-sensitivity.
>>>
>>>Case-sensitivity promotes rigour and attention to detail, which are thematic in programming.
>>
>>That's a hoot. In 20 years of programming, during which time I have followed up behind a number of programmers, I've never found myself - not even once - worrying about the case of variable names. This issue is so low on the priority list as to be nonexistent. The problems are usually things like a lack of understanding about data normalization, SQL, granularity, boolean logic, and on and on. Once I followed up behind someone that had written what was far and away the worst program I've ever seen. He smashed every rule in the book. It was astounding how bad it was. Not only bad, but there was some really weird "techniques" (if you could call them that) that he used. If you could invert that - make it a great programming example instead of a horrible one - but leave in case inconsistency in his variables, etc. then I wouldn't have a care in the world. I wouldn't criticize it even one billionth of a percent. Could someone make it painful. SuRE tHEY couLD If ThEy WANted To BUt YOU Won'T FinD thAT. It's mainly minor discrepencies.
>
>Not sure what you're saying here - that this guy was a bad programmer but had perfect case consistency? I haven't encountered that, but I guess it could happen. I was merely saying that to me, case inconsistency is a red flag. Whenever I've encountered it in other people's code, the logic has been sloppier than usual, the comments lie more than usual etc.
>
>>
>>Another example: Case-sensitivity in Linux. They brought it over from the programming environment, mistakenly thinking what a great thing it is. You know what they have to do in order to get regular people using Linux. They have to remove it so that when you search for a file name, you don't have to have the case exactly right. Imagine some CEO or CIO looking for the some document related to the big presentation and he/she can't find it because when he typed it into the search field, he didn't use the same case. Do you think Linux would ever get into or stay in that corporation after that? No, he'd never let it in or toss it out and he'd find (or would like to find) the programmers that made that idiotic decision and rip their heads off and defecate down their necks. So the smarter programmers remove that issue from their search tools. And that is probably the best reason not to have it. If it's a problem that needs to be worked around, it's better to fix the root cause than treat the symptoms. Case-sensitivity should have never been invited to the party.
>
>Case-sensitivity is the party, it's been there all along.
>
>Fundamentally, symbols like file and variable names are stored in memory or the file system as unique and distinct character strings. At the root level, the computer has to find and manipulate them by their exact names, not using other strings that are arbitrarily deemed to be "equivalent".
>
>What do I mean by "arbitrary", right? Here's another example, of an exec trying to find customer sales info.
>
>Using the case-insensitive language of choice, you create a text box to accept a search string. In v1 you SEEK UPPER( "smith" ) against a pre-UPPERized index tag. Case-sensitivity killed dead! On reflection, you consider your exec is rather pointy-haired, so in v2 you ALLTRIM() the input and STRTRAN() out any "unacceptable" input characters. In v3 you implement optional partial string search. Cool!
>
>The demo with the boss goes great, except for one uncomfortable moment when he can't get any results for beans sold to 3rd Millenium Coffee Co., you know, that customer with the really cute blonde buyer. You do a partial string search and find that "Millennium" is spelled with 2 "n"s. Who knew? Apparently Ms. Ima Lexicon, the CSR who originally entered the customer in the ERP system.
>
>The next day, during a show-and-tell of ERP reporting capabilities, Boss couldn't get any results for your biggest customer, BarStucks Cafés. Uh-oh, Ms. Lexicon at it again. You try to explain that "e" # "é" and "E" # "é" (you don't dare tell him "é" was silently STRTRAN()'d out). Doesn't matter, he was embarrassed, your search is "stupid" and bad things happen to your head, neck and favourite programming tools.
>
>But, your search isn't actually stupid, is it? It implements a lot of best practices, and it definitely solves the case-sensitivity problem.
>
>Trouble is, the definition of "case-sensitivity" is arbitrary. Boss's is not the same as yours; guess who wins? The example above is extremely trivial; it gets a lot worse - just ask Dragan or anyone else who works with alternate code pages or character sets.
>
>I agree that, where possible, you should fix a root cause rather than symptoms. But, the real root cause here is that humans are sloppy. I started out in this branch discussing case-sensitivity vis-a-vis programming languages. There, we're talking about programmers, where we can have an expectation of a basic level of precision. I don't think it's a good idea to say, hey, programmers are sloppy, let's put a case-insensitive band-aid on this symptom, rather than try to improve programmers.
>
>But if you want to move the discussion to the realm of the end user, yes, it's usually a good idea to make some accommodation. But, where do you draw the line? The easier you make it for the end user, the harder your code is. Someone who doesn't understand what's involved is likely to say, "Make it like Google!" If your heart hasn't sunk already, that'll do it for sure.
>
>Google is actually an interesting option for companies today. You can buy or lease (maybe even get a free trial of?) a Google Search Appliance, hook it up to your intranet, point it at your document stores and databases and give it a couple of days to crawl everything.
>
>Then Boss types in "BarStuck Cafe Sales" (misspellings and all) and the top hit that comes up is the PDF of the detailed sales report Accounting runs every day for your top 20 customers, and which neither you nor the Boss even knew you had. (as Rummy would say, you didn't know what you didn't know :))
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform