GSoC 2020 and KDE

Tomorrow (29/06/2020) begins the first evaluation of the Google Summer of Code 2020. Last GSoC, when I was participating as a student, I wrote in my final report a set of future proposals that could be done in the ROCS graph IDE (Section What’s Next?). This year, some students got interested in these ideas but only one could enter the program (we didn’t have enough mentors for more than one project). Here are the list that I proposed:

  • Implementation of a better algorithm to position the nodes and edges on the plane. I can recommend the use of Force-directed graph drawing algorithms, because they are usually fast and are physics-based;
  • Create a better interface workflow for the program. I can recommend something like the Possible New Configuration image. This configuration consider that the user will spend most part of the time programming, so it creates a better writing space, while the view has a more square shape, which is (in my opinion), better for visualization;
  • Remodelation of how each graph is represented in the javascript code. The type system is good to provide a global configuration, but I think it falls apart when dealing with individual edges and dynamic creation of subgraphs and new edges/nodes (which is needed in some algorithms);
  • Rewrite the view to deal with some problems related to the space of the graphs that is really limited, mouse clicks not working correctly and bad navigation;
  • Change how the icons are used by the ROCS, as some icons don’t have cross-compatibility between some systems.

From this list, Dilson decided to tackle the first one listed. Here is his proposal. Most of the best algorithms involves some type of heuristic inspired in physical motions in the graph, being really fast and good in most graph classes (although there is specialized algorithms for some graph classes). You can see more of his work here. He is doing a great job by showing a good understanding of the algorithms and methods while giving a great amount of thought in the test process (as it is not trivial to test random algorithms).

For now, he implemented a layout algorithm that is an adaptation of the Fruchtermani-Reingold algorithm that works only on connected graphs in a special plugin that controls each physical forces inside the model. I will be giving some updates on his work sparsely in this blog. Please check his blog for more details if interested. :)

Improvements and Future

This is a special post to mark a new version of this blog. New posts will now have a set of tags associated and these tags have their own page where it is possible to see all related posts. Besides this, I can generate rss feeds for specific tags, like the special KDE rss feed that is linked direct to the KDE Planet site. The old generic feed still works. There also possibility to add comments with disqus , but it will be deactivated for now, as I don’t want to pay for a plan or have ads in my personal blog.

All of this is done to let me write about more than KDE, expanding the subjects of this site to my personal projects and my life. For some time I wanted a place to write freely about what I wanted to do now and in the future, and this is a place for this. So, I am not only trying to improve the blog, but also myself. To become a better programmer, a better researcher and a better human overall.

But, for now, let us talk about the future. I am in the end of my masters degree and the future is uncertain for me. Trying to enter a PhD, writing my dissertation, trying to find a job to add to my curriculum, mentoring a student in the Google Summer of Code 2020, trying to maintain my personal projects and keeping my personal life in check takes a toll on the mind and body (and the pandemic does not really help much).


When the pandemic began, I was having serious problems in keeping up the same amount of work that I was doing before. But, as the weeks went on, I developed some techniques to overcome my limitations: First, I needed to explicitly list what I was going to do everyday with a flexible and simple system of markings that permitted me to postpone some checks and mark a work as half done (I used a very nice handmade notebook that I bought some time ago). Second, I needed to divide my room space into places where I could work, have fun and sleep, based on this video. While I already did some of that before, this time I had to be more strict to myself.

But then, I had to face against my worst enemy: A good sleep time schedule. Keeping bad sleep schedules and working in the worst possible hours always have been my worst problem since as a child. Although I did not yet fully fixed this, I am way better nowadays. I applied some rules to my day-to-day life that helped a lot (I do not remember from where I saw this for the first time):

  • Stick to your plan;
  • Give yourself time for adequate sleep;
  • Maintain a strict and consistent sleep schedule;
  • Don’t vary by more than 60 minutes on the weekends;
  • Limit caffeine after lunch;
  • Create a relaxing night time routine;
  • Avoid electronics, bright lights and stress before bed;
  • keep your bedroom quiet, dark and cool;

I adopted blue light filters to almost all electronics that I own and I am limiting my caffeine intake to just one mug in the morning. The problem is the relapses that occur when I feel that I am more anxious about my future or personal problems. I still don’t know how to properly fix this and maybe I will have to go to see a professional, but for now is good enough, as this last weeks I seem to be maintaining a good morning routine. I am a lover of breakfasts (a good coffee, some bread & butter in a good morning sun and cold breeze), so these last days have been great.

