Some fancy code

All of this demonstrates the ...

True Value of C

  • To allow really smart people
  • To write totaly worthless code
  • To completely intimidate the average coder
 
wow guys good job.

I haven't done anything really usefull in this thread .. I'm just a script kiddy compared to you guys :)
 
I can't remember the exact quote, but:

"One of the main causes of the fall of the roman empire was the fact that, having no consept of zero that couldn't indicate the successfull termination of their C programs."

Also:

"There are 10 kinds of people in this world, those who can read binary and those who can't." - I know it's old but i still find it funny.
 
Damn, I go away for a week and miss all the fun :( gj people
 
Sorry, tried something, it didn't work.
 
i stick to my readability = maintainability statement :p
and i have a headache ;(
 
Wow is all I can say. On the one hand it makes me want to get back into coding again so that I can do things like this, and on the other hand it makes me want to forget coding even exists because now I feel small and insignificant.
 
no, don't think so :p
I'm sure if you sit on the computer for 10 hours trying to figure it out, you will get to some point.

i stick to my readability = maintainability statement
yeah, but 1337 code is cool too; Maybe who ever wrote this has a readable version of it somewhere.
 
nietzsche said:
Decoding obfuscated code is a nice pastime for hobby cryptologists. Pulling something like that off in production code is a crime against humanity, though. Imagine working on a project consisting of a codebase (even of moderate size) that is similarly obfuscated. :seizure:
Couldn't agree more. As a programmer, I find a lot of code gets obfuscated by accident or neglect. Big part of the job is being clear.
 
kurly said:
Big part of the job is being clear.
I tend to agree to that though should I stumble upon eg. a function where I can
a. be fast, but unclear
b. be slower, but clear,

I would tend to go for a. One can always put extensive comments :)
Ofcourse, the decision would also depend on what you're making I guess.
 
Ansur said:
Ofcourse, the decision would also depend on what you're making I guess.
Exactly. a lot of good speed-code techniques are wasted on rarely called or singly called routines. They make no perceptible difference.

The effort gets wasted writing these low use routines, but then the waste gets mulitplied by every modification. Save it for cirtical sections, then comment your cleverness - like you said.

Rule: Good code looks simple. (97% effective)
 
Code:
[color=#3333FF]class[/color] FaceApp[b][color=#663300] :[/color][/b][color=#3333FF]public[/color] CWinApp[b][color=#663300]
{[/color][/b][color=#3333FF]
private[/color][b][color=#663300]:[/color][/b]
	MFCApplicationWindow[b][color=#663300] *[/color][/b]wnd[b][color=#663300];[/color][/b]
	HBITMAP bmpOriginalImage[b][color=#663300];[/color][/b]
	clsProgCtrl[b][color=#663300] *[/color][/b]ProgramControl[b][color=#663300];[/color][/b][color=#3333FF]
public[/color][b][color=#663300]:[/color][/b]
	BOOL InitInstance[b][color=#663300]()
	{[/color][/b]
		wnd[b][color=#663300] =[/color][/b][color=#3333FF] new[/color] MFCApplicationWindow[b][color=#663300]();[/color][/b]
		m_pMainWnd[b][color=#663300] =[/color][/b] wnd[b][color=#663300];[/color][/b]
		
		wnd[b][color=#663300]->[/color][/b]ProgCtrl[b][color=#663300] =[/color][/b] ProgramControl[b][color=#663300] =[/color][/b][color=#3333FF] new[/color] clsProgCtrl[b][color=#663300]();[/color][/b]
		ProgramControl[b][color=#663300]->[/color][/b]CreateGUI[b][color=#663300]([/color][/b]wnd[b][color=#663300]);[/color][/b]
		ProgramControl[b][color=#663300]->[/color][/b]LoadInputImage[b][color=#663300]();[/color][/b]
		
		m_pMainWnd[b][color=#663300]->[/color][/b]ShowWindow[b][color=#663300]([/color][/b][b][color=#000000]true[/color][/b][b][color=#663300]);[/color][/b][color=#3333FF]
		return[/color][b][color=#000000] true[/color][/b][b][color=#663300];
	}[/color][/b][color=#FF6633]
	int[/color] ExitInstance[b][color=#663300]()
	{[/color][/b][color=#3333FF]
		delete[/color] ProgramControl[b][color=#663300];[/color][/b][color=#3333FF]
		return[/color] CWinApp[b][color=#663300]::[/color][/b]ExitInstance[b][color=#663300]();
	}
};[/color][/b]
Just testing again. P.S. Why does the code window have a lot of blank space at the end of code listings?? It doesn't in older version of Vb
 
Quite nice, though the code prduced here, at first, seems more obfuscated than some I've seen in that contest.
 
Ha! Knew it. Fun anyway. The layout of your code doesn't matter as long
as you don't have to display that code in public :)

I've never liked the lpszString(): C++ style btw.
 
Back
Top