Kodi Arfer / Wisterwood

There's nothing a programmer fears so much as inheriting unintelligible code.

Topic List
#001 | Kodiologist |
For the last five years, I've worked nearly exclusively on programs that I wrote from scratch. Now I face the task of extending someone else's program, and I can only hope that it doesn't prove a nightmare. It's begun very inauspiciously: the first file I opened has variables named "crap" and "crap2".

---
"If I pick nine, you'd better not be racist against me!"
"No promises, niney."
#002 | HeyDude |
That's pretty special right there.
#003 | ShadowSpy |
Hopefully, you won't have to go through anything where the entire file is written on one line of code.
---
"A period"
~~This is what I like to add to the end of almost every sentence.~~
#004 | Kodiologist |
Yay, there are magic numbers everywhere, and the program implements its own idiosyncratic system for cascading parameters.

From: ShadowSpy | Posted: 6/24/2010 11:06:26 AM | #003
Hopefully, you won't have to go through anything where the entire file is written on one line of code.

It's not quite that bad:

[traj,mp,p]=findDotTrajSin('p',p,'ntrials',ntrials,'Xmax',ScreenSize(3),'Ymax',ScreenSize(4),'name',name);

Screen('DrawTexture',window,tex,[],[(traj(1,idx,kdx)-Gx/2) (traj(2,idx,kdx)-Gy/2) (traj(1,idx,kdx)+Gx/2) (traj(2,idx,kdx)+Gy/2)]) % draw target

There are lots of encouraging comments, too:

"WHAT TO DO HERE? WHICH IS MORE IMPORTANT?"
"NOTE, THIS PART IS BASED ON SPECIFIC VALUES OF Occ2P FROM SET PARAMS... DANGER DANGER DANGER"
"AGAIN, WHAT TO DO HERE...?"

---
"If I pick nine, you'd better not be racist against me!"
"No promises, niney."