2,966 reputation
11122
bio website
location
age
visits member for 3 years, 11 months
seen 14 hours ago

Oct
3
answered How can I estimate the entropy of a password?
Sep
24
comment Subset whose sum gets closest to saturating some bound
@JörgWMittag, this special case is one of the original NP-complete problems.
Sep
24
comment Case insensitive keywords in a language
Who are the end users? Will they be using version control on their scripts?
Aug
30
awarded  Nice Answer
Aug
29
comment What encryption algorithm/package should I use in a betting game?
@James, that's what the random 45-character prefix is for. It raises the source entropy (including the entropy of the random number from 0 to 100) to about 270 bits, which is too much for a determined number guesser to tackle in a reasonable time on a reasonable budget. By the time 270 bits isn't enough, SHA-256 won't be enough either, because it won't be collision-resistent.
Aug
28
answered What encryption algorithm/package should I use in a betting game?
Aug
21
comment Which CSS attributes should be in HTML and which in BODY?
Flagged to migration to webmasters.stackexchange.com, where this would be on-topic.
Aug
20
comment What's the best way to inject science into everyday programming?
Computer science is a cross-disciplinary field which includes some science and some non-science. Simple ;)
Aug
19
comment Use cases for “private” interfaces?
The question wasn't about interfaces in C# (or in any other existing language) but about the fundamental concept. This post doesn't address it at all.
Aug
16
comment Is there a programming language where 1/6 behaves the same as 1.0/6.0?
@MasonWheeler, division is indeed a well-defined mathematical concept. Following that argument through logically, given that a 32-bit integer type is a model of the ring Z/ 2^32 Z you should expect that division by an even integer should sometimes raise an exception. Division by odd integers would always be ok, though, because they have multiplicative inverses mod 2^32.
Aug
9
comment What Discrete Mathematics topics should the average computer science student know?
What are you averaging over - how far through their degree they are, or their ability? And are you intended to average over a range from pre-undergraduate to 99% of the way through writing a PhD thesis, or should "student" be understood as a narrow subset?
Aug
8
comment How do you encode Algebraic Data Types in a C#- or Java-like language?
Java sort-of has polymorphic values in some cases because its generics are implemented by erasure. You could have a single instance of Empty which is cast by an accessor method to Empty<T>. You'll get a couple of warnings unless you suppress them, but I believe this is actually used in the standard library for things like Collections.emptySet().
Aug
7
comment How do you encode Algebraic Data Types in a C#- or Java-like language?
@svick, well observed. I wasn't taking into account that the base type would be parameterised.
Aug
7
answered How do you encode Algebraic Data Types in a C#- or Java-like language?
Jul
16
comment Killer semi-unique programming language features
This goes all the way back to BCPL.
Jul
12
comment How do you explain the importance of using a [distributed] version control system to someone who's not in the CS field?
Except that Word/Excel documents are opaque to every VCS I've ever seen. Be careful when using this explanation!
Jun
20
comment How to get better at solving Dynamic programming problems
The question's wrong. true and (false xor true) = (true and false) xor true (easily seen by reducing both to false xor true).
Jun
15
comment faster algorithm for finding all subsets
Better than O(2^n) is possible for fixed k. I don't think anyone will give a better answer than the accepted one for stackoverflow.com/questions/127704/… , but I can't flag this question as a duplicate of a question on StackOverflow.
Jun
15
comment faster algorithm for finding all subsets
O(n^2) is better than possible, because there are \binom{n}{k} subsets of size k. For fixed k, you're looking at O(n^k) being optimal.
Jun
11
comment Visual programming for serious software
What is the actual question here? Are you asking about tools to generate code by drag and drop, tools to visualise control flow (but which don't allow modifying it), both, or something else?