Reputation
1,293
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
9 18
Impact
~53k people reached

  • 0 posts edited
  • 0 helpful flags
  • 260 votes cast
Nov
17
awarded  Pundit
Nov
12
awarded  Notable Question
Nov
12
comment In Java, should I use “final” for parameters and locals even when I don't have to?
@Steve Kuo: It just allows me to quickly find all variables. no big gain, but together with preventing accidental assignments it's worth the 6 chars. I'd be much more happy if there was something like var for marking non-final variables. YMMV.
Nov
1
comment Help with design structure choice: Using classes or library of functions
Classes with a single function are no problem (you can nest them in a single file, at least in Java). Using classes gives you more flexibility (imagine the user will define a macro: with classes you simply create a list like (new EdgeDetection(), new SimpleSharpening(4), new Rotation(90)). Classes give you more flexibility (which you mightn't need).
Oct
17
comment Why did memory-managed languages like Java, Javascript, and C# retain the `new` keyword?
+1 for the broken switch (in the hope you repair it :D).
Oct
17
comment Why did memory-managed languages like Java, Javascript, and C# retain the `new` keyword?
I wonder that they don't use "New" instead of "new". Somebody could tell them there are also lowercase letters, which sort of solve this problem.
Oct
12
answered How can I handle clock hands using doubles that suffers at most O(log n) corrupt bits at nth frame of display?
Oct
2
answered New nodes joining distributed genetic algorithm
Sep
27
comment Should ** bind more tightly than !, ~?
@Sean McSomething: Maybe... the problem is that it makes the code longer... and a smaller part of it fits on the screen. But increment/decrement is not very common outside of loop headers, so it's not really bad.
Sep
27
comment Should ** bind more tightly than !, ~?
@Sean McSomething: Or allow them but only on L-values occurring exactly once?
Sep
27
comment Should ** bind more tightly than !, ~?
@amon: I see... but I'd simply ignore it. It's non-commutative monoid, it has no absorbing element, so what? Multiplication of positive integers has none either.
Sep
27
comment Should ** bind more tightly than !, ~?
KISS. A rule like "all unary operators take precedence over all binary ones" is much easier to remember than any super-smart rule allowing to save a few chars from time to time.
Sep
27
comment Should ** bind more tightly than !, ~?
@amon: Sure does concatanation have a neutral element: the empty string. So it's like multiplication, but I don't believe using * wouldn't be any better than +. I fully agree with forbidding things like 1+2+"3"!
Sep
10
comment Design: multiple algorithms on the same large data sets
Any non-trivial algorithm will take much longer than the copy, so simply copy it.
Sep
9
comment Git Staging: When to stage? What to do if modification occurs afterwards
I stage files whenever I finished some small piece of work (too small for a commit) or before some changes I'm not sure about. Do whatever works for you. Find a tool (e.g., git gui or git cola) showing you both the stages and unstaged changes (git diff and git diff --cached are good, but sometimes I want more).
Jun
27
awarded  Notable Question
Jan
23
awarded  Yearling
Jan
11
answered How do you handle increasingly long compile times when working with templates?
Jan
2
comment What's the reasoning behind the “I” prefix naming convention for interfaces in .NET?
@ScottWhitlock: For me, IAnimal is much more readable than AnimalInterface. Verbose names are preferable except in cases when a simple short convention can be used for something occurring frequently enough. And interfaces are such a case.
Dec
31
comment Having error codes option in C++ library for performance
@Shao Voon Wong: No. Because of "Subsequent calls do nothing if they determine an earlier call resulted in an error" there are no error chains.