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

Apr
22
comment Choosing a software license that requires written permission to use commercially
Note that your code cannot be dual-licensed in this fashion if using 3rd party GPL code. The simplest way to avoid this issue is to require all contributions towards the dual-licensed software to assign copyright to the product owner, though assigning rights is sufficient. Of course, it is much harder to get unpaid contributions for any commercial product, even an open source one. To expand on Doc Brown's example, take note of the MySQL Contributor's agreement.
Apr
20
comment Is restricting sessions to an absolute IP likely to have a wide impact on mobile networks?
As a minor addendum: Depending on the nature of your service, it may be of value to provide your users with an optional feature which restricts their usage to a specific IP or IP range (and then handles violations by either blocking the user, logging a warning, or requiring a secondary form of authentication). I've encountered services which offer this feature.
Apr
20
answered Why does the TRACE level exists, and when should I use it rather than DEBUG?
Apr
9
comment is there a cleaner / simpler way to code this?
@Matthew: That's how I usually do it as well. A quick google says that in LUA 5+ you would use table.concat for this purpose. I usually only use WHERE 1=1 when editing via SMSS or when using dynamic SQL.
Apr
8
comment Language compiled to JS – most elegant way to do synchronous-style waits
@MasonWheeler: I assume the op means he wants to use synchronous-style syntax.
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.