ywcheong::blog
Public Notes
I regularly organize interesting computer-related topics for public reading.
Recent Posts
sys.setrecursionlimit(10**6) Is NOT a Silver Bullet
To Begin with the Conclusion… When solving algorithm problems in Python, if your logic requires exceeding the default recursion limit of 1000, it’s better to refactor your code to use iterative functions or consider switching to C or C++. Otherwise, there is a risk of encountering fatal bugs on Windows that cannot be detected. Where the Problem Started This all began while I was solving Baekjoon 11049 (Matrix Chain Multiplication). This problem is a classic dynamic programming question where memoization is used, and recursion makes the structure clean and intuitive.
October 31, 2024
In Python 2, input() is eval(raw_input())
Building the Easyplotlib Structure The very first step I took while developing Easyplotlib was to define the communication protocol between the frontend and backend. To briefly explain this project, its main function is to automatically generate code according to the user’s requirements (though it’s not AI), execute it, and then show the results. Since the project dynamically generates and executes code, I was very mindful of the risk of introducing ACE (Arbitrary Code Execution) vulnerabilities if the structure was poorly designed.
October 6, 2024
A Haunted Story While Developing with FastAPI (feat. VSCode)
The Experience While Developing with FastAPI While developing a new web project using FastAPI, I encountered a mysterious incident. (Spoiler: There were no ghosts.) For this project, I planned to use AWS for production, so I had already set up my development environment on AWS EC2. Although I had done several Python projects before, this was my first time using FastAPI, so I was trying to understand the basics with a simple demo code.
October 4, 2024