Skip to content

Sunday, 6 June 2021

In KDE we have this awesome meta-build system, called “kdesrc-build“. It allows developers to compile tens and hundreds of KDE (and also external!) projects with only a few command line interactions. Since a few years, specifically after the migration from SVN to Git, it is the de-facto standard way for many contributors to update and build libraries, on top of which they develop their applications. This post is about how efficiently integrating it with a QtCreator workflow. (footnote: this does not mean that you should use QtCreator, especially if you are happy with Kdevelop or other IDEs; this post just explains how the interaction works nicely if you do use QtCreator)

Before looking at QtCreator, let’s look a little bit deeper into kdesrc-build. I will not explain how to set it up, how to use it in detail, or how to configure it to use a self-built Qt . I simply assume that you are already configured kdesrc-build and that it works on your system.

In this case, you will have two important files:

  • ~/.kdesrc-buildrc : this is your main configuration file that defines where Qt is installed, where kdesrc-build shall checkout source code, where build directories shall be created and where the final artifacts shall be installed.
  • ~/.config/kde-env-master.sh : this file provides a ready-to use environment for starting applications in exact the same setup as they are compiled with kdesrc-build.

Use QtCreator on the Same Source & Build Directories

Now let’s assume that you have a certain project checked out and compiled with kdesrc-build and then want to work on it with QtCreator.

QtCreator has the idea of configurable “Kits”. A Kit is always the combination of a Qt version, a compiler, a debugger, a CMake version, a target device (if you are not an embedded developer, then this is always your Desktop computer), and a few more things. The importance concept here is that QtCreator assumes that you are taking all these decisions when creating a Kit and then, wherever possible, QtCreator will enforces these settings and overwrite anything that looks different. Thus, for interacting with a kdesrc-build build and install directory, we have to create a Kit that is correctly configured for your specific kdesrc-build configuration.

Kit configuration window in QtCreator

Configure the environment

Until recently QtCreator only supported the setup of the build environment and used this also for the runtime environment when starting applications form QtCreator. In the version I am using (4.14.1), there is still only the main environment; for later versions you might need to adapt the following.

Into this environment you have to set several environment variables, which I took from the generated kde-env-master.sh. Either you copy it yourself or just take the following snippet and adapt the KDEDIR and the QTDIR variables.

KDEDIR=/opt/kde/install
QTDIR=/opt/qt5-build/qtbase
LD_LIBRARY_PATH=${QTDIR}/lib:${KDEDIR}/usr/lib:$KDEDIR/usr/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}
PATH=${QTDIR}/bin:${KDEDIR}/usr/bin:${PATH}
QML2_IMPORT_PATH=${QTDIR}/qml:$KDEDIR/usr/lib/x86_64-linux-gnu/qml/:${QML2_IMPORT_PATH}
QML_IMPORT_PATH=${QML2_IMPORT_PATH}:${QML_IMPORT_PATH}
QT_PLUGIN_PATH=${QTDIR}/plugin:${QT_PLUGIN_PATH}:${KDEDIR}/usr/lib/x86_64-linux-gnu/plugins/
XDG_DATA_DIRS=${KDEDIR}/usr/share:${XDG_DATA_DIRS}

Another crucial point is to adapt the CMake configuration to find all build artifacts from libraries that are build with kdesrc-build. For the CMake configuration add one additional line (again, just adapt the path)

CMAKE_PREFIX_PATH:STRING=/opt/kde/install/usr/;%{Qt:QT_INSTALL_PREFIX}

And, well, that’s it.

Now, you can simply:

  1. Open a CMake based project in QtCreator (if you want to use QMake, you also have to configure the mkspec values, which I omitted above) from your <KDESRC-SRC-FOLDER>/src/ folder.
  2. Go to the “Projects” tab and add the “kdesrc-build” Kit for your project.
  3. Press at the project button at the lower left main window (the one that looks like a computer) and select the “kdesrc-build” Kit.
  4. Press compile or press run, and everything is done within the kdesrc-build setup.

Friday, 4 June 2021

Let’s go for my web review for the week 2021-22.


Why the World is Running Out of Computers - YouTube

Tags: tech, cpu, economics, shortage

Per usual the sponsor placement is a bit annoying. Still the content is very interesting if you were still wondering why we have a chip shortage. Complex supply chains for the win.

https://www.youtube.com/watch?v=IOvqN23Sr4o


Even LinkedIn Is Overrun by Influencers | Index

Tags: tech, social-media, linkedin, attention-economy

I’m on that social media for work reason, still oh boy… how much I hate it. This article pretty much summarizes why.

https://index.medium.com/shameless-work-influencers-are-the-bane-of-linkedin-5f458bb046aa


What the heck, z-index??

Tags: tech, web, frontend, css

Where we’re reminded that the stacking contexts with CSS is not tied to the DOM tree… Yay for making complicated rules which means you’ll create such stacking contexts unexpectedly. This article comes with a couple of nice tricks to make things easier though like the isolation property. The CSS Stacking Context Inspector browser extension is good too.

https://www.joshwcomeau.com/css/stacking-contexts/


Best Practices Around Production Ready Web Apps with Docker Compose — Nick Janetakis

Tags: tech, docker

Lots of good ideas on how to use docker-compose in development vs in production. Very web app oriented as the title imply but contains a few nuggets which make sense for desktop or embedded use as well.

https://nickjanetakis.com/blog/best-practices-around-production-ready-web-apps-with-docker-compose


Logging is important – Giovanni Collazo

Tags: tech, logging

Very sensible and simple advises on how to do logging in your application. Just lacks a bit a discussion on how to use the different log levels.

https://gcollazo.com/logging-is-important/


ongoing by Tim Bray · Testing in the Twenties

Tags: tech, tests, craftsmanship, programming

I’ve been banging the testing drum for so long I’d have a hard time to not violently agree with that article. I have a couple of beefs with it though, like the sacrificing encapsulation point but other than that…

https://www.tbray.org/ongoing/When/202x/2021/05/15/Testing-in-2021


On the Diverse And Fantastical Shapes of Testing

Tags: tech, tests

More on the test pyramid debate… As usual looking at the history of a concept and carefully evaluating how things are named is very enlightening. This is a must read.

https://martinfowler.com/articles/2021-test-shapes.html


Conditional HTTP GET: The fastest requests need no response body | Ilija Eftimov ⚡️

Tags: tech, http, caching

Very interesting deep dive into conditional HTTP requests. It fully covers ETag and Last-Modified.

https://ieftimov.com/post/conditional-http-get-fastest-requests-need-no-response-body/


Enhancing Photorealism Enhancement

Tags: tech, neural-networks, ai, 3d, gaming

After the denoiser of raytracing images from Nvidia, here is a neural network approach from Intel to make game output photorealistic. Using the G-buffers as input is particularly clever.

https://intel-isl.github.io/PhotorealismEnhancement/


2.93 LTS — blender.org

Tags: tech, blender, 3d

Not that I’m able to do anything really meaningful and beautiful with it and still… I’m super excited by all the progress they’re making. It’s really great tool and great tech.

https://www.blender.org/download/releases/2-93/


Amazon Tracks Unregretted Attrition Rate, People It’s Not Sad to Lose

Tags: management, amazon

And you thought work culture in that company couldn’t be worse? Well… think again.

https://www.businessinsider.com/amazon-tracks-unregretted-attrition-rate-people-not-sad-to-lose-2021-4?IR=T


Let’s Make It Easy • Woody Zuill • GOTO 2021 - YouTube

Tags: tech, management, problem-solving

Interesting talk about management and why it’s hard. It touches upon problem solving and why we fail at it. In short we often look at symptoms and not problems. To make things worse we often try to solve them at the wrong place out of sheer ignorance.

It’s also a very humble talk which I always appreciate.

https://www.youtube.com/watch?v=Jtt7PAejrFA&list=PLEx5khR4g7PI89_ZS_wz5suqCoqFgv-gO&t=1s


The art of the SWAG - Jacob Kaplan-Moss

Tags: tech, project-management, estimates

Another nice piece about estimates. This time for the tough times when you’re asked a quick ballpark number. The best piece of advises in there: know when you shouldn’t do it at all, and, if you go for it sound vague.

I’d even add “you can never be to vague”. Even if you go for “a few weeks, maybe two or three” very often people here “two weeks”. Don’t hesitate to hammer down the uncertainty in all this.

