2,416 reputation
2617
bio website github.com/CodesInChaos
location Frankfurt, Germany
age
visits member for 3 years, 7 months
seen 2 days ago

Feb
28
comment Best way to unit test methods that call other methods inside same class
Since those derived classes can be in different assemblies, they're exposed to third party code, and thus part of the public surface of your class. To test them, you can either make them internal protected, use a private reflection helper, or create a derived class in your test project.
Feb
27
comment Why different testing methods are so contradicting topic?
I think most disagreement is about what and how to test, not about testing in general. For example I think that mocking is overused(mocking services is fine, many others are not). Others prefer integration tests. Then there are some kinds of tests that are unnecessary if you use good static analysis and contract based design.
Feb
27
comment Rules about the concreteness of method parameter types, return types and property types
Postel's law is pretty high on my list of "biggest software engineering mistakes".
Feb
27
comment How to make my web app restful
IMO search fits the query parameters model better than the REST model. I'd guess each different kind of search gets a different resource url, but the actual filters should be query parameters.
Feb
27
answered Rules about the concreteness of method parameter types, return types and property types
Feb
27
comment Best way to unit test methods that call other methods inside same class
protected is almost the same as public. Only private and internal are implementation details.
Feb
27
comment Best way to unit test methods that call other methods inside same class
protected methods are part of the public surface of a class, unless you ensure that there can be no implementations of your class in different assemblies.
Feb
27
comment Best way to unit test methods that call other methods inside same class
FunctionB is broken-by-design. new Random().Next() is almost always wrong. You should inject the instance of Random. (Random is also a badly designed class, which can cause a few additional problems)
Feb
27
comment Is there a proper way to create a file format?
I would avoid BinaryFormatter.
Feb
25
awarded  Caucus
Feb
25
comment Is there a reason that tests aren't written inline with the code that they test?
Half of the arguments here apply to inline documentation as well.
Feb
24
comment Why does it matter that HTML and CSS are not programming languages?
TeX is an interesting corner case. It's technically a programming language, but most people use it purely as a markup language.
Feb
24
comment Most difficult subject/theory in Computer Science?
Crypto isn't that hard. The problem is that security can't be tested easily, so you only notice your mistakes when somebody hacks you. But lack of testability applies to most forms of IT security, not just crypto.
Feb
23
revised Strategy for website with international strings
added 98 characters in body
Feb
23
answered Strategy for website with international strings
Feb
23
comment When thinking about dates and times - is midnight today in the past or future?
In some contexts 24:00:00 is used to describe midnight at the end of the day.
Feb
23
comment Compile GPL-code into a JNI-capable shared library and use it in commercial software
Even if you'd distribute it as separate .so files within an archive, GPL (as opposed to LGPL) usually affects the whole software, and not just that single .so file. So I think calling a GPLed .so file from your closed source application isn't possible.
Feb
23
revised Do I have to include the license of a third party library imported as a DLL?
Added name of license and reproduced it, so the question becomes self contained
Feb
23
suggested suggested edit on Do I have to include the license of a third party library imported as a DLL?
Feb
20
comment A completely free and open programming language
The problem with patents is that they can affect any programming language, even those that are in no way based on what patent holder developed since similar problems often lead to similar but independently invented solutions. Only really old programming languages are reasonably safe from this, since patents covering them either expired, or it would be prior art.