CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 09:22:16 GMT
content-type: text/html; charset=utf-8
cf-ray: 965b12422f31dfa6-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=2d8d264f-1080-49b3-ab37-c408e5bd9fbf; expires=Mon, 27 Jul 2026 09:22:16 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: e0fc3029-abee-4a01-83ca-8fd9a77c3e07
x-worker-origin-response-time: 618000000
x-dns-prefetch-control: off
set-cookie: prov=2d8d264f-1080-49b3-ab37-c408e5bd9fbf; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=ZedIsV2yIYUwCxdArrEJfy_YmGgSvuSBvyPXIweZwYw-1753608136-1.0.1.1-fd8HRgeWBRkSiUPcba6DogKzFrJV6WRzNu9JvdDYs4IDp..QMvgC.k_z4Xn5xEJODKhINjTBUguRZHpqitwQC5zJ3kVymknggf451u18I_8; path=/; expires=Sun, 27-Jul-25 09:52:16 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=RskIEOpqJ0VbJpKyuXLbC0y3HKKjAUgHejcdrQCCjO8-1753608136656-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'design-patterns' Questions - Code Review Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [design-patterns]
For questions requesting extra attention to be paid to the usage of design patterns in the code.
1,425 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
10
votes
4
answers
2k
views
Builder pattern in Rust
I tried to implement Builder pattern, a popular design pattern for constructing objects consisting of different components, in Rust.
Here is my attempt:
...
6
votes
3
answers
1k
views
Game Design Patterns Command implementation
I started reading the GameProgrammingPatterns book and wanted to implement the command pattern.
...
4
votes
1
answer
185
views
ReportManager design — ownership via move or unique_ptr, SRP concerns, and O(1) lookup strategy
I’m practicing the Single-Responsibility principle with a small project.
A Report is composed of ...
-1
votes
1
answer
96
views
Am I overusing classes and/or OOP features? [closed]
I have a very class heavy approach to writing C++ code, which I don't think is necessarily wrong. However, I often use classes without knowing if I actually need them, which I feel leads to making ...
4
votes
1
answer
112
views
Maze game from book Design Patterns with smart pointers and polymorphism
The Design Patterns book chapter 3 about Creational Patterns starts with a maze game. They use the maze as an example throughout the chapter and instead of rooms they have also things like enchanted ...
9
votes
2
answers
364
views
Simple LRU cache implementations in C++20
LRU cache is a classical design pattern frequently questioned in programming technical interviews. It is best illustrated with pictures. Here are two examples.
The following are two alternative ...
4
votes
3
answers
353
views
numpy array/item handling functions
Recently I have been using numpy arrays, which have great utility via their broadcasting methods.
I am attempting to write a useful public facing library, and this ...
4
votes
2
answers
530
views
Simple Java program to aggregate lines of a text file
I have just written a small application to aggregate the lines of a text file, for example to group the lines according to the frequency of IP addresses in a log file.
Would the code be sufficiently ...
0
votes
1
answer
65
views
Bulk conditions evaluation throwing a single RuntimeException exception
Bulk conditions evaluation throwing a single exception of a configurable type for all unfulfilled conditions.
It is developed around several design patterns:
(1) fluent interface to configure the ...
user289021
1
vote
1
answer
117
views
Database design using Closure Table for tagging system
I created these database tables with the inspiration in NjDevPro github repository. The design uses Closure Table for implementation of hierarchical tagging system in ...
4
votes
2
answers
121
views
Managing file paths in a python Data Science project
When doing Data Science projects, I often have to load data and metadata, and output results, plots, logs, etc.
Therefore I have to handle all the file paths from where to load the input and write the ...
3
votes
0
answers
55
views
Structure of nested Divs with a table
I'm a new frontend programmer.
I'm making a web site with flask, and to be honest, I don't know much about front-end so I don't know if what I'm doing is best practices. In one section, I have a div ...
5
votes
2
answers
131
views
Argument Order To Determine Order Of Output (Python; `attrs`)
Feedback Request
Is the manner in which I use attrs adequate (i.e. designed well)?
Should I not expect to be able to use argument ordering to order the joining of ...
0
votes
2
answers
136
views
[Spring Boot][REST] Design Pattern Best Practice (Single Entity, multiple business logic implementations)
I have some problems regarding best-practice design between data source layer(Entity), domain layer(Service) and presentation layer (controller):
I have one entity with a type field in the database to ...
1
vote
1
answer
117
views
Refactoring Agreement Status Logic: Applying SOLID Principles and Separating Logging/Auditing with Decorators
I have some production code that contains a lot of repetition and mixes business logic with auditing and logging. I've made two attempts at refactoring it, primarily using decorators. I'd like to get ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
c# × 454
object-oriented × 380
java × 302
c++ × 182
python × 126
php × 118
javascript × 108
.net × 52
c++11 × 45
beginner × 45
repository × 41
mvc × 38
dependency-injection × 35
factory-method × 34
game × 34
entity-framework × 32
python-3.x × 31
performance × 26
unit-testing × 25
algorithm × 23
generics × 23
interface × 23
multithreading × 21
classes × 20
singleton × 20
more related tags
Hot Network Questions
- Can expanding foam provide interior strength for a large model?
- A national poll of 1000 French returns 25% of "Yes". Is it enough to say that it's quite impossible locally to be 0%, if we don't know the variance?
- What is the citation for Augustine's "consensus, non concubitus..."
- Story that taught cryptography in the form of a manga
- Balancing a Holy Water Bomb
- A question about as ..... as comparison
- In Jurassic Park, is the lysine dependency intentionally fake (in-universe)?
- Civilian airplanes with inside fuselage jet engines
- Source for Adam naming the angels
- The Russian president is struggling to pass a law now. Then, how much power does Kremlin have to initiate a congressional decision?
- Did the first sin in the garden of Eden actually take place before the fruit was eaten?
- How can I turn the text in a PNG file back into text layer?
- What is the best interpretation of Psalm 6:4? Does "Turn" or "Return" capture the intended meaning?
- Question about relativity of simultaneity vs signal delay
- Alternative to tedious assert-rewrite for trivial operations?
- Not being introduced to the team – should I ask for it?
- how is it possible for a player to have crossed 2400 and secure 3+ IM norms to stay FM
- I don't have enough alive employees to start the day. What now?
- Are you required to protect trade secrets revealed to you even if you didn't sign an NDA?
- Blinded despite Blindsight?
- What's the difference between an eVisa and ETA travel authorization?
- How do I set up a recursive algorithm to repeatedly square root a positive real number?
- About Harp Pedaling for a Pentatonic Glissando
- Confusing/incorrect sentence in proof of Zorn's Lemma in Lang's "Real and Functional Analysis"