Later is now when I am again at my peacefull work place
(When I wast writing the previous reply, I had a crying newborn on my arms - it is nasty when 1,5 months old child has a flu
Allright, I bet most of this is well known by you, but I'll just write this anyways.
Well planned interfaces are crucial. They allow (at least) next things:
1. Easy and meaningfull ways to use features.
- This is quite obvious, if we wish to set temperature in my previous example, it is convenient to use a function which takes the new temperature as parameter, and returns success code someway. It would be less convenient to do this via some ridiculous IF, like
* \brief function for getting pointer to termometer temperature value
* \brief read new value from temperature storage
And the most horrible way would be to have a global variable helding this value...
2. Easier modification of code.
- When interfaces are planned cleverly, we have managed to divide the code in reasonable blocks. This is half of the job for having maintainable code.
3. Avoiding collisions between components.
- When each interface is planned and shown, we automatically have a list for most variables, namespaces, functions etc.. Although with proper C++ this is not such a huge issue. (forgive me for providing this dull points, I do have worked more with C)
4. Easier understanding of code.
-Well, the temperature example in section 1 should explain this
That's why I believe that the most of the interfaces should be planned by ones who do the best job
(I am not pointing at anyone, nor am I accusing anyone, I do not have right to do so (I am quite green myself, and I do not know you guys [yet])
And why beforehand?
1. That would allow planning the future features in beforehand.
2. That would give newcomers easier starting point. It is far easier to do a component when one says:
"Please write temperature showing system which creates these function/message interfaces:
And fulfills these requirements."
instead of having a task:
Here are the requirements, here is the code, you could for example do that temperature part...
I understand how big task it is to create the interfaces. I also do know that it is hard to make them 100% working at first try. But that's what writing code is, it is re-doing things. However, changes in interfaces are the most nasty changes, which (in my opinion) just makes the need for well planned IFs even more important.
I hope you guys do not feel like I have come in here just to tell you that "you are doing wrong, you should do it like this". I know most - if not all - of you are propably much more experienced than I. I just wanted to give another point of view. I am not expecting you to change your ways just because one newbie is creating s*loads of posts nagging about things
But perhaps you wish to consider my words?
Ps. I installed FC8 at home, it is just that now I have problems with my USB WLAN stick's drivers... It seems like the new rt2x00 driver has some problems with handling IRQs. :/