2,160 reputation
2616
bio website github.com/CodesInChaos
location Frankfurt, Germany
age
visits member for 3 years, 4 months
seen 15 hours ago

Jan
13
comment How should one debug a PHP web application securely without exposing secrets to competitors?
Related How to be a zero-bug programmer?.
Jan
13
comment storing and retrieving millions of documents using c#
For the actual files, a plain file system should work fine. Just don't place them all in the same directory, create subdirectories with a few hundred files. For example you could create a subdirectory for each day 2013/01/13/filename.ext. For the search use whatever database you like, mapping the query to a filename.
Jan
10
comment Why do we need to use sealed on a class? Do we really need sealed?
Eric thinks from the point of view of a library developer. If a change to a library breaks a consumer, the library author can't make that change anymore. So it's useful to restrict a consumer from using it in a way that you're not willing to support. Restricting the consumer increases the flexibility of the library developer.
Jan
9
comment Why should we be aware of licenses?
That you agree to the license by merely using the software isn't that clear. Typically users have to agree to a EULA whose legal standing is tricky. It's only clear that you can't legally distribute software without obtaining a license.
Jan
2
comment Win loss code that does not make 1-0 record better than someone like 20-3
Most ranking systems base their result on the strength of the player you beat. Elo is a really primitive but popular system, Whole-History Rating is a nice advanced one.
Dec
13
comment How do you unit test private methods?
protected is part of the public API and incurs the same limitations (can never be changed, must be documented,...). In C# you can use internal together with InternalsVisibleTo.
Dec
12
comment Why doesn't Java String have static string manipulation methods?
null is an exceptional state and should be handled explicitly.
Dec
11
comment Creative Commons 3 vs Common Public Attribution License Version 1.0 for my PHP Script
I believe that your first condition ("but can not redistribute it as a new product or with a different name") contradictions the OSI definition of open source.
Dec
11
comment ASP.NET Web Forms is bad, or what am I missing?
Another issue with your example is that it's vulnerable to CSRF attacks. (But that'd also be true if you used POST without an Anti-CSRF token)
Dec
11
comment ASP.NET Web Forms is bad, or what am I missing?
Because the HTTP specification says so. "In particular, the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval. These methods ought to be considered "safe"."
Dec
11
comment ASP.NET Web Forms is bad, or what am I missing?
Don't use GET to modify something. At minimum you should use POST, but preferably DELETE.
Dec
11
comment Under what scenarios will an App's localStorage get cleared?
"is it a good idea to use localStorage?" That depends on what you want to store there. You cannot expect it to be permanent, so design your application to take that into account.
Dec
11
comment How should we “pick the comfortable programming language” in an interview?
Unless you have reason to believe that the interviewers are good functional programmers, I'd avoid haskell.
Dec
11
comment How to identify unstable floating point computations?
I meant a custom type that keeps track of upper and lower bounds by using different rounding. This doesn't work in every situation (In particular non continuous operations like x > y don't work), but should work well in many cases.
Dec
11
comment How to identify unstable floating point computations?
A custom numeric type that keeps track of the error in C++ should work decently. Of course that requires some changes to the program.
Dec
11
comment Where to store the private key?
The best you can do about malicious clients is restricting them to a well defined service API, not giving them direct access to the db. You can't really do anything beyond that, since you can't hide a secret in the client.
Dec
8
comment How can we calculate Big-O complexity in Functional & Reactive Programming
For the recursive approach you need to know how a certain recurrence relation maps to the cost. See A Short Tutorial on Recurrence Relations for a longer explanation.
Dec
8
comment How can we calculate Big-O complexity in Functional & Reactive Programming
You need to know the performance of the underlying algorithms of the functions you're using.
Dec
6
comment How to camel-case where consecutive words have numbers?
What about SHA-512/256 or SHA3-256? I'm having a hard time coming up with names that don't contain an _.
Dec
6
comment How deterministic are SessionIDs from SHA'd GUIDs?
I'm not worried about rollover, but rollback. I'm worried about rollback after restoring from backup, crashes, etc.