Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 10-08-2009, 12:00 PM   #1
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default ...because obfuscated code is fun.

I wrote this just now in response to various people claiming "real developers don't document", "documentation's not necessary", "you can figure out what code does just by looking at it anyway so it's pointless..."

Code:
class X{public static void main(String[]
a){for(char _:("EYZd&Zd&hYj&cVR]&UVgV]"+
"`aVcd&U`Tf^V_e&T`UV&,*").toCharArray())
{_=_==0x026?021:_==052?'*'-0x010:_;
System.out.print((char)(_+017));}}}
OK, it's a laugh and obviously I hope you don't stumble upon anything like this in reality - but it's there to prove a point! Enjoy, and spread the love to anyone that claims the same thing about documentation
__________________

berry120 is offline   Reply With Quote
Old 10-08-2009, 07:14 PM   #2
Guru
 
JogaBonito1502's Avatar
 
Join Date: Jan 2008
Location: U.S.
Posts: 7,841
Default Re: ...because obfuscated code is fun.

Hahaha! That's so awesome! I always leave comments on my code, but not on every line. I leave a short description of every function or class I create.
__________________

JogaBonito1502 is offline   Reply With Quote
Old 10-09-2009, 04:07 AM   #3
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: ...because obfuscated code is fun.

Quote:
Hahaha! That's so awesome! I always leave comments on my code, but not on every line. I leave a short description of every function or class I create.
...Which of course is exactly what you should do! Comments on every line usually have the opposite effect, there's so much clutter they make your code more difficult to read
berry120 is offline   Reply With Quote
Old 10-09-2009, 10:10 AM   #4
Solid State Member
 
Join Date: Oct 2009
Posts: 19
Default Re: ...because obfuscated code is fun.

quite simply you write undocumented code for a client, you're fired.

That's the end of the argument.
Hoodlum is offline   Reply With Quote
Old 10-09-2009, 02:44 PM   #5
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: ...because obfuscated code is fun.

Quote:
quite simply you write undocumented code for a client, you're fired.
If only... that's unfortunately not always how it works in the real world though.
berry120 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 01:00 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0