musicmatzes blog

open

It happened that I ordered a new mobile phone for myself. And because I don't want to have a google account, pre-installed facebook Apps and the like, it is a OnePlus One.

The order

Well, to order a oneplusone you can go to amazon and order it for like 433 Euro (64 GB version). Or you go to the oneplus store and order it for 299 Euro, which is what I did. I also ordered a screen protector and a case for it, to protect it even more.

But well, if you want to order from the manufacturer, you have to register on their page, which pissed me off a bit. The second problem was that you can only pay via Paypal and because you order from non-germany, you have to setup your Paypal account with a credit card. I do not have a Paypal account (because it really sucks) – so I asked someone else to pay the order for me and transfered the money to the persons bank account.

Unboxing

The One arrived seven days after I ordered it. It was absolutely nicely boxed, though some boxing was rather ridiculous: I understand that the power adapter has to be boxed separately, because of adapter variants. I do not understand why it has to be boxed two times – one time in a box, another time in a plastic-foil.

Screen protector

I also ordered a screen protector. It was shiped together with the One, nice! I applied it accordingly to this tutorial and I managed to get only one really tiny bubble under the protector foil. Well done!

Update!

Of course, when starting the One for the first time, it asks you to insert your google account data, etc. etc. I do not have a google account, so I was really pleasant surprised when I was offered a “skip” button!

As I do not have a micro/nano-SIM card yet, I also skipped the SIM setup.

Then, after some localization and skipping, I was offered to update the phone from CM 11 to CM 12. I did this, of course. It was really fast, although it said it would take up to 20 minutes. While updating it told me that 128 Apps are optimized. I always thought CM comes without Apps preinstalled? Well... We will see.

Initial setup

After applying the update I was asked for several things again, including google account data. Of course I switched off what I could switch off.

I also disabled everything the google apps want to do. None of the google apps should now be able to access my texts or other data. I hope.

The initial setup was fun. I really enjoyed using the device. It is a bit heavier than my old device, but it is also a few inches bigger, so that's completely okay.

I really hope I can get my SIM card as soon as possible, so I can start using the device properly.

What really bothered me in the first place: I have a 64 GB device. I can use about 55 GB of this – copying music will be painful! But well... I solved that “issue”. I found out, that one can install git-annex on Android. So I did that and just imported my complete music library. It took a rather long time to create the 44771 files and 3913 folders on the device. But having git-annex available on my Android device is a great plus point. So I don't have to care about syncing the files and so on, I just can use git-annex and it does everything for me. I just have to be careful with the available memory, as 55 GB can not handle my 500 GB music library, of course.

And, just you know, I do not use the web interface. I use the terminal emulator, of course!

But then, the disillusion: The music player didn't work with the symlinks git-annex generates. So I removed the git-annex repository from the device and copied music to it as I am used to.

Sync with owncloud

Well, syncing with owncloud was a topic. I thought it would be easy, but it wasn't.

There is this DavDroid app on both the market and F-Droid, which can by used to sync between caldav/carddav servers and the device. I entered my owncloud data and synced, but it just won't work.

So I filed a bug in the forum of the developers, but they couldn't help me with my problem (though they responded really quickly and were really nice at all).

So I tried other synchronization apps and finally landed with CalDAV Sync Adapter and carddav sync free which worked.

Now I have everything set up to use the oneplusone as my daily driver! Yay!

A gem I found

I found a nice app in the f-droid as well: whohasmystuff, which can be used to keep track of things you lend to someone. Really nice and basic app. It just works™.

tags: #android #cmmod #linux #media #music #open source #software #oneplusone

I started a project some time ago, where I develop a template for a wiki which is statically compiled into a html page. As the template is more mature now, I want to introduce you wiki.template and explain why I wrote it.

Once upon a time...

If you read this blog you know that I'm a member of the NixOS community. The NixOS community has, of course, a wiki. And the quality of this wiki is bad. No really, it is just one large page (the landing page) linking to sub-pages which are more or less maintained and contain only snippets of information. Sure – there's a lot of content in there, but (especially beginners) one has to search for it. You can't simply find it.

That's why I wanted to have a new wiki for the NixOS community. And because I like git, I wanted the content to be stored in a git repository.

