|
But the question here is just how arbitrary is 255? This number has a long and well known history as a one byte maximum, so when I see it, I don't think it was arbitrarily chosen, but rather a left-over from very old legacy code, or a question of monkey see, monkey do.
Granted, without that history, any valid choice for a default maximum length for nvarchar is equally arbitrary. I think I may even start using numbers like 347.
Do what thou wilt shall be the whole of the Law. - Liber AL vel Legis 1:40, Aleister Crowley
|
|
|
|
|
Brady Kelly wrote: This number has a long and well known history
I don't disagree. "That's the way we've always done it", and "Being bears of little brain an easy to remember number is always best" both seem like perfectly sound justifications to me. I was merely pointing out that if one is going to call 255 arbitrary as the foundation of one's argument one can't then replace it with an equally arbitrary number and present it as an improvement.
|
|
|
|
|
It may be a performance thing.
Even though the size of the field has to be more than one byte, having the size of the actual field be a power of two makes it fit more efficiently into caches, which are organised into multiples of the machine word, partly because the physical address lines naturally do the same.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
That does make sense, and would make more sense if we were talking about the vast quantities of numbers representing the actual field size, which occur once per row, and sometimes in tens of millions or more, but we're talking about the maximum length for a row, which only occurs (I assume) once per row definition.
Do what thou wilt shall be the whole of the Law. - Liber AL vel Legis 1:40, Aleister Crowley
|
|
|
|
|
Brady Kelly wrote: Why not a nice, round default like 200 or 300? powers of 2 are round sizes for computers.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
I know, but except in rare cases, us humans using numbers that are round for computers makes no more sense than numbers that are round for humans.
Do what thou wilt shall be the whole of the Law. - Liber AL vel Legis 1:40, Aleister Crowley
|
|
|
|
|
Brady Kelly wrote: makes no more sense
Nor does it make less. The problem with you young things is that you think the whole world is based on tens and always has been. Those of us old and wise enough to think in gallons and pints, feet and inches, pounds and ounces (what I call natural measures) don't have this short sightedness. Using convenient binary and hexadecimal numbers (what could be easier to remember than #FF?) just makes sense to us.
And what's wrong with having a standard that everybody can work with rather than trying to guess what you consider to be a 'nice, round number' anyway? It's just reinventing the wheel and relearning to slice bread. Wasteful, pointless and frustrating effort trying to read other people's minds is precisely what programming is meant not to be about.
You don't presumably ask why there are 24 hours in a day when it could have have been a nice round number like 10 or 50 every time you encounter a date/time variable? How is your bugbear any different?
|
|
|
|
|
SQL Server itself uses 50 as the default max length for an nvarchar , and EF uses MAX . Both seem easy enough to remember for someone who counts himself lucky, but not that young (46), enough to not have to directly use hex in my coding work, like most modern programmers.
Do what thou wilt shall be the whole of the Law. - Liber AL vel Legis 1:40, Aleister Crowley
|
|
|
|
|
Blame it on the person who first thought of the range 0-255; he did not think of a 'nice, round' one like 200 or 300.
100 is nicer, rounder, isn't it?
|
|
|
|
|
If the data base value corresponds to an external value from another system (business logic, data acquisition, etc.), it may make sense to have them match.
Software Zen: delete this;
|
|
|
|
|
Very early, as I've a lot to do today...
Would Darth Vader wish you all a Very Merry Sithmas and a Hothy New Year?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Before or after he sliced your arm off with a lightsabre?
|
|
|
|
|
What are you doing replying today. Oh dear face + palm ! Happy Christmas!
|
|
|
|
|
What are you doing reading this today. Oh dear face + Palm. Hope had a happy christmas
|
|
|
|
|
Of course he would! I find your lack of faith disturbing.
You have just been Sharapova'd.
|
|
|
|
|
These aren't the puns you're looking for.
You can go about your business.
Move along.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Wow! You really were having a bad day, weren't you?
You have just been Sharapova'd.
|
|
|
|
|
And he sings Christmas classics such as "O Dark Side":
"O dark side! The Death Star's brightly shining,
It is the night of the Death Star's birth.
Long lay the galaxy in sin and error pining.
Till the Emperor appeared and the shift in the force felt its worth."
And "Dark Christmas":
"I'm dreaming of a dark Christmas
Just like the ones I used to know
Where the Death Star glisten,
and rebels listen
To hear death rays in the snowy planet Hoth."
And the all time favorite "Darth Jingle":
"Dashing past the stars
In Vader's TIE advanced
O'er the galaxy we go
Imperial marching all the way
Bells on the Death Star ring
Exploding planets bright
What fun it is to laugh and sing
A dark side song tonight."
And the light show is quite spectacular as well
|
|
|
|
|
Merry Xmas ! (it's near 2pm on Xmas day where I am, and a sunny 29.1C)
Perhaps believing in Santa, and that Santa is omnipotent, the OP of this question asked [^] asked: [sic] "I want to see satellite view of any Place"
In a foolish moment ... perhaps weakened mentally by Xmas cheer ... of assuming that statement ... by a first-time poster whose mother-tongue is not English ... was a question that actually had meaning lost in translation ... I posted an answer with links to CP articles on using Google Maps, and Google Earth.
The OP, today, I see from my ephemeral-glory-reputation-meter on CP, accepted the answer, and then un-accepted it with the comment [sic]:
"its can"t show that what activity is goning there"
well, sic transit gloria mundi
It's moments, like these, make the hours spent cleaning the muck off my hip-boots after I wade back bloodied from QA onto terra firma, worthwhile ... that's not a complaint: the continuing ego-reduction via synaptic liposuction remains ... very valuable, and, all it costs me is some humility.
cheers, Bill
«Tell me and I forget. Teach me and I remember. Involve me and I learn.» Benjamin Franklin
|
|
|
|
|
Perhaps the solution the OP wants: is to connect all CCTV cameras in an area, and get live feed.
Those who are security-conscious can cover their cameras' eyes.
|
|
|
|
|
Sri Avijnata, I defer to your siddhi powers in reading this OP's mind
cheers, Bill
«Tell me and I forget. Teach me and I remember. Involve me and I learn.» Benjamin Franklin
|
|
|
|
|
I somehow find it amusing that you use words and sentences that very few would use in their day-to-day lives, or even have to Google (like me), especially the Latin, like "ephemeral", "sic transit gloria mundi", "terra firma" and "synaptic", yet you still abbreviate Christmas to Xmas like you're some 15-ish teen who has trbl writing prpr Englesh (of course you're aware that Xmas should never be used in formal writing)
Unless, of course, you're trying to get the Christ out of Christmas, in which case you're even more of an atheist than you are a linguist, which is pretty scary!
|
|
|
|
|
“You are a little soul carrying about a corpse, as Epictetus used to say.”
Marcus Aurelius, Meditations
«Tell me and I forget. Teach me and I remember. Involve me and I learn.» Benjamin Franklin
|
|
|
|
|
Yes, and that's why we need satellites!
|
|
|
|
|
Sander Rossel wrote: that very few would use in their day-to-day lives
Maybe not in the barbarian lands where you live but I'll warrant that many an Englishmen could claim such eloquence to be but the very beginning of his stock of mots juste. Retract this vile slander this instant or I shall be forced to demand satisfaction upon the cockcrow!
Sander Rossel wrote: "sic transit gloria mundi"
There is a glorious proof of the familiarity of this phrase in the film Foul Play (1978, Goldie Hawn, Chevy Chase, Burgess Meredith, Dudley Moore, Rachel Roberts - funniest film ever, no exceptions!). The central character you learn is named Gloria Mundy upon which information one sits waiting for the inevitable pun for the entire length of the film and it .... never comes! The ultimate meta-joke. Magnficent!
Sander Rossel wrote: of course you're aware that Xmas should never be used in formal writing
Says who? I quote from the Guardian's ponderings upon its own style guide in this regard ...
Quote: we need not be oversensitive about abbreviating Christmas: the longer word is itself a contraction of "Christ's mass", listed in the OED as first appearing in the 12th century. Wikipedia suggests that the subsequent contraction to "Xmas" arose because the ancient Greek letter X, chi, is the initial letter of Christ, although the first example listed in the OED (as "X'temmas") does not appear until 1551. Two centuries later, Coleridge writes to Southey on Christmas Eve 1799 to tell him: "My Xstmas [sic] Carol is a quaint performance." In 1884, we even find "Xmassing" employed as a verb in the magazine Punch
|
|
|
|