Blog

Black Light and Gamma Control on the Mac App Store

Time flies. I published my first OS X app 12 years ago. That was for Mac OS X Public Beta in year 2001. At the time, I wasn’t satisfied with the default gamma setting of OS X on my orange clamshell iBook, and thus came the first version of Gamma Control.

After the official release of OS X, I got a couple requests for improvements and new features, which brought version 2 of Gamma Control and a newcomer: Black Light. It was fun to do them, and not too time consuming to maintain them so I did.

To tell the truth, I’ve never used much neither of these apps since OS X 10.0 came out, even though I’ve been maintaining them all this time. And I’ll admit I’ve been maintaining them a little less than I should have been in the past few years. Perhaps giving those two apps for free has something to do with that.

Today I’m releasing version 3.1 of Gamma Control, which fixes a long standing bug where the gamma correction was applied at times it shouldn’t and makes the color targets friendlier to Retina displays. I’m also releasing Black Light 1.8 with an option to disable the effect when a screensaver starts. Both of these apps are now available on the Mac App Store for $5.99.

Previous versions are still available for free, mainly as a convenience for those with pre-10.6 OS X. I’m not going to hide them very far and they are still working with current OS X. But if you are using Black Light and Gamma Control, please consider purchasing them. That will keep me motivated to continue adjusting them as OS X evolves, and the Mac App Store will keep the apps updated for you.


Game Controllers

With all the fuss about the new look in iOS 7, has anybody noticed Apple is also adding a standard API for game controllers?

It might seem banal, but I’d be surprised if this is not a prelude to apps (and games) running on the Apple TV.


MeoTempo

For about two years now, I’ve been working part-time on an iOS project with a small team of people. The app is structured as a calendar, but unlike other calendar apps this one tells you how much time you have left, how much time you’ve planned and spent on things, and it comes with a tool to track what you’re doing right now (giving you later a history of how you spent your time).

I’m not going to detail what the app can do here. It was released last week, so just go take a look.

For this app I built a synchronization engine. Each device running the app has an independent copy of the database, and each time it connects to our servers, databases are merged together and changes are propagated to other devices. The way it works is interesting, so I’ll elaborate a little.

Our synchronization system is built in a similar way to distributed version control systems (Git, Mercurial, etc.). It has a repository layer used to syncs binary data blocks with other repositories. On top of this the app maintains a SQLite database corresponding to the model. Changes in the local repository are kept in sync with the model database. Changes in the local repository are also pushed to the remote one, and vice versa. And there your iPhone syncs with your iPad.

This systems has two interesting properties in common with DVCS. First, if one repository is lost (whether on the server or on a device), it can be reconstructed from the others. Second, in theory we could do peer-to-peer sync too without a central server even though in practice managing peer-to-pear communications is more complicated and nothing has been done on this front.

It’s interesting to note that the model database is basically a cache of what is in the repository. Whenver the schema for the model database changes (when updating the app for instance), we don’t have to migrate any data: we get rid of the previous model database and rebuilt it from the local repository, just like when syncing.

All in all, I’m quite happy with this system. It took some time to build, there’s still some rough edges, but it was really worth the effort. Give MeoTempo a try if you want to see it in action.


PHP Markdown Lib

It’s time for PHP Markdown to become a mature well-packaged PHP library instead of a hybrid file that tries to be everything for everyone.

Today, I’m announcing the Lib branch of PHP Markdown. It contains the two exact same parsers found in PHP Markdown and PHP Markdown Extra, but without all the cruft. It is packaged to be used as a library, and only as a library. The two parsers classes are in the Michelf namespace:

\Michelf\Markdown
\Michelf\MarkdownExtra

Yep, a namespace, so it requires PHP 5.3 or later.

The Lib branch is PSR-0 compliant to allow autoloading of its parser classes. It’s also a Composer package made available on Packagist.

Three Branches

So, right now there are three branches of PHP Markdown. Here’s a summary of each:

PHP Markdown
The original PHP Markdown is the one implementing the Markdown syntax specification. It includes a global Markdown function, a parser class, as well as various plugin interfaces for Wordpress, Smarty, for replacing the Textile parser.
PHP Markdown Extra
The Extra branch has been added quite a while ago to extend the core Markdown syntax with other useful things. It’s implemented as a second parser class derived from the PHP Markdown parser’s, and packaged exactly the same way in a single file with the various plugin interfaces.
PHP Markdown Lib
The Lib branch is a new one aimed at being a modern PHP library people can use to integrate in various things. Contrary to the other two, it does not contain any plugin code. It requires PHP 5.3 or later because it makes use of namespaces.

PHP Markdown Lib starts at version 1.3. I wanted to start over at 1.0, but that’d have made bug reports about a specific version of PHP Markdown harder to understand (people often don’t say or know which branch they’re using), hence why there’s a separate version number.

Moving forward

Next year, in 2014, only the Lib branch will continue to be updated.

The original PHP Markdown and PHP Markdown Extra distributions will continue to be available on the classic version page, but starting next year updates containing bug fixes and new Extra features will go exclusively to the Lib branch.

If like many of you you’ve been using PHP Markdown as a Wordpress plugin, you can still continue to rely on it, it is unlikely to stop working anytime soon. The reality however is that I do not have the time to keep improving things for Wordpress as it evolves. Time passed, and now many other plugins based on PHP Markdown but with better integration have appeared. I do not have a recommendation to make at this time, but feel free to let me know if you have one as I might write a follow-up on that topic.

Ditching support for older versions of PHP will simplify the maintenance work and will enable usage of newer PHP constructs in the code. Getting rid of the Wordpress plugin part will let me worry about things which are more related to the parser side of things.

It’s time for PHP Markdown to become a mature well-packaged PHP library instead of the strange hybrid it has been for many years. Therfore, starting today, the Lib version now takes the front row on the updated PHP Markdown webpage. Let me know if you have any question.



  • © 2003–2024 Michel Fortin.