https://jacobian.org/2021/jun/2/swag-estimates/


Return to Office: Employees Are Quitting Instead of Giving Up Work From Home - Bloomberg

Tags: management, hr, remote-working

Looks like some people fell in love with remote working during the past year. Won’t be easy to let go of it for them (for good reasons IMHO, I’m obviously biased).

https://www.bloomberg.com/news/articles/2021-06-01/return-to-office-employees-are-quitting-instead-of-giving-up-work-from-home


What It Takes to Run a Great Hybrid Meeting

Tags: management, remote-working

That’s a lot of good advises to deal with hybrid meetings (some people on site and some remote). In a way that boils down to “put yourselves in the shoes of the remote participants, what do they see and hear?” but there’s a couple of extra one.

I particularly like the idea of having remote participants being assigned an in-room “avatar”.

https://hbr.org/2021/06/what-it-takes-to-run-a-great-hybrid-meeting



Bye for now!

Wednesday, 2 June 2021

Introduction & the pain

I am a big fan of both KDE and Mozilla software – while no software is perfect, of course, these two I like and trust the most when it comes to my desktop and web browsing respectively. To illustrate, I have been using KDE when it was still called the K(ool) Desktop Environment 1.x, and Mozilla since its Netscape and Phoenix days.

But as both KDE’s Plasma desktop and Mozilla’s Firefox browser each became more and more powerful, making use of their individual strengths started to produce some clashes.

One of the most powerful features of Plasma – and one that I make extensive use of – are its Activities1. I use them to keep different tasks in different environments and as such remove needless distractions.

For example, to list just a few, I have a “Communication” Activity where I keep all communication channels and generic web pages and try to spend as little time there as possible; an “Organise yourself”; a “Blogging” Actvity; and several ephemeral ones for each project I need concentrating on – two recent examples were “Presentation for FRI“ where I did research, wrote and presented from; and “Activity-aware Firefox” where I was coding and testing the script I am blogging about today.

And a feature that makes Activities immensely powerful is that you can stop/suspend the ones that you do not need active right now and it stops all that is happening in it. With this you can save a lot of processor and memory resources. Then later when you start the Activity again, it shows up in the same state it was stopped. Super practical!

At the time of this writing, I have 3 active Activities and 10 suspended/stopped ones.

Now, as you can imagine, often in these Activities, you want to have some web tabs open. And here is where things start to sour. More often than I would like things like these happen:

  • a link opened in one Activity could open in a Firefox window in a different Activity (sometimes even starting that extra Activity, if it was stopped)
  • when resuming a stopped Activity with Firefox in it, it would sometimes spawn other Firefox windows that are not related to that Activity
  • in general Firefox windows tend to move around Activities where you do not expect them to be

At some stage this became a huge pain, especially as every time Firefox started, I would never know what popped up in which Activity and would then spend way too long to move every browser window in its appropriate Activity and suspend Activities that I did want to be started. This was so bad, that I actually rued every time I needed to close Firefox or log out of Plasma, knowing what awaits when Firefox starts again.

But enough about whining, we should move towards fixing! ;)

Solution: “Activity-aware Firefox”

… so, why not make Firefox aware of Activities?

As with most problems, this itch was felt by others before me. I will list the ones that I found and took inspiration from:

Now, Firefox has continued to be developed since the above mentioned posts were written, so I could further simplify some things in the script. At this point I have to thank to Mozilla’s wonderful community on their official #general:mozilla.org Matrix channel.

Which is how I came to this:

#!/bin/bash
#
# Compatability for Firefox and KDE Plasma Activities
#
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: © 2021 Matija Šuklje <matija@suklje.name>


ACTIVITY=$(qdbus org.kde.ActivityManager /ActivityManager/Activities CurrentActivity)
FF_FOLDER=$"$HOME/.mozilla/firefox"
DEF_PROF=$"$FF_FOLDER/????????.default-release"
NEW_PROF=$"$FF_FOLDER/????????.$ACTIVITY"

if [ -d $FF_FOLDER/????????.$ACTIVITY ];
then
        exec /usr/lib/firefox/firefox -P $ACTIVITY "$@" &
        echo ">>> started an existing profile: $ACTIVITY"

else
        /usr/lib/firefox/firefox --createprofile $ACTIVITY
        echo ">>> created a new profile: $ACTIVITY"
        cp -a $DEF_PROF/chrome $NEW_PROF/ # copy any custom user chrome, e.g. needed to hide the top tab-bar
        echo ">>> copied user chrome from default profile"
        exec /usr/lib/firefox/firefox -P $ACTIVITY "$@" &
        echo ">>> started the new profile: $ACTIVITY"

fi

exit

Basically, what the script does is that it creates a new Firefox Profile for each Plasma Activity it was started in (it matches its ID), and then always starts that Profile in that Activity.

The script, some additional files (such as its .desktop), along with instructions and interactions with specific add-ons etc., is available on GitLab as “Activity-aware Firefox”.

What works and what not

“Activity-aware Firefox” if you set it up as instructed in the README file, works for me great. But there are some kinks still.

Basically all of the above-mentioned pain-points are gone. And that is the most important to me.

Now I can start “Activity-aware Firefox” in any Plasma Activity and know exactly what I will get. And that is a huge win!

An unexpected downside though is that for some reason Firefox kills itself if it has been sleeping for a certain period of time after receiving e.g. SIGSTOP, if you resume a stopped Activity, Firefox will start with the default profile. If that happens, I need to close that window and simply start “Activity-aware Firefox” and it will come back as expected. Annoying, sure, but since my default profile is now without any tabs, it does not take a lot of time. Would love to hear it if someone has a good solution for this, though!

Something that was a conscious choice when writing the script was that it does not copy the default profile into the new Activity-aware one. This means when it first starts, it starts with a blank Profile. To sync add-ons, settings, bookmarks, etc. I rely on Firefox Sync, which of course takes some time to finish. But in relation on how much time it saves me on a regular basis on not messing around with misplaced windows, it is well worth it.

The reason why that was a conscious decision is that not everything in ~/.mozilla/firefox/ can be simply moved between Profiles without breaking things. So instead of trial-and-error, I decided to err on the side of cautious.

Instead of moving tabs between windows, you now have to move them between “devices”/Profiles with Firefox Sync, as every Firefox Profile is treated separately from another.

The positive side of this separation though is that if you suspend or kill “Activity-aware Firefox” in one Plasma Activity, it will not any others :)

Next steps – help welcome

There are a few steps one must take to set up “Activity-aware Firefox” as I did, so I suspect it is not something I would expect more careful newcomers to replicate. Ideally this is how Firefox and Plasma would work out-of-the-box (and without the kinks!) But I am toying with the idea whether it would be beneficial to at least wrap the script and .desktop file into an installable package.

I also did not implement any way to clean up Firefox Profiles that are not used anymore, but a good starting point is adrian15’s blog post. The reason being that I do not understand that enough (yet) and fear I would delete too much.

Another obvious next step would be to figure out how to make sure that when an Activity is started again, the Firefox it automatically starts uses the correct Profile.

Any and all help most welcome!

Just drop me a mail or open an issue/merge request.

Plasma Activities and Firefox are just too good to not work well together :D

hook out → well, now I need to migrate my work laptop to Activity-aware Firefox as well …


  1. If you do not know what Activities are in Plasma or how to use them, Niccolo Vé does a good job explaining that in his video

NeoChat 1.2 🔗

Carl Schwan CarlSchwan 10:00 +00:00
RSS

The NeoChat is happy to announce the 3 major version of NeoChat. This release is the product of more than 3 months worth of work.

Bubbles everywhere 🗨️

The first thing you will see then opening NeoChat 1.2 is that we are now using message bubbles.

Bubbles 🗨️ everywhere 🗨️
Bubbles 🗨️ everywhere 🗨️

We also replaced the not so great green line used as read marker with a better looking separator.

Advanced Chatbar

The text input component was completely redesigned.

Editing a message
Editing a message

Replying to someone
Replying to someone

Adding an attachment
Adding an attachment

It’s also now possible to get autocompletion of commands:

Use commands the easy way!
Use commands the easy way!

Speaking of commands, it’s now possible to send customized reactions when replying to a message with /react I love NeoChat.

Custom reactions
Custom reactions

