Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
0 replies
19 views

I'm building a Chart.js timeline chart in Angular/TypeScript and I'm wondering which approach is considered better practice. Option A — Separate helper methods: private buildChartConfig( record: ...
HenrysPapa's user avatar
Best practices
0 votes
1 replies
107 views

I’m working on refactoring a legacy codebase with a method that’s grown to several hundred lines. The method mixes many responsibilities and is difficult to maintain. Because the codebase is old, I ...
ARUN KUMAR P CSE's user avatar
1 vote
3 answers
120 views

I want to add a trigger to my table to validate the data before allowing insert or update. For example, something like this: CREATE TABLE MyHorribleLegacyTable (i int IDENTITY, name char(100), ...
Scott's user avatar
  • 29
2 votes
7 answers
835 views

I have a SQL query where the list of strings is repeated twice: ('foo', 'bar', 'baz', 'bletch'). What is the most maintainable method to avoid such repetition and make this code more DRY? I am not ...
Timur Shtatland's user avatar
-1 votes
1 answer
83 views

In a very large and old codebase, suppose we're using a database column status with enum values as NEW, IN_PROGRESS, COMPLETED, REJECTED. Now this status is used in multiple conditions in code like if ...
gaganshera's user avatar
  • 2,637
3 votes
1 answer
699 views

We use the build in i18n module for angular. I successfully generated source file for my original lang (en). Then I copied the source file and created another file with (es) translation. It is easy to ...
simply good's user avatar
  • 1,133
8 votes
3 answers
666 views

My Python projects heavily depends on PyPi packages. I want to make sure that: in any time in the future: the packages required by my apps will always be available online on PyPi. For example:- I ...
ibrahem's user avatar
  • 560
1 vote
1 answer
466 views

I have a Python class that requires some data in order to be initialized. This data is usually obtained using a function from another module, which makes calls to an API. One of the parameters my ...
dieortin's user avatar
  • 532
2 votes
1 answer
144 views

I would like to write a function f which invokes two overridden virtual methods, op_1 and op_2, of a derived class in a particular order, without exposing those methods beyond f and the methods' ...
Manningham's user avatar
0 votes
1 answer
161 views

How we can achieve writing reusable and modular code in an Enterprise code. What are the basics to get started
VIKRAM SINGH CHOUHAN's user avatar
0 votes
1 answer
135 views

I am currently writing some code in C# and have decided, at one point, that for my specific case a composite pattern will be useful. However, there is clearly a performance problem in my code once I ...
Giacomo Nassif Jack's user avatar
2 votes
1 answer
230 views

On my current project, I need to convert values between types that are only known at runtime: the input type is the JSON type of the input, and the output type is defined in a configuration file ...
CidTori's user avatar
  • 418
1 vote
0 answers
52 views

Suppose we a validation code similar to the following: Rule(account => account.CompanyName).MaxLength(50) Or Rule(account => account.Balance).MustBeGreaterThan(0) Do we still call the numbers ...
Kush Grover's user avatar
0 votes
1 answer
88 views

Objective: Define a Priority Queue Implemented with a Max Heap Provide as much type safety as possible and provide an implementation that is flexible/reusable (even though python is dynamic and only ...
MPC's user avatar
  • 13
-1 votes
1 answer
380 views

I have learned clean code and some people advise me to learn refactoring. So what are the best resources to learn refactoring and code smells in practical way? I tried to learn from Martin Fowler book ...
Mahmoud Abd El-Razik's user avatar

15 30 50 per page
1
2 3 4 5
21