So I came up with the idea to recreate the NixOS wiki and start it from scratch. Of course, the content of the original wiki has to be migrated to the new wiki then, but this has to be done carefully and by hand to ensure that things are ordered and easy to find afterwards.

The requirements

The requirements where rather simple, but nevertheless important to me. As already said, I wanted to have the content version controlled with git. The templates and markups for other data should be version controlled as well, if possible. This way, the content (or whole wiki) can be distributed with git, hosted on github or similar hosting platforms and so on.

I wanted to be able to customize the style of the wiki completely and I wanted to be able to write snippets of markup which can be reused, such as a warning-alert template where you can pass custom text and get a red alert box in your wiki page. Pretty normal stuff for a wiki.

Syntax highlighting, TOC-generating, all these things should be integrated or available through plugins (or there should be the possibility to write such plugins).

So I searched for wiki software with git backends...

The state of git-backend-driven wiki software

The state of wiki software with git backend is bad. No, it is even worse. There are actually two projects I had a look at and one which is written in Perl (and I didn't have a look on this one, because Perl).

gitit

First of all, there is gitit. Gitit is a wonderful piece of Haskell software. It works great and is fast. But it has its issues:

  1. No Templates. Period.
  2. Content is checked in, but neither templates nor style information
  3. Haskell. So writing plugins – nah, not really.
  4. Just few plugins available

So it was pretty clear that gitit is not an option for me.

gollum

Gollum was the other alternative. Developed by github, ruby thing, sounds well, right?

But. There's a big but.

  1. No templates
  2. No plugins
  3. No custom styling or at least no documentation about it

It was clear to me: No option!

The solution

Well, the solution? Just write it yourself! And that's what I did. I started to work on a template for a wiki which is statically compiled with nanoc. Later I switched to jekyll.

Compiling the wiki to a static site has several advantages. First of all, hosting the site is cheap. A common web server can host thousands of pages without even noticing. Of course, you are also protected against hacking and all this stuff, as you do not have the problems dynamic websites have.

But these are common advantages of static compiled sites. An even bigger advantage is, that contributions to the wiki must pass a review-process of some kind. Of course, I will not grant push access to the repository to anyone and of course nobody gets access to merge pull requests, besides myself. I will protect myself against pushes to master as well, so each change to the wiki has to be reviewed. And that's what matters when it comes to quality: Changes must be reviewed.

Besides this big advantage, I do not have to care about updates (of the compilersoftware). I can do them locally and roll back if they fail. I do not have to keep track of spam bots, security updates, user account data, etc. etc. etc.

So here's the story how I wrote the template:

wiki.template

I started the project with nanoc, the static site compiler I love. The project is at version 4 these days and the compiler is really really good. It is flexible, scales well, fast and a joy to work with.

I just failed integrating foundation, the CSS framework I wanted to use. I played around with Jekyll a bit, but wasn't able to get Haml working. But at some point, foundation seemd to be more important than Haml, so I switched to Jekyll.

I also thought of the option to build the site with Jekyll directly from the github repository and build a github page with it, just because this way I can save money for hosting. I still think of that option, but as I use Jekyll with plugins I cannot build it on github directly. So I searched for tutorials on how to build it with travis and deploy my github page from travis. This is documented and a known as working.

Current state of wiki.template

To get my stuff working, I had to use some plugins. And these plugins basically work for me, but the code was either a mess or lacked features I wanted to have. So what did I do? Right, I forked them and send pull requests to the maintainers.

At this very point in time, I have three pending pull requests to these plugins, two of them just normal “cleanup codebase” PRs, one feature. I also opened issues for other features I do not necessarily need but would like to see implemented. I would implement them myself, but well... not enough time.

So what is the current state? Well, wiki.template is basically usable. I want to integrate some more features and it completely lacks of documentation on how to use it.

But these things will be done soon and I hope I can then create a fork of it to start my NixOS Wiki.

The NixOS Wiki

I already announced the NixOS Wiki fork (semi) officially on the NixOS mailinglist. Of course, as always in such communities, a discussion started on whether to do such a thing or not, which software to use and whatever. I don't care about this, I will simply do this and we will see whether it succeeds or not. Discussion all over the place helps nobody.

tags: #git #linux #nix #nixos #open source #programming #software #wiki

This semester is at its end in about one and a half week. It was a good semester, even if mine is not over yet (I'm in my praxis semester right now and I have to work four weeks longer than the other students – but they have exams)! Since one year I'm the leader of the local LUG (Linux User Group) and I really like beeing it.

As far as I can tell I will be the leader for the next semester as well, but I guess one year is a great point to reflect and look back what I've done and what was awesome and maybe even what was not so good.

What was

So, in the last year, we had (during the semester) one talk each week (in alphabetical order here):

  • 31C3-Review
  • C++ – Arcane and rusty (2 parts)
  • Docker
  • Email (In)Security
  • FTP-Searchengine
  • Fish
  • Git-Intro
  • Go
  • Nix(OS) (my talk, actually)
  • Pimp my x86 (2x)
  • Presentation of a Bachelors Thesis
  • Presentation of a semester project (2x)
  • Racket
  • Regex Workshop
  • Reverse-engineering Workshop (2 parts)
  • Ruby on Rails 1
  • Ruby on Rails 2
  • Rust

Almost all talks were held by students, only one was help by an ex-student, who does one talk each semester for us. And they were awesome.

We also managed to go to the 31C3 as a group, which was an awesome experience and I'd really love it if we manage to go there this year as well. I also started a rewrite of our website, hopefully I will finish it this weekend, so I can do a talk about it next week, which is the last week where a talk is held in this semester (traditionally we do a “Pimp my x86” talk at the very end of the semester, where each student is allowed to talk for about 10 minutes, so it is lightning-talk-ish).

Plans

So next semester I really want to start organizing for the next Unix Friends and User Campus Kamp (Yes, the shortcut for this is UnFUCK). I really hope we can manage to get this event in the following semester, in the early months of 2016. It would be awesome to have a full weekend of nerdish talks and awesome people hanging around in our university, talking about Linux, programming languages and other foo which scratches my fields of interest.

And, of course, I hope we have some more awesome talks.

tags: #linux #open source #programming #social #software #tools

So I'm in my praxis semester at the moment, and I have to work with fastcgi++, a C++ library for fastcgi. And it is a nightmare! Here comes why...

So first, the codebase of fastcgi++ is a mess. Code snippets like

bool foo = someFunction();
if (foo) return true;
else return false;

are everywhere. You really don't want to read that kind of code. And yes, you have to actually read this code because there is no documentation on how to use the library! There is a wonderful doxygen-generated API documentation, but that does not help you because, yeah, you know the types and the interfaces now – lucky you! How to build a fastcgi module with them – figure it out by reading through the codebase!

Secondly, you are not allowed to define your custom accept() handler. You have to inherit from a Request class template and you have to implement the virtual bool response(void) = 0; method. Okay, no problem, I can do this! But then, you want to start accepting requests. You do this by creating an instance of a class called Manager:

Fastcgipp::Manager<MyRequestInheritedClass> man();
man.handler();

or something like this (this is no real code, I just want to demonstrate how it looks like). The manager accepts one connection (through many layers of abstraction, actually), creates an instance of your request class and calls response() on it.

Well, that's not a problem, is it? Well, it gets to a big problem if you want to be able to handle multiple requests at once, speaking of multithreading/concurrency here. It is a huge mess! My codebase exists of three classes, actually. A ThreadedRequest class, a BlockingQueue where requests get stored thread-safe and a RequestDispatcher which is a singleton which runs several worker threads. These worker threads take the requests out of the queue and process them if they can.

The ThreadedRequest class puts itself into the queue, which is a member of the RequestDispatcher singleton instance. The problem is not that it is unnecessarily complicated to build these 1-N multiplexing thing, but that the library provides an interface which enforces you to couple your classes realy tightly. And this is freaking bullshit.

So, finally: I'm building a wrapper lib around fastcgi++ to be able to handle requests in a concurrent way. And it sucks. But it works.

So, my conclusion is: Stay away from this bullshit library. And even from fastcgi if you can. Apache for example offers a way to write modules, so you can simply write your own module for apache if you need to – which is faster anyways!

If you have to use fastcgi, consider writing your own library!

tags: #c++ #linux #server #open source #programming #software

I started a fork of a diary application which is written in bash, because I thought there are some things missing and some features could be added – and the repository of the original author was really old.

I started to pretty it up and implement some 21st-century things so it becomes a really nice note-taking application.

So, initially the application was called “diary” and developed on sourceforge, by Jamie Briggs. Someone created a fork, named “diary-f”, which added some features.

The lastest change in the original repository is from February 2013, which is almost two years ago by now. The last change in the repository of the fork is from three years ago – even longer, yes!

So, the application per se is really good one. It is just a small shell script, but it works really good for me. Anyways, I missed some features, namingly:

  • Multiple separate entries per day
  • Everything should be kept in git, so I know when I edited the articles
  • GPG encryption everywhere

I started implementing multi-file support directly in the “diary-f” repository, but then decided to create a fork, as it won't be compatible with the original software anymore. By now, three things are done in the repository: I refactored the codebase to fit my coding style (well, it is still bash, isn't it?), mutli-file support as said and git support. I want to implement gpg support next and maybe the ability to add attachements to entries. And after these things are implemented, I want to be able to search the entry repository for certain entries in a simple way, which could be difficult, given the fact that everything is encrypted in there.


If you're interested in the application, I'd welcome pull requests for almost everything. Contributing guidelines are:

  • Document your work, how do things work?
  • KISS
  • DRY

That's basically it. I'm looking forward to your patches! tags: #bash #git #open source #programming #shell #tools

So, it's just a few days before christmas, so let me post a short update on waysome! We're currently implementing EGL support and we should be able to implement the API-window interfacing afterwards, which enables one to issue window-moving though the API.

I guess this pretty awesome! Actually, EGL gives us a hard time, because the interface just sucks.

We have already more than 2k commits merged into the development branch, more than 600 issues/pull requests were opened and nearly 600 are already solved. After window moving is implemented, we will start with heavy testing and debugging, to get it to a certain state where it is stable and as much as possible bugs are removed.

I actually hope we can get a basic window manager until the end of the semester, as we're running a bit out of time here.

You are welcome to contribute or just watch it (but we would really prefer that you send us patches, contribute by testing and so on) on github. tags: #programming #open source

When creating an open source project it is really important to get stuff done and working as fast as possible. As soon as the initial project phase is over, things calm down and if the stuff is not working properly at this point, people lose interest.

So, you should try really hard to avoid that and get stuff done as fast as you can, so you have something to show. This does not mean that your stuff should be complete or everything should work as expected, but you should be able to show some basic features of the software, so you can inspire others to hack on the project and improve it.

Because that's what keeps a project living: people and contributors which want to bring the project forward. And if you can show them things, they might get enthusiastic about the project and start contributing!

So, you should try really hard to get something which basically works.

Speaking of my semester project, we're almost at the point where we have something which basically works. We have some very basic functionality, which means we can start a terminal and use it (not everything works as it should, but we're working on it). So, we can show something.