There was also improvements in the keyboard shortcuts. It’s now possible to use ⬆️ to jump in edit mode for the last message.

Quick Edit
Quick Edit

Another way to edit the last message is to use the s/text/replacement syntax inspired by sed. It’s not enabled by default but you can find it in the settings.

Matrix URI support

NeoChat now support matrix uris and when opening matrix: link in your browser you will then be proposed to open it with NeoChat. As a side effect, supporting Matrix URIs helped us unify how we handle opening and joining rooms accross our codebase.

Inline reply

We added inline replies support in our notification. So it’s now possible to reply to messages directly from the notification.

Inline reply
Inline reply

Fancy effects

Miss the fancy fireworks or snow effects from Element? We too. So Alexey Andreyev added them in NeoChat.

Fireworks
Snow
Confetti

Mobile Improvements

On mobile the context menu are implemented as bottom drawer.

User Information Dialog on Mobile
User Information Dialog on Mobile

Account switcher

NeoChat supports multiple accounts since day one but it was not really practical to switch between accounts. We now implemented an account switcher, available at the bottom of the room list.

Account Switcher
Account Switcher

Other

Aside from the many new big features this release brings, NeoChat 1.2 contains a lot of bugfixes and small usability improvements. We closed aproximately 100 issues (bugs and feature request) and this doesn’t count the huge number of bugs fixed without an corresponding issues. Some hightlight are:

  • Scrolling on mobile now is smoother. It still not perfect but we are working on making it better.
  • Joining a room now makes it appears in the room list without having to restart NeoChat and the room will be automatically opened
  • Show the location of hyperlinked text on hover.
  • Add an indicator for lack of internet connectivity
  • NeoChat doesn’t hang anymore when loading a room
  • Disable the chatbox if we’re not allowed to send messages
A script element has been removed to ensure Planet works properly. Please find it in the original post. A script element has been removed to ensure Planet works properly. Please find it in the original post.

Monday, 23 March 2020

This blog post was not easy to write as it started as a very simple thing intended for developers, but later, when I was digging around, it turned out that there is no good single resource online on copyright statements. So I decided to take this stab at writing one.

I tried to strike a good balance between 1) keeping it short and to the point for developers who just want to know what to do, and 2) FOSS compliance officers and legal geeks who want to understand not just best practices, but also the reasons behind them.

If you are extremely short on time, the TL;DR should give you the bare minimal instructions, but if you have just 2 minutes I would advise you to read the actual HowTo a bit lower below.

Of course, if you have about 20 minutes of time, the best way is always to start reading at the beginning and finish at the end.

Where else to find this article & updates

A copy of this blog is available also on Liferay Blog.
Haksung Jang (장학성) was awesome enough to publish a Korean translation.

2021-03-09 update: better wording; more info on how to handle anonymous authors and when copyright is held by employer, © and ASCII, multiple authors; DCO; easier REUSE instructions

2022-10-23 update: more FAQ entries

2023-03-28 update: a few more FAQ entries following feedback at FOSDEM and from Mastodon

TL;DR

Use the following format:

SPDX-FileCopyrightText: © {$year_of_file_creation} {$name_of_copyright_holder} <{$contact}>

SPDX-License-Identifier: {$SPDX_license_name}

… put that in every source code file and go check out (and follow) REUSE.software best practices, published by the FSFE.

E.g. for a file that I created today and I released under the BSD-3-Clause license, I would use put the following as a comment at the top of the source code file:

SPDX-FileCopyrightText: © 2020 Matija Šuklje <matija@suklje.name>

SPDX-License-Identifier: BSD-3-Clause

Introduction and copyright basics

Copyright is automatic (since the Berne convention) and any work of authorship is automatically protected by it – essentially giving the copyright holder1 exclusive power over their work. In order for your downstream to have the rights to use any of your work – be that code, text, images or other media – you need to give them a license to your work.

So in order for you to copy, implement, modify etc. the code from others, you need to be given the needed rights – i.e. a license2 –, or make use of a statutory limitation or exception3. And if that license has some obligations attached, you need to meet them as well.

In any case, you have to meet the basic requirements of copyright law as well. At the very least you need to have the following two in place:

  • attribution – list the copyright holders and/or authors – especially in jurisdictions which recognise moral rights (e.g. most of EU) it is important to keep the names of authors, if they are listed;
  • license(s) – since a license is the only thing that gives anybody other than the copyright holder themself the right to use the code, you are very well advised to have a notice of the the license and its full text present – this goes for both for your outbound licenses and the inbound licenses you received from others by using 3rd party works, such as copied code or libraries.

Inbound vs. outbound licenses

The license you give to your downstream is called an outbound license, because it handles the rights in the code that flow out of you. In turn that same license in the same work would then be perceived by your downstream as their inbound license, as it handles the rights in the code that flows into them.

In short, licenses describing rights flowing in are called inbound licenses, and the licenses describing rights flowing out are called outbound licenses.

The good news is that attribution is a discretionary right that can be exercised by the author should they choose to. And you are obliged to keep the attribution notices only insofar as the author(s) made use of that right. Which means that if the author has not listed themselves, you do not have to hunt them down yourself.

Why have the copyright statement?

Which brings us to the question of whether you need to write your own copyright statement4.

First, some very brief history …

The urge to absolutely have to write copyright statements stems from the inertia in the USA, as it only joined the Berne convention in 1989, well after computer programs were a thing. Which means that before then the US copyright law still required an explicit copyright statement in order for a work to be protected.

Copyright statements are useful

The copyright statement is not required by law, but in practice very useful as proof, at best, and indicator, more likely, of what the copyright situation of that work is. This can be very useful for compliance reasons, traceability of the code etc.

Attribution is practically unavoidable, because a) most licenses explicitly call for it, and if that fails b) copyright laws of most jurisdictions require it anyway.

And if that is not enough, then there is also c) sometimes you will want to reach the original author(s) of the code for legal or technical reasons.

So storing both the name and contact information makes sense for when things go wrong. Finding the original upstream of a runaway file you found in your codebase – if there are no names or links in it – is a huge pain and often includes (currently still) expensive specialised software. I would suspect the onus on a FOSS project to be much lower than on a corporation in this case, but still better to put a little effort upfront than having to do some serious archæology later.

How to write a good copyright statement and license notice

Finally we come to the main part of this article!

A good copyright statement should consist of the following information:

  • start with the © sign;
  • the year of the first publication – a good date would be the year in which you created the file and then do not touch that date anymore;
  • the name of the copyright holder – typically the author, but depending on the circumstances might be their employer or if there is a CLA in place the legal entity or person they transferred their rights to;
  • a valid contact to the copyright owner

As an example, this is what I would put on something I wrote today:

© 2020 Matija Šuklje <matija@suklje.name>

While you are at it, it would make a lot of sense to also notify everyone which license you are releasing your code under as well. Using an SPDX ID is a great way to unambiguously state the license of your code. (See note mentioned below for an example of how things can go wrong otherwise.)

And if you have already come so far, it is just a small step towards following the best practices as described by REUSE.software by using SPDX tags to make your copyright statement (marked with SPDX-FileCopyrightText) and license notice (marked with SPDX-License-Identifier and followed by an SPDX ID).

Here is now an example of a copyright statement and license notice that check all the above boxes and also complies with both the SPDX and the REUSE.software specifications:

SPDX-FileCopyrightText: © 2020 Matija Šuklje <matija@suklje.name>

SPDX-License-Identifier: BSD-3-Clause

Now make sure you have these in comments of all your source code files.

Q&A

Over the years, I have heard many questions on this topic – both from developers and lawyers.

I will try to address them below in no particular order.

If you have a question that is not addressed here, do let me know and I will try to include it in an update.

Why keep the year?

Some might argue that for the sake of simplicity it would be much easier to maintain copyright statements if we just skip the years. In fact, that is a policy at Microsoft/GitHub at the time of this writing.

While I agree that not updating the year simplifies things enormously, I do think that keeping a date helps preserve at least a vague timeline in the codebase. As the question is when the work was first expressed in a medium, the earliest date provable is the time when that file was first created.

In addition, having an easy way to find the earliest date of a piece of code, might prove useful also in figuring out when an invention was first expressed to the general public. Something that might become useful for patent defense.

This is also why e.g. in Liferay our new policy is to write the year of the file creation, and then not change the year any more.

Innocent infringement excursion for legal geeks

17 U.S. Code § 401.(d) states that if a work carries a copyright notice in the form that the law prescribes, in a copyright infringement case the defendant cannot rely on the innocent infringement defense, except if they had reason to believe their use was covered fair use. And even then, the innocent infringer would have to be e.g. a non-profit broadcaster or archive to be still eligible to such defence.

So, if you are concerned with copyright violations (at least in USA), you may actually want to make sure your copyright statements include both the copyright sign and year of publication.

See also note in Why the © sign for how a copyright notice following the US copyright act looks like.

Why not bump the year on change?

I am sure you have seen something like this before:
Copyright (C) 1992, 1995, 2000, 2001, 2003 CompanyX Inc.

The presumption behind this is that whenever you add a new year in the copyright statement, the copyright term would start anew, and therefore prolong the time that file would be protected by copyright.

Adding a new year on every change – or, even worse, simply every 1st January – is a practice still too wide-spread even today. Unfortunately, doing this is useless at best, and misleading at worst. Needless to say, if you do this as part of your build process, this is extra wrong. For the origin of this myth see the short history above.

A big problem with this approach is that not every contribution is original or substantial enough to be copyrightable – even the popular 5 (or 10, or X) SLOC rule of thumb5 is legally-speaking very debatable.

So, in order to keep your copyright statement true, you would need to make a judgement call every time whether the change was substantial and original enough to be granted copyright protection by the law and therefore if the year should be bumped. And that is a substantial test for every time you change a file.

On the other hand copyright lasts at least 50 (and usually 70) years6 after the death of the author; or if the copyright holder is a legal entity (e.g. CompanyX Inc.), since publication. So the risk of your own copyright expiring under your feet is very very low.

Worst case thought experiment

Let us imagine the worst possible scenario now:

1) you never bump the year in a copyright statement in a file and 2) 50+ years after its initial release, someone copies your code as if it were in public domain. Now, if you would have issue with that and go to court, and 3) the court would (very unlikely) take only the copyright statements in that file into account as the only proof and based on that 4) rule that the code in that file would have fallen under public domain and therefore the FOSS license would not apply to it any more.

The end result would simply be that (in one jurisdiction) that file would fall into public domain and be up for grabs by anyone for anything, no copyright, no copyleft, 50+ years from the file’s creation (instead of e.g. 5, maybe 20 years later).

But, honestly, how likely is it that 50 years from now the same (unaltered) code would still be (commercially) interesting?

… and if it turns out you do need to bump the year eventually, you still have, at worst, 50 years to sort it out – so, ample opportunity to mitigate the risk.

In addition to that, as typically a single source code file is just one of the many cogs in a bigger piece of software, what you are more concerned with is the software product/project as a whole. As the software grows, you will keep adding new files, and those will obviously have newer years in them. So the codebase as a whole work will already include copyright statements with newer years in it anyway.

Keep the Git/VCS history clean

Also, bumping the year in all the files every year messes with the usefulness of the Git/VCS history, and makes the log unnecessarily long(er) and the repository consumes more space.

It makes all the files seem equally old (in years), which makes it hard to identify stale code if you are looking for it.

Another issue might be that your year-bumping script can be too trigger-happy and bump the years also in the files that do not even belong to you. Furthering misinformation both in your VCS and the files’ copyright notices.

Do not bump the year during build time

Bumping the year manually is bad, but automating year bumping during build time is taking it to another level!

One could argue – and I suspect this is where it originates from – that since compiling is translation and as such an exclusive right of the copyright holder. But while translation from one programming language to another clearly can take a lot of mental effort and might require different ways how to express something, a machine-compilation from human-readable source code to machine-readable object/binary code per se is extremely unlikely to have added a new copyrightable component into the mix. That would be like saying an old song would gain new copyright just because it was released in a new audio format without any other changes.

Bumping the year during build time also messes up reproducible builds.

Why not use a year range?

Similar to the previous question, the year span (e.g. 1990-2013) is basically just a lazy version of bumping the year. So all of the above-mentioned applies.

A special case is when people use a range like {$year}-present. This has almost all of the above-mentioned issues7, plus it adds another dimension of confusion, because what constitutes the “present” is an open – and potentially philosophical – question. Does it mean:

  • the time when the file was last modified?
  • the time it was released as a package?
  • the time you downloaded it (maybe for the first time)?
  • the time you ran it the last time?
  • or perhaps even the ever eluding “right now”?

As you can see, this does not help much at all. Quite the opposite!

But doesn’t Git/Mercurial keep a better track?

Not reliably.

Git (and other VCS) are good at storing metadata, but you should be careful about it.

Git does have an Author field, which is separate from the Committer field. But even if we were to assume – and that is a big assumption8 – Git’s Author was the actual author of the code committed, they may not be the copyright holder.

Furthermore, the way git blame and git diff currently work, is line-by-line and using the last change as the final author, making Git suboptimal for finding out who actually wrote what.

Token-based blame information

For a more fine-grained tool to see who to blame for which piece of code, check out cregit.

And ultimately – and most importantly – as soon as the file(s) leave the repository, the metadata is lost. Whether it is released as a tarball, the repository is forked and/or rebased, or a single file is simply copied into a new codebase, the trace is lost.

All of these issues are addressed by simply including the copyright statement and license information in every file. REUSE.software best practices handle this very well.

Why the © sign?

Some might argue that the English word “Copyright” is so common nowadays that everyone understands it, but if you actually read the copyright laws out there, you will find that using © (i.e. the copyright sign) is the only way to write a copyright statement that is common in copyright laws around the world9.

Using the © sign makes sense, as it is the the common global denominator.

Comparison between US and Slovenian copyright statements

As an EU example, the Slovenian ZASP §175.(1) simply states that holders of exclusive author’s rights may mark their works with a (c)/© sign in front of their name or firm and year of first publication, which can be simply put as:

© {$year_of_first_publication} {$name_of_author_or_other_copyright_holder}

On the other side of the pond, in the USA, 17 U.S. Code § 401.(b) uses more words to give a more varied approach, and relevant for this question in §401(b)(1) prescribes the use of

the symbol © (the letter C in a circle), or the word “Copyright”, or the abbreviation “Copr.”;

The rest you can go read yourself, but can be summarised as:

(©|Copyright|Copr.) {$year_of_first_publication} {$name_or_abreviation_of_copyright_holder}

See also the note in Why keep the year for why this can matter in front of USA courts.

While the © sign is a pet peeve of mine, from the practical point of view, this is the least important point here. As we established in the introduction, copyright is automatic, so the actual risk of not following the law by its letter is pretty low if you write e.g. “Copyright” instead.

© sign and ASCII

While Unicode (UTF-8, UTF-16, …) is pretty much ubiquitous nowadays, there are places and reasons for when the encoding of source code will have to be limited to a much simpler one, such as ASCII. This could be e.g. in case when the code is written to be put into small embedded devices where every bit counts.

The © character was introduced in 8-bit extended ASCII, but the original 7-bit ASCII does not have it.

So if this is the situation you are in, it is fine to either ommit the copyright sign or replace it with e.g. (C) or Copyright.

Why leave a contact?

A contact is in no way required by copyright law, but from practical reasons can be extremely useful.

It can happen that you need to access the author and/or copyright holder of the code for legal or technical question. Perhaps you need to ask how the code works, or have a fix you want to send their way. Perhaps you found a licensing issue and want to help them fix it (or ask for a separate license). In all of these cases, having a contact helps a lot.

As pretty much all of internet still hinges on the e-mail10, the copyright holder’s e-mail address should be the first option. But anything really goes, as long as that contact is easily accessible and actually in use long-term.

Avoiding orphan works

For the legal geeks out there, a contact to the copyright holder mitigates the issue of orphan works.

There will be cases where the authorship will be very dispersed or lie with a legal entity instead. In those cases, it might be more sense to provide a URL to either the project’s or legal entity’s homepage and provide useful information there. If a project lists copyright holders in a file such as AUTHORS or CONTRIBUTORS.markdown a permalink to that file (in the master) of the publicly available repository could also be a good URL option.

How to handle multitudes of authors?

Here are two examples of what you can write in case the project (e.g. Project X) has many authors and does not have a CAA or exclusive CLA in place to aggregate the copyright in a single entity:

© 2010 The Project X Authors <https://projectx.example/about/authors>

