프로그래밍
-
Use of PIMPL Design Pattern프로그래밍/디자인패턴 2013. 6. 3. 16:46
출처- http://www.codeproject.com/Articles/17536/Use-of-PIMPL-Design-Pattern IntroductionPIMPL (Private Implementation) is a simple way to hide a part of a class implementation to other classes of the same project.It makes it possible to avoid other classes to know internal data structures and other information of the class. It also simplifies some #include preprocessor instructions.Example WITHOUT..
-
Encryption operating modes: ECB vs CBC프로그래밍/프로그래밍 관련 2013. 5. 20. 17:00
출처 - http://www.adayinthelifeof.nl/2010/12/08/encryption-operating-modes-ecb-vs-cbc/ Encryption operating modes: ECB vs CBC Today I overheard two colleagues discussing one of my favorite subjects: encryption. The discussion was about that encrypting data (with a normal block cipher) was working perfectly in ECB mode, but not in CBC mode. So, this all leads up to the question: what is ECB and CBC..
-
Perforce Reverting Another User's Files프로그래밍/프로그래밍 관련 2013. 4. 15. 22:43
There are two ways to revert files opened in a Perforce client workspace for a user other than yourself. The first method can be accomplished with an account with either Perforce admin or super privileges, while the second method can only be performed by a super user account. Reverting files by deleting the client workspace As a Perforce admin or super user, the simplest solution is to delete th..
-
Compound Patterns프로그래밍/디자인패턴 2013. 2. 4. 19:53
Compound Patterns A lot of patterns work together very well to form compound patterns. Below is a UML class diagram that implements various design patterns to form a compound pattern. After the diagram are some notes describing how and why this design was arrived at. 1. Polymorphism was introduced by the use of the Quackable interface. This makes a number of design patterns available to us. 2. T..
-
Proxy Pattern프로그래밍/디자인패턴 2013. 2. 4. 19:50
Proxy Pattern Motivation Sometimes we need the ability to control the access to an object. For example if we need to use only a few methods of some costly objects we'll initialize those objects when we need them entirely. Until that point we can use some light objects exposing the same interface as the heavy objects. These light objects are called proxies and they will instantiate those heavy ob..
-
State Design Pattern프로그래밍/디자인패턴 2013. 2. 4. 19:47
State Design Pattern Intent Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.An object-oriented state machinewrapper + polymorphic wrappee + collaboration Problem A monolithic object’s behavior is a function of its state, and it must change its behavior at run-time depending on that state. Or, an application is characterixed by lar..
-
Composite Pattern프로그래밍/디자인패턴 2013. 2. 4. 19:43
Composite Pattern Motivation There are times when a program needs to manipulate a tree data structure and it is necessary to treat both Branches as well as Leaf Nodes uniformly. Consider for example a program that manipulates a file system. A file system is a tree structure that contains Branches which are Folders as well as Leaf nodes which are Files. Note that a folder object usually contains ..