Tag Info

New answers tagged

2

In addition to existing answers, I would like to add: Being simple, small, well-defined and limited. Justification: When each of these descriptions are negated and applied to a piece of software, it will imply an increasing difficulty of understanding its source code. Being modular, and conforms to (1) LSP as well as (2) POLA. LSP: Liskov ...


2

Automated testing A comprehensive suite of automated tests is perhaps the most useful feature of a code-base when it comes to enabling someone with no prior familiarity to make substantial changes. Usually when entering a new code-base you have low confidence that changes won't have unintended effects, so you start small and as you become more confident ...


0

You can solve the problem of specialized methods by using Scala language. Scala can inline methods, this (in combination with easy higher order function usage) makes it possible to avoid code duplication for free — this looks like the main problem mentioned in your answer. But also, Scala has syntactic macros, which makes it possible to do a lot of things ...


3

I would do this: For every class that implements IContextMenu create a Factory/Creator. For example for a class named TypeAContextMenu create a TypeAContextMenuCreator, for TypeBContextMenu create a TypeBContextMenuCreator, etc. Every creator implements the same interface, like say IContextMenuCreator, they just have a create() method that returns an ...



Top 50 recent answers are included