© 1998 Contributors to the Project X <https://git.projectx.example/ProjectX/blob/master/CONTRIBUTORS.markdown>

An an example of when the project is handled by a non-profit NGO legal entity.

© 2020 BestProjectNGO <https://bestprojectngo.example>

Bot to automate contributions

A really interesting project is All Contributors, which specifies how to manage contributions to all – even non-code – contributions to a project. It also includes a CLI tool and offers a GitHub bot to automate this process.

The major downside is that the prescribed format is an HTML table embedded in MarkDown. So not very easy to read or parse in source form.

What if I added code to an existing project?

A major benefit of FOSS is that people collaborate on the same project, so it is inevitable that several people will be touching the same file. If that file already includes a copyright statement, this is a good question.

If there are only a handful of people who wrote that file, it would be fine to just add a new line with your copyright statement, as such:

SPDX-FileCopyrightText: © 2018 Matija Šuklje <matija@suklje.name>
SPDX-FileCopyrightText: © 2021 Master Hacker <mh@example.org>

But if there are many authors that would need to be added that way, to avoid clutter, it would make sense to instead create an AUTHORS.* or CONTRIBUTORS.* file as described in the question above.

What about public domain?

Public domain is tricky.

In general the public domain are works to which the copyright term has expired11.

While in some jurisdictions (e.g. USA, UK) you can actually waive your copyright and dedicate your work to public domain, in most jurisdiction (e.g. most of EU member countries) that is not possible.

Which means that depending on the applicable jurisdiction, it may be that although an author wrote that they dedicate their work into public domain this does not meet the legal standard for it to actually happen – they retain the copyright in their own work.

Unsurprisingly, FOSS compliance officers and other people/projects who take copyright and licensing seriously are typically very wary of statements like “this is public domain”.

This can be mitigated in two ways:

  • instead of some generic wording, when you want to dedicate something to public domain use a tried and tested public copyright waiver / public domain dedication with a very permissive license, such as 0BSD for code or CC0-1.0 for non-code; and
  • include your name and contact if you are the author in the SPDX-FileCopyrightText: field – 1) because in doubt that will associate you with your dedication to the public domain, and 2) in case anything is unclear, people have a contact to you.

This makes sense to do even for files that you deem are not copyrightable, such as config files – if you mark them as above, everyone will know that you will not exercise your author’s rights (if they existed) in those files.

It may seem a bit of a hassle for something you just released to the public to use however they see fit, without people having to ask you for permission. I get that, I truly do! But do consider that if you already put so much effort into making this wonderful stuff you and donating it to the general humanity, it would be a huge pity that, for (silly) legal details, in the end people would not (be able to) use it at all.

What about minified JS?

Modern code minifiers/uglifiers tend to have an optional flag to preserve copyright and licensing info, even when they rip out all the other comments.

The copyright does not simply go away if you minify/uglify the code, so do make sure that you use a minifier that preserves both the copyright statement as well as the license (at least its SPDX Identifier) – or better yet, the whole REUSE-compliant header.

Transformations of code

Translations between different languages, compilations and other transformations are all exclusive rights of the copyright owner. So you need a valid license even for compiling and minifying.

What is wrong with “All rights reserved”?

Often you will see “all rights reserved” in copyright statements even in a FOSS project.

The cause of this, I suspect, lies again from a copycat behaviour where people tend to simply copy what they so often found on a (music) CD or in a book. Again, the copyright law does not ask for this, even if you want to follow the fullest formal copyright statement rules.

But what it does bring, is confusion.

The statement “all rights reserved” obviously contradicts the FOSS license the same file is released under. The latter gives everyone the rights to use, study, share and improve the code, while the former states that all of these rights the author reserves to themself.

So, as those three words cause a contradiction, and do not bring anything useful to the table in the first place, you should not write them in vain.

Practical example

Imagine12 a FOSS project that has a copy of the MIT license stored in its LICENSE file and (only) the following comment at the top of all its source code files:

# This file is Copyright (C) 1997 Master Hacker, all rights reserved.

Now imagine that someone simply copies one file from that repository/archive into their own work, which is under the AGPL-3.0-only license, and this is also what it says in the LICENSE file in the root of its own repository. And you, in turn, are using this second person’s codebase.

According to the information you have at hand:

  • the copyright in the copied file is held by Master Hacker;
  • apparently, Mr Hacker reserves all the rights they have under copyright law;
  • if you felt like taking a risk, you could assume that the copied file is under the AGPL-3.0-or-later license – which is false, and could lead to copyright violation13;
  • if you wanted to play it safe, you could assume that you have no valid license to this file, so you decide to remove it and work around it – again false and much more work, but safe;
  • you could wait until 2067 and hope this actually falls under public domain by then – but who has time for that.

This example highlights both how problematic the wording of “all rights reserved” can be even if there is a license text somewhere in the codebase.

This can be avoided by using a sane copyright statement (as described in this blog post) and including an unambiguous license ID. REUSE.software ties both of these together in an easy to follow specification.

What if I work for a company, NGO, university?

In many jurisdictions if you are in an employment relationship (at least full employment), your employer would be the one holding the relevant rights.

If the revelant jurisdiction is Slovenian (as an EU example), ZASP §101 (unofficial English translation) says the following:

(1) When copyright work is created by an employee in the execution of his duties or following the instructions given by his employer (copyright work created in the course of employment), it shall be deemed that the economic rights and other rights of the author to such work are exclusively assigned to the employer for the period of ten years from the completion of the work, unless otherwise provided by contract.

(2) On the expiration of the term mentioned in the foregoing paragraph, the rights mentioned in the foregoing paragraph revert to the employee, however, the employer can claim a new exclusive assignment of these rights, for adequate remuneration.

If the relevant jurisdiction is USA this would fall under “work for hire” and the employer would be the copyright holder of any work their employee makes that are within the scope of their employment. There are also other cases where “work for hire” kicks in, but the sloppy rule of thumb is that if the closer the work’s creation was controlled by the employer/hiring party, the more likely it would be the copyright holder.

In any case, if your contract says you are transferring the rights to your employer or the other party, then they would be the copyright holder (e.g. in USA) or at least the exclusive rights holder (e.g. most of EU).

On a similar note, an author / copyright holder / exclusive right holder can transfer the rights they have to another person by written agreement.

What if I want to stay anonymous?

Whether you want to sign your work with your legal name, a pseudonym14 or even not at all is your own decision as author.

But do take into consideration that if you want to stay anonymous, you will have a much harder time proving you are the author of that piece of code later. For this reason, it would make sense to release your anonymous code under a “public-domain-like” license such as CC0-1.0 or Unlicense.

In any case, unless you have good reasons not to (e.g. for your personal safety), it would be really useful to use the copyright tag to at least include a contact. In case you want to just use a pseudonym, that should not be much of an issue. But in the case you want to stay anonymous, the contact could be simply the URL to the project’s homepage and instead of your name you could state the name of the project, or leave it empty.

Anonymity and Git

If you are concerned about anonymity, do take into consideration also that Git stores both author and committer data for each commit. Look into how to keep those records in a way that they cannot be linked to you.

My project uses DCO. Does this conflict with it?

Not at all. Quite the opposite!

When signing the DCO 1.1, you state that you are contributing under the license as stated in the file. If the file you contributed (to), includes an SPDX license tag, that supports the DCO.

While signing the DCO typically requires you to use git commit --signoff when you commit, so it stores your agreement with DCO in the repository history, if a file is copied outside that git repository that information, along with your authorship information is lost. So it makes sense to include your copyright statement and contact in each file even if you sign a DCO.

How do I find out the date of file creation?

If you are creating a new file, this is trivial, as you just need to enter the current year (e.g. with date +Y).

But if you are adding your copyright statements to your existing software, that might indeed be a bit more tricky.

Luckily, if your project uses a VCS and all its history is tracked in it, you can find the date of the first commit for each file. If using Git, the following command will output you the year the file was first authored:

git log --follow --format=%as {$path} | tail -n1 | cut -c-4

Failing that, you could check with your filesystem (e.g. for EXT4), but this can be of very questionable quality, if you know the file landed on your disk at a later date, you changed disks etc.

If even that is not a viable possibility, just use your best judgement.

That is a tricky question, and probably depends on the jurisdiction in question.

This analysis tries to answer those questions from the Slovenian jurisdiction.

