본문 바로가기

전체 글402

Adapter Pattern CHAPTER 7 Adapter Pattern It is not the strongest of the species that survives, nor the most intelligent. It is the one that is most adaptable to change. Charles Darwin Sometimes you do not have the interface you would like to connect to. There could be many reasons for this, but in this chapter, we will concern ourselves with what we can do to change what we are given into something that is clo.. 2023. 3. 28.
Builder Pattern CHAPTER 5 Builder Pattern Can he fix it? Yes, he can! Bob the Builder eme Song If you work in software for any amount of time, you will have to deal with getting input from the user anything from having a player enter their character name in a game to adding data to the cells on a spreadsheet. Forms are often the heart of an application. Actually, most applications are just a special case of the.. 2023. 3. 28.
Factory Pattern CHAPTER 5 Factory Pattern Quality means doing it right when no one is looking. Henry Ford In Chapter 3, you started thinking about writing your own game. To make sure you don t feel duped by a text-only game, let s take a moment and look at drawing something on the screen. In this chapter, we will touch on the basics of graphics using Python. We will use the PyGame package as our weapon of choic.. 2023. 3. 28.
The Prototype Pattern CHAPTER 3 The Prototype Pattern Reality doesn t care if you believe in it. Boba Fett, StarWars extended universe The Problem I can still remember the very first time I wanted to program anything. This was at a time when DOS could not address more than 20 MB at a time, and thus our massive 40 MB hard drive had to be partitioned into two drives. It was a beige Olivetti XT. The local library had a .. 2023. 3. 28.
The Singleton Pattern The Problem We only have a single file to update. Let s create a new file called logger.py and write the following code in the file: logger.py def log_message(msg): with open("./var/log/filename.log", "a") as log_file: log_file.write("{0}\n".format(msg)) if __name__ == "__main__": log_message("error!") Now, we can use our new logger function to write log messages to the file system in our main_s.. 2023. 3. 28.
Before We Begin Becoming a Better Programmer To become a better programmer, you need to decide to obsess about mastery. Every day is a new opportunity to become better than the day before. Every line of code is an opportunity to improve. How do you do that? When you must work on a piece of existing code, leave the code better than you found it. Try to complete a quick problem-solving challenge every day. Look f.. 2023. 3. 28.
Index Practical Python Design Patterns: Pythonic Solutions to Common Problems Wessel Badenhorst Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book s product page, located at www.apress.com/9781484226797. For more detailed information, please visit http://www.apress.com/source-code. Printed on acid-free paper For Tanya, m.. 2023. 3. 28.
UML 다이어그램 vscode 개발 Tool 조합 - Visual Studio Code - 확장팩 : PlantUML Extension GraphViz 1. PlantUML Extension 설치 하신후에는 기본으로 Sequence Diagram 을 그리실수 있습니다. 2. GraphViz - Class Diagram 을 그리기 위해 환경변수 설정 : GRAPHVIZ_DOT 설정값 : GraphViz 폴더안의 bin 폴더에 있는 dot.exe 파일의 전체 경로 ### UML 관련 참조 자료 http://plantuml.com/ko/guide PlantUML Language Reference Guide plantuml.com 참조 사이트 : https://www.clien.net/service/board/lecture/13.. 2023. 3. 24.
The Bridge Pattern 13 The Bridge Pattern At first sight, the Bridge pattern looks much like the Adapter pattern in that a class is used to convert one kind of interface to another. However, the intent of the Adapter pattern is to make one or more classes’ interfaces look the same as the interface of a particular class. The Bridge pattern is designed to separate a class’s interface from its implementation so that y.. 2023. 3. 23.