Friday, January 14, 2011

Deadline? What for?

The scenario:



  • A planned project budget of some 25 million Euros

  • A consortium of 20+ industrial partners (including all the really big global players in this area

  • A project-discussion time of more than 6 months before the meeting described here

  • 5 workdays until the final deadline for submitting the project proposal - no possibility of a late handin

  • No coordinating partner yet

  • Not even a very simple draft or outline of a proposal yet


Excerpt 1 of the consortium meeting: Trying to find a coordinating partner


... we have to agree on the coordinating partner, so please, who is willing to do it?

Why should we have a coordinating partner?

Because this is mandatory!

Are you sure?

Yes!

Sorry, we shouldn't waste our time on that, let's discuss it via email, we don't have to find the coordinator today. Let's just write a name into the proposal and then we'll see. We have more important things to discuss today...


Excerpt 2 of the consortium meeting: Trying to agree on a deadline


... we have 5 days left until we must submit our proposal - so all the partners have to describe their workpackages and send it to the coordinator, who will then compile the proposal

But we don't have a coordinator

Ok, that's right - so I'll coordinate this proposal compilation myself. Please send me your descriptions. And I would say, the deadline is in 2 days

Deadline? I don't think, we should have a deadline. We all do our best and when we're done, we'll send you the results

But when? Keep in mind that there's much work to do to make this proposal look good!

No, I'm against a deadline, what about the rest?

... nobody else said anything ...

Well, ok, then we obviously agree that we don't have a deadline. We'll send you our descriptions as soon as we have finished them


What do you think happened to the proposal? :-)

Thursday, January 6, 2011

Why would you use lock if you can take a bool...?

Some developers have perfect in-depth knowledge about multithreading and synchronization as the following piece of C#-code shows:


while(dangerous)
;
dangerous = true;

// operations in critical section here...

dangerous = false;


... as you can see, the people who invented lock(...) just think way too complicated - in reality it's much easier! You only have to know that one of the very important properties of bool variables is that several lines of code that use the same variable are compiled down to a single atomic operation :-)
Ah - and I forgot to mention the other important property: in case of an exception it is guaranteed that all bools are automatically set to false during stack unrolling... :-)