Dec 3, 2009

Introduction to programming with C#

As Vesko Kolev stated in his blog - a new bulgarian book about C# programming is in progress.
I decided to take part because it seems very interesting. I haven't much experience in publishing so it will be very beneficial for me to work on this.
Actually I was author in a software magazine few years ago (as far as I remember I was about 17 years old so it must have been about 6 years ago). It should help me as I took the first chapter - introduction to programming where I will show the readers how to install Visual Studio 2010, how to start their first project and how to write their first program, some diagrams of the .NET framework 4.0 will also be included in this chapter.

We decided not to include any advanced features in this book, just core programming language, no extensions, no lambda expressions, no var, no automatic properties, no nothing.
This is because this book targets potential software developers and not software developers. It should show the developer how to code, how to think etc. We decided that if a man / lady without any software experience may think that auto property won't take memory after it doesn't involve variables (at least visualy :).
That is why we do only core things.

Wish us luck. We would really love to expand bulgarian software development community with few more people :). After all if even one guy / gal of all the people that will potentiall read the book becomes an expert - our mission would be completed (we are dreaming for more impact ofcourse :).

As Svetlin Nakov and Vesko Kolev said - telerik is sponsor for this book so it should be published easilly than their prеvious book - "Introduction to programming with Java" and would probably joy some more marketing efforts.

That was it about the book.
Now about my motivation to join the project no matter my personal engagements and all the work I have at telerik and at the university.
The first reason is that I am a self - taught (almost) developer.
I never had degree that will help me find my work, join some society of developers that will help me when I hit a difficult problem.
There wasn't even internet in my hometown. A friend of mine gave me a book on programming with Delphi (that Sams 21 days brick :).
The Delphi help also helped me and I also downloaded html files to read later when I was at school.

Then I applied for a job in the city where I was studying (Veliko Tyrnovo).
It was all my collegues that helped me improve my skills.
I don't feel as a worldwide recognised expert or something but getting to the intermediate level from nowhere is achievement to me.
So reason #1 to join this book is to give something back.

Another reason is that I would like to see how a book is written, are there different proccesses than in the software development. It has something to do with the blog posts I guess :)
So reason #2 is to steal some knowledge :)

And some kind of nostalgy would be the last reason to join :).As I said, I was an editor in a software magazine, it was very nice thing to do. The article, then the readers asking for some more information. I miss this a bit :)
Reason #3 - to feel the old days when I was an editor :)

The specified service has been marked for deletion error message when removing a service

If you receive this message while trying to delete a windows service - check if the Services.msc application is open.

You will need to restart in order to delete the service, but you will know to first close the Services.msc application the next time PRIOR uninstalling the service (using installutil /u service_exe_name).

Hope this helps someone outthere...

Edit : I found another scenario when this can happen and it seems to be more .NET specific and common to software developers - if your service creates some worker threads, Windows will attempt to kill the main thread, the main thread will attempt to kill the main thread but the worker threads if not marked as BackgroundThreads via the IsBackgroundThread property will remain. The GC will wait for them to reach a safe point so they can be terminated and the service will most probably be only marked for deletion, requiring you to restart windows.

Please note - if you are using the ThreadPool class you will probably not hit this problem as the ThreadPool internal threads are automatically marked as background threads.

Edit 2: Another case when you will receive The specified service has been marked for deletion error message is when you try to uninstall service which wasn't stopped first or it was marked as unstopable.
This is done if you have this.CanStop = false in your service code.
Windows knows this service shouldn't be stopped and it will only mark it for deletion but will not delete it right away.
Be careful with CanStop property.