2012
Apr
16
comment Eliminating tab characters in a new language
I up-voted this answer; then following Hakan's link in the comment and realized I had up-voted the Tab answer made by Fishtoaster.
Apr
15
comment Does LINQ require significantly more processing cycles and memory than lower-level data iteration techniques?
Overall I agree with you but the behavior of the Where method - Where method does not add all matching items to a collection. It stores the information needed to filter items in expression tree. If the returned iterator is not actually used, no filtering will happen at all.
Mar
16
revised Efficient methods for storing tens of millions of objects for querying, with a high number of inserts per second?
added 532 characters in body
Mar
15
answered Efficient methods for storing tens of millions of objects for querying, with a high number of inserts per second?
Feb
14
comment Is there a specific term for an accessor method that returns a boolean value?
@Emmad: I think list.isNotEmpty() is more readable than !list.isEmpty()
2011
Nov
30
awarded  Nice Answer
Nov
30
revised How do regular expressions actually work?
added 254 characters in body
Nov
30
answered How do regular expressions actually work?
Nov
15
comment Can anyone help solve this complex algorithmic problem?
I am not a native English speaker but I feel it would be more clear if you rephrase how to calculate how much gas at a node x: sum(g[1..x])-sum(d[1..x-1])
Nov
10
comment Do real-world algorithms that greatly outperform in the class below exist?
@Steve314: who says a string hash function has to take all characters in a string into calculation? Depending on the probability model of the problem domain, a "partial" hash does not necessarily mean more hash collisions. In most cases, a dedicated "partial" hash works equally good enough compared to a "full" hash.
Nov
9
comment Do real-world algorithms that greatly outperform in the class below exist?
@Steve314: how about return s[0]+s[s.length-1]? What disqualifies it not a hash function for string?
Oct
18
comment How does a developer set up an environment to hack on an OS like Linux, Plan9 or BSD?
@World Engineer: linux is not that easy to be screwed unless that's your intention because 1) you can have multiple kernels in multiple separated files; 2) chroot can be used to isolate other normal files. If you want to modify a kernel code and see how it behaviors, just compile it into a new kernel and load this kernel from boot loader. If it crashes, reboot and load the old kernel. I don't see how could that process screwing up your system.
Oct
7
comment Do real-world algorithms that greatly outperform in the class below exist?
@Steve314: why do you assume hash functions are O(m) where m is the size of the key? Hash functions can be O(1) even if you are dealing with strings (or other complex type). There is no too much value to put it in formal definition than simply realizing the hash function could significantly change the complexity if a wrong data structure (hash table) is chosen for your input (key size is unpredictable).
Oct
7
comment Do real-world algorithms that greatly outperform in the class below exist?
Don't take big-O notation for speed.
Oct
7
comment What is the greatest design flaw you have faced in any programming language?
c# got this right
Oct
7
comment What is the greatest design flaw you have faced in any programming language?
@muntoo: your example is just a bad use of macro.
Oct
7
comment What is the greatest design flaw you have faced in any programming language?
@Mason Wheeler: if + to string is commutative, no one would have to complain about it at the first place. I think Matthieu M. has a good point.
Sep
29
comment Tabs versus spaces—what is the proper indentation character for everything, in every situation, ever?
One thing I like emacs is I can hit tab key multiple times without destroy the indentation.
Sep
29
comment Server-side event logs through DB or writing to file?
@Emmad: your query does not give the last 20 entries before the exception. There are many ways to do this in SQL but all of them suck in both performance and verbosity.
Sep
29
revised Server-side event logs through DB or writing to file?
added 371 characters in body