What about if I merge or split a file or just use a snippet?

In case you copy just a part of a file (assuming that part is copyrightable) into another file, you can put retain/copy its licensing metadata by wrapping its SPDX/REUSE tags between an SPDX-SnippetBegin and an SPDX-SnippetEnd tag. For more details see the Snippet tags format annex of the SPDX specification.

An example would se as follows:

# SPDX-SnippetBegin

# SPDX-FileCopyrightText: © 2020 Matija Šuklje <matija@suklje.name>
# SPDX-License-Identifier: BSD-3-Clause

...
import sense
lots_of_cool_code()
...

# SPDX-SnippetEnd

You can use this also when e.g. concattenating different JS files into one.

In any case, unless you are the copyright holder, do not remove or alter other people’s copyright statements. You can always add a new one, if it is needed.

hook out → hat tip to the TODO Group for giving me the push to finally finish this article and Carmen Bianca Bakker, Robbie Morrison, as well as the Legal Network for some very welcome feedback


  1. This is presumed to be the author at least initially. But depending on circumstances can be also some other person, a legal entity, a group of people etc. See also this FAQ entry for more info. 

  2. A license is by definition “[t]he permission granted by competent authority to exercise a certain privilege that, without such authorization, would constitute an illegal act, a trespass or a tort.” 

  3. Limitations and exceptions (or fair use/dealings in USA/Canada/UK) in copyright are extremely limited when it comes to software compared to more traditional media. Do not rely on them. 

  4. In USA, the copyright statement is often called a copyright notice. The two terms are used intercheangably. 

  5. E.g. the 5 SLOC rule of thumb means that any contribution that is 5 lines or shorter, is (likely) too short to be deemed copyrightable, and therefore can be treated as un-copyrightable or as in public domain; and on the flip-side anything longer than 5 lines of code needs to be treated as copyrightable. This rule can pop up when a project has a relatively strict contribution agreement (a CLA or even CAA), but wants some leeway to accept short fix patches from drive-by contributors. The obvious problem with this is that on one hand someone can be very original even in 5 lines (think haiku), while one can also have pages and pages of absolute fluff or just plain raw factual numbers. 

  6. This depends from jurisdiction to jurisdiction. The Berne convention stipulates at least 50 years after death of the author as the baseline. There are very few non-signatory states that have shorter terms, but the majority of countries have life + 70 years. The current longest copyright term is life + 100 years, in Mexico. 

  7. The only improvement is that it avoids messing up the Git/VCS history. 

  8. In practice what the Author field in a Git repository actually includes varies quite a bit and depends on how the committer set up and used Git. 

  9. Of course, I did not go through all of the copyright laws out there, but I checked a handful of them in different languages I understand, and this is the pattern I identified. If anyone has a more thorough analysis at hand, please reach out and I will happily include it. 

  10. Just think about it, pretty much every time you create a new account somewhere online, you are asked for your e-mail address, and in general people rarely change their e-mail address. 

  11. As stated before, in most jurisdictions that is 70 years after the death of the author. 

  12. I suspect many of the readers not only can imagine one, but have seen many such projects before ;)

  13. Granted, MIT code embedded into AGPL-3.0-or-later code is less risky than vice versa. But simply imagine what it would be the other way around … or with an even odder combination of licenses. 

  14. A(n identifiable) pseudonym, under copyright law, has basically the same power as a legal name. Think of all the musicians, actors and writers that we know under their pseudonym or stage name. 

Friday, 14 October 2016

One afternoon twenty years ago Matthias Ettrich and Martin Konold sat at a stone table in the cafeteria of the university Tübingen and talked computers. They talked Linux and they talked desktop. They talked about making Linux accessible to everyone. This was the moment where KDE was born. This afternoon they walked away with a mission. Matthias went on to write the call to action to found the KDE project, and Martin to create the very first KDE mailing list kde@fiwi02.wiwi.uni-tuebingen.de.


On October 14th 1996 the famous announcement arrived on the newsgroups comp.os.linux.development.apps, comp.os.linux.misc, and de.comp.os.linux.misc:

    New Project: Kool Desktop Environment. Programmers wanted!

The new project quickly attracted a group of enthusiastic developers and they pushed out code with a frentic pace. kdelibs-0.0.1 was released in November, containing the first classes KConfig and KApplication. In May 1997 the young project presented at the Linux-Kongress in Würzburg. In August Kalle Dalheimer published the famous article about KDE in the German computer magazine c't which attracted a whole generation of KDE developers to the project. On Jul 12th 1998 KDE 1.0 was done and released. The community had not only implemented a friendly face for Linux but also a bunch of applications while going, including a full web browser.


KDE did hundreds more releases over the years, continuously improving and maintaining the growing number of applications and amount of code. The community grew. It started to do annual conferences such as Akademy or the Desktop Summits and focused developer sprints such as the Osnabrück or the Randa meetings. KDE e.V., the organization behind KDE, which was founded as partner for the KDE Free Qt Foundation, grew with the community to be the corner stone of the organizational structure of KDE, using German association law as its secret superpower (read more about this in the book "20 Years of KDE: Past, Present and Future").

Millions and millions of people used KDE software over the years. Thousands of people contributed. KDE made appearances in Hollywood movies, it was subject of theses and scientific studies, and it won many awards. KDE's founder, Matthias Ettrich even received the German Federal Cross of Merit. The timeline of twenty years of KDE is an impressive demonstration of what Free Software is able to achieve.


Akademy 2014 group photo by Martin Holec (CC-BY)


KDE also was a breeding ground. Many people started their careers there. Hundreds of students went through mentoring programs such as the Summer of Code or the Season of KDE. Whole projects emerged from KDE, such as ownCloud and its sibling NextCloud, Kolab, or KHTML, which turned into WebKit and then Blink, powering most of web browsers on this planet today.

Today Linux has reached world domination in various, sometimes surprising, ways. KDE has contributed its share to that. With Plasma it provides a slick and powerful desktop which does make Linux accessible to everyone. This mission has been accomplished. But there is more. Following KDE's vision of bringing freedom to people's digital life there are amazing projects exploring new areas through Free Software, be it an application such as Krita to bring freedom to digital painters, or a project such as WikiToLearn to create collaborative text books for education. When KDE people meet you can feel the enthusiasm, the openness, and the commitment to change the world to the better just as in the days of the beginning.




I joined KDE in 1999 with my first patch to KOrganizer. I wrote a lot of code, maintained and founded applications, served on the board of KDE e.V. for nine years. Most importantly I found a lot of friends. Neither my personal nor my professional life would be what it is today without KDE. I owe a lot to this community. Thank you for the last twenty years.

Monday, 9 May 2016

 

wikitolearn
WikiToLearn

 

On May 5th night, we had a hangout call with our project mentors and other GSoC students of WikiToLearn team.
This is the first hangout call we had with respect to GSoC.

We discussed the following things :

* Having a blog account and keep updating the progress in it. Also to find a way to mirror our blog and WikiToLearn wiki page to keep track of everything.

* Gianluca explained about the need of KDE account, Phabricator.

* All our current source code are hosted on Github, we may move to KDE QuickGit someday soon.

* We discussed our project proposals. We felt it will be a good idea if we inform about our project ideas to upstream contributors, MediaWiki contributors so that they could help us if we have any problem with respect to MediaWiki extension development.

* Make use of WikiToLearn tech channel effectively for every technical problem because we have experienced people there who could help us to solve it.

Things which I have done till now :

* Created an account on KDE identity.

* Got KDE developer access.

* Aggregated my Blog with KDE planet.

* Have an account on Phabricator.

* Have an account on KDE Bugtracking System. (WikiToLearn team doesn’t use it much.)

* Updated my user page on WikiToLearn.

* Created a doc which shows a list of days and hours I’ll be working/taking off.

* Running MediaWiki instance locally in my system.

* Installed and enabled VisualEditor. (Playing with it)

* Spending some amount of time in configuring Parsoid server. (I need to link VisualEditor and Parsoid server so that they talk each other and enables me to create and save wiki pages.)

 

VisualEditor
MediaWiki with VisualEditor

Things I’ll work on next :

* Configure Parsoid server.

* Design workflow scheme for collaborative editor extension.

* Try out some simple VE extensions.

 

Friday, 22 April 2016

gsoc-2016

Something I’ve wanted to say for more than a year. Yes! I am a GSoCer now!
This was one among my biggest dreams. 🙂

