Thoughts On Publishing Open Source Software

Earlier today I read an article about Xiaomi breaking GPL license. This made me think why I publish all the software I write in my spare time as open source.

People may have many reasons to release their software as open source. Many do it for the ideological reasons. But I think it all comes down to the sense of appreciation and the feeling of giving something back. It’s nice to have a popular application. But it’s even greater feeling if someone likes your code so much that they decide to use it. The other reason – the feeling of giving something back is probably deeply rooted in our society based on exchange of goods. If you give me something, I will give you something in exchange. And vice versa.

Lots of people may not realize it, but without open source the computing wouldn’t be what it is today. And I don’t mean only the popular projects such as Mozilla Firefox, LibreOffice or Linux. The hacker culture that began forming sometime in the 60s in academia (MIT)  where computer enthusiasts exchanged their knowledge and build upon the knowledge of others allowed for a greater development in computing and it produced many great programmers and computer scientists. The ghost of open source is constantly floating around. Publishing code as open source may not help eg. GCC developers directly. But it may help someone else to create something awesome that even the godly GCC developers will enjoy 🙂

I publish most of my code under LGPL and possibly GPL. Although the Free Software Foundation tries to convince people that LGPL is something inferior to GPL by calling it “Lesser GPL” (it used to be Library General Public License) I like the fact that it gives the users even more freedom. If you wanted to use GPL software in your application, you would have to publish it under GPL, too no matter how much code is yours. But with LGPL you can publish it under any license you want. But there’s one thing – I want you to give me something back in exchange for my code. If you don’t just use it, but if you improve it, I want everyone (including the selfish me) to have access to these improvements.

Qt Quick for desktop – yes or no?

I should begin by telling my background. I have several years of experience using the Qt Widgets, so I know them quite well. On the other hand, I decided to try the Qt Quick when implementing user interface for Lyli this December, so I’m still quite new to the world of QML and Qt Quick. However I feel that I’ve seen enough to evaluate both on their usefulness for the desktop development.

The short answer to the question in topic is “No, at least not yet.” It’s not that I don’t like QML. I actually like it a lot. It’s really easy to create a custom interface using QML. But that’s the thing – it’s great for designing custom interfaces, such as ones used on smart phones or tablets, but not for desktop with a “standard” set of interface elements.

The problem of Qt Quick is the lack of good standard interface elements. There is a Qt Quick Controls module that provides some of the basic modules, such as buttons, labels and check boxes. But it still feels limited, and you will probably have to design some of the elements yourself. Which is not as easy as it looks, because for a good integration with the desktop you need to take things like theme colors and default fonts into account.

The other thing is the lacking behavior of the default views. Often, you have to implement basic things like multiselection on your own, while with Qt widgets this is a matter of setting a corresponding property (so far the only view that I found that provides some extended selection mode is TableView). Another example is a problematic connection of some of the existing Qt Models to QML. Take browsing the file system as an example. So far I found only two options – either subclass the QFileSystemModel to add option to change the model index from QML, or use the FolderListModel. None of these options is nearly as comfortable as the widget’s approach.

Once Qt Quick Controls provide similar set of widgets as as the standard Qt Widgets with a similar functionality, there would be little reason to use the C++ widgets. Until then, the C++ Qt Widgets is a better choice.

Lytro Sucks, But The Camera Is Cool

This is the first blog in series of blogs I’m going to write about the Lytro camera. Even though it is a great toy from the technical point of view, the main reason why I decided to write this blog is the frustration I had with it.

So I bought the original Lytro camera. It was mostly a coincidence. I got a newsletter from my favorite shop with photographic equipment, that the Lytro cam is on sale. I immediately remembered reading about the upcoming Lytro camera a few years ago. At first I thought that they started selling it just recently, so it was a big surprise for me to find out that it has been sold for three years already and that there’s a new, shinier version (probably the reason for the big discount).

In this blog I’m going to write some first impressions of the camera itself and the accompanying software. Hopefully more blogs will follow with the more technical insight.

Hardware

AKA the good part. Well, not good like it’s so super awesome that you have to have it no matter what. But it is still nice although it has its share of problems.

Let me begin with the cool part. Lytro is a lightfield camera, which means that it records not only the light intensity at each pixel, but also a ray direction. This allows for a complete reconstruction of the scene lighting. For the casual user it means it is possible to change refocus after the shot has been taken and that it allows for a 3D effect, which looks incredibly cool. I suppose it would incredibly awesome when paired with a lightfield display, as that would make a true 3D experience, way more advanced than what the current 3D TV’s and cinemas offer.

