Taken out today: Depression Era Economics
The counts: Blogging: 1; Development: 3; Other: 2; SQL: 1
Line of the day: Honestly, this is another example of how we’re trying to be a better company.
It’s not a marketing gimmick – we’re software developers just like you
and we don’t like “Things That Suck.”
Post of the day:
Is Yukon the end of the middle-tier?
Honorable fortune cookie say: A mathematician is a machine for converting coffee
into theorems.
What is Take Outs? Check out the
FAQ here.
Ben Violette asked in the Orkut Writer's community:
How would you rate these in order of importance as qualities for a writer to have:
- Persistance
- Talent
- Skill
- Education
- Discipline
- Creativity
One of the best questions I've seen thus far on Orkut. While Michelle Young is right in many ways, I do believe there is some priority implicit in the list. My answer is jaded since I mostly write and read non-fiction.
- Discipline, that instills...
- Persistence, that teaches...
- Skill, that implements...
- Creativity, that focuses...
- Talent, which benefits from...
- Education
At least in my experience. One can have all the degrees and raw talent they want, but too frequently, they can't follow anything more than a writing formula. Add creativity and you can start defining your own style. It takes practice, practice and more practice to yourself skillful. A skillful writer doesn't achieve much unless they actually write, though. Writing is hard because it demands time, patience and focus. That's discipline. So, without discipline, the rest of the list is just seems like pretense.
I would argue that the only difference between discipline and persistence is execution.
Suppose you have a column in table that's type float and another that's an actual primary key. You want to find the next whole number for the float column. One way to do this is to find the maximum value for the float column, add some extremely small number to it and then use the ceiling function on that result to get desired value.
Of course “extremely” small might be much larger than you expected. As I read Books-On-Line, I see that the range for float(53) is 2.23E -308 through 1.79E + 308. So, I'm writing a procedure that's something like this:
declare @epsilon float(53)
declare @next float(53)
declare @projidnbr int
set @epsilon = 2.23E-308
set @projidnbr = 45
set @next = (select max(RFInbr) from
dbo.ReqstForInfo where projidnbr=@projidnbr) + @epsilon
select @epsilon,@next,ceiling(@next)
Lo and behold, it doesn't work. The max(RFInbr) = 3.0, and this function returns 3.0 as the next value. Of course, if I change my value for @epsilon to 2.23-16, it does work. Why? Yet again, I didn't read the whole entry. The range for float(53) is 2.23E -308 through 1.79E + 308 with 15 digits of precision.
I so wanted to rant about this being a bug. It's not. In my heart of hearts, I knew that this correct. Remember that generally, the number of digits of precision of an IEEE 754 is equal to one less than the number of 8-bit bytes used for storage doubled (although implementations might differ) For the application I'm working on, it is very unlikely that the maximum RFINbr would ever have more than three decimals in length, so 2.23E-16 is for all practical purposes just as good as 2.23E-308. This started me thinking, hey, this would be a great excuse reason to use the CLR features of Yukon. Turns out that it doesn't help -- same size and same precision for doubles there.
Anybody else out there doing higher-precision stuff with SQLServer, and how?