Showing posts with label Computer Science. Show all posts
Showing posts with label Computer Science. Show all posts
Wednesday, January 25, 2017
Wednesday, November 9, 2016
house analogy
build one house that fulfills 100 people's design requests - that's software
Wednesday, September 17, 2014
asynchronous <> multithreaded
Sunday, January 5, 2014
Thursday, January 2, 2014
Monday, November 11, 2013
Dependency injection
here
if the pattern used creates the dependencies in properties but allows sets as follows:
#if DEBUG
set { m_blah = value; }
#endif
I am not sure if this is true dependency injection
if the pattern used creates the dependencies in properties but allows sets as follows:
#if DEBUG
set { m_blah = value; }
#endif
I am not sure if this is true dependency injection
Wednesday, August 7, 2013
Code refactoring
- Techniques that allow for more abstraction
- Encapsulate Field – force code to access the field with getter and setter methods
- Generalize Type – create more general types to allow for more code sharing
- Replace type-checking code with State/Strategy[6]
- Replace conditional with polymorphism [7]
- Techniques for breaking code apart into more logical pieces
- Componentization breaks code down into reusable semantic units which present clear, well-defined, simple-to-use interfaces.
- Extract Class moves part of the code from an existing class into a new class.
- Extract Method, to turn part of a larger method into a new method. By breaking down code in smaller pieces, it is more easily understandable. This is also applicable to functions.
- Techniques for improving names and location of code
- Move Method or Move Field – move to a more appropriate Class or source file
- Rename Method or Rename Field – changing the name into a new one that better reveals its purpose
- Pull Up – in OOP, move to a superclass
- Push Down – in OOP, move to a subclass
from here
Friday, August 2, 2013
Monday, March 12, 2012
Thursday, February 9, 2012
Interesting phenomenon with class constructors in inherited classes
when the constructor is static first the descendant will run and then the ancestor.
when its an instance constructor its the other way around.
the reason being that there is no inheritance in static contructors
when its an instance constructor its the other way around.
the reason being that there is no inheritance in static contructors
Subscribe to:
Comments (Atom)