Skip to content

Digging up the Roads

August 14, 2016

Yesterday I added another Tarrasch download opportunity to the downloads page on I chose to call the new “release” Nightly as opposed to replacing the existing Beta. I am definitely risking confusion through too many options here, but as always it’s all about trade-offs.

Basically I have made a lot of changes under the surface, and these expose enough benefits to end users that I want to make the new version available. But I am not quite ready to replace the existing beta, because I haven’t put in enough miles with the new changes to have sufficient confidence. However I will be using the newer Nightly build myself and I would really appreciate it if others try it out and give me feedback.

What are the nature of the recent changes? Most importantly I have finally bitten the bullet and upgraded wxWidgets, the massive GUI library that Tarrasch is built on. For more years than I want to count I have been using the same wxWidgets installation and fearing making any changes in that area. At some stage this has to stop, wxWidgets has had years and years of attention to goodness knows how many details and it is silly to turn your back on these essentially “free” improvements.

I am really pleased that I finally decided to take a fresh look at wxWidgets and install and integrate the latest version. I had become scared to touch anything in the wxWidgets arena. This caused some very tangible problems. Most importantly perhaps it meant a distinctly suboptimal experience for software developers who were tempted to work with the Tarrasch source code via Github. The wxWidgets dependency was woven into Tarrasch in a way that reflected the way I set up an old version of wxWidgets on my machine, many years ago, way before I ever open sourced my code. In retrospect I am rather ashamed of the previous state of my tarrasch-chess-gui Github repository. I have now cleaned all that stuff up. A Windows C++ developer can now expect to be successfully rebuilding Tarrasch (with zero warnings – not hundreds of warnings!) about 10 minutes after deciding to take a look – even if he or she had no experience with wxWidgets. I should really have done this years ago.

One nice little refinement that has come out of this exercise is that I could finally do something about the Tarrasch icon. Previously I had managed to completely lose control of how the icon was baked into Tarrasch. This was really embarrassing actually, I had resorted to literally purging the standard installed wxWidgets icon and replacing it with my (poor – and also not scalable) T shaped icon. I couldn’t build any wxWidgets application without the T icon even if I wanted too! If I remember correctly the reason for this was a weird feature of Windows that still affects me now on Windows 10. Windows caches icons, it doesn’t reload icons each time it needs one. But for me at least (I am being conservative here – maybe I have some obscure registry setting wrong) the cache doesn’t get refreshed when the file changes. So rebuilding a program with a new icon apparently has no effect!

I didn’t understand the problem years ago when I first encountered it, and overreacted basically purging all traces of the standard wxWidgets icon from my system in an effort to make the T icon show up. It’s funny, there is an old programmers’ joke that says something like “There are only two difficult problems in software development – good naming, invalidating out of date cache entries, and off by one errors”. I would have thought in this case Microsoft could actually just invalidate the cache entry whenever a file’s modification date changes but maybe that’s too simple for some reason.

Anyway, now I understand the problem better I have taken control back, and can put whatever icon I want into any .exe. (The fact that the icon doesn’t appear to change [at least immediately] no longer causes me to doubt my sanity).  I have taken the basic idea of a T shaped section of the chess board and made a nicer, resizable icon using the motif of a fianchettoed bishop which is a real T shaped formation. If you install the Nightly build you might not see the new icon of course! If that’s the case, please google for “Rebuild the Windows icon cache” or similar.

This post is getting too long. I will restrict myself to making one more point. Another tangible benefit for end users of the wxWidgets upgrade has been that one longstanding Tarrasch problem has been eliminated or at the very least greatly attenuated. Keen users might have noticed that adding a lot of variations and/or comments to a game progressively slows down the responsiveness of the Tarrasch editor. This becomes a very real problem for me in my role as an amateur chess journalist. I am going to be using the Nightly release for this reason alone.


No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: