1,637 reputation
312
bio website
location
age 23
visits member for 2 years, 11 months
seen Apr 9 at 21:36

Apr
7
answered Map of functions vs switch statement
Mar
4
answered What is the functional-programming alternative to an interface?
Mar
4
revised What is the functional-programming alternative to an interface?
Fix syntax highlighting.
Mar
4
comment What is the functional-programming alternative to an interface?
You can add sintax highlighting hints when the language in the answer doesn't match the language in the question. See my suggested edit for example.
Mar
4
suggested suggested edit on What is the functional-programming alternative to an interface?
Mar
4
answered Designing a function with many optional components
Feb
27
answered Is it possible to half-way synchronize javascript functions that include async calls?
Feb
26
revised Refactoring Switch Statements and is there any real use for Switch Statements at all?
deleted 11 characters in body
Jan
16
comment How can I avoid mistakes using the same variable name again?
Honestly, all the 3 answers so far suck. Variable naming doesn't solve this problem in general and puts the blame on the wrong place. Isn't there any linter out there that gives a warning if you assign to a function parameter?
Jan
8
comment Does the state Pattern violate Liskov Substitution Principle?
Basically, the big problem is that object orientation is good for adding new classes but makes it hard to add new methods. And in the case of state, as you said, it is not likely that you will need to extend the code with new states very often.
Jan
8
revised Open sourcing an internal project that has confidential information in the old revisions.
make the title clearer.
Jan
8
suggested suggested edit on Open sourcing an internal project that has confidential information in the old revisions.
Sep
23
answered What is the advantage of assigning a function to a var?
Sep
22
comment How to get multiple open-source projects to use a standard way of doing something
xkcd.com/927
Aug
26
awarded  Pundit
Jul
20
comment If python compiles to assembly and an OS is written in it, will it compete favorably with C in benchmarks?
@SK-logic: One might argue that Java is more of a dynamic language when it comes to its implementation though, given how it uses an intermediate interpreter and JIT compiler.
Jul
20
comment Strategy/algorithm to divide pot to chips
What if the cassino is owned by me? mwahahaha! In any case, this problem can also occur in more reasonable situations: for example, if you run out of $5 chips then its better to split $30 into [$10, $10, $10] then into [$25, $1, $1, $1, $1, $1]
Jul
20
comment Strategy/algorithm to divide pot to chips
@Chad: Your greedy algorithm does not work for all denominations. For example, if we the we only have $5, $20 and $25 chips available then the greedy algorithm would split $40 into [$25, $5, $5, $5] instead of the optimal [$20, $20].
Jul
20
answered Best practice on if/return
Jul
2
comment Is this a decent use-case for goto in C?
This also works in Javascript. I guess there is one thing where it is similar to Java after all.