Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,846 Members 37,603 Now Online
XDA Developers Android and Mobile Development Forum

Post your vote for Worst Code Ever and explain why.

Tip us?
 
AdamOutler
Old
(Last edited by AdamOutler; 2nd May 2013 at 01:28 AM.)
#1  
AdamOutler's Avatar
Recognized Developer - OP
Thanks Meter 9,623
Posts: 5,196
Join Date: Feb 2011
Location: Louisiana

 
DONATE TO ME
Default Post your vote for Worst Code Ever and explain why.

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/
Flash with Odin on Windows, Linux and Mac. Use JOdin3, Available in a web browser or offline
Check out my developer pages. Add me to your circles on Google Plus.
Wanna see the longest Linux BASH script ever made? click here.
The Following 2 Users Say Thank You to AdamOutler For This Useful Post: [ Click to Expand ]
 
WTFsandwich
Old
#2  
Member
Thanks Meter 3
Posts: 54
Join Date: Jul 2010
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
The Following 3 Users Say Thank You to WTFsandwich For This Useful Post: [ Click to Expand ]
 
Rick_1995
Old
#3  
Rick_1995's Avatar
Recognized Developer
Thanks Meter 3,055
Posts: 1,114
Join Date: Sep 2009
Location: Whoville
The linux kernel. Extremely ugly/hacky code but it works.
The Following 3 Users Say Thank You to Rick_1995 For This Useful Post: [ Click to Expand ]
 
Terrorantula
Old
#4  
Senior Member
Thanks Meter 36
Posts: 119
Join Date: Apr 2013
Source Code

terrible movie
 
Lifehacker7
Old
#5  
Lifehacker7's Avatar
Recognized Themer
Thanks Meter 1,613
Posts: 2,319
Join Date: Nov 2012
Location: Kolar, karnataka
Quote:
Originally Posted by Terrorantula View Post
Source Code

terrible movie

FYI, this isn't about movies!
LIFE!
SIGN UP FOR DROPBOX USING THIS LINK .GET 500 MB EXTRA SPACE !



Need signatures / banners like this ^ ? Click on my signature to meet our team!
 
soad666p
Old
#6  
soad666p's Avatar
Junior Member
Thanks Meter 2
Posts: 22
Join Date: Dec 2010
box2d.
i found it to be a big pain in the ass for college
http://box2d.org/
 
Terrorantula
Old
#7  
Senior Member
Thanks Meter 36
Posts: 119
Join Date: Apr 2013
Quote:
Originally Posted by Lifehacker7 View Post
FYI, this isn't about movies!
Is it about music then? Maybe it's No code by Pearl Jam? Cause no code is truly the worst of all.
 
lesmo_sft
Old
#8  
lesmo_sft's Avatar
Member
Thanks Meter 30
Posts: 37
Join Date: Jun 2010
Location: Mexico

 
DONATE TO ME
Quote:
Originally Posted by WTFsandwich View Post
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
Old
#9  
Member
Thanks Meter 3
Posts: 54
Join Date: Jul 2010
Quote:
Originally Posted by lesmo_sft View Post
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
Old
#10  
lesmo_sft's Avatar
Member
Thanks Meter 30
Posts: 37
Join Date: Jun 2010
Location: Mexico

 
DONATE TO ME
Quote:
Originally Posted by WTFsandwich View Post
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
Microsoft Enthusiast. Likes potatoes and money.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes