81,417 reputation
19186331
bio website
location Lancaster, CA
age
visits member for 4 years
seen 2 hours ago

enter image description here


Oct
31
comment Dependency injection: At what point am I allowed to create a new object?
I didn't say that it was. I simply said that you don't need a DI container to do it.
Oct
31
comment Dependency injection: At what point am I allowed to create a new object?
I would agree that you need a framework for very large applications. Many applications are not that large, and do not benefit from the additional complexity of using a DI framework.
Oct
31
awarded  Outspoken
Oct
31
comment Isn't MVC anti OOP?
@ErikReppen: Consider a situation where you have to transfer a customer data packet over the internet to some remote location. Nobody expects all the application behavior that pertains to a customer to be encapsulated in that data packet. Transferring data packets between classes in a program is really not all that different, from that perspective. That a class instance is encapsulating a collection of data only, and not behavior, does not invalidate its encapsulation benefit.
Oct
31
comment Dependency injection: At what point am I allowed to create a new object?
doing DI manually beats the whole purpose of using an Inversion of Control container -- If by that you mean "...which is centralizing your dependencies in a configuration file" then you're right, because that's all an IoC container really does. The real goal of DI is decoupling, and you can do that by supplying your dependencies in a constructor method. You don't need a DI framework at all to do that.
Oct
31
reviewed Close Getting the relational table data into XML recursively
Oct
30
answered More elegant way to avoid hard coding the format of a a CSV file?
Oct
30
comment Why can't Java/C# implement RAII?
@delnan: You wouldn't. Therefore you wouldn't favor such a language design if your goal was to be implicit.
Oct
30
comment Why can't Java/C# implement RAII?
@bigown: Thanks for the vote of confidence. I deleted my answer anyway, which apparently wasn't helping anyone. I wasn't aware, when I answered the question, that this was merely a hypothetical exercise. I did learn a few things, however.
Oct
30
comment Why can't Java/C# implement RAII?
@delnan: Not sure what point you're trying to make. You're still describing what could be considered "explicit." Whether it can be made implicit or not doesn't make it any less explicit.
Oct
30
awarded  Disciplined
Oct
30
comment Why can't Java/C# implement RAII?
@mike30: Sorry, but you're wrong. using requires compiler support, because it has to recognize that the type it is using implements the IDisposable interface. It is not simply a language macro.
Oct
30
comment Why can't Java/C# implement RAII?
@mike20: using blocks are more than just sugar. You might as well call async sugar; it's not. Both constructs have special compiler support. Both constructs seek to provide meaning beyond what amounts to a simple syntax variation.
Oct
30
comment Why can't Java/C# implement RAII?
I certainly don't favor major machinery changes for what apparently amounts to a mundane syntax style variation. If that makes be seem inflexible, then so be it.
Oct
30
comment Why can't Java/C# implement RAII?
Actually, I think it's fair to say that Java and C# strongly favor explicit constructions. Otherwise, why bother with all the ceremony inherent in using Interfaces and inheritance?
Oct
30
comment Why can't Java/C# implement RAII?
@mike30: Meh. All this syntax does is remove the braces and, by extension, the scoping control they provide.
Oct
30
reviewed Close How you return to a code when you don't remember what you were doing?
Oct
30
comment Found a better solution to a problem at work - should I deter from posting the code snippet online?
I can't say that with any certainty, given the byzantine nature of the patent system.
Oct
30
comment Approximately how much is solid and broad knowledge of data structures and algorithms worth in the employment market?
There's no way to know precisely how much money you are going to make by adding a skill to your repertoire. Learn data structures and algorithms because they will make you a better programmer regardless of which languages and technologies you work in.
Oct
30
answered Found a better solution to a problem at work - should I deter from posting the code snippet online?