Journal Articles

CVu Journal Vol 11, #1 - Nov 1998
Browse in : All > Journals > CVu > 111 (19)

Note: when you create a new publication type, the articles module will automatically use the templates user-display-[publicationtype].xt and user-summary-[publicationtype].xt. If those templates do not exist when you try to preview or display a new article, you'll get this warning :-) Please place your own templates in themes/yourtheme/modules/articles . The templates will get the extension .xt there.

Title: From the Coalface

Author: Administrator

Date: 03 November 1998 13:15:28 +00:00 or Tue, 03 November 1998 13:15:28 +00:00

Summary: 

Body: 

I have a friend.... another Tale From the Linker.

My friend may have synthesised his story from one or more incidents at different times and places. On the other hand he may not have.

My friend works in a company where they have a person designated as "System Design Authority" for a project. They have the final say on design matters however this seems to have become all technical matters. This helps stop arguments but some times causes them. On my friends project the SDA was an engineer who had been "left behind" when all the rest of the team faded away to other companies. Thus he did know more than the new team about the application but not SW engineering. This caused problems because whilst the SDA did know about the application when it came to C he was a bit of a hacker...

This was highlighted when someone suggested that enumerated types were used instead of all the unsigned char defines used in many places. He had never heard of enumerated types. (Come to that neither had the Project Leader) Enumerated types were explained to the Team Leader & Project Leader. In an instant they decided to use them instead of defines where appropriate. My friend pointed out that they were not appropriate anywhere. This caused a few interesting comments from the new converts. My friend then explained that enum's were 16 bit.

So what you might say. In fact the Project Leader and Team Leader did say just that. Well in an 8-bit system that has very little memory and is time critical you have just doubled the size of many items from 8 to 16-bit. As they are 16-bit they will need, at assembler level more , and often slower, instructions.

However they did decide that shorts would be used instead of ints "For reasons of portability." As advised by an experienced (and expensive) contractor.

Both int and short are 16-bit on the system in question. However it was decided that using a defines like : #define U16 unsigned short (or int) in a global header was far too much trouble and it would not be done. As for typedef's... well my friend decided to leave this idea for another time. So all my friends code is full of shorts as instructed by the SDA "to make it more portable 'cos all shorts are 16-bit".

Later during testing a struct containing 3 unions was noticed. Two of the unions contained three char's and one contained a short and a char... Now there is an accident waiting to happen!

Perhaps it would be better to make sure that people only have authority over areas they understand but in the land of the blind who watches over the short sighted one eyed man who thinks he has 20-20 vision?

STOP PRESS: It appears that there were a couple of enumerated types used. My friend found them during testing. One was "enum Splat {slpat_on = 0, Splat_off = 1};" When the author was questioned about it he said "Oh yes... er that was a part we cut and pasted from the previous development. We don't actually use it in this one. We just left it in the code" NB. The previous development was also on an 8-bit system.

Final note: For those of you who follow the religion of "Alternate Suggestions Of Life From The Spellchecker" for enum the checker suggested enema. Only time will tell in this case.

Notes: 

More fields may be available via dynamicdata ..