Ah, the glorious smell of a hot fan spinning its little motor off. That is about all the satisfaction I have had with my latest (and possibly most annoying) project, which many of you have been following along with (or at least have had the opportunity to doso) in the other language tutorials.
Python, such a lovely, and simple language. Being able to create powerful applications in minutes (granted this may trail well over 360 of them) and getting all the functionality needed quickly. That is, until it decides that you have had to easy of a time. (For those of you waiting for my next tutorial, it may be a while) "Look how nicely this program is working. It does everything I told it to, and I didn't even have a bunch of errors to fix!", right up until there are errors. It works, and it doesn't. It chooses what to do when it wants to do something, but, it chooses from a list of optons that were not given to it. That is the legacy of programming: working on something until it breaks and then fixing it (or deleting it and starting over).
For my part, everything had been going better than expected, and I was actually thinking about pushing my tutorial forward; including the next 2 topics within the next tutorial, not just the one (File handling). Then I decided to use the nice, shiny (apparently working) syntax highlighter to write some code in (helping people out in the HTML department). Everything worked fine, I could save it off and it was being highlighted correctly. Though that would all change.
A while later I decided to update some old files, nothing I had used in a while, and nothing I really cared about, but still I was going to update them to go by the nice new standards I have set forth for myself - using a double space indent. It worked so nicely, intending every line of code depending on where it was in the file and getting it all looking spiffy for the new save. I saved the file, exited the program and came back to it later.
Upon loading the app and opening the little bugger (file I had previously edited), I was astounded to find that the program had busted itself. It said the file was open, but it was a blank document. That I knew was not correct. So, being the type of person I am, I opened up my documents and found the location of the file, looked at it and thought that the file browser was also broken. This was not the case, I hadn't done anything to edit (or break) the file browser and it was working fine for the other files, but simply reading 0 bytes for the size of the file I had been editing.
At this point I realized that my nice little syntax highlighter had claws. It would kindly edit your files for you, but when you went to save them off, it would kindly eat their contents first. Why, now is a great time to look at the source code and see what errors pop up. So I did.
At first everything looked fine. It would open and save files as it is supposed to. I opened file after file and saved them off without incident. Then I figured it out (as I lost another file). The damn thing will eat HTML. As the first highlighting language I was planning on adding to the tutorial was HTML (after python) that raised a few issues.
So, now I have an error, and 2 empty files. While I know where the fricking error is at I have no idea why it is being raised, or what its problem with the general world is. I just know that it shouldn't be there, and my code highlighter isn't opening anything I care about until I get it worked out. And, to save others the hassle of figuring out what is going on (and why theiir files are dissappearing) I will not be releasing another tutorial until I have solved this particular issue.
Isn't it just lovely when life throws a curve ball? Discuss.
Page 1 of 1
5 Replies - 451 Views - Last Post: 20 June 2008 - 11:18 PM
Replies To: Programming woes
Re: Programming woes
Posted 20 June 2008 - 11:33 AM
Welcome to the world of newbie programming, I have that happen a ton, and I have only been here for a year!!!! The best is when you have files all over the place, and someone asks you to access one and run it, and you have a massive brain fart, and can't find the file, so you have to re-write all the code in it to get it to work. GRR.....that just sucks!!!
Re: Programming woes
Posted 20 June 2008 - 11:18 PM
Feel better now
The best is when you have files all over the place, and someone asks you to access one and run it, and you have a massive brain fart, and can't find the file, so you have to re-write all the code in it to get it to work. GRR.....that just sucks!!!
That is why I name all my folders a descriptive as popssible. Like random_js_files
The only problem is that things tend to get jumbled, so I have to rmember filenames.
It is even more fun when I am making a sebsite skin. I name all the image files the same thing (main.png) and then just have them in different folders. If I forget which particular site it is I want to look at I have to go through each and every skin folder until I find the right one
Page 1 of 1