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

Feb
13
comment Trailing slash in RESTful API
It also fits the normal path/url model, where directories are often written with a trailing /
Feb
9
comment Is it wise to include something like OpenSSL or GnuTLS with a project in a repository?
Depends on target audience, target OS, form of distribution(source or binary), the language of your project etc.
Feb
9
comment Is C a regular language?
Even regex aren't regular anymore
Feb
8
comment When is unit testing inappropriate or unnecessary?
"Making them internal would require putting the unit tests into the same assemblies as production code" - At least in .net, you can use InternalsVisibleTo to avoid this.
Feb
8
comment Which HTTP status codes are really OK?
Don't forget to handle 3xx. You need to follow the redirect(a limited number of times) before you get the real status code. Many HTTP libraries handle 3xx for you.
Feb
8
comment Which HTTP status codes are really OK?
(401 is the right response if you use http authentication since it requests different http credentials. If you other authentication (such as cookies+sessions) you'd use 403)
Feb
6
comment Anonymous software license
Publishing music anonymously has pretty weird effects in Germany. People playing it need to pay some stupid organization, since they can't prove that the music wasn't created by a member of that organization.
Feb
6
comment How important is it to reduce the number of lines in code?
The problem with introducing variables is that you need good names for them. For example I find it surprising that adult && decade isn't true for age==20 since intuitively adult = age >= 18 for me. And quarter for 25 years isn't the clearest name either, prefer quarterCentury or something similar.
Feb
5
comment Would md5 hashes allow detection of synced files?
Your disks need to be quite fast for MD5's cost to matter.
Feb
5
comment How can I deal with a team member who dislikes making comments in code?
The problem with that approach is that you easily end up with "Gets or sets the Foo" style documentation which is worse than no documentation at all.
Jan
26
comment Is node.js a suitable server platform for financial applications?
Having to use manual fixedpoint for money sounds annoying.
Jan
25
comment Purpose of Base Address?
@DeadMG Then why didn't you just edit it to a neutral form like what @.whatsisname did? Using M$ isn't different from other forms of bad writing, leetspeak, etc.
Jan
25
revised Purpose of Base Address?
added 258 characters in body
Jan
25
answered Purpose of Base Address?
Jan
25
comment How do we make unit tests run fast?
I like having some slow and comprehensive unit tests, but I don't run them on every build.
Jan
25
comment How do we make unit tests run fast?
First benchmark, to figure out where the performance cost comes from. Are there a few expensive tests, or is it the sheer amount of tests? Are certain setups expensive?
Jan
22
comment How to be a zero-bug programmer?
@endolith The limits say that there exist programs for which it is impossible to prove that they're bug free. Just like it's impossible to prove if certain programs terminate. But this impossibility doesn't apply to every program, and probably doesn't apply to most normal programs. Just read up on the halting problem, this is pretty much the same thing. | On the practical side, to prove the correctness for many non trivial programs you'd need to solve really hard mathematical problems, such as proving if P equals NP or not, breaking AES (or proving it secure),...
Jan
22
comment How to be a zero-bug programmer?
@endolith 1) On the practical side one big problem is that a spec can have bugs as well. 2) It's also just too damn hard to prove that a program conforms to a spec for not trivial programs. Sometimes you can, but it's a lot of hard work. 3) On the theoretical side you run into the usual limitations, goedel, halting problem, uncomputable functions etc. which prevent you to prove the correctness of arbitrary programs. | I assume Matthew was alluding to the theoretical limits.
Jan
20
comment Is there something like a polymorphic Singleton?
I'd pass an IResourceLoader interface via IoC to the classes that need access to resources. That way you can easily use different implementations of that interface, and your classes don't need to know if this happens to be a singleton or not. They're just told "use this resource loader"
Jan
19
comment My boss has a bad case of “Not Invented Here”
Would running the C# application on the same machine as the SQL server fix your performance problem?