GSoC – Google Summer of Code is an annual program, in which Google awards healthy stipends to students for contributing to Open Source projects.

All these days, I was spending most of my time fixing bugs on different open source projects. Now I have got the opportunity to work with WikiToLearn,  a proud member of KDE community, for a long period of time, implementing a new feature to wiki editor.

I would like to tell a bit about our WikiToLearnWikiToLearn wants to provide free, collaborative and accessible textbooks to the whole world.
Our philosophy is synthesized in the sentence: “knowledge only grows if shared”. We provide a platform where learners and teachers can together complete, refine and re-assemble notes, lecture notes in order to create textbooks, tailored precisely to their needs so that you can “stand on the shoulders of giants”.

I should thank my mentors Cristian Baldi, Gianluca Rigoletti  and other community members for helping me in reviewing and getting a great project proposal done. I’m really excited to work with them this summer. 🙂

Looking at previous GSOCers like Sayan, Sagar, Vignesh, Parth was always motivating me to contribute to open source and become a GSoCer.
I thank F.S.M.K, DGPLUG, and our GLUG-DSCE which taught me a lot about free/open source technologies.

More love to WikiToLearn  folks for giving me this opportunity to work with them. 🙂

 

You can have a look at my proposal abstract here.
Soon I’ll push my complete project proposal on GitHub.

The real fun begins now. 🙂

Saturday, 11 January 2014

Ποια είναι η καλύτερη διανομή για νέο χρήστη;

Η παραπάνω ερώτηση ίσως να μην μπορεί να απαντηθεί αντικειμενικά από advanced χρήστες ή ακόμα και απλούς χρήστες ελεύθερου λογισμικού που το χρησιμοποιούν χρόνια. Ο λόγος που δεν μπορεί να απαντηθεί είναι διότι όλοι μας έχουμε κατασταλάξει σε ότι διευκολύνει εμάς, πράγμα που μπορεί να μην διευκολύνει κάποιον που τώρα ξεκινά στον χώρο του Linux. Έτσι, οι σκέψεις που θα αναπτύξω παρακάτω, είναι απλά η εμπειρία μου.

Η παραπάνω ερώτηση μπορεί να διατυπωθεί και ως: Ποια είναι η καλύτερη διανομή σε παραγωγικό περιβάλλον εργασίας;
Ίσως οι 2 (πανομοιότυπες) ερωτήσεις δεν είναι σωστά διατυπωμένες.
* Ίσως η καλύτερη ερώτηση θα ήταν: Ποιο γραφικό περιβάλλον είναι πιο καλό-παραγωγικό για τους χρήστες;
* Επίσης πρέπει να πάρουμε υπόψιν μας και τον παράγοντα εμπειρία. Τι εμπειρία έχει ο χρήστης; Ίσως και από τι λειτουργικό έρχεται (windows-MAC OSX);
* Αυτό που δεν θα ασχοληθώ είναι με τα χαρακτηριστικά του υπολογιστή του χρήστη.

Πριν προχωρήσω στην ανάλυση των σκέψεών μου, θα ήθελα να αναφέρω ότι έχω χρησιμοποιήσει στο παρελθόν τις διανομές kUbuntu, Ubuntu, Fedora, PCLinuxOS, Linux Mint, openSUSE, Arch Linux. Από γραφικά περιβάλλοντα έχω χρησιμοποιήσει 50% Gnome, 20% MATE, 15% Cinnamon, 10% KDE, 5% Unity (τα ποσοστά είναι χρόνος χρήσης). Τέλος, στα δεδομένα που αναφέρω, είναι όπως τα χρησιμοποίησα. Από τότε μπορεί να έχουν αλλάξει-βελτιωθεί.

Θα ξεκινήσω με τα πιο συχνά λάθη που κάνουμε οι χρήστες Linux.

1. Μετά την εγκατάσταση, η διανομή απλά δουλεύει.

Κλασικό λάθος. Μια διανομή Linux δεν πρόκειται να την εγκαταστήσει μόνος του ο "νέος" χρήστης. Ελάχιστες φορές έχω συναντήσει χρήστες που "παιδεύονται" μόνοι τους να εγκαταστήσουν μια διανομή. Πόσο μάλλον να προσπαθήσουν μόνοι τους για dual boot. Μέχρι στιγμής έχω συναντήσει 1-2 άτομα να το κάνουν αυτό. Και πάλι μετά την εγκατάσταση, επικοινώνησαν μαζί μου διότι είτε ήθελαν βοήθεια στην δημιουργία partition, είτε κάποιο υλικό δεν αναγνωρίζεται. ΠΑΝΤΑ εμείς είμαστε που εγκαθιστούμε την διανομή. Το ότι βάζεις Ubuntoειδή διότι βλέπει όλες τις συσκευές, είναι ΜΥΘΟΣ. Εάν τις έβλεπε, δεν θα υπήρχε λόγος ύπαρξης του Jockey (εάν δεν κάνω λάθος). Αφού εμείς θα εγκαταστήσουμε την διανομή, ότι υλικό δεν θα δει, το εγκαθιστούμε.

2. Προτείνουμε την διανομή με την μεγαλύτερη κοινότητα ώστε να υπάρχει υποστήριξη.

Ακόμα ένα κλασικό λάθος. Σε περίπτωση που ο χρήστης αντιμετωπίσει ένα πρόβλημα, ΔΕΝ πρόκειται να ψάξει στο google ή να μπει στο forum (δεν συζητάμε για λίστα ή IRC), ώστε να διατυπώσει το ερώτημά του (άσε που δεν θα ξέρει τι πρόβλημα έχει). Αυτό που θα κάνει είναι να σου τηλεφωνήσει και να σου πει: ΔΕΝ ΔΟΥΛΕΥΕΙ ΤΟ INTERNET. Και εσύ πρέπει να σκεφτείς τι πάει να πει ο ποιητής με την φράση αυτή. Στην Ελλάδα η κοινότητα Ubuntu έχει την μεγαλύτερη βάση δεδομένων σε οδηγούς στο forum, όμως ο χρήστης εσένα θα τηλεφωνήσει.

3. Σε νέο χρήστη (ή πελάτη σου), βάζεις Unity γιατί τα έχει όλα στο launcher.

Αυτό είναι ΤΕΡΑΣΤΙΟ σφάλμα. Ένας χρήστης που έρχεται από windows, έχει συνηθίσει ΕΝΑΡΞΗ (ή εικονίδιο windows)>ΟΛΑ ΤΑ ΠΡΟΓΡΑΜΜΑΤΑ>ΠΡΟΓΡΑΜΜΑ (το οποίο μπορεί να βγάλει και στην επιφάνεια εργασίας για να του έρθει πιο εύκολα ή στην task bar, ως συντόμευση). Επίσης γνωρίζει ότι για να απενεργοποιήσει τον υπολογιστή, θα πάει πάλι στην ΕΝΑΡΞΗ>ΤΕΡΜΑΤΙΣΜΟΣ ΥΠΟΛΟΓΙΣΤΗ. Ο δε χρήστης MAC OSX (στην περίπτωση που θέλει να αντικαταστήσει το MAC OSX), γνωρίζει ότι όλες οι εφαρμογές του είναι είτε στην κάτω μπάρα, είτε στο applications). Για να σβήσει τον υπολογιστή του, απλά πάει επάνω αριστερά, στο μηλαράκι, και το σβήνει. Δεν θα ασχοληθώ πολύ με χρήστες MAC διότι πιστεύω το 99% των χρηστών είτε έχει περάσει πρώτα από windows, είτε έχει χρησιμοποιήσει στο σχολείο, σε φίλο του κλπ.

Ας δούμε λοιπόν τώρα ένα ένα τα γραφικά περιβάλλοντα (διότι δεν παίζει ρόλο η διανομή).

* KDE: Είναι πιο κοντά στα δεδομένα των χρηστών windows. Υπάρχει βίντεο στο YouTube κάποιων που κάνανε "έρευνα" στο δρόμο, λέγοντας σε απλούς ανθρώπους ότι αυτά είναι τα νέα windows και τους ήταν πολύ οικείο το περιβάλλον και τους άρεσε. Έχει λοιπόν το κουμπάκι K (ή το λογότυπο της κάθε διανομής), όπου ο χρήστης ενστικτωδώς θα πατήσει. Εκεί λοιπόν με τον ίδιο τρόπο με τα windows, μπορεί να βρει τα προγράμματα και την απενεργοποίηση. Στην task bar, μπορεί να βλέπει ποια προγράμματα έχει ανοικτά. Τέλος έχει συντομεύσεις στην task bar καθώς και στην επιφάνεια εργασίας.

