|
Sigh. I know you don't like cats Roger, but...
Giving cats pills is actually a lot easier than most dogs. Any dog bigger than about 25 pounds or so is large enough you have a hard time poking a pill down its throat far enough to keep it from spitting it back out. My English setter was adept at the 'hide it and then spit it out later' trick.
Conversely, I had a cat who took 3-4 pills a day for the last four years of his life. Granted, he was an easygoing cat, but he actually ran back to the laundry room where we kept his meds when it was time. He knew that he got a treat after he took his pills. I got so good at it I could give him all of his pills at once with a single motion that only took a couple seconds.
(Yeah folks, I know this is a joke)
Software Zen: delete this;
|
|
|
|
|
Pointless walk with the dog round the empty town past the closed shops. Check.
Obligatory Pixar film that you'd never admit to watching at any other time. Check.
Sausage and chips with a nice drop of Zinfandel. Check.
Doctor Who Special. Check.
Strictly Special with slightly dodgy result but not nearly as jaw droppingly stupid as in the main contest. Check.
Yup. Suppose it must have been. Still don't get what all the fuss is about then.
|
|
|
|
|
Christmas is only as fun as you make it... Try harder!
|
|
|
|
|
Sander Rossel wrote: Try harder!
But then it's just work!
|
|
|
|
|
Life's tough, get used to it
Here's one tip to make it more bearable though, whenever I'm down I'd like to remind myself that life is a trail of tears and then you die. That always cheers me up.
Uhhh... Merry Christmas. I guess
|
|
|
|
|
Christmas is like life; it's what you make it.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
You get out what you put in.
(Particularly if you buy your own presents)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
My wife's stepdad has his wife's grandson living with him. The lad is 18 now, but has had a lifetime of health and educational problems. He is in his first job, washing up in the kitchen of a local hotel.
He came downstairs with some presents this morning and said "can you help me wrap these up please".
So the old man wrapped all the presents, handed them back to him, and asked " Who are they for anyway?".
"You" came the reply.
Some men are born mediocre, some men achieve mediocrity, and some men have mediocrity thrust upon them.
|
|
|
|
|
There are worse Christmases. I spent mine with my wife in the hospital after having a mild heart attack two days before Christmas. She is home now and doing fairly well, although she did get supplemental oxygen in her stocking.
Software Zen: delete this;
|
|
|
|
|
Have you ever bought a cured ham and wonder what it had?
I'm retired. There's a nap for that...
- Harvey
|
|
|
|
|
|
What possible reason, in 2015, could one have for making the default max length of an nvarchar 255 characters? The storage location that holds the max length has to be larger than one byte, and making that little variable a dynamic number of bits, so in case it drops below 256, it only uses one byte, is so practically infeasible it's not funny.
Why not a nice, round default like 200 or 300? Even EF's default of nvarchar(MAX) makes much more sense than NHibernate's prehistoric 255.
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? OK, hand in your programmer license please.
|
|
|
|
|
2, 4, 8, 16, 32, 64, 128, 256. Cause it's still stored that way for space efficiency.
|
|
|
|
|
Yes, it's stored in multiples (normally) of 8 bits, one byte, but 255 is the maximum for one byte, and the max length for an nvarchar can't fit into one byte, and is normally stored in a four byte structure, making 255 a totally arbitrary value based on archaic systems where the value was stored in only one byte.
Storing a value of 3 in 8 bits is no less efficient than storing the value 2 in those same 8 bits.
Do what thou wilt shall be the whole of the Law. - Liber AL vel Legis 1:40, Aleister Crowley
|
|
|
|
|
To make importing from Excel easier?
Or so Pascal-style calls can be used?
|
|
|
|
|
Brady Kelly wrote: makes much more sense
No it doesn't. There aren't degrees of arbitrariness. If 255 is arbitrary then so is 200 or 300. Any number is as arbitrary as any other. The question 'why not' applies equally to 200 and 255!
|
|
|
|
|
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
|
|
|
|