Post your vote for Worst Code Ever and explain why.

Search This thread

AdamOutler

Retired Senior Recognized Developer
Feb 18, 2011
5,224
9,827
Miami, Fl̨̞̲̟̦̀̈̃͛҃҅͟orida
I think this should be fun.

Post an example of the worst code you've dealt with and why. Here's mine:


Google ADK2012
The ADK2012 is a cornerstone of home automation and input/output of sensors and data to and from Android devices. The ADK sets the example of how it "should be" done. However, for reasons in the video below, including violation of all Arduino Code Guidelines and adherance to several Unmaintainable Code guidelines, I am nominating the ADK2012 as the Worst Code Ever.


here's the ADK2012 code: http://pastebin.ubuntu.com/5621322/
 
Last edited:

WTFsandwich

Senior Member
Jul 30, 2010
54
3
Not really pertinent to Android, but as I was first learning to code (C#, unfortunately), one of my programs required a while loop, amd the condition on which to run it needed to be written as "while (true == false)" in order for it to trigger correctly. Using my intended variable for the loop condition caused it to not run, and other attempted fixes caused infinite loops or no action.

To this day I'm unsure if it was other code in the program that caused this or what, but it is fundamentally, the worst code I've ever seen.

Perhaps not quite in the spirit of what was intended by "bad code", but nonetheless, felt the need to share.

Sent from my LG-E970 using xda app-developers app
 

Lifehacker7

Senior Member
Nov 19, 2012
2,326
1,566
Bangalore, karnataka
Source Code

:( terrible movie

urutu5e3.jpg

FYI, this isn't about movies! :rolleyes:
 

lesmo_sft

Senior Member
Jun 12, 2010
63
43
Mexico
Not really pertinent to Android, but as I was first learning to code (C#, unfortunately), one of my programs required a while loop, amd the condition on which to run it needed to be written as "while (true == false)" in order for it to trigger correctly. Using my intended variable for the loop condition caused it to not run, and other attempted fixes caused infinite loops or no action.

To this day I'm unsure if it was other code in the program that caused this or what, but it is fundamentally, the worst code I've ever seen.

Perhaps not quite in the spirit of what was intended by "bad code", but nonetheless, felt the need to share.

Sent from my LG-E970 using xda app-developers app

What? Like... really? It sound kinda' impossible, or even illogical... maybe a bug (extremely unlikely) on the C# version you were writing?
 

WTFsandwich

Senior Member
Jul 30, 2010
54
3
What? Like... really? It sound kinda' impossible, or even illogical... maybe a bug (extremely unlikely) on the C# version you were writing?

As I said, I haven't the slightest idea. My professors, the TA's, even one of the CS department heads all had a gander at it and couldn't figure it out.

I may still have the code lying around, if you'd be interested in seeing it.

Sent from my LG-E970 using xda app-developers app
 

lesmo_sft

Senior Member
Jun 12, 2010
63
43
Mexico
As I said, I haven't the slightest idea. My professors, the TA's, even one of the CS department heads all had a gander at it and couldn't figure it out.

I may still have the code lying around, if you'd be interested in seeing it.

Sent from my LG-E970 using xda app-developers app

Yeah, that'd be great! Just the part where you use the true == false should be ok :laugh:
 

Eckserah

Member
May 9, 2013
16
3
Nashua
so at the office i currently work at we have a huge mixture of asp, and vbscript on both the front and back end and random asp.net pages that seem to do the same as the asp pages but get redirected to when finished with other pages. there are multiple copies of functions all over the place and the database is indexed but has to be re indexed all the time due to changing primary keys. we have been working on trying to fix something and it took us 2 days just to be able to work with a development enviornment. i hate this code and want to beat it to a pulp. also the colors it uses for labeling things are HORRENDOUS and eye burning!
 
  • Like
Reactions: Rick_1995

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Not really pertinent to Android, but as I was first learning to code (C#, unfortunately), one of my programs required a while loop, amd the condition on which to run it needed to be written as "while (true == false)" in order for it to trigger correctly. Using my intended variable for the loop condition caused it to not run, and other attempted fixes caused infinite loops or no action.

    To this day I'm unsure if it was other code in the program that caused this or what, but it is fundamentally, the worst code I've ever seen.

    Perhaps not quite in the spirit of what was intended by "bad code", but nonetheless, felt the need to share.

    Sent from my LG-E970 using xda app-developers app
    3
    The linux kernel. Extremely ugly/hacky code but it works.
    2
    I think this should be fun.

    Post an example of the worst code you've dealt with and why. Here's mine:


    Google ADK2012
    The ADK2012 is a cornerstone of home automation and input/output of sensors and data to and from Android devices. The ADK sets the example of how it "should be" done. However, for reasons in the video below, including violation of all Arduino Code Guidelines and adherance to several Unmaintainable Code guidelines, I am nominating the ADK2012 as the Worst Code Ever.


    here's the ADK2012 code: http://pastebin.ubuntu.com/5621322/
    1
    so at the office i currently work at we have a huge mixture of asp, and vbscript on both the front and back end and random asp.net pages that seem to do the same as the asp pages but get redirected to when finished with other pages. there are multiple copies of functions all over the place and the database is indexed but has to be re indexed all the time due to changing primary keys. we have been working on trying to fix something and it took us 2 days just to be able to work with a development enviornment. i hate this code and want to beat it to a pulp. also the colors it uses for labeling things are HORRENDOUS and eye burning!