Noew I'm back at the house and enjoying a relaxing drink before heading for bed as after all, I need something to get the smallest twinges of adrenalin out of my system.
October 2006 Archives
Noew I'm back at the house and enjoying a relaxing drink before heading for bed as after all, I need something to get the smallest twinges of adrenalin out of my system.
A professor stood before his philosophy class and had some items in front of him. When the class began, wordlessly, he picked up a very large and empty mayonnaise jar and proceeded to fill it with golf balls.
He then asked the students if the jar was full. They agreed that it was.
So the professor then picked up a box of pebbles and poured them into the jar. He shook the jar lightly. The pebbles rolled into the open areas between golf balls.
He then asked the students again if the jar was full. They agreed it was.
The professor next picked up a box of sand and poured it into the jar. Of course, the sand filled up everything else.
He asked once more if the jar was full. The students responded with a unanimous "yes."
The professor then produced two cans of beer from under the table and poured the entire contents into the jar, effectively filling the empty space between the sand. The students laughed.
"Now," said the professor, as the laughter subsided, "I want you to recognize that this jar represents your life. The golf balls are the important things--your family, your children, your health, your friends, your favorite passions--things that if everything else was lost and only they remained, your life would still be full.
"The pebbles are the other things that matter like your job, your house, your car.
The sand is everything else--the small stuff.
"If you put the sand into the jar first," he continued, "there is no room for the pebbles or the golf balls. The same goes for life. If you spend all your time and energy on the small stuff, you will never have room for the things that are important to you. Pay attention to the things that are critical to your happiness. Play with your children. Take time to get medical checkups. Take your partner out to dinner. Play another 18. There will always be time to clean the house, and fix the disposal.
"Take care of the golf balls first, the things that really matter. Set your priorities. The rest is just sand."
One of the students raised her hand and inquired what the beer represented.
The professor smiled. "I'm glad you asked. It just goes to show you that no matter how full your life may seem, there's always room for a couple of beers."
When you create an object using the syntax 'ObjectT foo' the object is instantly initialized, and you refer to each of the items in the object as foo.<whatever>. When the function returns the ObjectT's destructor is called to clean up the object. This happens for every class.
Borland have seen it fit to make their compiler barf when you use one of the Visual Class Library(VCL) classes to create an object. Personally, I find the fact that you have to then wrap the code in a __try__ __finally__ block to be a waste of my time. After all there is no rational reason for preventing me from using the variable on the stack, as stack memory is just as good as heap memory (I'm old skool me!).
All you're going to have on the stack is a pointer to a VTBL and the data concerned with the object; nothing more. If you have to cast it to a lesser object, then cast it to a lesser object. If you are using this object in another object (for example adding it to a collection), then use the proper syntax (in this case the ObjectT *foo = new ObjectT()). As a programmer you should know these things.
I would argue that the compiler should not protect us from such annoyances, but the reality is that to make better code we need more assertive nannies. All my C code is compiled with -Wall -Werror, which catches a lot of stupid mistakes, but doesn't catch a lot of normal problems. Sometimes I think I would be better in a garbage collected, reference managed, array overrun protected world... but where would be the fun in that? I like my assembly language, I'm more careful as I know every instruction counts. That and the fact that a review of assembly code takes significantly longer than the same review of C code makes me pray that the developers are paying more attention.
![]() |
Which Megatokyo Character Are You?
created with QuizFarm.com
Then we have Warhammer 40k, Dawn of War. I have no compunctions to sending wave after wave of troops at the opposition, slowly eroding their numbers until I can actually wipe them out. Entire squads get wiped out and I just send more in. I just don't have the same connection to them.
Strange that, and it's only a computer game.
Grrrr.
You ignorant stupid rat b*****d wh***son of a b****h. What; do you think you own my computer? Away with you and your crappy force fix of my choices as a customer. This complaint brought to you by shite software and a harkening back to why is there no programmatic access to the Start menu pin list. Thank you for small mercies.
Even if disk space is cheap/free, it doesn't make sense to spend the time reading the information whan you could be using it. The problem is of course, using a sensible and fast compression/decompression algorighm, and also realizing that it really screws with the whole ease of write on the disk. You end up with some change one byte means completely altering the on-disk image so you need to write a lot more information. This is probably why we use transparent compression on files that don't change that much.
Whee, ain't science fun.
From the start we have the header, appinfo (optional), sortinfo (optional) followed by the record entry headers.
The header is:
| Field | Size | Value |
|---|---|---|
| Db Name | 32 | Ascii Database Name |
| attributes | 2 | See DataMgr.h for meaning (dmHdrAttrResDB) |
| version | 2 | Version number an application would use this to decide if the content was compatible |
| creationDate | 4 | Creation date of the database - time from the palm epoch when it was created |
| modificationDate | 4 | Last modifiied date of the db. creationDate by default. |
| lastBackupDate | 4 | date last backed up ina hotsync |
| modificationNumber | 4 | when changed this gets bumped |
| appInfoID | 4 | Offset in this DB to the appinfo block (0 if it does not exist). |
| sortInfoId | 4 | Offset in the DB to the sortinfo block (0 if it does not exist) |
| type | 4 | the 4 character type of the pdb |
| creator | 4 | the 4 character creator of the pdb |
| uniqueIDSeed | 4 | Stumped - I don't know what this is for, leave it at 0 |
| This is the end of the header structure, the next is the record entry information | ||
| Field | Size | Value |
|---|---|---|
| nextrecordList | 4 | Address of the next record list (only used for really bit pdbs) |
| nRecords | 2 | Number of records in the recordlist |
| pad | 2 | Number of records in the recordlist |
| nRecords items | 4 * nRecords | Addresses of the records in the pdb |
The address of the first record usually lies immediately following the appinfo and sortinfo data. As this data is consumer defined, the only way of determining it's size is to use relative calculations. For example, the size of the appinfo structure it's local address up to min(addr(sortinfo, Address of any data records)) - 1. The size of the sortinfo structure is it's local address up to the min(Address of any data records) - 1. They are application defined, and as such should not be messed with.
Aer Lingus... a division of Ryanair has a nice ring to it.
Pretty cool, even if you're an administrative user, you don't start with all the privileges that your group memberships provide.
Here comes the rub - I've stopped reading the prompts, I just find the one that tells me how to get to the next step and click on it. I'm not positive, but I think this is probably par for the course for other users as well.
Shame that, nice idea, but hamstrung by having too many things need administrative privileges.
