Comparison of Free UML Tools

There is a lot of different UML modelling software to choose from. Here, I will create a short overview over the most common free uml tools. This list is not meant as an exaustive review, but more to give you an idea what each of the tools can to so you have an easier time choosing the uml tool that is best for you.


Linux: Installing Ruby on Rails

The official Ruby on Rails documentation has a good guide on how to install Ruby on Rails. I still had some problems setting everything up, so here I will describe how I installed Ruby on Rails on Linux (LMDE).

Installing Ruby on Linux

Before installing Ruby on Rails we need to install Ruby as well as Ruby Gems and sqlite:

sudo apt-get install ruby rubygems sqlite3

Installing Ruby on Rails on Linux

sudo gem install rails -V

-V because otherwise you will get no direct feedback. Downloading and installing Ruby on Rails takes a lot of time, so without verbose output it looks like the install of ruby on rails stopped.

If the installation hangs at this step:

Installing RDoc documentation for rails-4.1.0...
rdoc --op /var/lib/gems/1.9.1/doc/rails-4.1.0/rdoc lib --title rails-4.1.0 Documentation --quiet

Try to install Ruby on Rails without documentation:

sudo gem install rails -V --no-ri --no-rdoc

Installing Ruby on Rails on LMDE (Linux Mint Debian Edition)

On LMDE, the above steps did not work for me, I got the following error message:

ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

    from extconf.rb:1:in `<main>'

This could be fixed by installing the following package before installing Ruby on Rails:

sudo apt-get install ruby-dev

Installing additional dependencies for Ruby on Rails

The Ruby on Rails server does not work without a Javascript Runtime (You would get the following error when starting the server: Could not find a JavaScript runtime.). You can install execjs with this command:

sudo gem install execjs

execjs depends on nodejs, so go ahead and install that as well:

sudo apt-get install nodejs

Creating a new Rails Project and starting the Server

Now you can go ahead and check if everything works:

rails new TestProject
cd TestProject
rails server
If you now visit http://localhost:3000/ you should see a page displaying: Welcome aboard You’re riding Ruby on Rails!

Installing QGIS on LMDE (Linux Mint Debian Edition)

The solution that I found for installing qgis (Quantum GIS) on LMDE (Linux Mint Debian Edition) is not optimal, but the only one that worked for me.

I am getting QGIS directly from the QGIS Debian repository and I am temporarily adding the main debian repository to my sources, because QGIS depends on some packages that are not included in LMDE.

LMDE: Install QGIS

1. Add QGIS to your sources.lst:

sudo vim /etc/apt/sources.list
# add:
deb jessie main
deb jessie main

After this, do not call apt-get upgrade until you removed these lines.

2. Now you can install QGIS:

sudo apt-get update
sudo apt-get install qgis

3. And at last remove the added lines from your sources.lst.

sudo vim /etc/apt/sources.list
# remove:
deb jessie main
deb jessie main

sudo apt-get update

This step is important, as otherwise a call to apt-get upgrade could break your system.

That’s it, now QGIS should run on your installation of LMDE.

Linux command line Image Manipulation for Android Developers

Sometimes while developing Applications for Android one has to transform a lot of images at once. In those cases, it is easier to use the command line than standard programs such as gimp.

Resize multiple Images via Command Line

for i in *.png; do convert "$i" -resize 50% "${i%%.png*}.png"; done

I use this a lot when developing for Android, as it is best to supply differently sized images for different devices to save memory.

Lets say I want to display a couple of square icons. The width of the icons should be 1/4th of the screen. I would create base icons with a dimension of 500×500 pixels. The images should be 60×60/80×80/120×120/160×160 pixel for ldpi/mdpi/hdpi/xhdpi respectively. What I do is copy the base images to the correct subdirectory of the res folder and execute the following commands in it (the percentage is calculated by dividing the desired width through the base width, for example: 80/500 = 0.16 = 16%):

# from base
# to xhdpi:
for i in *.png; do convert "$i" -resize 32% "${i%%.png*}.png"; done
# to hdpi:
for i in *.png; do convert "$i" -resize 24% "${i%%.png*}.png"; done
# to mdpi:
for i in *.png; do convert "$i" -resize 16% "${i%%.png*}.png"; done
# to ldpi:
for i in *.png; do convert "$i" -resize 12% "${i%%.png*}.png"; done

Optimize multiple Images via Command Line

I use optipng as well as advpng to optimize the size of my images:

optipng *.png -o5
advpng -z --shrink-insane *.png