The problem with software is that you don't actually see what amount of effort is put into it. An experienced programmer can, of course, see it, but not the average guy from the street. So, with complexity of software and source code, the need to get something which basically works and can be used, increases rapidly. We in our project have written source code since end of September, we just hit and passed the 30k LOC mark. That's great, because we have a great infrastructure of code, which is really powerful in my opinion. But, by now, we “only” can start a terminal and have some background image. We are not yet able to do more things. This will change in the next few weeks, but by now, a user can only see some really basic stuff. But there's a huge amount of effort put into the project.

The User can't see it. This is were things get complicated (also in regard of our assessment of our supervising professor). As soon as some more infrastructure is merged, we can actually start implementing the API, which can then be used to actually show things, so we hopefully won't have this problem in a few weeks anymore. But until then, I consider this stuff as really critical.

We also have to provide a documentation of the project phase, which will be included in our grading as well, so at least that is not as ciritcal as it seems, but I would really love to have a working software at the end of the project phase. And by now, I don't see we get there. It is not that much left to do, but much enough...

So, in my humble opinion, it is really important that one gets working stuff (in a open source project), so it can be shown to others and can advertise itself thereby.

tags: #programming #open source

When developing open source software, one cannot chose who participates on the project. At least not when it's the kind of open source project “I start something on github/bitbucket/whatever and if people want to contribute, they can do it”.

