Reputation
5,787
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
4 27 52
Impact
~311k people reached

Apr
17
comment Why is String immutable in Java?
Java provides mutable and immutable strings. This answer details some performance advantages that can be done on immutable strings, and some reasons one might choose immutable data; but does not discuss why the immutable version is the default version.
Apr
17
comment Why is String immutable in Java?
1. Of course, there is the penalty of not being able to destroy the larger parts of the string if this happens. Interning is not free; though it does improve performance for many real world programs. 2. There could easily be "string" and "ImmutableString" which could satisfy that requirement. 3. I'm not sure I understand that...
Apr
17
answered Why is String immutable in Java?
Apr
12
awarded  Popular Question
Mar
18
comment Why aren't more desktop apps written with Qt?
@annoying_squid: Also, I'm not sure how a separate preprocessor is "unavoidable" for large C++ libraries; e.g. Boost does just fine without them.
Mar
18
comment Why aren't more desktop apps written with Qt?
@annoying_squid: As I said in the answer, I don't intend this to be taken as a "don't use Qt" bashing party. The question says "why might someone not use Qt", and I provided reasons why someone might choose to not use Qt. For many applications, Qt is wholly appropriate, and if your application(s) fall into that category, more power to ya. All nontrivial systems (be they Qt, C++, native UI frameworks, WxWidgets, whatever) have problems; balancing these problems against one's requirements and choosing the right system(s) to use is just a part of software design.
Feb
7
comment Why aren't more desktop apps written with Qt?
@Qix: You've never had to use moc? That is a preprocessor.
Feb
6
comment When should pointers be checked for NULL in C?
See also: stackoverflow.com/questions/4390007/…
Feb
2
comment How is C/C++ more difficult to decompile than C#?
Example: The concept of a class does not exist as far as the binary format on disk for machine code is concerned. But it is a concept for C#'s Common Intermediate Language.
Jan
28
comment Why does Internet Explorer have so many incompatibilities with other browsers?
@Bart: Oops. I read your post backwards. Going back into my hole now...
Jan
28
comment Why does Internet Explorer have so many incompatibilities with other browsers?
I would agree with most of this if we were speaking about IE6. What about 9 and later?
Jan
28
comment Why does Internet Explorer have so many incompatibilities with other browsers?
@Bart, IE's main competitor in the first browser war, Netscape, wasn't considerably more conformant with W3C. It wasn't until later versions of Mozilla and early Firefoxes that a reasonably conformant browser was available. But those browsers post-date IE6.
Jan
18
awarded  Popular Question
Jan
18
comment Descriptive naming vs. 80 character lines
I think 100 characters is fine nowadays....
Jan
18
comment Descriptive naming vs. 80 character lines
Does 80 characters really improve readability? What screen can't easily do 120 these days?
Jan
10
comment Why is the cyclomatic complexity equal to two for a simple Hello World?
Of course, this answer has "everything must be a member function" glasses. C / C++, for instance, don't have this behavior.
Jan
10
comment Is this XOR value swap algorithm still in use or useful
So... You save a register but pay with 3 more instructions. I think the temp version would be faster anyway.
Jan
7
comment Fast compression in C++ and decompression in C#
For what value of "light on CPU"? Would plain zlib/gzip be okay?
Jan
7
comment Are immutable/stateless singletons bad?
@m3th0dman: Yes, I'm saying it shouldn't be a singleton. Making anything a singleton is an extremely limiting decision in a design -- you should have as few of them as possible. They are no better than global variables. You would be better off having the factory just having a static member variable containing the item in question. There's no need to encode that constraint into the design of the other objects.
Jan
7
comment Are immutable/stateless singletons bad?
@m3th0dman: Then the class in question shouldn't be a singleton. The factory should maintain its own reference.