Original Post
the post 'do you comment?' reminded me of this site i found when i was learning some WinSock, www.vijaymukhi.com
just thought i'd share it with the rest of the world
there's some interesting articles on it, but here's a random extract for the 'i-don't-need-to-comment-cause-i-can-read-code-like-i-read-english' guys:
this is part of a tutorial and not some obfuscated c contest, i did not change the formatting in any way, frightening isn't it? looks like he even writes books on Java, C#,...
there's even some kind of methodology he uses, variables get 1 letter, functions get 3, all in alphabetical order, simple, but effective
hmm, just hope i never get to work with this guy
Edited by - kvh on June 21, 2001 11:56:05 AM
#include <windows.h>
#include<stdio.h>
WNDCLASS a;
long _stdcall zzz();
HWND b;
MSG c;
HDC h;
_stdcall WinMain(HINSTANCE i, HINSTANCE j, char *k, int l)
{
a.hInstance = i;
a.lpszClassName = "Hi" ;
a.lpfnWndProc = zzz;
a.hbrBackground = GetStockObject(WHITE_BRUSH);
a.hCursor = LoadCursor(0,IDC_CROSS);
RegisterClass(&a);
b=CreateWindow("Hi","Bye",WS_OVERLAPPEDWINDOW,1,100,200,300,0,0,i,0);
ShowWindow(b,1);
while(GetMessage(&c,0,0,0))
DispatchMessage(&c);
}
long _stdcall zzz(UINT w, UINT x, UINT y, long z)
{
if (x = = WM_LBUTTONDOWN)
{
h = GetDC(w);
LineTo(h,LOWORD(z),HIWORD(z));
LineTo(h,LOWORD(z),HIWORD(z));
ReleaseDC(w,h);
}
if (x = = WM_DESTROY)
PostQuitMessage(0);
return DefWindowProc(w,x,y,z);
}
|