A short story about source code comments

A bug was reported in Tetzle, and the reporter helpfully tracked down why it was happening but was not sure what the purpose of the offending code was. I took a look at the code and said, “Beats the hell outta me!” I’m lazy, so of course it was not commented. I traced it through git all of the way to the very first release, and then had to track down my ancient notes about what the purpose was (it turns out Tetzle crashes if you delete the image of the current game, so it was preventing that but not clearing it on launch — kind of obvious, really). I fixed the code and added comments so that I would know what the purpose of that code is if I ever wonder in the future. The moral of the story is: comment your damn code, you’ll need it someday. Of course, I doubt I will be diligent about that, since I’ve run into this exact same situation before. :-P

Minor FocusWriter update

I’ve made a new release of FocusWriter, version 1.3.5.1, primarily to fix a data loss bug. The bug occurred when opening a file created by other RTF word processors that used multi-byte hex values, which FocusWriter did not handle properly. Also in this release is a Dutch translation, thanks to Robert Borst. Enjoy!

Another bug bites the dust!

I have made a small release of FocusWriter, version 1.3.5. I am working on some of my other projects at the moment, but I was made aware that paragraph alignment was being lost for awhile now. I decided to make a release after fixing it and without much else changed as I view any data loss bug, no matter how big or small, as extremely important.

I did add one feature, however, before being informed of the bug: exported themes are now gzip compressed for a nice space savings. I changed the exported theme extension to “.fwtz” along with that, so if you want to share themes with users of older versions of FocusWriter you will need to extract the theme and rename it to end with “.theme”.

If you find a bug in FocusWriter, please don’t hesitate to report it. Enjoy the new release!

More releases!

Good news, Tanglet fans! I have made a new release, version 1.2.0. This release includes some graphical improvements along with its new features. There is now the option to choosing how dense the board will be, as well as requiring words to start with more than 3 letters if you are looking for even more of a challenge. By default a list of how many words of each length that you have found is shown along the bottom. And finally, I made it a lot easier to share games by adding the option to import or export them.

I was getting tired of how the board was just a bunch of rounded rectangles, so I made the letters look like they are on actual dice. I also gave the timer bar some gloss as it was starting to look a little out of place next to the new board. These changes inspired me to create a completely new icon.

Many thanks go to Bentzy Sagiv for a Hebrew translation, and Bas Duineveld for a Dutch translation.

Another day, another release!

I’ve had bug fixes and new translations for Kapow piling up for far too long, so I have made a new release, version 1.3.4. I also took the time to improve the application icon, which I had a lot of fun designing. I think it looks so much better now!

Thanks go to Krasimir S. Stefanov for adding a Bulgarian translation, Pavel Fric for adding a Czech translation, Guillaume Gay for adding a French translation, Ricardo Carrillo for adding a Spanish translation, and Sergiy Gavrylov for adding a Ukrainian translation.

Bugs, bugs, whatcha gonna do?

What better way to announce my return than with a bugfix FocusWriter release? That’s right folks, I have squashed yet more bugs in your favorite program! Along with fixing bugs I have added support for the same subset of ODT that I support of RTF. Unfortunately, there was a minor glitch with the translations of the Mac version that required making a second release. Thanks go to Epameinondas Soufleros for a Greek translation, and Daniel Nylander for a Swedish translation. Enjoy!

Hiatus

For personal reasons Gott Code is on extended hiatus. Thank you for your understanding.

Even more bugs fixed in FocusWriter

I have made a FocusWriter release, version 1.3.3. Mostly this release just fixes bugs, especially on the Mac (including making drag-and-drop of RTF work). Also included in this release is the emergency file cache, as well as the new icon and load image. Thanks go to Eduard Bruckner and Dennis Peteranderl for a German translation, and Dmitriy Kodanev and Danila Evstifeyev for a Russian translation. Enjoy!

The future of Mac support

A while ago I started using a Mac Mini that I purchased partly with donations from kind users. A very big thank you to all who helped! I am now able to build Intel 64-bit apps for Mac OS X 10.5 and 10.6. I will for now continue to build Carbon 32-bit Universal apps on my ancient iBook for Mac OS X 10.4, but I will not fix bugs specific to that platform. I will eventually completely drop support for it, and for the few users who that impacts, you can always compile my programs from source. :-)

Now, before anyone asks, I won’t be supporting the Mac App Store. The very simple reason is that I can’t. I write open source software because I believe in sharing, and the App Store license is legally incompatible with that. Unfortunately, this means that there will likely never be FocusWriter (or the rest of my work) on the iPad, despite the interest of my users. Of course, if Apple eventually makes their license open to the kind of software that I develop and believe in, then I will absolutely take advantage of it.

Coming soon…

I am still working on other projects at the moment, but I have decided to finish a patch release for FocusWriter. It’s mostly bug fixes, with a few small polish features thrown in.

The most important new feature should be completely invisible for most users: an emergency file cache. FocusWriter has always had “auto-save”, which means exactly that: once a minute, it calls the save function. That is quite different from other word processors, but in keeping with its original design (which was more of a self-contained writing environment).

However, I don’t think that most users expect auto-save to mean that, and it doesn’t do anything to protect files that haven’t been manually saved and named (and since you can’t see the user interface, it’s easy to forget that you haven’t saved it the first time). So I have added a file cache. Once a minute, FocusWriter will store a copy of the files that are open. When you close the file, or close the program, it will delete the cached copies. If the program (or computer) crashes, it will detect the presence of the cache, and ask if you want to restore from it. If you don’t, it will move the cached contents to a date-based folder so that you can decide what to do with them at a later time.

I have kept the current “auto-save” functionality; however, it is disabled by default for all new users. You can not opt-out of the emergency cache (at least, not right now), since the files are deleted when the program properly closes. I hope this will satisfy both the current users of “auto-save” by keeping it around, as well as users who want to have some form of emergency file caching.

Another change is the backend for the typewriter sounds. There have been many sound bugs caused by my use of libao (and I was never completely happy with the code to begin with), so I have decided to replace it with SDL_mixer. I still don’t want to depend upon a game library for a word processor, so it loads SDL_mixer dynamically. If you don’t have SDL_mixer installed it will fallback to using QSound (any Linux users without SDL_mixer or Network Audio Sound will not have any sound effects, sorry). SDL_mixer will, however, be included in the binary versions for Mac and Windows. This should fix all of the sound errors that people have been having.

The last thing of note is a visual change, and I am rather excited about it: I have unveiled FocusWriter’s new icon and load screen. Over the course of FocusWriter’s life, I’ve gotten several submissions for new icons, and while many of them have been quality work, they just weren’t quite the look that I was going for. So with the help of my wife, I designed these. I was keeping them secret until 1.4, but got tired of waiting and they will instead be in the next release. I hope you like them as much as I do.

FocusWriter's new icon
FocusWriter's new load image

Follow

Get every new post delivered to your Inbox.