636 reputation
58
bio website
location Toronto, Canada
age 42
visits member for 4 years, 3 months
seen Dec 15 at 22:41

Defining quotes:

"The present letter is a very long one, simply because I had no leisure to make it shorter."
— Blaise Pascal

"The early bird gets the worm, but the second mouse gets the cheese."
—Steven Wright


Sep
24
awarded  Autobiographer
Sep
23
awarded  Yearling
Sep
15
awarded  Guru
Dec
20
awarded  Good Answer
Nov
17
awarded  Yearling
Aug
26
comment Software developer interview questions: is speed everything?
Makes you wonder if Code Kata would't benefit a programmer in these circumstances - en.wikipedia.org/wiki/Kata_(programming)
Jun
8
awarded  Caucus
Apr
3
revised Choice of node.js modules to demo flexibility
added 5 characters in body
Apr
3
asked Choice of node.js modules to demo flexibility
Sep
13
awarded  Yearling
Jul
31
awarded  Nice Answer
Jul
31
revised A practical use of “yield” keyword in C#
added 86 characters in body
Jul
31
revised A practical use of “yield” keyword in C#
added 403 characters in body
Jul
31
comment A practical use of “yield” keyword in C#
@MainMa, I threw my information into an answer because it's likely to get more exposure and to be more easily learned from there (better formatting to work with). Thanks for the suggestion.
Jul
31
revised A practical use of “yield” keyword in C#
deleted 11 characters in body
Jul
31
revised A practical use of “yield” keyword in C#
added 1261 characters in body
Jul
31
answered A practical use of “yield” keyword in C#
Jul
30
comment A practical use of “yield” keyword in C#
In another case, it makes some kinds of sorting and merging of lists easier to program because you just yield items back in the desired order rather than sorting them into an intermediate collection and swapping them, to achieve an ordered collection. There are many scenarios. Just one is the merging of two lists: foreach(var o in list1) yield return o; foreach(var o in list2) yield return o;. The IEnumerable<object> method that contains this code will yield back one contiguous list of items, it's effectively a merge with no intermediate collection created inside the method.
Jul
30
comment A practical use of “yield” keyword in C#
Also note that the yield keyword effectively creates a "lazy load" situation (I used that term loosely) over the collection items that can be much more efficient. For example, if your foreach loop iterates over the first 5 items of 1 million then that's all the yield returns, and you didn't build up a collection of 1 million items internally first. Likewise you will want to use yield with IEnumerable<T> return values in situations to achieve the same efficiencies.
Jul
18
comment How do I help a team member be more confident?
Start that team member out with some simple SQL requirements at work, overseen by another member, or to support some aspects of a larger database project. As they get into it and start familiarizing themselves with SQL and seeing it used in real world projects, they'll start to see their options open up and start thinking of ways to use it for other tasks and projects. Have the experienced SQL programmers steer her away from common beginner pitfalls for an accelerated experience.