Tuesday 7 October 2008

Projects

I've only recently started doing some hobby projects recently. I've been a bit burnt out for the past year or so, so I haven't been doing anything of my own for a while. Anyway, most of the things I'm starting now are in C#, but I've also just downloaded the Google Android SDK, so we'll see how that goes.

The main personal project I am currently working on is a flow chart viewer in C#. Later I will make an editor for it too. I'm making it, because the open-source ones I can find are not Generic enough for my requirements. I'll post more on that later.

Thursday 18 September 2008

Stack Overflow

Recently, a new programming Q&A site called Stack Overflow has been released to public beta. I've been using this site for just over a day now, and I have found it to be really useful. I asked a question, and it had several good answers in a very short space of time. I've already discovered several good open source applications, and references on various topics that I may have taken years to find in the cloud by my lonesome.

So, anyway, if you are a programmer, beginner or advanced, and you want good answers to random programming questions, I would definitely suggest that site.

Spam Blogs

Hahaha. I was pleasantly surprised about 1 minute ago, when I logged into this blog in the first time in 2 years to write an entry. My pleasant surprise was that this has been automatically tagged as a spam blog. Why I pleasantly surprised? Because now I can see that Google/Blogger is doing something about all those annoying spam blogs. The fact that this got tagged as one is relatively unimportant, because (hopefully) a human reviewer will reverse that decision.

Wednesday 21 May 2008

System.IO.Ports.SerialPort.Close() Hangs

In the dotNET / .net framework v2 on Windows Vista, I have noticed that every so often a call to SerialPort.Close(); will hang forever (i.e. it has gone into deadlock). I read few posts of people who thought they had solved the problem with the prepending of the line SerialPort.ReadTimeout = 0;. However, I tried doing this, and although it made the occurence of the hang a lot less frequent, it still happened.

So, I thought there was no way to get around the hang, so I decided that I would close the port on a new thread, as well as having the SerialPort object contained in another object, which I would force the death of if I detected a hang. Well, funnily enough, after I did this, it would no longer hang at all. So it appeared that the problem was solved by simply creating a new thread from which to close the serial port. Strange.

In essence, by trying to find a way to handle the problem, the problem ended up going away. I'm not going to bother to find out why, I'll just be happy with that.