Skip to main content

Questions tagged [dry]

DRY is short for "Don’t Repeat Yourself". This paradigm advocates to avoid code and data redundancy.

-1 votes
2 answers
147 views

let's say we're building an Ecommerce Marketplace. We have Sellers and each Seller has Products. We want to display a list of available Products across all Sellers to Buyers. But, we only need to ...
Staskij's user avatar
  • 21
1 vote
3 answers
382 views

For most apps I've built which deal with CRUD operations, I end up two very similar UI pages: one for the creation of the object, one for updating it. An example would be StackExchange's UI for ...
Simon Farshid's user avatar
14 votes
3 answers
3k views

When writing unit tests, I feel that there is a trade-off between code repetition and test logic. Example of my current (likely flawed) approach: To test this function (overly simple function for ...
Jasper Braun's user avatar
1 vote
3 answers
431 views

Currently working on a project where we have multiple services that all need to consume the same authorization service when their endpoints are hit. Right now we have the authorization boilerplate ...
Astrum's user avatar
  • 143
53 votes
10 answers
8k views

I usually write my code in a test driven style. I write tests as specifications and then my code. It's great and useful. I always try to ignore implementation when testing and only test behaviour. I ...
Derek C.'s user avatar
  • 617
2 votes
1 answer
318 views

I have a lot of classes that are just a CRUD interface for microservices. They only have a param for the endpoint and some of the methods get_list / get_item / create / update / delete / activate / ...
xpy's user avatar
  • 129
4 votes
5 answers
277 views

For code, we know approaches like DRY and we tend to extract common functionality. What approaches are recommended for comments? Perhaps it's a really open question, so I'm going to go with my ...
Gonzalo.-'s user avatar
  • 161
0 votes
2 answers
216 views

I have a block of code that branches into 2 pathways, let's call them the "simple" and "complex" branch, based on user input. Either the simple or complex logic has 4 steps, let's call them A, B, C ...
Dragonsheep's user avatar

15 30 50 per page
1
2 3 4 5
10