When developing open source software in a team, for example in a project from your university or so, you can, indeed, choose your project members. You can't do this every time, because some universities have some fucked up rules that project members get chosen randomly or something, but sometimes you can.

So here are some short notes what you definitely have to take care of when you're in the position where you can choose your project members:

  • Review capabilities

Your project members must be able to do constructive reviews, spreading positive criticism. Otherwise, they'll freak you out! I gurantee it!

I always try to be constructive when reviewing source code. I try to avoid terms like “this sucks” or “this is complete bullshit” – these just worsen the mood in the team!

  • Skills are not enough – you need enthusiasm

You can choose the most skilled guys around. You won't succeed with your project. Choose people that are not that familiar with the environment but who have enough enthusiasm to succeed. I guarantee you – they will surprise you!

I don't think I'm the most skilled programmer out there – of course not. But I have enthusiasm which keeps me attached to something and I'm willing to improve myself every single day. I think that's much more important than skills per se.

  • Enthusiasm + Skills + 24/7 work = Burnout

This is more an advice for you directly, but it can also help you when choosing your project members. If you have enthusiasm and enough skills to succeed with your project, don't work 24/7. It will kill you! Take a break every 7 days or something. Do something else. In another environment. You will be much more efficient afterwards, when coming back to the original project!

I noticed this myself, after 8 weeks of daily working on a project, I had to stay back for one day. The day after that day was much more relaxed than the days before!

  • Less skills, but will to learn is more valueable then the other way round

