2,762 reputation
1123
bio website
location
age
visits member for 4 years, 2 months
seen 10 hours ago

Mar
26
awarded  Nice Answer
Mar
25
comment What is a simple, correct and secure way of executing code stored in database?, that is also sandboxed
Please provide more context. Why do you want to do this?
Jan
31
awarded  Yearling
Jan
12
comment How does big O notation indicate upper bound on a function?
@Snowman: No, the least upper bound on f(n)=n+10 is O(n) (i.e., the upper+lower bound, i.e. f(n) ∈ Θ(n)). Big O notation defined as being applied to functions, not execution times.
Jan
12
comment How does big O notation indicate upper bound on a function?
@BartvanIngenSchenau: That is incorrect. O(1) is defined as being applied to functions, not execution times.
Dec
22
comment why “new” keyword is not contextual keyword?
@programmer1: Read the article linked in my comment on your question.
Dec
22
comment why “new” keyword is not contextual keyword?
See also Eric Lippert's post on the topic: Reserved and contextual keywords
Nov
24
comment What is this pattern called? Run finally?
According to this EMCAScript draft‌​, future versions of Javascript will probably have native promise support.
Nov
21
comment How to deal with Windows .NET configuration files
This varies by language and OS. In Windows C#, reasonable approaches to storing user settings include: 1. Store configuration in the user profile directory (.config files can be loaded from arbitrary locations, if you still want to use .config). 2. Use a Settings File: Right click your project, click "Add->New Item," and select Settings File. 3. Use registry.
Nov
14
comment Why is a python package more perfomant as zip?
The difference is extreme enough that newer versions of OSX actually compress memory to avoid needed to use virtual memory (this idea was not invented by Apple).
Nov
13
revised Would a “downcast if block” be a reasonable language feature?
added 105 characters in body
Oct
28
comment Is it permissible to use explicit interface implementation to hide members in C#?
Of course, implementing Add explicitly also reduces clutter. TryAdd can do anything Add can do (Add is implemented as a call to TryAdd, so providing both would be redundant). However, TryAdd necessarily has a different name/signature, so it is not possible to implement IDictionary without this redundancy. Explicit implementation resolves this problem cleanly.
Oct
28
comment Is it permissible to use explicit interface implementation to hide members in C#?
I wouldn't say it hides the mutating setter but rather that it doesn't provide it at all. A better example would be ConcurrentDictionary, which implements various members of IDictionary<T> explicitly so that consumers of ConcurrentDictionary A) won't call them directly and B) can use methods which require an implementation of IDictionary<T> if absolutely necessary. E.g., users of ConcurrentDictionary<T> should call TryAdd rather than Add to avoid needing unnecessary exceptions.
Oct
27
revised Is it permissible to use explicit interface implementation to hide members in C#?
Fixed link typo
Oct
25
comment Is it a good practice to run unit tests in version control hooks?
#1 is obviated by allowing developers to check-in to a personal branch or local repository. It's only when a developer wants their code somewhere that other developers can see it that the unit tests need to run. As with #1, #2 is obviated by only hooks to mainline branches. #3 is obviated by the fact that A) Any such feature can be disabled, even though it's a hassle (and should be a hassle) and B) Individual failing unit tests can be disabled.
Oct
21
comment Refactoring web pages with user controls
Presumably Jeremy means "webforms"
Oct
7
comment Why should your code not use 100% CPU?
Raymond Chen's take on the Subject: blogs.msdn.com/b/oldnewthing/archive/2010/12/03/10097861.aspx . 100% CPU usage is fine, as long as it's at the right priority and is accomplishing useful work.
Sep
15
comment Is it okay to use exceptions as tools to “catch” errors early?
Note that coding contracts enable you to detect many such errors statically. This is generally superior to throwing an exception at runtime. The support and effectiveness of coding contracts varies by language.
Jul
30
comment Should all HTTP requests including credentials be made using a POST even if it is actually just a request for data?
I would usually refer to "HTTPs only" cookies as "secure" cookies (to avoid implying contrasting with HttpOnly cookies). Also, I would recommend using a secure, HttpOnly cookie. HttpOnly cookies are not accessible via javascript.
Jul
21
answered How should I include jQuery in a library?