Notes from first encounter (on Linux)

Hello everyone. I decided to check OF out this weekend, and these are some of the things I’ve noticed so far. I was not sure which category to post this, hope it is okay here. The post became bit longwinded, and might appear whiny and nitpicky. Sorry about that. Anyways, here we go:

  1. I tried to login to this forum with my github account, but it failed for some reason. I’m using two-factor auth, maybe it has an effect?

  2. I prefer simple text-editor+make workflow over IDEs. Seeing that most of the technical stuff for such workflow is actually in place, I think some improvements could be made in documenting it. Also the download page could note that the Linux-download does not actually depend on Code::Blocks despite the naming. Or maybe you could provide a CB-free/Makefile-only release.

  3. On a slightly related note, what is the difference between Linux and Linux64? OF is distributed in source form, I don’t think there should be any significant differences between 32 and 64 bit Linuxes necessitating separate downloads.

  4. While we are talking about makefiles, I think it would be really cool if they had targets for crosscompiling to Windows with mingw (and maybe something equivalent for OSX?). This is not that important though, and I understand that it might require a significant effort.

  5. I’m not a fan of the maze of scripts that are in place now. and should be replaced by single makefile, so that you could just call make OF or make PG or something along those lines. There are also some weird chowns in those, I guess they are guards against running the scripts accidentally as root. Maybe it would be better to just bail out (with optional override) if there is some uid mismatch going on. Besides I don’t think the script even works correctly (who am i does not print anything on my machine, maybe you meant id -u instead?)

  6. Continuing on the scripts, I’m extremely hesitant running some random scripts as root. This is mostly documentation issue I think, the setup guide could say somewhere in the top that “These steps are for configuring required libraries. Expert users can install them manually (refer section $FOO for list of dependencies) and skip this section” or something along those lines.

  7. The docs/ seems to be outdated wrt projectgenerator:
       > It will be compiled when you run the script.

  8. Because the Linux downloads were just for Code::Blocks (which I didn’t want), I thought I’ll just pull the git repository instead and go from there. It took a moment to realize that it wasn’t as straight-forward path as I had anticipated (biggest stumbling block being the lack of makefiles in examples). Documentation about installing from git, and about the various scripts in scripts/dev/, could be improved.

  9. After building projectGenerator, I noticed that it didn’t actually work. When clicking the name button, it variably either froze or crashed. Tracking the issue down, I found that the issue was in invoking native (GTK) widgets, most likely something to do with threads. This was also my first contact with the internals of OF, and I’m sorry to say that it looked bit messy.

  10. First of all, why is projectGenerator called first projectGeneratorSimple and then internally “testApp”? I guess the former makes sense if the current version is result of a simplifying rewrite, but the latter is just bad.

  11. The code is stylistically inconsistent. There are extra spaces all over the place, and also lots of extra empty lines. Take a look at testApp::draw() in testApp.cpp. Besides the various white-space issues, there is also the question of what is mode? Why isn’t it consistently an enum? Then there are some random lines of code commented out, which I consider a bad practice.

  12. As I continued my fall down the rabbit hole, my next stop was ofSystemUtils.cpp. First thing I noticed as I scrolled around the file was that my editors syntax hilighting got confused at some point. That is because there appears to be ObjC mixed in at OSX sections. Which leads to my second impression; it is a maze of #ifdefs for different platforms. The file probably should be broken down to one file per platform or something to make it easier to read and maintain.

  13. Also the whitespace woes continue here, exemplified by initGTK(), function that seemed to be the culprit for the issues in projectGenerator.

  14. It seems bit weird to have GStreamer involved at all in showing a simple text box. The code probably could (and should) be refactored so that the glib loop which seems to be the key here would be shared between GTK parts and GST parts more explicitly. Also, this is the part where I suspect that the threads are causing some problems, although I do not know GTK enough to say if that is indeed the case and how it should be fixed.

  15. And this is where I’m right now, thinking about cleaning and splitting ofSystemUtils up, and maybe then consider adding GTK3 or maybe even Qt support, or fixing up the current GTK2 stuff.

So, not great first impressions, but admittedly some of that might be just me and my choices. But still, I think that OF is interesting looking framework and I hope it’ll continues improve, especially on the Linux front. I’ll have to see how much I myself am able to contribute towards that beside my whining here.