All sorts of possible explanations. Without knowing something about the function, it's impossible to offer specific comments. There are many things the function could be waiting for (eg completion of an asynchronous I/O operation, files to be created by another program, mutexes to be released, critical sections to be released, completion of another program). It's possible the first call to the function may be initiating some wider action, and subsequent calls are waiting for that action to complete.
Rob 2 0
Posts
-
execution time of function increases -
The truth about MinWin: the heart of Windows 7If it's being executed well, the goal would be to eliminate duplication of interfaces: for example, removing cases where two distinct functions unnecessarily achieve the same things in different ways, or cases of functions acting as a forwarder (or facade) for another. That sort of thing would reduce both the complexity and attack surface. As to performance issues: there are plenty of cases where a cleanly designed and decoupled system will outperform an organic system with high coupling. Organic systems tend to have interconnects between parts that don't need to exist and such interconnection can introduce performance hits. One hallmark of mature system designs is that they have little unnecessary complexity - in other words, they are usually simpler than less mature designs. Unnecessary complexity tends to increase sensitivity of the system to change(eg adding new applications or components), making it harder to maximise performance and increasing chances of something breaking.
-
Annoying requirementsThe first thing you need to do is get your ego under control. I've been on both sides of the fence on occasion. Sometimes I've been on the receiving end of a client with an essential contracted requirement that requires incidental violations of laws of physics. And, I've sometimes been the technical authority representing a client with a critical requirement, facing down a stubborn developer who flatly refuses to meet an essential requirement without offering any valid explanation. The reasons for the requirement need to be talked through, and the benefits/tradeoffs of implementing something to meet it need to be discussed. This requires maturity of all participants to ensure there is a resolution that everyone involved can accept. And it also means both need to avoid the temptation of thinking of the other as incompetent/useless/annoying. Such attitudes tend to be quite visible to other parties and nobody appreciates being treated with disdain. Quite frankly some of the other attitudes exhibited in this thread ("just do it if he's dumb", stalling until they see reason, demanding justification before you try) are completely immature. An unhappy client will probably elsewhere so the developer (or his/her employer) loses business and therefore profit. In worst cases, the only ones who benefit are those in the legal profession when it all goes to court.
-
Why do you ANSWER questions in the programming forums?As someone who participates in a few forums, the issue is not only about those who post answers not doing a good enough job. It is also about unrealistic demands of those asking the questions. 1) Those who post a large body of code and saying no more than "it doesn't work - tell me why". When asked for more clarification, they turn around and accuse others of "disrespect" - after all, their question is quite clear and obvious. Yeah, right! 2) Quite a few questions asked are already addressed thoroughly in FAQ lists that most forum sites have readily available (as dedicated sections, sticky posts, etc). When a pointer is given to the FAQ, quite a few reply that they haven't (or won't) read the FAQ as they want a more personal answer or consider the FAQs a waste of their precious time. 3) Posting of homework questions, without making any attempt of their own. This is probably the most common concern, despite the fact most forums or newsgroups have an explicit "no homework" policy. Those who CAN answer are well aware that the most important part of homework is the learning that comes from trying to do it. When that is pointed out, again, there are accusations of disrespect. There are all sorts of similar concerns that regular forum contributors experience. People who contribute their time freely do actually look for some sign that the people seeking help are worth the effort. As to your questions. 1. Why answer? What is the motivation? The motivation is satisfaction of helping people who are genuinely trying to learn. Those people, rare as they are, do sometimes emerge. Seeing them develop offers satisfaction. Being told by people that they are entitled to have their poorly written questions answered does not cut it. If people want a useful answer, they need to put in the effort to ask a useful question. 2. What would make it easier to answer, or easier to find questions you could answer? Finding questions I can answer is not a problem: finding questions I am WILLING to answer is the problem. I look at subject lines and the grouping of questions (eg in particular forums) and simply ignore any that don't seem worthwhile (eg "HOMEWORK", subjects that I know are in the FAQ, "Help required!!! Urgent!!!"). Not many make it past that filter. My second filter is looking for subject lines in reasonable (not perfect) english expression on topics I have an interest in and discarding SMS or L33t style abbreviations. That number is manageable. Once I get to that point, I