Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
5
Impact
~285 people reached

  • 0 posts edited
  • 0 helpful flags
  • 2 votes cast
Aug
15
awarded  Nice Question
Jun
18
awarded  Teacher
Jun
15
comment Should I check parameter before using it in methods?
@Giorgio Totally agree. The question seems to be about wrong API usage (i.e. programmer error, aka bug), so silently returning false is inappropriate. This asks for even more code to deal with programming errors, and you can't do a sensible thing anyway. The golden rule: Crash early, crash often! Makes life for programmers so much easier. Whoever will use your code later will hate you for hiding API usage mistakes.
Jun
15
comment Should I check parameter before using it in methods?
How is that "false" helpful for the developer calling that function? Is he supposed to check for it? Does it offer any hint of what's going wrong and when?
Jun
15
comment Fast indexing of k-combinations
Typical sizes are nCr(64, 1...10), and it can often be just a one-time conversion for a given index or combination, so setting up the complete table might not be the best option. Tables work if you need one them and permanently, but I often need several different ones, and this fills up memory quickly. If we take it to like nCr(100, 1...6) it's out of reach anyway.
Jun
15
comment Fast indexing of k-combinations
Thanks, that gives a solution for k = 2. Maybe I can work out something for k > 2 from that starting point.
Jun
15
comment Fast indexing of k-combinations
@MichaelT Your links do not address the question - iterating over the combinations is not the problem. This is about mapping indices and combinations. Given "11001000", what is the index (or enumeration count if you will)? What code belongs to index 1673?
Jun
15
awarded  Student
Jun
15
asked Fast indexing of k-combinations
Dec
4
comment How important is graceful degradation of JavaScript?
The developers' time is much better spent on the javascript part, bringing benefit for the other 98% to 99%, read: 294 millions users. Don't let them suffer because of the other 6 millions.
Sep
28
awarded  Supporter
Sep
28
awarded  Autobiographer