Questions tagged [code-maintainability]
66 questions
0
votes
3 answers
How to exit if and try/catch and branch elsewhere (like a goto) in Java?
Is it possible to improve this Java code by not using labels (and not repeating too much code or creating too many methods)?
void func() {
Object r;
Object s;
if (r == null ) {
try { some code 1 modifying the value of s; }
…

mins
- 6,478
- 12
- 56
- 75
0
votes
0 answers
How to replace " switch...case... " with "dictionary" for a better maintainability
In my code, i have switch case such as
switch(iSortCol) {
case1: if(iSortDir="desc"){order1 = order1.OrderByDescending(x=>x.GROUPNAME);
elseif(iSortDir="asc")order1 = order1.OrderBy (x=>x.GROUPNAME);
case2:…

baby123
- 1
- 1
0
votes
2 answers
How to implement a retry After logic?
I was recently working on an application and have a use case where I return back a set of responses to clients e.g. ALLOW, DENY and PENDING.
Let's say if the response returned by the service is PENDING, I want clients to retry back after a given…

Sunil
- 307
- 1
- 4
0
votes
1 answer
Proper way to arrange the jquery event binding in large applications
While working in highly interactive and animated client side web applications, we highly rely on jQuery libraries and use their events heavily.
In large enterprise applications, this results in a big connection of the events, their callbacks and…

Tarun
- 939
- 15
- 25
0
votes
1 answer
When developing enterprise web applications, what is the best way to include an element or set of elements that appears in a number of pages?
For eg: If I have a navigation section with a number of links/buttons in it and this needs to be included in several pages (jsps), what is the best way to do this in a maintainable fashion? Would I do this by a jsp include?

Ramya
- 289
- 6
- 17
-1
votes
3 answers
Is there any tool for auto maintaining css code
I have a huge CSS file which should be about 20'000 lines and it was accidentally saved on one line a while ago, making it extremely hard to read and maintain.
I was looking for a tool that would automatically separate lines of CSS files, but I am…

JulioBordeaux
- 494
- 1
- 7
- 23