A nagging voice in the back of my head has finally convinced me that I should go back and fix the mess that the stock generator became (it was three scripts and a total of seven or so data files, if memory serves.)
This is the point where the audience shudders, because *he's going back to something now*.
You're right. I should have done this when the whole process was fresh in my memory; now, I can't understand what I wrote, I can't even understand most of my COMMENTS, and there's four or five versions of each little conversion tool so I don't know which one was the working one.
Code and learn, I guess.
I copied and pasted two regexes out of the old code (I might as well, dammit, I wrote 'em and they took me a half hour to figure out apiece) and then set to writing the generator, whole cloth. Took me about twenty minutes.
Debugging took an hour, one of the most frustrating of my life. I almost wanted to cry because some things just LOOKED SO DAMN RIGHT but didn't WORK.
I didn't cry, of course. (Not much, anyway. Leave me alone!) I had it write every friggin' variable at every point it got changed into *another* file, just named errors. because I couldn't think of anything that sounded better. That was after forty minutes of banging my head into it; twenty minutes later, things looked significantly better. Now, it's writing almost what I need it to, and it's not off by much.
It's missing a few exceptions. Spelling differences between the new inventory file generation program's huge list of cards and the Cl**ster's version of that name. I inserted a little regex to clear it up and hopefully, after I fiddle with it a little, my generator will take four files (Cl**ster, stock, newinv, and controls) and spit out three (errors, stock, and controls). Errors will still get generated, because I need to know if other things have been misspelled. I'm working on code to show it.
Once I've got the new generator finished, it goes into the Testing Room directory and *does not get touched for any reason*. None. It's there to be a standard. It will be copied elsewhere and used from there.
Maybe I'll write a CD with all the stuff I did once I've got it all done, just to have a permanent record of it all.
Anyway, just noting to myself (and you, whoever's reading this) that I'm very close to having the final working version of the stock generator done. This will make working with the CGI script a bit easier; more of the work will be done for me, and I can work the CGI around the final version of the stock files, instead of making it work one way and then trying to patch this new behavior on later.
I have class at 7:00 in the morning, and I sure as hell wish I didn't. Four straight hours of math and then an hour and a half before my boring-as-hell English class.
I wish I cared more about school. I'm on academic probation these days and it's not a happy thought. (Oddly enough, this is because I'm not doing so hot on the tests. I never had any trouble with tests before; I'm probably just not reading enough of the textbooks to deal with it.)
In my English class, at least, it won't matter. I can write the socks off the professor and I usually do my edits in the hour and a half before the class; they look excellent to her and decent to me. It's a 101; if I don't pass it, then something's wrong with me.
The math classes and my network class may be more of an issue. I think I've got a good handle on my stats class - I started paying more attention after the first screwup, and the project is most of the grade - but my discrete mathematical structures class is mostly the final, and I haven't been doing well in there. Need to fix that. (If I can pick up the final, I can guarantee myself at least a passing grade.)
I have to go code; I don't have much time before I have to sleep; then I have to go to school; then I have to go to my mother's house; then I have to go to sleep again; then I have to drive my SO to work super-early in the morning (7:00 again, actually!) and then I have to get home and code again.
So this will probably be my last entry until Thursday, because I probably won't have time to code again until then.