DIATRIB5.TXT - January 10, 1999 Diatribe #5 - More Rants, Raves and Comments... By SwampRat (cl) 1999 Gay Furry Association Behavioral Science or Why we're so Screwed up! Anything that is evolved enough to have a nervous system runs on the 3 F's - Friend, Foe, Food. It's hard-wired in the brain. I will give you an example: A car is coming at you. Your eyes see the moving object because it is different than all the other objects. The pattern is scanned by the brain and a search is made to see if you have a memory of this object. You have, it is a car. Along with that memory are links to other memories - and All of them carry emotions.. So your eyes focus on a moving object. It has a color, form, speed, distance. The brain finds this object is in it's memory and brings up all the information it can - It is coming straight at you, or passing on the roadway? Is it Real or a film you are watching? What experiences do you have to draw on about this situation? Friend/Foe/Food - It's not a food item. It seems to be going on a course that will pass you harmlessly - Friend. Now that your brain is no longer in survival mode, it brings other things up, maybe a jingle or an advertisement about the car. A memory that is linked to this kind of car. Hatred or fear or even ignoring the item may come up, but they are the Emotions that came with the memory. If you want to know how fast all this happens - You are in one lane, the other vehicle is in another. You notice it. Everything gets processed - There is a Jack-in-the-Box head on the antenna. Kids are bouncing around in the back seat. The driver is using his hands more to talk than to drive. All this while You are also processing what is happening inside Your vehicle - Music, a conversation, Your own kids bouncing in the back seat... Then the car is passed you and the whole cycle starts again. A bee is a Foe to most people, a Friend to flower/tree/bee keepers, and a Food item to some ( Bee Bread is made with Bees - Not live ones of course ). * * * * The 3 F's are Recognition - What is it. From What is it, comes What to Do about it. Most people will talk about the 'Fight or Flight' Response - Do I fight it or do I run away? But there is a Third - Sit Still and Wait. Of course, Flight or Fight or Sit Still and Wait is a mouthful. You are walking on a trail and see a bear not that far up. Do you Jump off the canyon? Do you throw everything up in the air and run back down the trail screaming,"abearabearabearabearabearabearabearabearabearabearabear!"? Do you pull your polished steel .45 automag, squint your eyes, grit your teeth and say,"Go ahead - Make my Rug."? Do you take your clothes off and rub honey on your - Oops! Wrong story. Or do you stand still, let 'him' take a good look at you and you take a good look at 'him'. The bear ambles off to wherever They were headed and you continue on your way. This again depends on your Personal Experiences with a given situation. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Some thoughts on Time. Time is as artificial as Plastic. If you tossed your clock out the window, would the sun suddenly stop? Of course not. A flower doesn't know time.. It knows Temperature, and the amount of Water around it and How much Sun there is. If you tell a Pansy it is 4pm it won't say anything.. Probably because it thinks you are an idiot. Time is something Man made up so he could regulate himself.. Some say Time is a 'Relative Constant'. In other words - Time is something that stays the same where You are, but changes where You are Not. I am beginning to think the Pansy is right.. So a Pine tree in the US is a Maple tree in Europe? If you don't think Time is artificial, Go outside on a sunny day and notice where the sun is. "The sun is about there.." No matter Where you are on the World, the Sun will Always be 'About There' every day. But 4 PM changes not 4 times in the US but 6. We have 4 time zones, and Daylight Savings when we move the 'clock' ahead or back. So we can move 'Time' all over the place, but the Rotation of the Earth isn't going to stop and go back, or speed up for a while because someone decided we need more light in certain places.. * * * * And God said, "Let there be Light." And Man Said, "Wait a Minute, I'm adjusting my watch." =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= RANT Mode ON After slogging through millions of bytes of encoded data, Trying to salvage a file, I wanted to write some things Down.. All You Stupid Ass-Hole Programmers Out There had Better Remember 2 things - Murphy Is watching over your shoulder, And There is NO SUCH THING as an Idiot-proof Program! Thank you. RANT Mode OFF * * * * Here's the deal - I am trying to extract information from a Corrupted zip file. I can find algorithms, data, programs.. Everything but what I want - Salvage. I have managed to pull sections of the HD up and save them as files, warts and all. Now I have batches of files containing the info I want to save. All I need to do Now is find something that will go through and Brute-force the Data out.. Does such a program exist? I haven't found it so far.. And I don't know C enough to make such a program. You make a Wonderful Compression Program. being an optimist, you make a hash-table that tells how long the original file was - So the next file isn't thought to be more data - if it came from another directory or not, and what kind of compression you used.. This make writing an Uncompresser a snap. Now - Let's cut that table off, or better yet, scramble it.. Now what have you got? A Mess! How is the user going to get his data back? YOU Wrote the Program Sam.. You can't unscramble what isn't there, and since of course 'This Will Never Happen', you didn't leave any way of Scanning the broken archive to reclaim it either... Can you say 'Head-Up-Ass'? This isn't Hollywood or a Pristine lab or even Your computer - This is the Real World where people stick ATM cards in their drives. Where Disks and OS' crash and Backups lose data. Does Anyone THINK of these things while they are doing their Black magic with OOP and Child Processes? What if that file was last year's taxes and the IRS wants to see them? The user confidently pulls the file up and runs the unarchive program... Which spits out a half-dozen errors and stops. The user knows everything about spreadsheets, word processors, graphics.. but couldn't write 'Hello' in BASIC ( PRINT "Hello" ). So now what? Now remember, Joe Public is pulling his hair out, trying to figure out What to say to the Nice Men in Grey Suits when they come to take his Business away. All Zipped archives come with a Header block, a file name, data blocks, and at the end, something called 'A Central Directory'. Ok so far? Chop the tail off. All the Header and Data blocks are intact, But... "Duh, Dis Archive is part of a whole bunch a udders, and da last part is on da last disk. Ah-Yup." Joe is sweating, But there is a Ray of Hope.. "Try FixThisArc." So he digs around and finds it, typing what it said to do.. "This is Not a Zip File." What Idiot write this Error Message? Nah, I used ARK instead of Zip.. Hey Stupeed - It has this .ZIP thing at the end, it's full of 'PK' 's, and I used THE Program. Hell yes it's a Zip File! You calling me a Liar? The best Head-Up-Ass I have seen - After running Zipfix, you are supposed to get a Usable file. I got a file alright.. "Error in archive, Use zipfix." Isn't that Just what I did? Isn't This supposed to be my Salvation File? Now Joe is drinking Maalox by the quart and thinking of visiting Compression Inc. with an Uzi. * * * * Ok, so let's fix the mess... No Central Directory - Unzip the Damn Thing where it sits Now and Screw the directory! Zipfile is Damaged - Ignore the bad archived files and decompress what you can. Zipfile is Really Damaged - Brute Force: Find the header Block - This points to the Filename. Grab Everything between 'a' and 'Z', Stick it on the screen, and ask for confirmation - Confirmation isn't Yes/No, It's Yes it's Ok or Type in the Correct name. This can be bypassed if there is a common thread ( All the files end in .TXT ). Walk through the Archive, decoding Everything until a Header Block is found, or the File ends, Saving decoded information to Salvage files. You can stick the original name at the top or open a text file that has the name and which file it was saved as.. File Salvage ------ --------- MyTaxes.Jan98 Salvage.1 * * * * Part of the header also includes How the file was compressed - It was either imploded or deflated.. So run the data through routine 1, and save the results, then through routine2 and save the results in another file. Sounds easy enough. Why doesn't the companies that Make the Software, Also make Fixit programs? Ask them. This is the equivalent to breaking a vase. If taping all the parts back together again doesn't work, you needed a new vase anyway, Right? WRONG! Your Great-Great Grandmother brought that vase from 'The Old Country'. It literally Can't be replaced.. So sit down the crazy glue and masking tape and get to work Son. I am not looking for Perfect Replacements, I am looking for Enough of the Puzzle I can finish the rest myself * * * * It's Impossible to Keep things from happening, Chaos is Everywhere. But Seat Belts are Not a fashion accessory.. Here's how to make a simple, efficient, Safe File compressor: Pick 2 numbers for a header Beginning and Ending. Use 1 and Only 1 decompression type - You Are writing this after all and whatever You decide on is what will be used. Now you have a Header block, and Data Blocks for each file just like everybody else, Except... You have Murphy in Mind. Header Information - Filename. Date/Time. CRC. Size1. Size2. Filename: This can be anything from 'c:/business/taxes/taxes.98/JoeCo.January' to 'Read.it'. The OS sure doesn't care if you stuff it 10 directories deep, or just foist it off wherever you are at the moment. Date/Time: Used when Updating an Archive - No sense in adding 100 files if only 2 have changed. CRC - Did any bits get switched on transit? Compare your CRC with the Original CRC. Size1 - How big was the file Originally ( Double Check #1 ) Size2 - How big is the Compressed File ( Double Check #2 ) Everything else to the EOF is Data, Period. This allows for Easy fixes of problems like - Part of a file or the Archive is missing. Something got eaten - Decode what you can. Put a warning in the Error.Log. Continue onward. Beginning Marker but no Ending marker. The data could start anyplace - Store the file in another place ( BROKEN.SAL will do nicely. Just keep adding to it as necessary ) Put a warning in the Error.Log, and continue onward. Ending Marker but no Beginning marker. Actually this one is the easiest - Take the last 1k (1024) bytes Including the Endmarker and store it in a file. Make up a name that is unique ( salvage.of.taxes.98.file In DOS SAL. ) with a counter as the extension. Put a warning in the Error.Log. Continue onward. To fix the middle one, Stick 2 lines of characters on the screen and let the user tell the program what the filename is. Or do the same as Number 3 - think Everything is Data and proceed from there. * * * * Doesn't that Sound Simple? And if anybody wants to help Me with My broken archives - They are all Text files, and the filenames end with '.WP' =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= On a more interesting note - A body-cream commercial has some Herpy-Lovers, and Maybe some macro lovers as well.. The alligator 'spokesperson' has been enlarged and walks over the model.. So if you are in either camp, be sure and tape the commercial before the censors find out that Reptiles don't wear clothing and certain parts of the creature can be seen in Detail. The End