the trailboss abuses his CodeRanch power for his other stuff (power corrupts. absolute power corrupts absolutely is kinda neat!)
permaculture light bulbs permaculture electric heat permaculture cast iron permaculture wood burning stove permaculture solar food dehydrators
The moose likes Meaningless Drivel and the fly likes scariest line of code you've ever seen??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "scariest line of code you Watch "scariest line of code you New topic
Author

scariest line of code you've ever seen???

fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11499
    
  16

For me, it was when i was developing in C. One developer had his own header file that had this neat little line:



There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

That is bad, but I'm not sure its worse than these two:

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Seen all too often:


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Michael Matola
whippersnapper
Ranch Hand

Joined: Mar 25, 2001
Posts: 1757
    
    3
Pat Farrell wrote:That is bad, but I'm not sure its worse than these two:



Well, that lets you write code like this:

Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Michael Matola wrote:Well, that lets you write code like this:


Ouch, that makes my eyes hurt just reading it. Any compiler worth using should complain constantly about such evil.
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8883
    
    5
Thanks to catpad...



[Thumbnail for lifeInAPL.jpg]


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Kaustubh G Sharma
Ranch Hand

Joined: May 13, 2010
Posts: 1281

Bert Bates wrote:Thanks to catpad...



OOOOOOOO..If you didn't tell me that it's an computer code....I could have thought this would be written by some ancient egyption..


No Kaustubh No Fun, Know Kaustubh Know Fun..
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Anyone who dares to guess what it does? (I did absolutely not get this from Wikipedia (A))


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

Wouter Oet wrote:++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

Anyone who dares to guess what it does? (I did absolutely not get this from Wikipedia (A))


Prints out Hello World

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

Pat Farrell wrote:That is bad, but I'm not sure its worse than these two:



Hey, I like that, if the language doesn't have a built in way to define 0 as false and 1 as true. Or is that the other way around.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scariest line of code you've ever seen???