2,722 reputation
2819
bio website github.com/CodesInChaos
location Frankfurt, Germany
age
visits member for 4 years, 6 months
seen 1 hour ago

NSA running around with their hair on fire because they realise if everyone starts using OTPs and not their weak AES algorithm then their PRISM programme is worthless. --- zuallauz - Would this simple encrypted chat program be feasible using One Time Pads?


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.
Jan
23
comment torrent support in browser
Opera contains a torrent client.
Jan
23
comment Throw exception or let code fail
Side notes: 1) Consider using string.Format over string concatenation for building the exception message. 2) only use as if you expect the cast to fail and check the result for null. If you expect to always get a Material, use a cast like (Material)Resources.Load(...). A clear cast exception is easier to debug than a null reference exception that occurs later on.
Jan
22
comment Kernel mode web servers: A clever optimization or a security nightmare?
Usermode applications are often written in typesafe languages which rules out most memory corruption based bugs (these are typically those that lead to remote code execution).
Jan
22
comment Kernel mode web servers: A clever optimization or a security nightmare?
The big problem with the Singularity approach is that it means that a but in the JITter can easily lead to privilege escalation.
Jan
20
comment REST request of different length
I would avoid returning a password hash via API. Another potential issue is that your hash looks unsalted. Password hashes should be slow and salted.
Jan
20
comment Is address 0000000C a special address?
I'd rather write 64 KiB instead of 65 kB in this case, since the power-of-two size is relevant.
Jan
16
comment What is the best way to structure and name files which contain generic classes with the same name?
The compiler internally mangles the name of generic types, adding a backtick and the number of generic parameters since .NET does not allow multiple types with the same name with a differing number of generic parameters but C# does. So the file naming convention matches what the compiler does.