Donnerstag, 21. Januar 2016

Building Cantor From Git


And why it took me 24x longer than it was meant to


A task I had to do is to build any KDE application from git. As I have mostly worked with Cantor (and even written a blogpost about it) I of course chose this app. As a beginner, compared to other people in the KDE community I had no clue where to download the Cantor source. One question in the Telegram group and I directly got the git link.

From there on, I faced multiple problems I didn't expect.I just installed openSUSE on a virtual machine, so I realized that the software I needed wasn't even preinstalled. I though that git would have been enough popular to be installed directly when getting linux...

I even didn't know where to get git from, apart from the internet. People told me there is a 'software manager' (Yes I'm really a beginner).
So after some research, I found it, got git and cloned the Cantor source – just the very first step of everything. Reading the README for what I had to do then, I thought that it was pretty simple - 5 easy commands!

I just again got errors from the commands that some necessary packages and programs weren't installed like CMake and some other related stuff. Those errors said what is missing – but by the name the errors called it, it wasn't existing in the software manager. After asking the KDE community again, I found out that the names of the packages differ between the linux system used – but the errors don't.
Finding the needed packages and installing all those 'necessary things' took me so long. But (taking me 3 days) I managed to do it, so here to full instruction on building Cantor, and any other KDE application from git on openSUSE:


sudo zypper install git

git clone  git://anongit.kde.org/cantor.git

cd Cantor

Then follow the commands in the README:

mkdir build
(creates build directory)
cd build

(locate into it)
----
For the next step you will need to go to your software manager YaST2 and search for and install the following:
-cmake
(-cmake gui if you want, but not necessary)
-extra cmake modules (ecm)
-Qt5
-Qt5svg
----
Then you can keep going:

cmake-DCMAKE_INSTALL_PREFIX=/Another/directory /where/tohave/thefinished/program -DCMAKE_BUILD_TYPE=debugfull

Those are the final two commands:

make
sudo make install


Keep in mind that sudo gives you administrator permissions and you will have to type in the root password.

And that was it! You can now jsut locate to the directory you set in the cmake -DCMAKE_INSTALL_PREFIX command and start Cantor!

This beginner task is meant to be 'done in 3 hours' – Google. Well, I guess this evaluation might be for more experienced linux users because altogether it took me like 3 days :(.
I was really happy when everything worked: I could just start the program and use this comfortable environment: Because with Cantor, there is no need for setting up some other graphic libraries or something like that. You just type in the few command lines, press the button and everything works :) .

Although I felt like an idiot, not knowing basics of linux (whole life usage of windows) I feel that I'm getting used to it and am glad I accepted this task as it teaches me working with this OS.


Mittwoch, 6. Januar 2016

Creating lessons with Cantor


As a student from the competition Google Code In, I saw that there is a task to create lessons in Cantor. Although I haven’t worked with this KDE software before, I accepted the task.

First of all I wanted to test some examples to get an overview of how Cantor works. Having no idea, I downloaded some of them and tried using them, without even knowing what a backend is. Of course it didn’t work and I was getting errors I’ve never heard of and there was text displayed I didn’t know what to do with.

After spending a bit more time on this program, I figured out that it is actually pretty simple: You choose the backend (programming language) and simply type commands, like for example plot(3x…) in and Cantor executes them. When I knew this I found it really easy to create my 2 lessons: Trigonometric – and Polynomial Functions. All I had to do is to type the functions in a specific format in and they were instantly plotted after just clicking “Evaluate Worksheet” – no other configurations and settings!


I successfully finished the task with the math knowledge from school. I’m happy I got through this and now know another program I might need in the future.

Mittwoch, 30. Dezember 2015

My experience with WikiToLearn


My experience with WikiToLearn

When I first started with Google Code In, I thought that it would be about work that is done fast and easy. With that attitude I had to abandon my first task at a random company (I don't remember). Seeing that this contest is pretty advanced, I looked for a task that fit to my programming skills which brought me to WikiToLearn: My first task was to run W2L locally so I can edit a part of the website.
I had to face many errors and even bugs which resulted that it took me quite a long time to figure out how to complete it. I asked in the comments and got surprisingly fast help. I got involved in the community:
Seriously one of the best communities I've ever had (and I can say that as an “independent“ student).

The WikiToLearn Google Code In Telegram group

I got much help, so then, I was able to do the task without big issues.
My next task was an explanation video on how to write a course in W2L, which I completed successfully. My third task though was to write a WikiBot. I wanted to display text at the talk page of a user – using python (pywikibot). The documentation wasn't really helpful, especially not for my operating system OS X, so I wasn't able to even test the library yet.
Together with my mentor Cristian we were still able to get through the configuration of the library. I was really happy when the first script worked. Finishing it into what I wanted to be I was really proud that I completed this complex task.

So overall they helped me a lot. Whenever someone has a problem, they take their time for you and even test your code.
Anyway I would definitely not say that the work is “easy“. The tasks aren't just “work that must be done” - they require to think yourself, to search for a solution to a problem that isn't even mentioned in the task. Those exercises and this great community motivated me to work with them.

WikiToLearn itself isn't that big yet. When you work at something together with the community, you get the feeling that you are part of them – when you succeed
you see how W2L grows.

I'm pretty sure that W2L will “explode” with it's open source principle. At one point, when it is kind of “ready” for users, it will definitely grow very very fast.

Until then, there is still a lot of work to get done and I'm happy to be part of WikiToLearn while watching it expand :).