Reputation
3,064
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
8 26
Newest
 Nice Answer
Impact
~73k people reached

Feb
2
comment In which cases and examples String in Java is not immutable?
@AnthonyPegram That is only true if you learned math before CPU registers and assembly languages. I've happened to know about asm earlier, so I initially wrote code in mutable style, where, for example, uppercase procedure mutates it's argument.
Jan
25
awarded  Nice Answer
Jan
14
comment How is rendering a Word document different from rendering a website?
Also, HTML does not necessarily contain representation rules. CSS does that, and you can easily set "b" tags to use any font weight. Also, HTML standard has shifted from representational tags ("i", "b", "div", etc.) to semantic ones ("em", "strong", "header", "section" etc.) exactly to get rid of representation details.
Jan
3
comment If Class is to define attributes and methods, and Interface is to define (a set of) methods, then how to think of interface needing new attributes?
The short answer is "An interface has no state", or, more precisely, interfaces do not define any state.
Jan
3
comment If Class is to define attributes and methods, and Interface is to define (a set of) methods, then how to think of interface needing new attributes?
Possible duplicate of Attributes / member variables in interfaces?
Jan
2
comment Managing widgets in a simple GUI framework
Layers seem like a proper solution. What makes you think it's a hack? Also, what's wrong with parent widget knowing properties of it's children? It's seems like it should know (or even define) their coordinates to be able to draw them in their proper places.
Dec
12
reviewed Approve Is it reasonable to not write unit tests because they tend to get commented out later or because integration tests are more valuable?
Dec
7
awarded  Yearling
Dec
6
reviewed Approve Are there CPUs that perform this possible L1 cache write optimization?
Dec
5
reviewed Approve In x86, where are the memory addresses of the values on the stack located?
Dec
2
reviewed Approve How does “repeat x = x:repeat x” return a list in Haskell?
Dec
2
reviewed Approve What is the interplay or relationship between business, functional, and system requirements?
Nov
22
reviewed Approve Burrows-Wheeler transform backward search: how to find suffix index?
Nov
22
reviewed Approve Comparing two large strings to see how much they match
Nov
22
reviewed Reject Design patter for a dynamic filter builder
Nov
17
awarded  Enlightened
Nov
17
awarded  Nice Answer
Nov
16
comment Is recursion a bad idea for large input sizes due to the limited call stack size?
As I said, you can do that only for primitive recursion. For example, you can do that with Fibonacci numbers, which are defined with recursion, but can be implemented with loops, because in the recursion is primitive. Note there are two recursive calls in the definition of fib, that's why I'm pointing this out - it's not about the number of recursive calls. I'm sure you saw iterative implementations of Fibonacci, so you already know how I'd do that. As for non-primitive recursion, you're absolutely right - you'd need to implement a stack.
Nov
15
comment Is recursion a bad idea for large input sizes due to the limited call stack size?
If you already have an iterative version, there is no point to have a recursion right next to it. It's just unnecessary code with exact same logic. Also, I believe it's possible to replace any primitive recursion with iteration, so it's not the matter of how much recursive calls you have.
Nov
15
comment Advantages of Strategy Pattern
You can, but you still would need a bunch of if/else blocks to call them (or inside them, to determine if it should do something or not), so it's not much of a help, except maybe more readable code. And also no extensibility for users of your hypothetical framework then.