2,724 reputation
1022
bio website
location
age
visits member for 3 years, 11 months
seen yesterday

2d
comment why “new” keyword is not contextual keyword?
@programmer1: Read the article linked in my comment on your question.
2d
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?
Jul
21
comment How should I include jQuery in a library?
Part of being a good citizen is being careful about licensing. Sure, the author of a FOSS project probably won't be attacked legally, but those who wish to use such code legally will have a much easier time of it if the author handles licensing properly.
Jul
18
comment Does CC0 allow sublicensing of derived works?
MIT License: Why isn't it considered viral? discusses the viralness of the MIT license. Also pay attention to the comments.
Jul
18
comment Print the next smallest from 2^i * 5^j where i,j >= 0
@Snowbody: The op's question is an algorithms question, so it's somewhat irrelevant. Ignoring that, your first concern should be dealing with very large integers, as this becomes a problem far sooner than garbage collector overhead.
Jul
18
comment Print the next smallest from 2^i * 5^j where i,j >= 0
+1 While this is roughly equivalent to my second snippet, your use of immutable edges makes it clearer how the edge count grows.
Jul
17
revised Print the next smallest from 2^i * 5^j where i,j >= 0
deleted 84 characters in body