March 11, 2003

20030311

  • Syndirella now saves its state when it has been inactive for a minute. This ensures that the feed list and state is not lost if the machine crashes or if Syndirella is otherwise incorrectly terminated. (Issue 19).
  • Syndirella now strips JavaScript from RSS description elements. (Issue 95).
  • If, for some reason, the top or left pane of the Syndirella window disappears, restarting Syndirella should fix the problem. Any comments on why the pane disappears are welcome.
  • Corrected some more cases where Graphics objects were not correctly disposed, in hope to fix the resource leaks under Windows 98/Me.

Download binaries, sources or installer.

Posted by yole at 01:22 AM | Comments (8) | TrackBack

March 09, 2003

Policy for answering bug reports

Looks like my initial policy for answering bugreports - "as soon as a new build is released, go through the entire archive of unanswered e-mails, find the ones that reported bugs fixed in the new build, answer and tell them where to download the new build" - has failed miserably, which should be quite expected. The result of this is a pile of more than 200 unanswered Syndirella-related messages, some of them dating back to January, received immediately after 0.9 was released.

So now I'll finally try to do the right thing: add _all_ bug reports (including the ones I can't confirm or reproduce) to the tracker, reply immediately to bug reports and specify the tracker URLs where the bugs have been recorded, and specify the IDs of fixed bugs in the new release announcements. It may be a little bit less user-friendly, but while an answer "recorded to the tracker, ID nnn" is worse than an answer "fixed in build 2003mmdd", it's still better than no answer at all.

Trivial matters, right - but I'm learning the hard way. :-)

Posted by yole at 12:30 AM | Comments (0) | TrackBack

March 05, 2003

20030305

  • Syndirella now does RSS autodiscovery only if the address specified in the "Add RSS feed" dialog points to a HTML page. If you specify the address of a broken RSS feed, a non-RSS XML file or some totally unrelated file (for example, a .GIF image), you will now get an error message immediately.
  • Syndirella now animates its tray icon for 30 seconds after a feed update that brought new items has been completed. After that, the icon turns solid red, and remains red while you still have unreasd items. When there are no unread items, the icon is colored blue.
  • The primitive HTML parser used for RSS autodiscovery now also understands attribute values surrounded by single quotes, not only double quotes.
  • Fixed several errors reported by Syndirella users.

Download binaries, sources or installer.

Posted by yole at 01:00 AM | Comments (6) | TrackBack

TFD in games

Dan Dunham writes about using the test-first design in game development:
After about two months of looking at bugs in Camelot, and looking over our master bug lists, I realized that ... well, almost none of them could have been caught by unit tests.

So I'd like to tell you about a case of using TFD in game development in which I have participated a little bit myself. When we were starting a St.Petersburg XP Users Group, we were contacted by some guys from MADia, and they told us that they were using XP for game development. Of course, I was really interested to hear about that, so I came to visit them and to see myself what they were doing and how.

By that time, they had just released their first original game, Echelon, and started the prototyping work for a future add-on to the game. One of the things they wanted to rewrite for the add-on was their menu system. The old code was quite ugly and limited, and they wanted to replace it with something that could be easily modified and extended with a standard scripting language. And they wanted to implement that in test-first mode.

I was really interested in getting some experience with XP in game development, so I offered my help with that project, and my Python expertise (which was quite limited, but still better than nothing). We paired with the lead developer of "Echelon" and together created an initial implementation of embedding Python into the game. Unfortunately, timing issues didn't let me continue working together with them, and I have basically lost the contact with them since that time.

A few months ago, the Echelon add-on Wind Warriors was released, and I bought it to see if anything remained of all the Python scripting idea. I was pleased to see that they did bring the Python-customizable UI to completion, and of course, all the Python source code was included with the game. And quite curiously, wherever I looked to read some code, I saw firstly unit tests. :-) Looks like the unit tests comprised about two thirds of the Python code.

It would be interesting to know if they used unit tests in their game logic code, written in C++, and whether they felt much gain from the tests. But still - here is an example of using TFD in games which you can examine yourself.

Posted by yole at 12:48 AM | Comments (1) | TrackBack

March 04, 2003

Not-quite-async HTTP

From the first day of Syndirella development (when it was still called RSSistor), I decided that I would use the .NET asynchronous functions instead of explicit threading. I have quite a lot of experience writing multithreaded programs in the traditional way, using the Win32 API and pthreads, so the async functions looked both more interesting and more of a "right way" to do things. It took me a while to realize that the async functions don't make the usual threading problems magically go away - I still need to do proper locking, and I need to do UI stuff in the UI thread and use BeginInvoke() to pass the control there. The "not enough worker threads" problem was more of a surprise to me, but it was still quite easy to understand and to fix - putting a reasonable limit to the number of feeds updated at the same time is a good thing, in any case.

However, there is still one more problem that is not so easy to work around. If you start Syndirella and click on "Update all feeds", you will probably notice that the UI will get "locked" several times, and not respond to your actions for a couple of seconds. Not a proper behavior for asynchronous updates, right?

Actually, what Syndirella is actually doing when it's locked is resolving DNS host names. Although HttpWebRequest.BeginGetResponse() will download the response asynchronously, the DNS resolution is still done synchronously, and the function will not return until the DNS query is complete.

As it can be seen from the Rotor sources, the class responsible for DNS resolutions is called ServicePoint, and the query is done in its method called GetNextIPAddressInfo(). And while it is simple to do DNS queries asynchronously (Dns.BeginResolve() is readily available), it is not so easy to pass the DNS information to HttpWebRequest. So far, I have thought of only one solution not resorting to manual threading: I can parse the request URLs and replace the host name with a dotted-decimal IP address after the DNS resolution is complete (for example, a request to "home.yole.ru/weblog/index.xml" would be rewritten as "80.70.224.68/weblog/index.xml").

I don't want to implement this right now, because this will involve some risky changes. I'll need to implement a cache so that each host is not resolved on every request, and it would be best to have a limited time to live for each name resolution result (like 6 or 12 hours). But unless a better solution is found, that's what I will do in 0.92.

Hints on better ideas to solve this problem are welcome. :-)

Posted by yole at 10:31 PM | Comments (4) | TrackBack

Outages

First, I'm really sorry for the network outage which caused home.yole.ru to become unaccessible and the mail to yole@yole.ru to bounce for almost two full days. When I saw the problems, I immediately blamed the ISP and waited for them to fix the problem, and didn't really try to resolve anything myself - but of course, my network is configured correctly, there can't be any problems at my end! But it looks like that I could have fixed the problem simply by rebooting my PC.

So if you have written anything to me in the past days and got a bounce, please re-send your mail.

I'm actually searching for a paid hosting provider now, so I hope that all the outage problems will not repeat anymore. The main issue is CVS hosting - it always needs to be discussed separately, and not everyone can provide such a service. And I don't want to use the free hosting at SourceForge and similar sites. There are several reasons for that - SourceForge's occasional downtime, desire to control the repository myself, and the need to host some other projects that cannot really be called "open-source software", and thus shouldn't reside on SF.

Besides the network problems, the past week has been pretty busy for me. My birthday, its celebration with my friends from real life and from LiveJournal, my new bass guitar (it's actually sunburst colored, not black), Space Rangers (an excellent new game by a Russian company - a mix of Elite, Master of Orion and Star Control 2), a brief cold... well, you get the idea. I'll be getting back on track now.

Posted by yole at 12:14 AM | Comments (2) | TrackBack