In future posts I will describe better my personal project and goals, but I will list some of my interests and goals for now:

  • Finish my master’s (PRIORITY);
  • Finish this years GSoC with success for me and my student (PRIORITY);
  • Finish some planned papers;
  • Go back to working in the Graph Isomorphism problem;
  • Submit PhD applications;
  • Submit job applications;
  • Focus on my old Automated Greenhouse project (future posts);
  • Focus on the SwarmBot project (future posts);
  • Help the Hackerspace Maringá in some projects and improvements;
  • Finish 2020 still sane and alive (PRIORITY?)

There is many things to be done, but so little time. Thank you for whoever read this post, stay well.

Discipline and clarity of mind for a better tomorrow.

Lakademy 2019

I’m now writing this post in the last hours of the Lakademy 2019 (and my first one). It was really good to be “formally” introduced to the community and it’s people, and to be in this environment of people wanting to collaborate to something as incredible as KDE. Althought I wanted to contribute more to other projects, I did some changes and fixes in the rocs, wrote my Season of KDE project and got some tasks that can help with the future of rocs.


This event showed me the passion that even the most veteran members have for the software, and how, even after years of collaboration, they are still teaching new members and putting everything they got to create better softwares for everyone. On the other side, seeing the new members collaborating for the first time with such desire to share and learn helped me with the energy to help more.


I just have to thanks KDE for everything they provided to me during these months of Google Summer of Code, for the help to come to Salvador to be a part of this community and for the good laughs. It was incredible! To the next Lakademy and (i hope so) Akademy. :)

Special thanks to Tomaz, that introduced me to KDE!

First Day of Lakademy

And Lakademy is finally here! This is not my first direct interaction with a KDE member, but I was sort of nervous to met many members at once, since it has been less than a year that I began contributing to KDE. As I got off the plane I got to know a member of the translation team with a KDE t-shirt and talked to him (he came in the same plane with me), and he introduced me to other members. We got to the hostel and, as we arrived one day earlier, we went out to drink, talk and eat acarajé (which was incredible). It was a nice evening and I got to know better the most veteran and new members.


Next day, we got up early to move to the Universidade Federal da Bahia and began the Lakademy. Some members went to buy groceries and some went directly and prepared the room. After a round of presentations, Lakademy was declared online! I spent most of the time reviewing ROCS code and wrote some fixes for redundant code and a problem with the interface that was introduced in one of the last commits. After that, I listed some tasks that could be done this week. We finished the first day of Lakademy sharing what we did and went back to the hostel to prepare to have dinner and some fun in Salvador. :)


Looking forward for the next days!

Step-by-Step Execution and Examples

Last week I finished writing all the new examples for the ROCS, together with a little description of each commented in the beginning of the code. The following examples were implemented:

  • Breadth First Search;
  • Depth First Search;
  • Topological Sorting Algorithm;
  • Kruskal Algorithm;
  • Prim Algorithm;
  • Dijkstra Algorithm;
  • Bellman-Ford Algorithm;
  • Floyd-Warshall Algorithm;
  • Hopcroft-Karp Bipartite Matching Algorithm.

It is good to note that while Prim algorithm and BFS were already in rocs, they were broken and could not be run. The following image is an example of a simple description of an algorithm:


About the step-by-step execution, I am considering our possibilities. My first idea was to take a look into the debugger for the QScriptEngine class, which is the QScriptEngineDebugger class. An instance of this class can be attached to our script engine, and it provides the programmer with a interface with all the necessary tools.

Although useful, I personally think our rocs don’t need all this tools. (but they can be provided separately) There are 3 ways to stop the code execution using this debugger:

  • By an not treated Exception inside the javascript code;
  • By a call to the debugger instruction, that automatically invokes the debugger interface;
  • By a breakpoint, that can be put in any line of the javascript code.

The first one is not really useful for us, as it halts the code execution. The second and the third can be really useful couple with an Continue command. But the second invokes the full debugger interface, which we don’t really want.


So, by using the third one, we can stop the execution in any line of the javascript code and create a step button with the Continue command to continue executing the code. The only problem is how to add the breakpoints, as there is no direct function to add them, and usually the programmer has to use the ConsoleWidget interface or the BreakpointsWidget to do this. The following image shows the Continue button, which is already working:


But the challenge of adding the breakpoints still remains. One of my ideas is to modify the code editor to accept an click on the line number bar, which triggers an signal to add/remove an breakpoint to that line. This is an clean alternative for me. But for that I have to check if the KTextEditor have this type of signal and create a way to add breakpoints in the code by function.