13,354 reputation
12049
bio website
location
age
visits member for 3 years, 2 months
seen Dec 23 at 18:05

Jan
3
answered What does the Apache licensing mean by “Permitted: Commercial Use”
Jan
1
comment Emotional detachment from bad code
@gnat: It kind of does. Whether code is ugly is subjective.
Dec
28
comment Why are reference-counting smart pointers so popular?
@supercat: Yes, you can get a special type of pointers to work. It's basically what Microsoft did in Managed C++. And note, that they would not have to keep a list of anything at runtime; compile-time support is sufficient. But it would not be very useful with all the existing code using plain old pointers.
Dec
28
comment Why are reference-counting smart pointers so popular?
@supercat: Maintaining a list at runtime would be more expensive than reference counting, therefore it would not have any advantage over shared_ptr. Most probably it would be a lot more expensive.
Dec
28
comment Why are reference-counting smart pointers so popular?
@supercat: Standard pointers can be reinterpret-casted, which prevents the collector from ever being sure what is a pointer. You'd need special kind of pointers and special rules for them and than it would no longer be useful with existing code.
Dec
23
awarded  Nice Answer
Dec
20
revised How to mock method with hard coded object?
be more explicit that changing the object creation is wrong
Dec
20
comment How to mock method with hard coded object?
@DeveloperArnab: If you inject different Employee object in tests, you won't test the code that normally creates it. So you shouldn't change it.
Dec
20
comment How to mock method with hard coded object?
@DeveloperArnab: The objects will be different, but they will have known content. So all you need to do is make the mock do custom comparison instead of object identity.
Dec
17
answered How to mock method with hard coded object?
Dec
12
revised How is a committer expected to behave?
added 68 characters in body
Dec
12
answered How is a committer expected to behave?
Dec
10
answered Are verb-like classes a code smell?
Dec
10
comment Are verb-like classes a code smell?
@Scottie: No, in the sentence "the cutting was done quickly" "was done" is a verb and "the cutting" is a subject. The form "cutting" is also used as part of verb in progressive tense ("he is cutting"), but in this context it acts as noun.
Dec
9
comment Need Advice About A Specialized eCommerce System
The database schema always has to be adapted to each business specifically, but otherwise it looks like standard stuff. You should be able to find plenty of components to reuse.
Dec
9
comment Need Advice About A Specialized eCommerce System
This question is off-topic, because it is too narrow. It is unlikely to have any lasting value for future visitors.
Dec
9
comment Are types erased in Haskell?
In general at runtime either the parametrically polymorphic functions may exist only once and call the ad-hoc polymorphic functions via some virtual dispatch method or all code may be generated for each type separately and calls statically linked. Either implementation is correct from the language point of view (note, that Haskell does not have polymorphic types; such thing can only be created with the GHC forall extension).
Dec
9
comment How can Java be improved so that it no longer needs to perform type erasure?
@BryceWagner: It could be done so that old code would accept the enhanced list type (it would simply inherit the basic one), but the old code does not contain the information that would be necessary to construct it.
Dec
3
comment How do I comply to GPL in case of Appliance?
It's important to note the difference between GPLv2 and GPLv3 here. For GPLv2 (Linux) the sources have to be provided, but method of installing new binaries on the device does not. For GPLv3 (most libraries usually used on Linux) such method must be provided.
Dec
3
comment Deprecation considered harmful?
The "meaning of deprecation" link does not work anymore. It points somewhere, but the document no longer discusses meaning of deprecation.