431 reputation
15
bio website connectwise.com
location Tampa, FL
age 35
visits member for 7 months
seen Sep 11 at 13:18

Web and application developer with over 15 years of experience. Have worked in multiple industries including healthcare, e-commerce, property management, and MSP.


Feb
27
comment Is there a design pattern for updating lists?
Another option would be to use the Decorator pattern to attach a Modifier object to the classes you need to add the functionality to; depending on how your object schema is set up, this might be a valid alternative.
Feb
27
awarded  Commentator
Feb
27
comment Is there a design pattern for updating lists?
I don't know what language you're working in, but you could try to create a generic ModifiedThing wrapper like ModifiedThing<T> that could accept any object and then provide the enum.
Feb
27
answered Is there a design pattern for updating lists?
Feb
24
comment What is the point of link rel=“self” in a REST API?
"Click here to bookmark this page" would be a use case where you could utilize the "self" reference. More generally, because REST is stateless, the server has no way of knowing from where the request came, so it is entirely possible that the page it returns to will need to know its own URI.
Feb
13
awarded  Good Answer
Feb
12
comment Interfaces vs Base class
You're perfectly correct, though, that an interface is usually more efficient than a base class in cases where the derived/implemented class creates its own functionality for all of the base class methods and that creating a base class just for the purpose of creating a method contract is poor design.
Feb
12
comment Interfaces vs Base class
Yes, but you can do MORE than just "gain access" via inheritance. Just because this particular example doesn't demonstrate that doesn't mean that it isn't an available possibility. You CANNOT define functionality via an interface, ergo the two processes are NOT identical, and calling them essentially the same is misleading.
Feb
12
comment Interfaces vs Base class
My rule of thumb: If you want to provide some common functionality accessible to a subset of classes, use a base class. If you want to define the expected behavior of of a subset of classes, use an interface.
Feb
12
comment Interfaces vs Base class
If you inherit from a base class, you also gain access to any non-overrided methods in that class. This is fundamentally different than the other two solutions. It's not semantics at all. The different approaches fulfill vastly different purposes.
Feb
7
awarded  Supporter
Feb
7
awarded  Nice Answer
Feb
6
awarded  Teacher
Feb
6
comment Does this justify goto statements?
Which is to say that yes, what you show is a needlessly complex way to break from nested loops, but no, there is a way to refactor that doesn't make a goto more appealing.
Feb
6
answered Does this justify goto statements?
Feb
6
awarded  Autobiographer