musicmatzes blog

software

I'm back from the 31c3, which was absolutely awesome for me! It was my first time at the congress and I met a lot of great people there, so it was a great success.

Richard Stallman, Matthew Garret and other great guys were hanging around at the 31c3, I had a chat with the gnupg maintainer and some students from the Netherlands, people from the Free software foundation and listened to discussions with a gnunet developer.

We, as a project, presented our semester project by giving a lightning talk and hacked a lot on it, too.

So, from my perspective, it were awesome days and I will be there next year again! tags: #programming #software #ccc

I already wrote about the project me and some friends at my university are currently doing. One of my team mates came up with the idea of porting the codebase from C to C++, yesterday the appropriate issue was opened Yesterday, to discuss it. I'm not sure what to think.

The idea is to port the codebase as soon as possible to C++. I do not like this idea entirely, as I think the port should be done after the project phase, but not within. I consider myself at a newbie-like level when it comes to C++ and I think other project members feel almost the same, maybe better, but not on an expert level or whatsoever. Given the fact that we're already running out of time, I think a port of the (30K LOC) codebase would quite take some time and would cause the project to be delayed even more.

So I'm trying to push back on that part. A port after the project phase would be another question, which I want to talk about here.

First of all: I don't think a port to another language is required, as I consider the codebase as very clean and carefully designed. The architecture is good, the code is well documented, the abstractions are clearly defined. A port to another programming language would have a certain level of impact on this, but I think we are able to handle that. I see the improvements which could be made by a port to a OOP(-like) language, though.

Having inheritance build into the language, having a template-like system in the language and having methods, virtual functions and the like would cause some redesign but also some improvements.

My project mate suggested C++ as language. Now, the careful reader knows that I don't like C++ that much. Some of my points are maybe valid, some not. But well, this is a very opinion-based topic, and I won't go into further detail or discussion about that topic here. What I think, though, is that it would be nice to port to a language which gives us more power (simplifying to the terminus “power” here to refer to possibilities to do abstractions, building complexity and the like) and security. I think C++ gives us more power about the code, which is very good. I don't think C++ gives us more security, meaning secure code. I think one can very simply do the same mistakes in C++ as in C, speaking of semantics of the code. For example you can create data races, thread related problems or memory corruption in C++ as well as in C.

That given, I consider C++ as an improvement to the code, but not the best possibility. My opinion is currently that a port to Rust would be a much better option, as Rust gives us memory safety, prevents us from doing nasty things with memory, including all the thread stuff. Given the fact that none of us is able to write Rust on an expert level by now, the question of doing the port within the project phase or after is answered automatically. Also, Rust is not stable yet. I would at least wait for version 1.0 of the Rust language before doing the port, possibly saving some time of Rust-to-Rust porting.

I still don't think a port is necessary and I really like the code we produce. I can see the advantages over staying in C, but for me personally, the disadvantages overweight by now. This may change in future, but for now and for the rest of the project phase, this is my opinion on the topic.

The discussion on github is not done yet, of course. I will carefully propose my opinion there, as this has become a very explosive topic by now. This article was just written to be a short overview over the topic and also to be a summary of my thoughts.

tags: #programming #c #rust #c++ #software

From today until friday, there will be a number of presentation for software development tools and basics at my university. I organized this with a friend of mine as preparation for our semester project.

We will talk about 9 different topics:

  • bash scripting
  • git and github
  • C programming (no basics but advanced stuff)
  • How to properly document source code
  • C++ programming
  • How to use gdb and valgrind
  • How to use cmake
  • Threading in C and C++
  • Introduction to OpenGL

in this order. Three of these presentations are held by myself: The one one git and github, the one on source code documentation and the gdb/valgrind one.

My slides will be, of course, published on github, as soon as the presentations are over. Note that they are entirely written in german.

These presentation will be a preparation for our semester project, which will be written in C. So, some of these presentations are not relevant for the project, but they are interesting anyways. We initially wanted to teach ourselves how to do things properly. Then, some more stuff got into the list of presentations and we decided to make the presentations open for everyone, so everyone can benefit from them.

Today, the first two (bash scripting and git/github) will be sermonized.

tags: #software #tools