I also like to suggest: Choose members who are not that skilled but willing to learn new stuff. If you do the other way round, they might do a great job, but they won't get better and they will do mistakes over and over again.

As I already said, I don't consider myself as the most advanced programmer out there, but I'm willing to improve. I make mistakes – everyone does, of course! But I always try to think back of previous mistakes I made and I'm constantly trying to avoid making them again.

  • If your lifeblood is in the project – always remember that for other project members this is not true

It's sad, but some people do open source just for the sake of open source, their graduation or some assessment at the end of the term or something like that. Always remember: These people are everywhere. And if they are in your project (you may not notice that when choosing them), you can't change that. Just take it as is.

When I'm writing software, my heart is really in it. For others, this is not true. I had a hard time learning this, but it's true. Sadly.


Of course, these points aren't carved in stone. But they are taken from my experience and maybe others can confirm. At end, everyone has to make their own experiences.

tags: #programming #open source

In my semester project at my university, we're developing a wayland based window manager for power-users, featuring very granular configurability and abilities to customize it.

As the lectures in this semester started on monday, we started hacking it on monday as well. We are 5 team members, me as repository maintainer and guy with the how-to-git knowledge, a close friend of mine doing the workflow and milestone organisations (as kindof scrum-master) and three other close friends of mine, all in the same course of studies.

In my opinion, we are very fast for this first week. Of course, when doing a scrum like approach, you have to get to milestones in short sprints, but I never imagined that we can do two milestones within the very first week, one of them beeing a picture on the screen! That was a very good experience, beeing that fast on the very first strike.

The next milestone, we want to reach in five days is using a desktop application with the windowmanager.

I almost forgot: The window manager is called “waysome”, for “wayland” and “awesome” in one word. We had this name in mind from the very beginning of the idea of writing a window manager on wayland, so we simply took it.

So, why is this so special? Because it is new! We use wayland, which is absolutely new technology when it comes to display server like things on linux. But not only this is new. We also do not define a behaviour of the window manager, but expose an API through which the user can send commands to the window manager for defining its behaviour. The API is meant for beeing used via scripts or utility programs the user has to write himself (not i3-like with “i3-msg bla blubb”). So the user has the power about every aspect of the window manager. This is also why we do not call it a “tiling” window manager, because it doesn't do tiling. If the user writes a configuration/script/plugin which makes the window manager behave like a tiling window manager – fine! But we don't define this!

The very idea is that you can “rebuild” your favourite window manager. You like i3, for example? But you want wayland? So use waysome and write a script which makes it behaving like i3! If you don't like some quirks of i3, you can simply leave them out! If you like awesome more, your can make waysome behave like awesome. Or whatever other window manager you like!

So, that's the idea. Our semester project should be finished at end of January 2015, I hope we can make it. We also have the idea of going to 31C3 and holding a short lightning talk about this. Maybe we will do this.

For more information and watching us working on it, feel free to watch us here.

tags: #programming #open source