14

First time I was screaming out of anger while looking at code.
I'm doing a group project in my university.
We are developing a indoor navigation Android app.
And a team mate of mine just merged this…

/*Method for help-feature.
Sets all the TouchEvents that are at least 400 ms long. This is made for all the relevant buttons or editTexts, which are seen on the mapView.
The case for mapView is needed because otherwise the other buttons, etc. wont work properly.*/

public void setButtonsForHelpDialog(){
View v = mapView;
switch (v.getId()) {
case R.id.mapview:
mapView.setOnTouchListener(…);
case R.id.buttonUp:
buttonOn.setOnTouchListener(…);
case R.id.buttonDown:
buttonDown.setOnTouchListener(…);

case R.id.description:
description.setOnTouchListener(…);
}}

The code is really aligned like this - no breaks. And it's even worse. There are if statements like if("constantly false var" == true). Which is highlighted by Android Studio.
This is done in a own class. The views are set via public member variables of this new class. The constant vars were added in the actual class holding the buttons and also stuff like this useless method
public void getDoStuff() {
doStuff()
}
And I could continue like this.

I never saw code this bad…
I can't even find words for it :/

Comments
  • 2
    I could email you worse code from a group assignment at University lol
  • 0
    @ctmalloy don't he might lose it and kill him :D
  • 1
    Welcome to dev rant :)
  • 0
    Funny ,I have to build a navigation system too but guess what,we have to run it in a stupid fucking Solaris machine.the platform they are telling us to do this on makes no damn sense at all.we have not been given any briefings for the last 5 weeks.
Add Comment