This is the 24th iteration on what happened in the last four weeks in the imag project, the text based personal information management suite for the commandline.

imag is a personal information management suite for the commandline. Its target audience are commandline- and power-users. It does not reimplement personal information management (PIM) aspects, but re-uses existing tools and standards to be an addition to an existing workflow, so one does not have to learn a new tool before beeing productive again. Some simple PIM aspects are implemented as imag modules, though. It gives the user the power to connect data from different existing tools and add meta-information to these connections, so one can do data-mining on PIM data.

What happened?

In the last four weeks, not that much happened. Mainly, because I was on vacation. Semester ended on Feb 21st, so from there on I did exactly one thing: Enjoy my free time.

Nevertheless, we got some things done in the imag codebase:

  • #801 merged the initial support for annotations.
  • #897 merged a new feature which gives us the possibility to build imag with the early-panic flag, which causes the store to panic on a failure rather than to throw errors. This is mainly for debugging, not for production use.
  • #900 merged improvements for the libimagstore documentation.
  • #901 merged some notes on long-term todos which would perish in the github issue tracker.
  • #902 merged some improvements on the Ruby API.
  • #903 improved the libimagrt documentation.
  • #907 updated clap.

Four PRs are not in this list because they are too trivial.

What about Ruby? Well, because of the little progress, nothing happened in regards of the Ruby bindings. But we get there, I promise.

What's coming?

I don't know yet. My 2nd semester for the masters course just began and I really don't know what the workload will be. So... this is all in all a rather sad update, I guess. Progress slowed down a lot, I don't know what will be there in the next four weeks...

We'll see...

tags: #programming #rust #software #tools #imag

I have to do a semester project in my fourth semester at my university. I already started planning a bit and me and others started writing a project specification, as we want to get this project done. The project has to be a software project, maybe included with some hardware stuff.

I don't want to talk about the project itself now. I want to talk about the bad fact, that we need to do some planning on software architecture and software engineering beforehand, but we (I) don't know how. We have these lessons in 3-5th semester, which is too late in my opinion, as the project is in the 4th semester. I'm currently planning the software, and we are thinking about a modular software setup, where we have one kernel which provides some infrastructure and modules which implement the actual functionality. Sounds great, I first thought it will be great, but I think it will not be. I ran into an argument with a good friend of mine yesterday. He argued that this is not how software works, in manner of how people want to develop software and how people want to use software.

The UNIX idea

The first idea is, we have a UNIX-Philosphy. We have very small programs which can do exactly one thing as perfect as possible. This is the idea of UNIX, and each piece of software should be designed with this philosophy. We could design our software to work in exactly this way, no problem! This implies, that we don't have a big infrastructure. No framework or so. Just the small programs and a bit of abstraction around them to be able to “link them”.

The other point

But. There is always a “but” in there! If we want to have a lot of features and a lot of possibilities what the software is able to do, we must have good bit of abstraction. That's the first point. The second point is: A user does not want to install a software and then install modules for it to enable himself to do basic things. So, the software must provide a minimal set of functionalities, which must be buildin. And this is exactly the opposite of the UNIX-Idea. We want features, we don't want them to be outsourced, as it is not as userfriendly as it could be, so we have to break UNIX.

Is there a balance?

This is a double-edged sword. Or maybe a trible-edged one! We have three points:

  • UNIX-Idea
  • Much features
  • Modularity And they don't harmonize. We have to break one of these points to fulfill the other two! Maybe there is someone out there who knows a solution to my problem?

The idea

My friend argued, that we should build one program which is able to do all the stuff we want to be able to do, and let others just “hack in” their functionality, as people do it in the kernel! I think the linux kernel is a very good example: There is a bit of infrastructure, but people always break things to introduce a new device-driver or whatever. His idea for our project would be the same: Write a kernel which can do a lot of stuff and let users hack in their stuff. The kernel has a interface to let the user load modules into the kernel, but the kernel per se is runable without them. And it works. So, we should provide a possibility to let people hack on the software without changing the actual software (by a module-interface or whatever) and, if they want to, let them add features to the software itself if they want to in a easy way. I don't know if this is the way how to do such things, but for the kernel it works! Maybe this is a good idea. I don't know. Tell me what you think!

tags: #software #programming