Skip to main content

Questions tagged [bad-code]

13 votes
6 answers
6k views

Is it OK to create a variable which only purpose is to increase readability? Example: public class Example { private final HowLongCanARepositoryNameReallyBeRepository ...
Adilson Cabral's user avatar
0 votes
1 answer
149 views

I want to know others opinion about this approach that I use in a lot of projects, for example, I can show the last time that I use it: public class DataStorageService { private enum Keys { ...
Tlaloc-ES's user avatar
  • 387
10 votes
4 answers
3k views

I have the following code: public void moveCameraTo(Location location){ moveCameraTo(location.getLatitude(), location.getLongitude()); } public void moveCameraTo(double latitude, double ...
Tlaloc-ES's user avatar
  • 387
3 votes
1 answer
342 views

I do not understand how you think about it:https://wiki.php.net/rfc/nullable_types when It is widely confirmed, that using nulls is bad practice Where am I wrong? thanks. I'm not criticizing !. I ...
BruceStackOverFlow's user avatar
107 votes
11 answers
22k views

I understand that save for breaking out of loops nested in loops; the goto statement is evaded and reviled as a bug prone style of programming, to never be used. Alt Text: "Neal Stephenson thinks it's ...
Anon's user avatar
  • 3,649
3 votes
1 answer
364 views

Is this a bad practice? const int sId(int const id); // true/false it doesn't matter template<bool i> const int sId(int const id) { return this->id = id; } const int MCard::sId(int ...
Serge's user avatar
  • 901
102 votes
10 answers
56k views

Yesterday I was discussing with a "hobby" programmer (I myself am a professional programmer). We came across some of his work, and he said he always queries all columns in his database (even on/in ...
the baconing's user avatar
  • 1,131
34 votes
3 answers
63k views

On my current project I am responsible for the implementation of a service which involves the consumption of newly created RESTful APIs, documented as solely supporting JSON. The client consistently ...
phillip.darley's user avatar
4 votes
4 answers
2k views

In my job I have to maintain a poorly written codebase which is both hard to understand, has tons of comments that are just plain wrong, has a bunch of weird decisionmaking going on in it and a whole ...
Daniel Figueroa's user avatar
10 votes
2 answers
4k views

I've always been taught that having side-effects in an if condition are bad. What I mean is; if (conditionThenHandle()) { // do effectively nothing } ... as opposed to; if (condition()) { ...
Isaac's user avatar
  • 203
7 votes
4 answers
609 views

Every year in january we process a big task with our system. While the performance during the task was above average the maintaince follow up is currently having a lot of trouble with jobs running too ...
Lucas Hoepner's user avatar
209 votes
4 answers
105k views

I'm trying to figure out what the Anti-Corruption layer really means. I know that it's a way to transition/work around legacy code or bad APIs. What I don't understand is how it works and what makes ...
knownasilya's user avatar
  • 3,284
10 votes
10 answers
3k views

As a developer, can you tell your project manager that an application is unworkable? Or, if you're a project manager, how would you need this presented to you in order to be compelled? This isn't ...
MaxWell's user avatar
  • 353
7 votes
5 answers
4k views

Possible Duplicate: I’ve inherited 200K lines of spaghetti code — what now? Recently I got hired to work on existing web application because of NDA I'm not at liberty to disclose any details but ...
onlineapplab.com's user avatar
131 votes
14 answers
11k views

A client has asked me to do a redesign of their website, an ASP.NET Webforms application that was developed by another consultant. It seemed like a relatively straightforward job, but after looking at ...

15 30 50 per page