Small successes (and a new project)
2015.06.30.
Introduction
It's been quite some while since I finished a project that I could post here, but I finally got around to one, and did some very minor (but exciting) experimenting (read: trial and error with lots of googling) along the way (I really like parentheses). Anyhow. Here's a quick post to sum it up.
Context
At the beginning of last week I had a chance to take some quick, mostly just introductory classes on a couple topics, the first two days being Linux and GitHub, respectively. Although I'm still not considering using a Linux distribution as my primary OS on any of my machines, it was fun to learn a bit more about how it all works. I did install a virtual Xubuntu (don't judge me, it was on the school computers and I liked the background and the terminal theme) since then, which I'll get back to later.
So the project I've just finished is an SDL2 visualization of just a few sort algorithms, you can click here to go to the project page and read all about it (after reading the rest of this post, of course).
GitHub
I found GitHub interesting, and although I had my worries about using it on Windows at first, it turns out that my IDE of choice (CodeLite) has a pretty neat and functional plugin for git support. As my first try at this thing, I used GitHub all through the coding of this project, although I had a feeling that I'm making commits more frequently than I should be. You can check out the project's GitHub page here.
SDL2 on Linux
After my small git successes, and coding the aforementioned project in the last two days, I felt adventurous enough to try making my new program work on Linux too. Since I wasn't sure if it's done yet, I took my previous project ( Game of Life) and copied that over to my virtual machine. After going through the SDL2 setup steps from the first Google search result ( Lazy Foo tutorials, an excellent resource by the way), I only had a couple of compiler warnings to get rid of, and most of them were fairly self-explanatory.
The most important thing perhaps was changing <SDL.h> to <SDL2/SDL.h> in the includes. After clearing up a couple more errors caused by including the SDL2_gfx headers with <> instead of quotation marks, I was extremely happy when my Game of Life came to life (no pun intended) on the virtual machine. The apt-get installation was just so much easier than setting up SDL2 on Windows was.
The point here is that I now added a Linux-friendly download to the GoL project, including the SDL2_gfx files and a Makefile. As long as you have g++ and SDL2 on your system, a simple "make" command should be enough to build it.
From now on, I'll be striving to make every new published project work on Linux too and include files for easy compilation, but my development environment is still gonna be Windows. Hopefully Windows 10, in about a month.
I have also added Linux friendly files for my new sort visualizer, which now that this article has come to an end, you can go and check out by clicking this link.