2,847 reputation
1919
bio website newmodifier.com
location Bedminster, NJ
age 27
visits member for 2 years, 7 months
seen 2 days ago

He who codes with me shall be my brother.

Never blame Anders for your bad design.


23h
awarded  Famous Question
Dec
30
comment Database Context and Singleton injection with IoC
You should create a new DbContext per request. IIS/ASP.NET uses new threads to serve requests and the DbContext isn't thread safe. Even if you aren't explicitly creating new threads, your singleton DbContext will have multiple threads operating on it. If multiple users are using your website at the same time, you will run into issues. A static DbContext variable won't work. See these links : stackoverflow.com/questions/6126616/is-dbcontext-thread-safe stackoverflow.com/questions/1416351/…
Dec
29
answered Database Context and Singleton injection with IoC
Dec
29
revised Should I use the new method/action to retrieve records? (Rails)
deleted 13 characters in body
Dec
29
answered Should I use the new method/action to retrieve records? (Rails)
Dec
29
awarded  Yearling
Oct
2
awarded  Good Answer
Sep
12
comment Why would I ever use delegates if I'm not doing events?
stackoverflow.com/questions/10766139/… great explanation there. Although, I prefer F#'s first class function system, C#'s is easier to understand once you come to terms with HAVING to declare the delegate signature and name it OR using a "built in" one.
Sep
12
comment Why would I ever use delegates if I'm not doing events?
Because there is no other way to pass a piece of code to a method in C#. The APIs exposed in those 3 libraries are some of the best, in my opinion. Try to imagine how you would make a similar library without delegates (aside from true first-class functions); you would not be able to. msdn.microsoft.com/en-us/library/dd460720.aspx Try rewriting Parallel.ForEach without delegates.
Sep
12
answered Why would I ever use delegates if I'm not doing events?
Sep
9
comment What are examples of automating BDD specifications through the UI layer?
It's testing both behavior AND technical aspects of the UI. The second you combine more than 2 dependent steps in a UI test, how is that not BDD? The "problem" is, there's the argument that you may as well do javascript unit testing as to not be testing many things at once. The link I posted is definitely BDD in a UI test because it's executing repeatable steps, expressed as behaviors, and asserting the result. It could fail because of a jquery selector being wrong, true, but it absolutely tests behavior.
Sep
9
revised What are examples of automating BDD specifications through the UI layer?
added 148 characters in body
Sep
9
answered What are examples of automating BDD specifications through the UI layer?
Sep
9
comment can I use XML for AJAX in a website created using HTML5
"DTD's, schemas" To reinforce your point, programmers didn't even define these when using XML years ago. They can be helpful for public APIs (things like XAML), but are relatively useless for a 1-off transport situation
Sep
9
comment CA1819: Properties should not return arrays. Does this happen only with arrays? If yes, why?
It's true, but you can also call private methods with reflection. If someone using your type wants to be tricky, finding trouble isn't hard. IEnumerable probably better honors the contract if you don't need random access.
Sep
9
comment CA1819: Properties should not return arrays. Does this happen only with arrays? If yes, why?
You can just return IEnumerable<T> because all arrays implement this interface and you won't be able to modify it without casting.
Sep
9
revised can I use XML for AJAX in a website created using HTML5
added 124 characters in body
Sep
9
answered can I use XML for AJAX in a website created using HTML5
Jun
3
comment Is SQL declarative?
When is your reply set to degrade seeing as how it's stored in a SQL Server database? :) I rarely hit an edge case in any of them that couldn't be solved within the framework. I see where you're coming from but the edge cases really don't cause me much pain for how beneficial and easy to reason about 99% of declarative code is. It's like saying Clojure or F# is bad because you had to use a mutable type to solve your problem.
Jun
3
comment Is SQL declarative?
Never truly effective? SQL, LINQ, Knockout.js, Prolog, ELM language. You may want to check again. I am using mostly declarative technologies at the moment.