KDE Plasma

* Cinnamon: Και αυτό είναι αρκετά κοντά στα δεδομένα των χρηστών windows. Αντί για ΕΝΑΡΞΗ, θα δει το Μενού (που φωνάζει: Κάνε κλικ εδώ). Στο μενού που θα εμφανιστεί, μπορεί να ανοίξει τα προγράμματα, να απενεργοποιήσει τον υπολογιστή, να βάλει συντομεύσεις στην task bar καθώς και να έχει αγαπημένα προγράμματα που ξεκινάει πιο συχνά αλλά να βλέπει και ποια προγράμματα έχει ανοικτά. Επίσης και εδώ, μπορεί να έχει συντομεύσεις στην επιφάνεια εργασίας.

Cinnamon

* MATE: Το αυθεντικό MATE, ίσως να μπερδέψει λίγο τους χρήστες. Όμως θα δουν την λέξη Εφαρμογές και πατώντας επάνω της, θα εμφανίστούν τα προγράμματα. Εάν είναι "πειραγμένο" με την μπάρα κάτω και το traditional menu, τότε θα είναι πιο εύκολο για τους χρήστες να το παρομοιάσουν με windows. Στο αυθεντικό MATE υπάρχει μια δυσκολία που βρίσκεται το κουμπί απενεργοποίησης. Όλα τα άλλα, είναι πλήρως πραγματοποιήσιμα όπως και τα 2 παραπάνω γραφικά.

openSUSE MATE

* GNOME: Είναι το γραφικό περιβάλλον που χρησιμοποιώ και με βολεύει. Το ατόφιο περιβάλλον δεν είναι πολύ φιλικό για χρήστες windows. Η πρώτη κίνηση θα είναι να πατήσουν στο Δραστηριότητες (ακούγεται λογικό να είναι εκεί τα προγράμματα). Την hot corner ίσως την βρει τυχαία (όταν θα πάει το ποντίκι στο Δραστηριότητες). Όμως πατώντας στις Δραστηριότητες θα δει μόνο τα αγαπημένα στην μπάρα. Πρέπει να τα πατήσει όλα ένα ένα ώστε να του εμφανίσει το τελευταίο (Εμφάνιση Εφαρμογών) για να δει όλα τα εικονίδια των εγκατεστημένων εφαρμογών. Θέλει ρύθμιση για δημιουργία συντομεύσεων στην επιφάνεια εργασίας. Ο σχεδιασμός του GNOME έγινε έτσι ώστε ο χρήστης να εστιάζει σε ένα πρόγραμμα που δουλεύει. Έτσι δεν υπάρχει μπάρα να δει ποια προγράμματα έχει ανοικτά (μόνο εάν πατήσει στο Δραστηριότητες). Οπότε αυτό είναι κάτι που θα μπερδέψει πολλούς χρήστες. Για την απενεργοποίηση επίσης είναι σε δύσκολη θέση (σύμφωνα με αυτά που συνήθισε στα windows). Το όλο σύστημα γίνεται πιο φιλικό με την εγκατάσταση κάποιων extensions αλλά και κάποιων ρυθμίσεων από το gnome-tweak-tool.

GNOME 40

* Unity: Εδώ εμφανίζονται στο launcher οι εφαρμογές που θεωρεί ο κατασκευαστής ότι είναι πιο συχνά χρησιμοποιούμενες. Οπότε είναι σαν να τις έχει στην επιφάνεια εργασίας ή στο task bar. Για άλλο πρόγραμμα, πρέπει να σκεφτεί να πατήσει το σηματάκι του Ubuntu (ή της άλλης διανομής, όσες το έχουν), όπως έκανε και στα windows, και εκεί θα του εμφανιστεί ένα πεδίο να γράψει (το ίδιο που γίνεται και στο GNOME). Οπότε δεν είναι στα στάνταρ του. Πόσο μάλλον που τα κουμπιά ελαχιστοποίησης, μεγιστοποίησης, κλείσιμο, βρίσκονται στα αριστερά καθώς και το global menu (θα ψάχνει που είναι το αρχείο, επεξεργασία κλπ). Επίσης, ούτε καν θα καταλάβει ότι τα βελάκια δίπλα στα εικονίδια στο launcher είναι τα προγράμματα που έχει ανοικτά. Τέλος, και εδώ η απενεργοποίηση βρίσκεται σε δύσκολο μέρος.

linux mint unity

Ένα άλλο που ακούω από τους χρήστες windows και δεν ξέρω πως να το εκλάβω είναι:
Δεν εγκαθιστώ-χρησιμοποιώ Linux γιατί είναι δύσκολα, τελείως διαφορετικά, χρειάζεται να διαβάσω, είναι για προγραμματιστές-χάκερς, πρέπει να ξέρεις προγραμματισμό.

Όμως, όταν σε αυτούς τους χρήστες δώσεις να χρησιμοποιήσουν MAC OSX, το μαθαίνουν σε λίγα λεπτά (το MAC είναι πιο κοντά σε δεδομένα του Linux, παρά σε windows).

Φαντάζομαι θα συμφωνήσετε μαζί μου, είναι θέμα marketing...


4. Σε νέο χρήστη βάζεις Ubuntoειδές επειδή έχει Software Center

Μέγα σφάλμα. Ο χρήστης windows έχει συνηθίσει (και αυτό θα κάνει και τώρα), να ψάχνει στο google το πρόγραμμα (ή λειτουργία), να κατεβάζει το πρόγραμμα και να το εγκαθιστά (φίλος κατέβασε το μtorrent.exe για να το εγκαταστήσει). Μετά να ψάχνει το "σπαστήρι" του και να γίνει χάκερ. Δεν ήξερε και από χθες το Software Center. Είτε του δείξεις το Synaptic, είτε το σύστημα του Linux Mint, είτε το YaST, αυτό είναι που θα μάθει και θα χρησιμοποιεί. Μόνο χρήστες MAC OSX το γνωρίζουν (άντε και χρήστες κινητών Android).

Κακά τα ψέματα, ο μέσος χρήστης θέλει:
- Πλήρη υποστήριξη ελληνικών
- Codecs (για να παίζει μουσική, βίντεο) και VLC
- Office (που να αποθηκεύει σε .doc για να μπορεί να τα διαβάζει σε windows)
- Firefox
- CD/DVD burn
- Files (nautilus, dolphin, caja, nemo)
- Skype

Μέχρι τώρα, ίσως η μόνη διανομή που να τα έχει όλα αυτά προεγκατεστημένα είναι η PCLinuxOS (όλα τα extra προγράμματα σε ένα αποθετήριο). Μόνη "ένσταση" είναι στο LiveCD καθώς και μετά την εγκατάσταση πρέπει να το γυρίσεις στα Ελληνικά μόνος σου. Επίσης και το Linux Mint είναι πολύ κοντά στις παραπάνω απαιτήσεις.

Όσον αφορά τον πιο προχωρημένο χρήστη, το openSUSE με το YaST και το PCLinuxOS με το PCC είναι αυτά που θα ικανοποιήσουν τα θέλω του. Από γραφικά περιβάλλοντα, το KDE και το MATE που έχουν πίνακα ρυθμίσεων, είναι αυτά που θα επιτρέψουν στον προχωρημένο χρήστη να παραμετροποιήσει το γραφικό περιβάλλον (έχουν κάτι αντίστοιχο και τα άλλα γραφικά περιβάλλοντα, αλλά πολύ απλά).

Για να καταλήξω σε κάποιο συμπέρασμα, η καλύτερη διανομή και γραφικό περιβάλλον για νέο-αρχάριο χρήστη (facebook, Internet, multimedia) είναι αυτά με τα οποία ξεκινάει την περιήγησή του στον κόσμο του Ελεύθερου Λογισμικού. Για να τα επιλέξει, δείξτε του 2 γραφικά περιβάλλοντα της διανομής που εσείς γνωρίζετε καλύτερα γιατί εσάς θα "πρήξει" με τηλεφωνήματα.