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

Jun
13
comment Why/how does Java use a controlled mechanism to pause threads for GC?
@delnan On windows there is SuspendThread
Jun
11
comment How to name a method that both performs a task and returns a boolean as a status?
This kind of exception handler is rarely a good idea. Only catch specific exceptions you're expecting, not all of them. And if possible avoid throwing it in the first place, eliminating the need to catch it.
Jun
11
revised Shortcomings of using dynamic types in C#
edited body
Jun
10
comment Snapchat clone: How do I secure pre-downloaded notifications so that they cannot be opened outside of the app?
You're trying to solve the DRM problem which can't be solved with software. You can only throw lots of obfuscation at it and pray.
Jun
10
comment What are the differences between a while loop and a for loop?
Which language are you talking about? In pascal your argument has some merit (hardcoding a large number as limit is ugly), but in C you can use arbitrary conditions with for. No difference between for(;xxx;) and while(xxx).
Jun
10
comment What are the differences between a while loop and a for loop?
Which languages are you talking about? C style? In pascal for loops are quite different from C for loops and in some other languages for also allows you to write for each loops.
Jun
7
comment Should you keep a copy of all the code you write?
Related article: Did Goldman Sachs Overstep in Criminally Charging Its Ex-Programmer?. This is also a good example that even if you win in the end, the legal battle itself can hurt a lot.
May
24
comment Refactoring a 1500 LOC method that only builds the graphical UI
One thing I'd change is separating the static setup from the dynamic state.
May
23
comment Why are strong names optional?
Most programs should not be installed into the GAC in the first place. So there is little reason for strong naming in those programs.
May
22
awarded  Nice Answer
May
18
comment Terms in conditions in installer or is on website ok
One important point for including them in the installer is that it's clear which version of your ToS / EULA your user agreed to.
May
16
comment Coding: conciseness/efficiency vs readability
I hope the SecondToken function is a joke.
May
14
comment c# naming - What are common conventions for a suffix to distinguish between read-only and writable interfaces
@KChaloux The latter is a wrapper and can still change its contents through the underlying collection. So it's only readonly, not immutable.
May
14
revised c# naming - What are common conventions for a suffix to distinguish between read-only and writable interfaces
added 15 characters in body
May
14
answered c# naming - What are common conventions for a suffix to distinguish between read-only and writable interfaces
May
14
comment c# naming - What are common conventions for a suffix to distinguish between read-only and writable interfaces
The O in ReadOnly should be uppercase to fit with the existing readonly collections in .NET.
May
11
comment Standard ways of revoking user access to a site
The cookie should consist of a random 128 bit value stored in its own table. That way you can revoke it by deleting it, and a user can have multiple sessions at the same time. Alternatively you can look at whatever session support is built into ASP.NET.
May
10
comment Standard ways of revoking user access to a site
Clearing the cookie isn't even necessary as long as you check in the db if the cookie is valid.
May
8
comment How to “neutralize” those who write bad code on the team?
Guns. Lots of them.
May
8
comment How to extend Constructor Injection?
Adding a required dependency is a breaking change, no matter how you inject that dependency.