Reputation
2,740
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
2 8 19
Newest
 Enthusiast
Impact
~83k people reached

Feb
9
comment Can commented-out code be valuable documentation?
In your last case I'd keep both code variants as compilable code.
Feb
4
comment Well defined mathematical operations for bearing (angle) class
Because "2 * east = south" makes no sense.
Feb
4
comment Well defined mathematical operations for bearing (angle) class
@DocBrown Are you sure modular arithmetic is still a ring if you use real numbers instead of integers as basis? Isn't it just an additive group?
Feb
4
comment Well defined mathematical operations for bearing (angle) class
@BartvanIngenSchenau Multiplication with an integer makes sense (for relative angles), but multiplication with real numbers/floats leads to the same unintuitive effects as division.
Feb
4
comment Well defined mathematical operations for bearing (angle) class
If you normalize after every operation then multiplication/division should be removed.
Feb
4
comment Well defined mathematical operations for bearing (angle) class
Many of your operations only make sense for relative values but not for absolute values.
Feb
4
comment Are there deals (free or low cost) to license Visual Studio for open-source developers?
You can use the Visual Studio Community Edition, which is essentially a free Visual Studio Professional with a couple of licensing restrictions.
Feb
4
awarded  Excavator
Feb
4
revised Using Visual Studio with a screen reader without paying for an expensive edition
added 7 characters in body
Feb
4
revised Using Visual Studio with a screen reader without paying for an expensive edition
deleted 1 character in body
Feb
4
revised Using Visual Studio with a screen reader without paying for an expensive edition
added 7 characters in body
Feb
2
comment How is atomicity of reference operations enforced?
Platforms with 64 bit pointers/references generally provide efficient atomic 64 bit writes.
Feb
1
comment Does ORM at any point become a “requirement” for RESTful API?
Note just because you want to store (some) data non-relationally doesn't mean that you need to use a document database. You could store these parts in a text/binary field in an otherwise relational database.
Jan
30
comment Are there any benefits of using this extra variable in the for loop annotation?
In C#/.NET the variant using n might be slower than the variant using array.Length since the JITter might not notice that it could eliminate array bounds checks.
Jan
26
comment Should an Http API always return a body?
@Hey I'd use the location http header for that.
Jan
26
answered Should an Http API always return a body?
Jan
24
comment Situations when O(n^2) better than O(n*log(n))
Concerning average vs. worst case, there is an important difference between "For every input the probabilistic algorithm is fast on average" vs. "For randomized inputs the deterministic algorithm is fast on average". The latter can easily bite you, perhaps the inputs you're dealing with in practice and the inputs you averaged over are not the same. Or perhaps an attacker deliberately crafted the input to hit the worst case as a DoS attack. One example of such an attack is HashDoS, which exploits the bad worst case complexity of hash tables. Similar issue with Quicksort with predictable pivots.
Jan
23
comment torrent support in browser
The problem with sequential downloading is that peers often leave once they finished downloading, so early pieces would be available on many peers and late pieces would be available on few peers. The tit-for-tat strategy doesn't work well either, if a client who has more pieces than another has all pieces they have, instead of different ones. This means random requests improve efficiency of the swarm, which is why many clients that support video streaming still mix sequential download with requests of random or rare blocks.
Jan
23
comment torrent support in browser
When connecting a to a peer they'll send you information about which blocks they have and they also send you a notification whenever they downloaded a new block. So clients only request blocks the peer has.
Jan
23
comment torrent support in browser
The bittorrent client can decide which blocks to request first. It can start in the beginning, which for example the video feature uTorrent does.