First I should note that I didn’t expect the images to have any exceptional quality. And it didn’t fail my expectations – current phones provide better (sharper, better colors) images than Lytro. But Lytro isn’t about ultra-sharp high-resolution images. It’s about the technology. I believe that given an opportunity, the lightfield technology may as well replace the current “3D” equipment in the long term.

The camera doesn’t have many controls, so it’s very simple to use. There is a button to turn the camera off/on, a shutter button, touch screen display and a zoom thingy. Unfortunately Lytro decided to ditch the firmly established camera design. The camera has a block shape with the lens on the shorter side, so it looks more like a colorful surveillance camera. The problem of this shape that it not possible to have a firm grip, making it difficult to hold it steady. The controls doesn’t help either – the shutter button is only a little indentation in the camera body and the zoom is controlled by swiping a finger on a narrow line on the camera body. One last thing that’s weird about the controls is the manual control. The camera allows you set shutter speed and ISO, but there’s no simple to control to tack exposure compensation. As a result, if you want image top be brighter, you have to go to the menu, change shutter speed to manual and set it, and then go to the menu again and do the same  thing for the iso, too.

But the images look cool 🙂

Software And Other Stuff

A now the crappy part. And I mean it. If I knew the software was such a piece of c*ap, I would never buy it. In fact, this is the reason why I would rather talk you out of buying the Lytro camera if you told me you want to one. To download and manipulate images taken with the camera, a special application called Lytro Desktop has to be used. When Lytro is connected to a computer, it identifies itself as a CD-ROM. There, you will find a file that links to their website to download the software (so no automatic installation). The CD-ROM is hybrid disc, so I suspect that it contains a Lytro Desktop installer for OS X (when the camera was introduced, Lytro Desktop was available only for OS X).

If you don’t have a 64bit Windows 7 or Windows 8, you won’t be able to install the software, because these are the only supported systems. Even if you have the required OS, you may still not be able to get your pictures, because the current Lytro Desktop 4 requires a GPU with DirectX 10 support. When I tried to start Lytro Desktop on my laptop, it just ended with a failed assertion, because it was not able to compile shaders. And it seems that they know that the new Lytro Desktop is broken, because they still offer download of the old Lytro Desktop 3. That one works for me.

I can’t tell how good or bad the current Lytro Desktop 4 is, but the version 3 is just bad. It’s incredibly slow – it takes several minutes to download few images, preprocessing the images for the perspective shift takes several minutes for each image. Also the Lytro Desktop has a very limited functionality. The software allows refocusing the image by clicking in the image. It works in the exactly same way as in their web viewer – the image is separated into several images with different focus and the software blends between them. Most of the time it works fine, but sometimes the images are separated incorrectly (eg. when I had a bright lamp in the image the software created an image where I could refocus between jagged “focused” bright circle from the lamp and the rest of the image). Then it allows for the perspective shift (aka 3D effect). Finally there are some completely useless filters such as black and white, a weird depth-based warp and other useless stuff. And that’s all. There’s no way to sharpen the images. There are no tools for color grading. Absolutely none. So if the white balance is wrong, there’s nothing you can do about it.

And finally the worst part, or “why you should newer buy a Lytro camera”. Not only the software is bad, but based on reading their forum the attitude of the manufacturer seems quite bad, too. The company seems to be run by a bunch of Apple fanboys who despise everything that has not been made by Apple. The first version of their software was Mac-only. Even though there is a big demand for an Android application, they decided not to do it, because their priority was to create an app for Apple TV (ignoring the fact that there’s no visible demand for it and that the Android market is way larger than that of Apple). When it comes to Linux support, they first promised that it’s just a matter of time. Later they changed their view on Linux and said that it’s not going to happen. They are promising an SDK, but it’s still not there…

Their licensing is weird, too. When you get you hands on the camera, you can immediately start taking pictures. No License mentioned anywhere. But if you browse into the Menu -> About and scroll all the way down, you will find out that by using the camera you accept their EULA with an link to the EULA. I wonder whether this is even legal. I mean – so far any software that requires to accept EULA I remember shows the EULA before the installation, or before the first use. There was always an option to refuse it, no matter whether it was software like Photoshop or a software running on a smart TV. But with Lytro, you accept the EULA implicitly (at least it looks like that from the About text, IANAL).

Better Lytro Desktop?

The series will continue with details of development of  Lyli (Lytro Linux), a tool which aims to be a free alternative to Lytro Desktop.

Next time I’m going to dive into the protocol that is used to download files from the camera.