JF https://www.javantea.com/page/make/338

I fixed a few bugs in Hack Mars this week. I'm happy that I'm able to work at 200% for the last few days. I've slept 8 hours and worked 16 hours Wed and Thurs. Today, I will go to the 2600 meeting at 5, but only because it's terribly important. In fact, I might as well call it work since hacking is a vital part of my job (the first word in the title of my game is 'hack', don'cha know).

I played GTA1 yesterday for a short while. It was fun, but very hard. The vice city level is very hard for me. I could only make 2 million doing missions, so I made a million dollars just killing people. So finally when the level is done, I drive over to the meeting spot and run the bastard over with my car. DOH! I didn't mean to do that! No, I want to go back. It was just like Crenshaw from the daily victim. "YOU HIT ME WITH A JEEP!" I want to move onto the next level with the rastas! Nooo!!!

Oh well, time wasted playing GTA is not counted against my work and neither is watching good anime or strange foreign films. I totally recommend Cowboy Bebop Knocking on Heaven's Door. The quality is higher than anything I've seen/heard before. The plot is good and the characters are better than usual.



My progress on HM is very nice. If I keep this up, next week, I'll have mission 2 done. Mission 1 and 2 are both pretty close to working. Working vs done is a long ways, but I've been getting better. In order to understand my problems/solutions bugs/fixes, you need to know a bit of programming. Watch this:
float fTime = 2.18f, fBestTime;
int iCue, iBestCue;
for(iCue = 0; iCue < 100; iCue++)
{
	if(cue[iCue].time < fTime 
	&& cue[iCue].time > fBestTime)
		iBestCue = iCue;
}
int iLoops = 4;

float fAnimL = (cue[iCue].animEnd 
	- cue[iCue].anim) / cue[iCue].animFPS;
float fDt = (fTime - cue[iBestCue].time) 
	- iLoops * fAnimL;
float fRet = cue[iBestCue].anim 
	+ cue[iBestCue].animFPS * fDt;


The code above may look fine, but in fact, fAnimL will be a bad number. Why? Because I used iCue instead of iBestCue. It only took me an hour to fix this, but the bug lasted a month (visibly) or actually 6 months (invisibly). Isn't it a pain in the rear? Yes, but it's quite necessary. My debugging technique is very refined, but my willingness to debug is less than perfect. If you have me for a programmer, you'll probably tear your hair out wondering when those f'n bugs will get fixed. They are all easy bugs, but I won't fix them. They are not features, I refuse to fix them. They give character to a program. If a program does not have bugs, the users will never contact the developer to let them know that they exist. Good and Bad?

Imagine a person who gets a scanner and writes a Linux driver for it. Hooray for him. But the person decides to publicize the source. So s/he puts a page on the web with the source. People search Google or Alltheweb and find the page. Hooray! A person messes around and it works. W00t! A second person compiles it and it doesn't work. This person e-mails the creator: "your driver sucks." The creator thinks, "Well, it's pretty easy to mess things up, but most Linux users are good hackers." S/he replies, "Sorry you have a problem. What seems to be the problem? An error?" The user says "It says read write error." But the creator doesn't understand that. Could it be permissions? Could it be the person didn't follow directions? How can I help a person who cannot help themself? The creator gives up. Perhaps another person will find the bug, take the source and fix it. This person is smart and sends the bug fix back to the creator and the creator posts it on the site. Who gets the new version? Only those who check from now on. This is a problem that software can solve. Sourceforge attempts this, but cannot really force people to update their software. The distribution system allows mainstream programs like KDE to be updated, but the user is on their own for others. Gentoo attempts to solve this with an interesting system of which I haven't tried. I use Slackware which gives me a lot of control over what I do. Pretty much Slackware's solution is to upgrade with the versions and install everything else from source. It's a good way to go if you trust yourself to make your own computer run correctly.

Permalink

Comments: 0

Leave a reply »

 
  • Leave a Reply
    Your gravatar
    Your Name