October 5, 2011 at 3:53 am
Fal (10/4/2011)
I had an interesting moment of reflection whilst helping my daughter with her homework the other day.She had a maths problem like “102 + 44 + 266 + 78 + 13” and I saw she was summing up from the hundreds column first. Enquiries revealed that her grade 3 teacher a couple of years ago taught a “shortcut” for addition whereby you sum up the hundreds, then the tens, then the units and finally sum all those up. And with an anti-epiphany I realised that the poor girl had been taught to solve basic maths problems with recursion. I managed to kill that idea by giving her a thoroughly nasty addition involving 10’s of thousands.
But now I’m left wondering: are we facing an entire generation of kids raised on recursive methods since kindergarten for even simple things? And as a parent, how can I persuade my kids to eat their cereal in a set-based manner rather than the annoying slow spoonful-by-agonising-spoonful?
And this is where a mathematician despairs.
Recursion is a well defined term both in mathematics and in computer science, and is extremely well understood by mathematicians and by computer scientists.
Until such time as someone discovers an exception to Church's Thesis, which in the opinion of most mathematicians and most computer scientists is not going to happen, someone teaching maths in school (grade school, high school, or university) who teaches methods that are not recursive should be forbidden to teach mathematics. Anyone who believes otherwise is a dangerous crank.
A teacher who teaches a lousey recursive method for exact multiplication instead of a good recursive method is an idiot, but that's not what the teacher here was doing (the teacher's method is a very good and efficient one for generating a serious of aproximations to the exact result of the multiplication, and is about as effective as the traditional right to left method for exact multiplication. It is closer to what one has to do in hardware to build a fast multiplier than is the right to left method). Anyway, it would be sheer ignorant stupidity to claim that the reason a good recursive method is better than a bad recursive method because the good method is "not recursive".
Tom
October 5, 2011 at 5:28 am
Ninja's_RGR'us (10/5/2011)
Jeff Moden (10/4/2011)
GilaMonster (10/4/2011)
Jeff Moden (10/4/2011)
I wonder how many of us there are that try to completely ignore certs and degrees in the interview process?I don't. If the person has a relevant certification or qualification I'm going to hold them to a higher standard than I would otherwise.
Heh... I don't hold certs against anyone 😛 but I also understand why someone might expect more from someone with alphabet soup after their name.
I treat everyone pretty much the same way... do you know what I need you to know or not? My questions aren't difficult or "tricky" so, certified or not, they should know the answers.
As a bit of a side bar, the shortest interview I ever conducted lasted through just one question (a simple "warm up question" to make the person more comfortable as one would do during a lie detector test) and was over 30 seconds after I asked it (and the "dude" claimed more than 9 years of experience).
As another set of side bars, the best DBA I ever hired had no certs and no degrees. The second best one I ever hired (as a developer, not a DBA) not only had no certs or degrees, he also had no production experience... only a shed load of practice on the network he'd set up at home.
So what was that question??
"How do you return the current date and time from SQL Server using T-SQL?" Like I said... it was a "warm up" question that was intentionally made very easy to set the interviewee at ease. I usually ask around 5 such super easy questions at the beginning of the interview. It's amazing to me that about half the people we interview don't make it through those "warm up" questions.
The answer the interviewee returned was "I don't know... we always used the GUI code to do that." The reason why that killed the interview immediately was because the fellow claimed to be a "9 out of 10" in SQL Server (and Oracle, by the way) and also claimed 9 years of experience on his resume. The positition being applied for was for "Sr. SQL Server Developer".
And, no... I won't post the other questions for reasons that are obvious. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
October 5, 2011 at 5:43 am
Jeff Moden (10/5/2011)
Ninja's_RGR'us (10/5/2011)
Jeff Moden (10/4/2011)
GilaMonster (10/4/2011)
Jeff Moden (10/4/2011)
I wonder how many of us there are that try to completely ignore certs and degrees in the interview process?I don't. If the person has a relevant certification or qualification I'm going to hold them to a higher standard than I would otherwise.
Heh... I don't hold certs against anyone 😛 but I also understand why someone might expect more from someone with alphabet soup after their name.
I treat everyone pretty much the same way... do you know what I need you to know or not? My questions aren't difficult or "tricky" so, certified or not, they should know the answers.
As a bit of a side bar, the shortest interview I ever conducted lasted through just one question (a simple "warm up question" to make the person more comfortable as one would do during a lie detector test) and was over 30 seconds after I asked it (and the "dude" claimed more than 9 years of experience).
As another set of side bars, the best DBA I ever hired had no certs and no degrees. The second best one I ever hired (as a developer, not a DBA) not only had no certs or degrees, he also had no production experience... only a shed load of practice on the network he'd set up at home.
So what was that question??
"How do you return the current date and time from SQL Server using T-SQL?" Like I said... it was a "warm up" question that was intentionally made very easy to set the interviewee at ease. I usually ask around 5 such super easy questions at the beginning of the interview. It's amazing to me that about half the people we interview don't make it through those "warm up" questions.
The answer the interviewee returned was "I don't know... we always used the GUI code to do that." The reason why that killed the interview immediately was because the fellow claimed to be a "9 out of 10" in SQL Server (and Oracle, by the way) and also claimed 9 years of experience on his resume. The positition being applied for was for "Sr. SQL Server Developer".
And, no... I won't post the other questions for reasons that are obvious. 😉
No worries Jeff, I just like those stories where the guy Claims he's a Paul Randal and then can't even speel sql server :-D.
October 5, 2011 at 7:28 am
GilaMonster (9/29/2011)
Wooooooooot!!!!!!!!!!!!!!!!!!2 years, many, many weekends, late nights and a mad rush to the end (and I'm not even counting the ones Jonathan did), it's here
Congrats.
October 5, 2011 at 7:51 am
Jeff Moden (10/5/2011)
Ninja's_RGR'us (10/5/2011)
Jeff Moden (10/4/2011)
GilaMonster (10/4/2011)
Jeff Moden (10/4/2011)
I wonder how many of us there are that try to completely ignore certs and degrees in the interview process?I don't. If the person has a relevant certification or qualification I'm going to hold them to a higher standard than I would otherwise.
Heh... I don't hold certs against anyone 😛 but I also understand why someone might expect more from someone with alphabet soup after their name.
I treat everyone pretty much the same way... do you know what I need you to know or not? My questions aren't difficult or "tricky" so, certified or not, they should know the answers.
As a bit of a side bar, the shortest interview I ever conducted lasted through just one question (a simple "warm up question" to make the person more comfortable as one would do during a lie detector test) and was over 30 seconds after I asked it (and the "dude" claimed more than 9 years of experience).
As another set of side bars, the best DBA I ever hired had no certs and no degrees. The second best one I ever hired (as a developer, not a DBA) not only had no certs or degrees, he also had no production experience... only a shed load of practice on the network he'd set up at home.
So what was that question??
"How do you return the current date and time from SQL Server using T-SQL?" Like I said... it was a "warm up" question that was intentionally made very easy to set the interviewee at ease. I usually ask around 5 such super easy questions at the beginning of the interview. It's amazing to me that about half the people we interview don't make it through those "warm up" questions.
The answer the interviewee returned was "I don't know... we always used the GUI code to do that." The reason why that killed the interview immediately was because the fellow claimed to be a "9 out of 10" in SQL Server (and Oracle, by the way) and also claimed 9 years of experience on his resume. The positition being applied for was for "Sr. SQL Server Developer".
And, no... I won't post the other questions for reasons that are obvious. 😉
How many of the ways do you require in the answer?
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
October 5, 2011 at 8:16 am
Jeff Moden (10/4/2011)
Fal (10/4/2011)
I had an interesting moment of reflection whilst helping my daughter with her homework the other day.She had a maths problem like “102 + 44 + 266 + 78 + 13” and I saw she was summing up from the hundreds column first. Enquiries revealed that her grade 3 teacher a couple of years ago taught a “shortcut” for addition whereby you sum up the hundreds, then the tens, then the units and finally sum all those up. And with an anti-epiphany I realised that the poor girl had been taught to solve basic maths problems with recursion. I managed to kill that idea by giving her a thoroughly nasty addition involving 10’s of thousands.
But now I’m left wondering: are we facing an entire generation of kids raised on recursive methods since kindergarten for even simple things? And as a parent, how can I persuade my kids to eat their cereal in a set-based manner rather than the annoying slow spoonful-by-agonising-spoonful?
Steve.
That technique is taught in a "course" called "Mega Math".... and done correctly, it's very fast and very easy to do mentally. I actually think that 3rd grade teacher was pretty smart for teaching it. Of course, such a change in the basic 3R's mortifies most educators.
As a side bar, I'm not sure why anyone considers this method any more recursive than the ol' right-to-left-with-carries method.
Agreed, I was actually pretty pissed when I read the Mega-Math book at the library and realized that nobody mentioned this as a possibility. Of course, I still screw it up because I habitually forget how to add, thank God I have a calculator handy...
---------------------------------------------------------
How best to post your question[/url]
How to post performance problems[/url]
Tally Table:What it is and how it replaces a loop[/url]
"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
October 5, 2011 at 8:18 am
Stefan Krzywicki (10/5/2011)
Jeff Moden (10/5/2011)
Ninja's_RGR'us (10/5/2011)
Jeff Moden (10/4/2011)
GilaMonster (10/4/2011)
Jeff Moden (10/4/2011)
I wonder how many of us there are that try to completely ignore certs and degrees in the interview process?I don't. If the person has a relevant certification or qualification I'm going to hold them to a higher standard than I would otherwise.
Heh... I don't hold certs against anyone 😛 but I also understand why someone might expect more from someone with alphabet soup after their name.
I treat everyone pretty much the same way... do you know what I need you to know or not? My questions aren't difficult or "tricky" so, certified or not, they should know the answers.
As a bit of a side bar, the shortest interview I ever conducted lasted through just one question (a simple "warm up question" to make the person more comfortable as one would do during a lie detector test) and was over 30 seconds after I asked it (and the "dude" claimed more than 9 years of experience).
As another set of side bars, the best DBA I ever hired had no certs and no degrees. The second best one I ever hired (as a developer, not a DBA) not only had no certs or degrees, he also had no production experience... only a shed load of practice on the network he'd set up at home.
So what was that question??
"How do you return the current date and time from SQL Server using T-SQL?" Like I said... it was a "warm up" question that was intentionally made very easy to set the interviewee at ease. I usually ask around 5 such super easy questions at the beginning of the interview. It's amazing to me that about half the people we interview don't make it through those "warm up" questions.
The answer the interviewee returned was "I don't know... we always used the GUI code to do that." The reason why that killed the interview immediately was because the fellow claimed to be a "9 out of 10" in SQL Server (and Oracle, by the way) and also claimed 9 years of experience on his resume. The positition being applied for was for "Sr. SQL Server Developer".
And, no... I won't post the other questions for reasons that are obvious. 😉
How many of the ways do you require in the answer?
That's the direction I took first as well. There are so many ways to answer that, I'm sure that I would just start overflowing at the mouth... There's a different answer for datetime/datetime2/UTC/offset/CLR... and that's before we start discussing "which current date and time (where are you?)". Do I try to look clever and come up with something using xp_cmdshell? GRRRR! I hate these hard questions! By the time I got done talking, I'm sure they would have thrown my resume out. Great, now I have a scene from the move Phenomenon going through my head (how many mammals can you name in 60 seconds?)
October 5, 2011 at 8:38 am
Chad Crawford (10/5/2011)
Stefan Krzywicki (10/5/2011)
Jeff Moden (10/5/2011)
Ninja's_RGR'us (10/5/2011)
Jeff Moden (10/4/2011)
GilaMonster (10/4/2011)
Jeff Moden (10/4/2011)
I wonder how many of us there are that try to completely ignore certs and degrees in the interview process?I don't. If the person has a relevant certification or qualification I'm going to hold them to a higher standard than I would otherwise.
Heh... I don't hold certs against anyone 😛 but I also understand why someone might expect more from someone with alphabet soup after their name.
I treat everyone pretty much the same way... do you know what I need you to know or not? My questions aren't difficult or "tricky" so, certified or not, they should know the answers.
As a bit of a side bar, the shortest interview I ever conducted lasted through just one question (a simple "warm up question" to make the person more comfortable as one would do during a lie detector test) and was over 30 seconds after I asked it (and the "dude" claimed more than 9 years of experience).
As another set of side bars, the best DBA I ever hired had no certs and no degrees. The second best one I ever hired (as a developer, not a DBA) not only had no certs or degrees, he also had no production experience... only a shed load of practice on the network he'd set up at home.
So what was that question??
"How do you return the current date and time from SQL Server using T-SQL?" Like I said... it was a "warm up" question that was intentionally made very easy to set the interviewee at ease. I usually ask around 5 such super easy questions at the beginning of the interview. It's amazing to me that about half the people we interview don't make it through those "warm up" questions.
The answer the interviewee returned was "I don't know... we always used the GUI code to do that." The reason why that killed the interview immediately was because the fellow claimed to be a "9 out of 10" in SQL Server (and Oracle, by the way) and also claimed 9 years of experience on his resume. The positition being applied for was for "Sr. SQL Server Developer".
And, no... I won't post the other questions for reasons that are obvious. 😉
How many of the ways do you require in the answer?
That's the direction I took first as well. ...
like this:
Print 'Look at the clock dummy!'
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
October 5, 2011 at 9:18 am
Chad Crawford (10/5/2011)
Stefan Krzywicki (10/5/2011)
Jeff Moden (10/5/2011)
Ninja's_RGR'us (10/5/2011)
Jeff Moden (10/4/2011)
GilaMonster (10/4/2011)
Jeff Moden (10/4/2011)
I wonder how many of us there are that try to completely ignore certs and degrees in the interview process?I don't. If the person has a relevant certification or qualification I'm going to hold them to a higher standard than I would otherwise.
Heh... I don't hold certs against anyone 😛 but I also understand why someone might expect more from someone with alphabet soup after their name.
I treat everyone pretty much the same way... do you know what I need you to know or not? My questions aren't difficult or "tricky" so, certified or not, they should know the answers.
As a bit of a side bar, the shortest interview I ever conducted lasted through just one question (a simple "warm up question" to make the person more comfortable as one would do during a lie detector test) and was over 30 seconds after I asked it (and the "dude" claimed more than 9 years of experience).
As another set of side bars, the best DBA I ever hired had no certs and no degrees. The second best one I ever hired (as a developer, not a DBA) not only had no certs or degrees, he also had no production experience... only a shed load of practice on the network he'd set up at home.
So what was that question??
"How do you return the current date and time from SQL Server using T-SQL?" Like I said... it was a "warm up" question that was intentionally made very easy to set the interviewee at ease. I usually ask around 5 such super easy questions at the beginning of the interview. It's amazing to me that about half the people we interview don't make it through those "warm up" questions.
The answer the interviewee returned was "I don't know... we always used the GUI code to do that." The reason why that killed the interview immediately was because the fellow claimed to be a "9 out of 10" in SQL Server (and Oracle, by the way) and also claimed 9 years of experience on his resume. The positition being applied for was for "Sr. SQL Server Developer".
And, no... I won't post the other questions for reasons that are obvious. 😉
How many of the ways do you require in the answer?
That's the direction I took first as well. There are so many ways to answer that, I'm sure that I would just start overflowing at the mouth... There's a different answer for datetime/datetime2/UTC/offset/CLR... and that's before we start discussing "which current date and time (where are you?)". Do I try to look clever and come up with something using xp_cmdshell? GRRRR! I hate these hard questions! By the time I got done talking, I'm sure they would have thrown my resume out. Great, now I have a scene from the move Phenomenon going through my head (how many mammals can you name in 60 seconds?)
See? now THAT's exactly what the easy questions are meant to do... get a person to relax and start talking about what they know. A simple GETDATE() would have sufficed but if someone I was interviewing started spitting out all of the possibilities and maybe even had the good humor to point to the clock with a big ol' grin and a chuckle, then I'd know that I had someone who was going to be worth interviewing. The ones who really don't know anything except "book smarts" are the ones who sit there with a fence post up their hiney and answer only the questions I ask. I don't know who coaches people on interviews but they're damned sure doing it wrong.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 5, 2011 at 9:55 am
Stefan Krzywicki (10/5/2011)
How many of the ways do you require in the answer?
Just this one:
SELECT DATEADD(MILLISECOND, dosi.ms_ticks, dosi.sqlserver_start_time)
FROM sys.dm_os_sys_info AS dosi
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
October 5, 2011 at 10:36 am
Jack Corbett (10/1/2011)
Hey guys I got some really cool news today. I was awarded MVP status!I just hope I can honor that award the way that all the MVP's on here already do!
*claps* Congratz Jack.:w00t:
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 5, 2011 at 10:41 am
SQL Kiwi (10/5/2011)
Stefan Krzywicki (10/5/2011)
How many of the ways do you require in the answer?Just this one:
SELECT DATEADD(MILLISECOND, dosi.ms_ticks, dosi.sqlserver_start_time)
FROM sys.dm_os_sys_info AS dosi
Cool, but when I run this and also select GETDATE() on one of my servers, the two returned values differ by about 27 seconds. Now what was that saying about the man having two clocks never knowing the real time? 😀
October 5, 2011 at 10:45 am
Jan Van der Eecken (10/5/2011)
Cool, but when I run this and also select GETDATE() on one of my servers, the two returned values differ by about 27 seconds. Now what was that saying about the man having two clocks never knowing the real time? 😀
Clearly your GETDATE is broken. :laugh:
(The code was just for fun in case anyone else reading is wondering).
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
October 5, 2011 at 10:49 am
SQL Kiwi (10/5/2011)
Jan Van der Eecken (10/5/2011)
Cool, but when I run this and also select GETDATE() on one of my servers, the two returned values differ by about 27 seconds. Now what was that saying about the man having two clocks never knowing the real time? 😀Clearly your GETDATE is broken. :laugh:
(The code was just for fun in case anyone else reading is wondering).
HAHA
2 of 3 servers I get arithmetic overflow and the 3rd server differs by 35 seconds.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
October 5, 2011 at 10:50 am
i see differences on most of my servers, too; one server is under two seconds, others as much as 37 seconds:
also, i got overflow adding the milliseconds, so i had to munge it a bit to get the time.
/*
ServerName SQLTime OSTime Days Hours Minutes Seconds Milliseconds
----------- ----------------------- ----------------------- ----------- ----------- ----------- ----------- ------------
DEV223 2011-10-05 12:49:02.713 2011-10-05 12:49:40.620 0 0 0 37 907
*/
;With MyServerTime
AS
(
SELECT
@@SERVERNAME As ServerName,
getdate() AS SQLTime,
DATEADD(second, (dosi.ms_ticks / 1000), dosi.sqlserver_start_time) AS OSTime
FROM sys.dm_os_sys_info AS dosi
)
select
ServerName,
SQLTime,
OSTime,
[Days] = datediff(day,0, OSTime-SQLTime),
[Hours] = datepart(Hour, OSTime-SQLTime),
[Minutes] = datepart(Minute, OSTime-SQLTime),
[Seconds] = datepart(Second, OSTime-SQLTime),
[Milliseconds] = datepart(millisecond,OSTime-SQLTime)
FROM MyServerTime
Lowell
Viewing 15 posts - 30,631 through 30,645 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply